diff options
| author | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-11 12:45:53 -0500 |
|---|---|---|
| committer | Naveed Massjouni <naveedm9@gmail.com> | 2011-03-11 12:45:53 -0500 |
| commit | a5415e8fc40eaa82761532e5ba83c3800cf9ed78 (patch) | |
| tree | 5128865a4acf58d774e78fed48df9001089834ba /nova/api | |
| parent | 76b5871adbb1bfc2e3d2a1151a00fa654c45953d (diff) | |
Need to set version to '1.0' in the nova.context in test code for tests to be
happy.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/auth.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index 320443935..8461a8059 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -57,8 +57,9 @@ class AuthMiddleware(wsgi.Middleware): return faults.Fault(webob.exc.HTTPUnauthorized()) project = self.auth.get_project(FLAGS.default_project) + version = req.path.split('/')[1].replace('v', '') req.environ['nova.context'] = context.RequestContext(user, project, - version=req.script_name.replace('/v', '')) + version=version) return self.application def has_authentication(self, req): |
