summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/wsgi.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py
index 91eeef4b1..03674d767 100644
--- a/nova/api/openstack/wsgi.py
+++ b/nova/api/openstack/wsgi.py
@@ -60,6 +60,15 @@ _MEDIA_TYPE_MAP = {
'application/atom+xml': 'atom',
}
+# These are typically automatically created by routes as either defaults
+# collection or member methods.
+_ROUTES_METHODS = [
+ 'create',
+ 'delete',
+ 'show',
+ 'update',
+]
+
class Request(webob.Request):
"""Add some OpenStack API-specific logic to the base webob.Request."""
@@ -998,8 +1007,7 @@ class Resource(wsgi.Application):
meth = getattr(self.controller, action)
except AttributeError:
if (not self.wsgi_actions or
- action not in ['action', 'create', 'delete', 'update',
- 'show']):
+ action not in _ROUTES_METHODS + ['action']):
# Propagate the error
raise
else: