diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-10 17:15:28 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-11 16:51:52 -0500 |
| commit | 574166045c6d4b7d8f5e2afeaa6d13aabf03bdb0 (patch) | |
| tree | 6a87438297d2cc4bc3a9b9a82663567e6352790d /nova/compute | |
| parent | bf7b89d577a9fbe8d25c3db2deae926d852d8bcc (diff) | |
Converting rescue/unrescue to use instance objects
Related to blueprint internal-uuids
Change-Id: If256d9a1251e780ff044bd87e0805c9f511c05e9
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 6 |
1 files changed, 4 insertions, 2 deletions
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, |
