summaryrefslogtreecommitdiffstats
path: root/openstack/common/extensions.py
diff options
context:
space:
mode:
authorGary Kotton <gkotton@redhat.com>2012-06-17 04:05:37 -0400
committerGary Kotton <gkotton@redhat.com>2012-06-18 01:15:09 -0400
commit9f938720f158889252fa1db44be96745fa48e1ff (patch)
tree5383ca2084fc6e188c59bef6224c78b2719a5ed9 /openstack/common/extensions.py
parent925edb3ee8bbd97afaa43b2888ab45d2bca50faf (diff)
downloadoslo-9f938720f158889252fa1db44be96745fa48e1ff.tar.gz
oslo-9f938720f158889252fa1db44be96745fa48e1ff.tar.xz
oslo-9f938720f158889252fa1db44be96745fa48e1ff.zip
Update common code to support pep 1.3.
bug 1014216 Change-Id: I3f8fa2e11c9d3f3d34fb20f65ce886bb9c94463d
Diffstat (limited to 'openstack/common/extensions.py')
-rw-r--r--openstack/common/extensions.py33
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]