summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2011-11-11 22:03:42 +0000
committerGerrit Code Review <review@openstack.org>2011-11-11 22:03:42 +0000
commit4efb01f4cbcf29150bdaa608242605a6dfef4140 (patch)
treec47285c206d90d738ae32a838aa065cf09994920 /nova/compute
parent45af0a0ac8ed37be9e62fd5a92dbe96517da0517 (diff)
parent574166045c6d4b7d8f5e2afeaa6d13aabf03bdb0 (diff)
Merge "Converting rescue/unrescue to use instance objects"
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index 7e17c8819..5ec19b859 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -1416,8 +1416,9 @@ class API(base.Base):
self._cast_compute_message('resume_instance', context, instance_id)
@scheduler_api.reroute_compute("rescue")
- def rescue(self, context, instance_id, rescue_password=None):
+ def rescue(self, context, instance, rescue_password=None):
"""Rescue the given instance."""
+ instance_id = instance['uuid']
self.update(context,
instance_id,
vm_state=vm_states.ACTIVE,
@@ -1430,8 +1431,9 @@ class API(base.Base):
params=rescue_params)
@scheduler_api.reroute_compute("unrescue")
- def unrescue(self, context, instance_id):
+ def unrescue(self, context, instance):
"""Unrescue the given instance."""
+ instance_id = instance['uuid']
self.update(context,
instance_id,
vm_state=vm_states.RESCUED,