summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-08-08 14:07:03 +0000
committerEd Leafe <ed@leafe.com>2011-08-08 14:07:03 +0000
commit10ab2e76b1ea8bbbb6bff4ccaf506bfdd5b57388 (patch)
treec61d801ff6e5754e0994fadd8d4db0f3661f4c53 /nova/compute
parentf1f86d229cff084a3f6257565a991c7ffe010907 (diff)
parentdcac4bc6c7be9832704e37cca7ce815e083974f5 (diff)
Updated with code changes on LP
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py8
-rw-r--r--nova/compute/manager.py8
2 files changed, 8 insertions, 8 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 308454d99..d5d66fa57 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -999,10 +999,10 @@ class API(base.Base):
return self._call_compute_message("set_host_enabled", context,
instance_id=None, host=host, params={"enabled": enabled})
- def set_host_powerstate(self, context, host, state):
- """Reboots or shuts down the host."""
- return self._call_compute_message("set_host_powerstate", context,
- instance_id=None, host=host, params={"state": state})
+ 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})
@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 8c0fa6232..4908cba97 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -958,10 +958,10 @@ class ComputeManager(manager.SchedulerDependentManager):
result))
@exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
- def set_host_powerstate(self, context, instance_id=None, host=None,
- state=None):
- """Reboots or shuts down the host."""
- return self.driver.set_host_powerstate(host, state)
+ def host_power_action(self, context, instance_id=None, 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,