def start(self): super(Dispatcher, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start()
def start(self): super(Dispatcher, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start()
def start(self): super(HealthManager, self).start() self.target = messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc.get_rpc_server(self.target, self) server.start() self.TG.add_timer(cfg.CONF.periodic_interval, self._dummy_task) self._load_runtime_registry()
def start(self): super(HealthManager, self).start() self.target = messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc.get_rpc_server(self.target, self) server.start() self.TG.add_timer(cfg.CONF.periodic_interval, self._dummy_task) self._load_runtime_registry()
def start(self): super(HealthManager, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start() self._load_runtime_registry() self.start_periodic_tasks()
def start(self): super(HealthManager, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start() self._load_runtime_registry() self.start_periodic_tasks()
def start(self): """Start the health manager RPC server. Note that the health manager server uses JSON serializer for parameter passing. We should be careful when changing this interface. """ super(HealthManager, self).start() self.target = messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc.get_rpc_server(self.target, self) server.start() self.TG.add_timer(cfg.CONF.periodic_interval, self._dummy_task)
def start(self): """Start the dispatcher. Note that dispatcher is an engine-internal server, we are not using versioned object for parameter passing. """ super(Dispatcher, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = messaging.get_rpc_server(self.target, self) server.start()
def start(self): super(Health_Manager, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start() if self.periodic_enable: # if self.periodic_fuzzy_delay: # initial_delay = random.randint(0, self.periodic_fuzzy_delay) # else: # initial_delay = None self.threadgroup.add_timer(self.periodic_interval_max, self.periodic_tasks)
def start(self): super(Health_Manager, self).start() self.target = oslo_messaging.Target(server=self.engine_id, topic=self.topic, version=self.version) server = rpc_messaging.get_rpc_server(self.target, self) server.start() if self.periodic_enable: # if self.periodic_fuzzy_delay: # initial_delay = random.randint(0, self.periodic_fuzzy_delay) # else: # initial_delay = None self.threadgroup.add_timer(self.periodic_interval_max, self.periodic_tasks)
def test_get_rpc_server_with_serializer(self, mock_json_serializer, mock_context_serializer, mock_get_rpc_server): x_target = mock.Mock() x_endpoint = mock.Mock() x_serializer = mock.Mock() x_context_serializer = mock.Mock() mock_context_serializer.return_value = x_context_serializer x_rpc_server = mock.Mock() mock_get_rpc_server.return_value = x_rpc_server res = messaging.get_rpc_server(x_target, x_endpoint, serializer=x_serializer) self.assertEqual(x_rpc_server, res) self.assertEqual(0, mock_json_serializer.call_count) mock_context_serializer.assert_called_once_with(x_serializer) mock_get_rpc_server.assert_called_once_with( messaging.TRANSPORT, x_target, [x_endpoint], executor='eventlet', serializer=x_context_serializer)
def start(self): super(HealthManagerService, self).start() self.service_id = uuidutils.generate_uuid() self.health_registry = health_manager.RuntimeHealthRegistry( ctx=self.ctx, engine_id=self.service_id, thread_group=self.tg) # create service record ctx = senlin_context.get_admin_context() service_obj.Service.create(ctx, self.service_id, self.host, self.service_name, self.topic) self.tg.add_timer(CONF.periodic_interval, self.service_manage_report) self.target = messaging.Target(server=self.service_id, topic=self.topic, version=self.version) self.server = rpc.get_rpc_server(self.target, self) self.server.start() self.tg.add_dynamic_timer(self.task, None, cfg.CONF.periodic_interval)
def start(self): """Start the engine. Note that the engine is an internal server, we are not using versioned object for parameter passing. """ super(EngineService, self).start() self.service_id = uuidutils.generate_uuid() self.target = oslo_messaging.Target(server=self.service_id, topic=self.topic, version=self.version) self.server = messaging.get_rpc_server(self.target, self) self.server.start() # create service record ctx = senlin_context.get_admin_context() service_obj.Service.create(ctx, self.service_id, self.host, self.service_name, self.topic) self.tg.add_timer(CONF.periodic_interval, self.service_manage_report)