diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-10 23:36:17 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-16 13:03:12 -0800 |
| commit | 1dba0cdc332e54162dc1d880e80deca968dbff4e (patch) | |
| tree | c479c43014bbd5ca876152279867130168c206d6 /nova/compute | |
| parent | 3278f4d72f369403395b745987d7e80330817e6a (diff) | |
Convert remaining calls to use instance objects
Related to blueprint internal-uuids. This touches get_diagnostics,
get_actions, and restore.
Change-Id: Ic4b3d9476fb53cb97b4ea75ad2e846374b2b4a41
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/api.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 2a0685fc2..ffd2efd29 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -827,9 +827,9 @@ class API(base.Base): self._delete(context, instance) @scheduler_api.reroute_compute("restore") - def restore(self, context, instance_id): + def restore(self, context, instance): """Restore a previously deleted (but not reclaimed) instance.""" - instance = self._get_instance(context, instance_id, 'restore') + instance_id = instance['id'] if not _is_queued_delete(instance): return @@ -846,7 +846,7 @@ class API(base.Base): instance_id, task_state=task_states.POWERING_ON) self._cast_compute_message('power_on_instance', context, - instance_id, host) + instance_id, host) @scheduler_api.reroute_compute("force_delete") def force_delete(self, context, instance): @@ -1370,15 +1370,15 @@ class API(base.Base): context, host=host, params={"action": action}) @scheduler_api.reroute_compute("diagnostics") - def get_diagnostics(self, context, instance_id): + def get_diagnostics(self, context, instance): """Retrieve diagnostics for the given instance.""" return self._call_compute_message("get_diagnostics", context, - instance_id) + instance['id']) - def get_actions(self, context, instance_id): + def get_actions(self, context, instance): """Retrieve actions for the given instance.""" - return self.db.instance_get_actions(context, instance_id) + return self.db.instance_get_actions(context, instance['id']) @scheduler_api.reroute_compute("suspend") def suspend(self, context, instance): |
