summaryrefslogtreecommitdiffstats
path: root/keystone/policy
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-18 14:43:26 +0000
committerGerrit Code Review <review@openstack.org>2012-12-18 14:43:26 +0000
commit7db702cab1f2cad8160aeadc8c1ae27853b8a34c (patch)
treef32a70911922dcd4b21a71d1277e1073ba6214b2 /keystone/policy
parentede7e209bded5494a2453485e619b7b81f23cf3a (diff)
parentfb963a560939e6be8c98d74e5555de7283173e32 (diff)
downloadkeystone-7db702cab1f2cad8160aeadc8c1ae27853b8a34c.tar.gz
keystone-7db702cab1f2cad8160aeadc8c1ae27853b8a34c.tar.xz
keystone-7db702cab1f2cad8160aeadc8c1ae27853b8a34c.zip
Merge "module refactoring"
Diffstat (limited to 'keystone/policy')
-rw-r--r--keystone/policy/__init__.py1
-rw-r--r--keystone/policy/routers.py22
2 files changed, 23 insertions, 0 deletions
diff --git a/keystone/policy/__init__.py b/keystone/policy/__init__.py
index 3379c617..8012515a 100644
--- a/keystone/policy/__init__.py
+++ b/keystone/policy/__init__.py
@@ -16,3 +16,4 @@
from keystone.policy.core import *
from keystone.policy import controllers
+from keystone.policy import routers
diff --git a/keystone/policy/routers.py b/keystone/policy/routers.py
new file mode 100644
index 00000000..6c050757
--- /dev/null
+++ b/keystone/policy/routers.py
@@ -0,0 +1,22 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+from keystone.policy import controllers
+from keystone.common import router
+
+
+def append_v3_routers(mapper, routers, apis):
+ policy_controller = controllers.PolicyV3(**apis)
+ routers.append(router.Router(policy_controller, 'policies', 'policy'))