From 574166045c6d4b7d8f5e2afeaa6d13aabf03bdb0 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 10 Nov 2011 17:15:28 -0500 Subject: Converting rescue/unrescue to use instance objects Related to blueprint internal-uuids Change-Id: If256d9a1251e780ff044bd87e0805c9f511c05e9 --- nova/compute/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nova/compute') diff --git a/nova/compute/api.py b/nova/compute/api.py index ab81dfbd7..01ae6f3f8 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, -- cgit