diff --git a/nova/cells/messaging.py b/nova/cells/messaging.py index 87f691e34ea8..37ede57fb379 100644 --- a/nova/cells/messaging.py +++ b/nova/cells/messaging.py @@ -750,7 +750,7 @@ class _TargetedMessageMethods(_BaseMessageMethods): def service_delete(self, message, service_id): """Deletes the specified service.""" - self.host_api.service_delete(message.ctxt, service_id) + self.host_api._service_delete(message.ctxt, service_id) def proxy_rpc_to_manager(self, message, host_name, rpc_message, topic, timeout): diff --git a/nova/compute/api.py b/nova/compute/api.py index ea13efc18fa2..e2369620b5f1 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -3372,9 +3372,13 @@ class HostAPI(base.Base): service.save() return service + def _service_delete(self, context, service_id): + """Performs the actual Service deletion operation.""" + objects.Service.get_by_id(context, service_id).destroy() + def service_delete(self, context, service_id): """Deletes the specified service.""" - objects.Service.get_by_id(context, service_id).destroy() + self._service_delete(context, service_id) def instance_get_all_by_host(self, context, host_name): """Return all instances on the given host."""