diff options
| author | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-17 04:32:24 -0400 |
|---|---|---|
| committer | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-17 04:32:24 -0400 |
| commit | 05ca6e24d4a3cf64bbe371f1c9c74088110eba68 (patch) | |
| tree | c8d29968e48298de7e2a093bcf476d4d55d2686e /nova/api | |
| parent | 59937e9f49b14ee592dd08ef9eb8febdc9a32c51 (diff) | |
Setting the api verion in the request in the auth middle is no longer needed.
Also, common.get_api_version is no longer needed.
As Eric Day noted, having versioned controllers will make that unnecessary.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/auth.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/common.py | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index 6f1cf5e63..4c6b58eff 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -69,8 +69,6 @@ class AuthMiddleware(wsgi.Middleware): return faults.Fault(webob.exc.HTTPUnauthorized()) req.environ['nova.context'] = context.RequestContext(user, account) - version = req.path.split('/')[1].replace('v', '') - req.environ['api.version'] = version return self.application def has_authentication(self, req): diff --git a/nova/api/openstack/common.py b/nova/api/openstack/common.py index d6679de01..74ac21024 100644 --- a/nova/api/openstack/common.py +++ b/nova/api/openstack/common.py @@ -74,7 +74,3 @@ def get_image_id_from_image_hash(image_service, context, image_hash): if abs(hash(image_id)) == int(image_hash): return image_id raise exception.NotFound(image_hash) - - -def get_api_version(req): - return req.environ.get('api.version') |
