def start(): """ Start the agent services. """ url = get_url() Services.reply_handler = ReplyHandler(url) Services.reply_handler.start() _logger.info(_('AMQP reply handler started'))
def __init__(self, consumer, **details): """ :param consumer: A consumer DB model object. :type consumer: dict :param details: A dictionary of information to be round-tripped. Primarily used to correlate asynchronous replies. :type details: dict """ self.address = "pulp.agent.%s" % consumer["id"] self.secret = str(consumer["_id"]) self.url = get_url() self.details = details self.reply_queue = ReplyHandler.REPLY_QUEUE self.authenticator = Authenticator() self.authenticator.load()
def __init__(self, consumer, **details): """ :param consumer: A consumer DB model object. :type consumer: dict :param details: A dictionary of information to be round-tripped. Primarily used to correlate asynchronous replies. :type details: dict """ self.address = 'pulp.agent.%s' % consumer['id'] self.secret = str(consumer['_id']) self.url = get_url() self.details = details self.reply_queue = ReplyHandler.REPLY_QUEUE self.authenticator = Authenticator() self.authenticator.load()
def test_get_url(self): url = messaging['url'] adapter = messaging['transport'] self.assertEqual('+'.join((adapter, url)), get_url())