Пример #1
0
    def __init__(self, conf):
        pool_size = conf.keystone_notifications.thread_pool_size
        NotificationTask.__init__(self, conf)
        service.Service.__init__(self, threads=pool_size)

        self.target = queue.get_notification_target()
        self._msg_server = queue.get_notification_server(targets=[self.target], endpoints=[self])
Пример #2
0
    def __init__(self, conf):
        pool_size = conf.keystone_notifications.thread_pool_size
        NotificationTask.__init__(self, conf)
        service.Service.__init__(self, threads=pool_size)

        self.target = queue.get_notification_target()
        self._msg_server = queue.get_notification_server(targets=[self.target],
                                                         endpoints=[self])
Пример #3
0
 def test_keystone_notification_config_used(self):
     topic = "my test topic"
     exchange = "my test exchange"
     version = " my test version"
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, topic=topic)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, control_exchange=exchange)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, version=version)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, version=version)
     target = queue.get_notification_target()
     self.assertEqual(topic, target.topic)
     self.assertEqual(exchange, target.exchange)
     self.assertEqual(version, target.version)
Пример #4
0
 def test_keystone_notification_config_used(self):
     topic = 'my test topic'
     exchange = 'my test exchange'
     version = ' my test version'
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, topic=topic)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME,
                       control_exchange=exchange)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, version=version)
     self.opt_in_group(queue.KS_NOTIFICATIONS_GRP_NAME, version=version)
     target = queue.get_notification_target()
     self.assertEqual(topic, target.topic)
     self.assertEqual(exchange, target.exchange)
     self.assertEqual(version, target.version)