summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/api/openstack/auth.py2
-rw-r--r--nova/api/openstack/servers.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index 7ae285019..6f1cf5e63 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -70,7 +70,7 @@ class AuthMiddleware(wsgi.Middleware):
req.environ['nova.context'] = context.RequestContext(user, account)
version = req.path.split('/')[1].replace('v', '')
- req.environ['nova.api.openstack.version'] = version
+ req.environ['api.version'] = version
return self.application
def has_authentication(self, req):
diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
index dc62882eb..818dd825f 100644
--- a/nova/api/openstack/servers.py
+++ b/nova/api/openstack/servers.py
@@ -57,11 +57,12 @@ class Controller(wsgi.Controller):
def ips(self, req, id):
try:
instance = self.compute_api.get(req.environ['nova.context'], id)
- builder = addresses_views.get_view_builder(req)
- return builder.build(instance)
except exception.NotFound:
return faults.Fault(exc.HTTPNotFound())
+ builder = addresses_views.get_view_builder(req)
+ return builder.build(instance)
+
def index(self, req):
""" Returns a list of server names and ids for a given user """
return self._items(req, is_detail=False)