@defer.inlineCallbacks
    def perspective_connector_add(self, ClientConfig):

        c = pickle.loads(ClientConfig)

        self.log.debug('Adding a new connector %s', c.id)

        if self.getConnector(c.id) is not None:
            self.log.error('Trying to add a new connector with an already existant cid: %s', c.id)
            defer.returnValue(False)
        if self.amqpBroker is None:
            self.log.error('AMQP Broker is not added')
            defer.returnValue(False)
        if self.amqpBroker.connected == False:
            self.log.error('AMQP Broker channel is not yet ready')
            defer.returnValue(False)

        # Declare queues
        # First declare the messaging exchange (has no effect if its already declared)
        yield self.amqpBroker.chan.exchange_declare(exchange='messaging', type='topic')
        # submit.sm queue declaration and binding
        submit_sm_queue = 'submit.sm.%s' % c.id
        routing_key = 'submit.sm.%s' % c.id
        self.log.info('Binding %s queue to %s route_key', submit_sm_queue, routing_key)
        yield self.amqpBroker.named_queue_declare(queue=submit_sm_queue)
        yield self.amqpBroker.chan.queue_bind(queue=submit_sm_queue,
                                              exchange="messaging",
                                              routing_key=routing_key)

        # Instanciate smpp client service manager
        serviceManager = SMPPClientService(c, self.config)

        # Instanciate a SM listener
        smListener = SMPPClientSMListener(
            SMPPClientSMListenerConfig=SMPPClientSMListenerConfig(self.config.config_file),
            SMPPClientFactory=serviceManager.SMPPClientFactory,
            amqpBroker=self.amqpBroker,
            redisClient=self.redisClient,
            RouterPB=self.RouterPB,
            interceptorpb_client=self.interceptorpb_client)

        # Deliver_sm are sent to smListener's deliver_sm callback method
        serviceManager.SMPPClientFactory.msgHandler = smListener.deliver_sm_event_interceptor

        self.connectors.append({
            'id':           c.id,
            'config':       c,
            'service':      serviceManager,
            'consumer_tag': None,
            'submit_sm_q':  None,
            'sm_listener':  smListener})

        self.log.info('Added a new connector: %s', c.id)

        # Set persistance state to False (pending for persistance)
        self.persisted = False

        defer.returnValue(True)
This will add a new connector to self.connectors
dataset/ETHPy150Open jookies/jasmin/jasmin/managers/clients.py/SMPPClientManagerPB.perspective_connector_add