diff options
Diffstat (limited to 'openstack/common/extensions.py')
-rw-r--r-- | openstack/common/extensions.py | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/openstack/common/extensions.py b/openstack/common/extensions.py index 162a02a..f2f5d81 100644 --- a/openstack/common/extensions.py +++ b/openstack/common/extensions.py @@ -220,15 +220,15 @@ class ExtensionMiddleware(wsgi.Middleware): if not action.collection in action_resources.keys(): resource = ActionExtensionResource(application) mapper.connect("/%s/:(id)/action.:(format)" % - action.collection, - action='action', - controller=resource, - conditions=dict(method=['POST'])) + action.collection, + action='action', + controller=resource, + conditions=dict(method=['POST'])) mapper.connect("/%s/:(id)/action" % - action.collection, - action='action', - controller=resource, - conditions=dict(method=['POST'])) + action.collection, + action='action', + controller=resource, + conditions=dict(method=['POST'])) action_resources[action.collection] = resource return action_resources @@ -240,21 +240,20 @@ class ExtensionMiddleware(wsgi.Middleware): if not req_ext.key in request_ext_resources.keys(): resource = RequestExtensionResource(application) mapper.connect(req_ext.url_route + '.:(format)', - action='process', - controller=resource, - conditions=req_ext.conditions) + action='process', + controller=resource, + conditions=req_ext.conditions) mapper.connect(req_ext.url_route, - action='process', - controller=resource, - conditions=req_ext.conditions) + action='process', + controller=resource, + conditions=req_ext.conditions) request_ext_resources[req_ext.key] = resource return request_ext_resources def __init__(self, application, config, ext_mgr=None): - ext_mgr = ext_mgr or ExtensionManager( - config['api_extensions_path']) + ext_mgr = ext_mgr or ExtensionManager(config['api_extensions_path']) mapper = routes.Mapper() # extended resources @@ -275,7 +274,7 @@ class ExtensionMiddleware(wsgi.Middleware): # extended actions action_resources = self._action_ext_resources(application, ext_mgr, - mapper) + mapper) for action in ext_mgr.get_actions(): LOG.debug(_('Extended action: %s'), action.action_name) resource = action_resources[action.collection] |