summaryrefslogtreecommitdiffstats
path: root/keystone/policy
diff options
context:
space:
mode:
authorAdam Gandelman <adamg@canonical.com>2012-03-13 16:23:45 -0700
committerAdam Gandelman <adamg@canonical.com>2012-03-14 11:30:02 -0700
commit9363d5fea676e1e083c5afe5287ef30c806046bf (patch)
tree9be554108ab100c0f645a92d770b661ed2cdb261 /keystone/policy
parentacc9f892b36aa7315ac84d1e7f6506a6fea9fbad (diff)
downloadkeystone-9363d5fea676e1e083c5afe5287ef30c806046bf.tar.gz
keystone-9363d5fea676e1e083c5afe5287ef30c806046bf.tar.xz
keystone-9363d5fea676e1e083c5afe5287ef30c806046bf.zip
Properly return 501 for unsupported Catalog calls
Similar to the other APIs, this creates a Driver class that describes expected functionality of the catalog driver and raises NotImplemented accordingly. NotImplementedError()'s are caught and returned as proper 501s instead of AttributeErrors. Also fixes some inconsistent paramters names in the sql backend. Fixes bug 954087 Update: Convert usage of NotImplementedError() to new keystone.exception.NotImplemented() for all unimplemented driver actions. Change-Id: I69d8e21a6f651e69b724ec5ed5784645bad80c00
Diffstat (limited to 'keystone/policy')
-rw-r--r--keystone/policy/core.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/keystone/policy/core.py b/keystone/policy/core.py
index a89c6083..a6dd00a1 100644
--- a/keystone/policy/core.py
+++ b/keystone/policy/core.py
@@ -17,6 +17,7 @@
"""Main entry point into the Policy service."""
from keystone import config
+from keystone import exception
from keystone.common import manager
@@ -42,4 +43,4 @@ class Driver(object):
For more information on a full implementation of this see:
`keystone.common.policy.enforce`.
"""
- raise NotImplementedError()
+ raise exception.NotImplemented()