コード例 #1
0
ファイル: services.py プロジェクト: taftsanders/pulp
 def start():
     """
     Start the agent services.
     """
     url = get_url()
     Services.reply_handler = ReplyHandler(url)
     Services.reply_handler.start()
     _logger.info(_('AMQP reply handler started'))
コード例 #2
0
ファイル: context.py プロジェクト: pcreech/pulp
 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()
コード例 #3
0
 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()
コード例 #4
0
 def test_get_url(self):
     url = messaging['url']
     adapter = messaging['transport']
     self.assertEqual('+'.join((adapter, url)), get_url())
コード例 #5
0
ファイル: test_connector.py プロジェクト: alanoe/pulp
 def test_get_url(self):
     url = messaging['url']
     adapter = messaging['transport']
     self.assertEqual('+'.join((adapter, url)), get_url())