Review fixes

This commit is contained in:
Ed Leafe
2011-08-08 17:34:42 +00:00
parent 586359f792
commit b23387ef7a
4 changed files with 6 additions and 8 deletions

View File

@@ -997,12 +997,12 @@ class API(base.Base):
def set_host_enabled(self, context, host, enabled): def set_host_enabled(self, context, host, enabled):
"""Sets the specified host's ability to accept new instances.""" """Sets the specified host's ability to accept new instances."""
return self._call_compute_message("set_host_enabled", context, 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): def host_power_action(self, context, host, action):
"""Reboots, shuts down or powers up the host.""" """Reboots, shuts down or powers up the host."""
return self._call_compute_message("host_power_action", context, 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") @scheduler_api.reroute_compute("diagnostics")
def get_diagnostics(self, context, instance_id): def get_diagnostics(self, context, instance_id):

View File

@@ -958,14 +958,12 @@ class ComputeManager(manager.SchedulerDependentManager):
result)) result))
@exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
def host_power_action(self, context, instance_id=None, host=None, def host_power_action(self, context, host=None, action=None):
action=None):
"""Reboots, shuts down or powers up the host.""" """Reboots, shuts down or powers up the host."""
return self.driver.host_power_action(host, action) return self.driver.host_power_action(host, action)
@exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
def set_host_enabled(self, context, instance_id=None, host=None, def set_host_enabled(self, context, host=None, enabled=None):
enabled=None):
"""Sets the specified host's ability to accept new instances.""" """Sets the specified host's ability to accept new instances."""
return self.driver.set_host_enabled(host, enabled) return self.driver.set_host_enabled(host, enabled)

View File

@@ -136,7 +136,7 @@ def host_shutdown(self, arg_dict):
@jsonify @jsonify
def host_start(self, arg_dict): 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. runs on the same machine as Xen.
""" """
return _power_action("startup") return _power_action("startup")