Merge "Tweaking 'global_tenant' parameter parsing"

This commit is contained in:
Jenkins 2015-02-25 20:27:23 +00:00 committed by Gerrit Code Review
commit 3dcfb64244
2 changed files with 7 additions and 3 deletions

View File

@ -238,7 +238,11 @@ class StackController(object):
"""
Lists summary information for all stacks
"""
global_tenant = bool(req.params.get('global_tenant', False))
global_tenant = False
if rpc_api.PARAM_GLOBAL_TENANT in req.params:
global_tenant = param_utils.extract_bool(
req.params.get(rpc_api.PARAM_GLOBAL_TENANT))
if global_tenant:
return self.global_index(req, req.context.tenant_id)

View File

@ -16,11 +16,11 @@ ENGINE_TOPIC = 'engine'
PARAM_KEYS = (
PARAM_TIMEOUT, PARAM_DISABLE_ROLLBACK, PARAM_ADOPT_STACK_DATA,
PARAM_SHOW_DELETED, PARAM_SHOW_NESTED, PARAM_EXISTING,
PARAM_CLEAR_PARAMETERS
PARAM_CLEAR_PARAMETERS, PARAM_GLOBAL_TENANT,
) = (
'timeout_mins', 'disable_rollback', 'adopt_stack_data',
'show_deleted', 'show_nested', 'existing',
'clear_parameters'
'clear_parameters', 'global_tenant'
)
STACK_KEYS = (