summaryrefslogtreecommitdiff
path: root/nova/api/auth.py
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2014-08-11 12:22:09 +0000
committerKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2014-08-27 05:52:32 +0000
commite6a642f07632a6233538ca5762cb1cca6e136e9f (patch)
tree579fa9c259bcc64bae1d50e8ca8b40e77c6960cf /nova/api/auth.py
parent3ab81c9b3eb87093b902c25e4edfc9eaf986356c (diff)
downloadnova-e6a642f07632a6233538ca5762cb1cca6e136e9f.tar.gz
Add v2.1 API router and endpoint
Now we have decided Nova v3 API interfaces are disabled and we will change v3 interfaces to v2 ones for using v3 infrastractures as v2.1 API. The big difference between v2 and v3 that v2 API URLs contain project-id but v3 ones don't contain it. This patch adds both an API router and an endpoint of v2.1 API to support API URLs containing project-id. This patch does not remove v3 API router and endpoint because v3 API tests use it now. After moving all v3 code to v2.1, we can remove them. Partially implements blueprint v2-on-v3-api Change-Id: Iee75fbd8951c9f246f68a9c75d762335fa5c4b4b
Diffstat (limited to 'nova/api/auth.py')
-rw-r--r--nova/api/auth.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/nova/api/auth.py b/nova/api/auth.py
index 710281a00d..43b4dbef88 100644
--- a/nova/api/auth.py
+++ b/nova/api/auth.py
@@ -75,11 +75,15 @@ def pipeline_factory(loader, global_conf, **local_conf):
return _load_pipeline(loader, pipeline)
-def pipeline_factory_v3(loader, global_conf, **local_conf):
+def pipeline_factory_v21(loader, global_conf, **local_conf):
"""A paste pipeline replica that keys off of auth_strategy."""
return _load_pipeline(loader, local_conf[CONF.auth_strategy].split())
+# NOTE(oomichi): This pipeline_factory_v3 is for passing check-grenade-dsvm.
+pipeline_factory_v3 = pipeline_factory_v21
+
+
class InjectContext(wsgi.Middleware):
"""Add a 'nova.context' to WSGI environ."""