Ejemplo n.º 1
0
 def test_get_sensors_notifier(self):
     rpc.SENSORS_NOTIFIER = mock.Mock(autospec=True)
     rpc.get_sensors_notifier(service='conductor',
                              host='my_conductor',
                              publisher_id='a_great_publisher')
     rpc.SENSORS_NOTIFIER.prepare.assert_called_once_with(
         publisher_id='a_great_publisher')
Ejemplo n.º 2
0
 def __init__(self, host, topic):
     super(BaseConductorManager, self).__init__()
     if not host:
         host = CONF.host
     self.host = host
     self.topic = topic
     self.sensors_notifier = rpc.get_sensors_notifier()
     self._started = False
Ejemplo n.º 3
0
 def __init__(self, host, topic):
     super(BaseConductorManager, self).__init__()
     if not host:
         host = CONF.host
     self.host = host
     self.topic = topic
     self.sensors_notifier = rpc.get_sensors_notifier()
     self._started = False
     self._shutdown = None
Ejemplo n.º 4
0
 def test_get_sensors_notifier(self):
     rpc.SENSORS_NOTIFIER = mock.Mock(autospec=True)
     rpc.get_sensors_notifier(service='conductor', host='my_conductor',
                              publisher_id='a_great_publisher')
     rpc.SENSORS_NOTIFIER.prepare.assert_called_once_with(
         publisher_id='a_great_publisher')