diff --git a/nova/compute/api.py b/nova/compute/api.py index d5d66fa571a4..d2c08678b8e8 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -997,12 +997,12 @@ class API(base.Base): def set_host_enabled(self, context, host, enabled): """Sets the specified host's ability to accept new instances.""" return self._call_compute_message("set_host_enabled", context, - instance_id=None, host=host, params={"enabled": enabled}) + host=host, params={"enabled": enabled}) def host_power_action(self, context, host, action): """Reboots, shuts down or powers up the host.""" return self._call_compute_message("host_power_action", context, - instance_id=None, host=host, params={"action": action}) + host=host, params={"action": action}) @scheduler_api.reroute_compute("diagnostics") def get_diagnostics(self, context, instance_id): diff --git a/nova/compute/manager.py b/nova/compute/manager.py index ecfbd3908d44..cb6617c331b1 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -958,14 +958,12 @@ class ComputeManager(manager.SchedulerDependentManager): result)) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) - def host_power_action(self, context, instance_id=None, host=None, - action=None): + def host_power_action(self, context, host=None, action=None): """Reboots, shuts down or powers up the host.""" return self.driver.host_power_action(host, action) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) - def set_host_enabled(self, context, instance_id=None, host=None, - enabled=None): + def set_host_enabled(self, context, host=None, enabled=None): """Sets the specified host's ability to accept new instances.""" return self.driver.set_host_enabled(host, enabled) diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index b549b33d1d1f..b913e764e3fb 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -1045,7 +1045,7 @@ class VMOps(object): xenapi_resp = self._call_xenhost("set_host_enabled", args) try: resp = json.loads(xenapi_resp) - except TypeError as e: + except TypeError as e: # Already logged; return the message return xenapi_resp.details[-1] return resp["status"] diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost index f6a9ac8d8db5..7bf507d0ff24 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost @@ -136,7 +136,7 @@ def host_shutdown(self, arg_dict): @jsonify def host_start(self, arg_dict): - """Starts the host. NOTE: Currently not feasible, since the host + """Starts the host. Currently not feasible, since the host runs on the same machine as Xen. """ return _power_action("startup")