summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorTrey Morris <trey.morris@rackspace.com>2011-02-14 12:32:33 -0600
committerTrey Morris <trey.morris@rackspace.com>2011-02-14 12:32:33 -0600
commit3f96e6dbf12533355aa6722eeb498814df076aea (patch)
treee02bdbc03996bb26143542cc33b3ee2bf0c34fac /nova/api
parent9c0862b5f84cdb09b7ab0aafca669d30f261a666 (diff)
downloadnova-3f96e6dbf12533355aa6722eeb498814df076aea.tar.gz
nova-3f96e6dbf12533355aa6722eeb498814df076aea.tar.xz
nova-3f96e6dbf12533355aa6722eeb498814df076aea.zip
added call to reset_network from openstack api down to vmops
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/servers.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 8cbcebed2..c604bd215 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -242,6 +242,20 @@ class Controller(wsgi.Controller):
return faults.Fault(exc.HTTPUnprocessableEntity())
return exc.HTTPAccepted()
+ def reset_network(self, req, id):
+ """
+ admin only operation which resets networking on an instance
+
+ """
+ context = req.environ['nova.context']
+ try:
+ self.compute_api.reset_network(context, id)
+ except:
+ readable = traceback.format_exc()
+ LOG.exception(_("Compute.api::reset_network %s"), readable)
+ return faults.Fault(exc.HTTPUnprocessableEntity())
+ return exc.HTTPAccepted()
+
def pause(self, req, id):
""" Permit Admins to Pause the server. """
ctxt = req.environ['nova.context']