diff options
| author | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-10 22:21:00 -0500 |
|---|---|---|
| committer | Brian Waldon <brian.waldon@rackspace.com> | 2011-11-14 15:25:28 -0800 |
| commit | 4201b019312aeae237d3a1175f501cbc0c235e3c (patch) | |
| tree | 3d03d4ebf9113531e6a1a87fbdba24a8b662a68d /nova/api | |
| parent | d9dd8f2fd395ad02e536d8054b0615520771b93e (diff) | |
Converting network methods to use instance objects
Related to blueprint internal-uuids
Change-Id: I04f8f855411658674441a8d0cb7b589dee8b36fa
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/contrib/admin_actions.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/api/openstack/contrib/admin_actions.py b/nova/api/openstack/contrib/admin_actions.py index 8ed0827b8..5e0c8571f 100644 --- a/nova/api/openstack/contrib/admin_actions.py +++ b/nova/api/openstack/contrib/admin_actions.py @@ -124,7 +124,8 @@ class Admin_actions(extensions.ExtensionDescriptor): """Permit admins to reset networking on an server""" context = req.environ['nova.context'] try: - self.compute_api.reset_network(context, id) + instance = self.compute_api.get(context, id) + self.compute_api.reset_network(context, instance) except Exception: readable = traceback.format_exc() LOG.exception(_("Compute.api::reset_network %s"), readable) @@ -138,7 +139,10 @@ class Admin_actions(extensions.ExtensionDescriptor): """Permit admins to inject network info into a server""" context = req.environ['nova.context'] try: - self.compute_api.inject_network_info(context, id) + instance = self.compute_api.get(context, id) + self.compute_api.inject_network_info(context, instance) + except exception.InstanceNotFound: + raise exc.HTTPNotFound(_("Server not found")) except Exception: readable = traceback.format_exc() LOG.exception(_("Compute.api::inject_network_info %s"), readable) |
