@@ -20,7 +20,7 @@ class OpenCTIConnectorHelper:
2020 :param rabbitmq_password: RabbitMQ password
2121 """
2222
23- def __init__ (self , identifier , config , rabbitmq_hostname , rabbitmq_port , rabbitmq_username , rabbitmq_password , log_level = 'info' ):
23+ def __init__ (self , identifier , connector_config , rabbitmq_config , log_level = 'info' ):
2424 # Configure logger
2525 numeric_level = getattr (logging , log_level .upper (), None )
2626 if not isinstance (numeric_level , int ):
@@ -30,11 +30,11 @@ def __init__(self, identifier, config, rabbitmq_hostname, rabbitmq_port, rabbitm
3030 # Initialize configuration
3131 self .connection = None
3232 self .identifier = identifier
33- self .config = config
34- self .rabbitmq_hostname = rabbitmq_hostname
35- self .rabbitmq_port = rabbitmq_port
36- self .rabbitmq_username = rabbitmq_username
37- self .rabbitmq_password = rabbitmq_password
33+ self .config = connector_config
34+ self .rabbitmq_hostname = rabbitmq_config [ 'hostname' ]
35+ self .rabbitmq_port = rabbitmq_config [ 'port' ]
36+ self .rabbitmq_username = rabbitmq_config [ 'username' ]
37+ self .rabbitmq_password = rabbitmq_config [ 'password' ]
3838 self .queue_name = 'import-connectors-' + self .identifier
3939 self .routing_key = 'import.connectors.' + self .identifier
4040
@@ -80,9 +80,9 @@ def send_stix2_bundle(self, bundle):
8080 self ._reconnect ()
8181
8282 # Validate the STIX 2 bundle
83- validation = validate_string (bundle )
84- if not validation .is_valid :
85- raise ValueError ('The bundle is not a valid STIX2 JSON:' + bundle )
83+ # validation = validate_string(bundle)
84+ # if not validation.is_valid:
85+ # raise ValueError('The bundle is not a valid STIX2 JSON:' + bundle)
8686
8787 # Prepare the message
8888 message = {
0 commit comments