summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorTrey Morris <trey.morris@rackspace.com>2011-02-17 19:32:30 +0000
committerTarmac <>2011-02-17 19:32:30 +0000
commit2b5866fb71e8d37835bf8b0778064ba53385b676 (patch)
tree9b9871ecd456bdf1c7a7fd66010c245eeb2fe472 /nova/api
parentd4de56f78c9b70b7a7d25e48e774155005c6cefa (diff)
parentea4d21b546d9447bac50cf97a62c11129da12d21 (diff)
downloadnova-2b5866fb71e8d37835bf8b0778064ba53385b676.tar.gz
nova-2b5866fb71e8d37835bf8b0778064ba53385b676.tar.xz
nova-2b5866fb71e8d37835bf8b0778064ba53385b676.zip
added labels to networks for use in multi-nic
added writing network data to xenstore param-list added call to agent to reset network added reset_network call to openstack api
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/__init__.py1
-rw-r--r--nova/api/openstack/servers.py14
2 files changed, 15 insertions, 0 deletions
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index 056c7dd27..dc3738d4a 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -79,6 +79,7 @@ class APIRouter(wsgi.Router):
server_members["actions"] = "GET"
server_members['suspend'] = 'POST'
server_members['resume'] = 'POST'
+ server_members['reset_network'] = 'POST'
mapper.resource("server", "servers", controller=servers.Controller(),
collection={'detail': 'GET'},
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index 17c5519a1..33cc3bbde 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -249,6 +249,20 @@ class Controller(wsgi.Controller):
return faults.Fault(exc.HTTPUnprocessableEntity())
return exc.HTTPAccepted()
+ def reset_network(self, req, id):
+ """
+ Reset networking on an instance (admin only).
+
+ """
+ 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']