diff --git a/heat/api/openstack/v1/stacks.py b/heat/api/openstack/v1/stacks.py index c86f17b13..e29ce0f7a 100644 --- a/heat/api/openstack/v1/stacks.py +++ b/heat/api/openstack/v1/stacks.py @@ -185,6 +185,7 @@ class StackController(object): 'sort_keys': 'multi', 'show_deleted': 'single', 'show_nested': 'single', + 'show_hidden': 'single', } params = util.get_allowed_params(req.params, whitelist) filter_params = util.get_allowed_params(req.params, filter_whitelist) @@ -194,6 +195,7 @@ class StackController(object): params[rpc_api.PARAM_SHOW_DELETED] = param_utils.extract_bool( params[rpc_api.PARAM_SHOW_DELETED]) show_deleted = params[rpc_api.PARAM_SHOW_DELETED] + show_nested = False if rpc_api.PARAM_SHOW_NESTED in params: params[rpc_api.PARAM_SHOW_NESTED] = param_utils.extract_bool( @@ -204,6 +206,12 @@ class StackController(object): if key in params: params[key] = param_utils.extract_int(key, params[key]) + show_hidden = False + if rpc_api.PARAM_SHOW_HIDDEN in params: + params[rpc_api.PARAM_SHOW_HIDDEN] = param_utils.extract_bool( + params[rpc_api.PARAM_SHOW_HIDDEN]) + show_hidden = params[rpc_api.PARAM_SHOW_HIDDEN] + # get the with_count value, if invalid, raise ValueError with_count = False if req.params.get('with_count'): @@ -227,7 +235,8 @@ class StackController(object): filters=filter_params, tenant_safe=tenant_safe, show_deleted=show_deleted, - show_nested=show_nested) + show_nested=show_nested, + show_hidden=show_hidden) except AttributeError as exc: LOG.warn(_LW("Old Engine Version: %s") % exc) diff --git a/heat/rpc/api.py b/heat/rpc/api.py index dbde05906..67e2be144 100644 --- a/heat/rpc/api.py +++ b/heat/rpc/api.py @@ -18,12 +18,12 @@ PARAM_KEYS = ( PARAM_TIMEOUT, PARAM_DISABLE_ROLLBACK, PARAM_ADOPT_STACK_DATA, PARAM_SHOW_DELETED, PARAM_SHOW_NESTED, PARAM_EXISTING, PARAM_CLEAR_PARAMETERS, PARAM_GLOBAL_TENANT, PARAM_LIMIT, - PARAM_NESTED_DEPTH, PARAM_TAGS + PARAM_NESTED_DEPTH, PARAM_TAGS, PARAM_SHOW_HIDDEN ) = ( 'timeout_mins', 'disable_rollback', 'adopt_stack_data', 'show_deleted', 'show_nested', 'existing', 'clear_parameters', 'global_tenant', 'limit', - 'nested_depth', 'tags' + 'nested_depth', 'tags', 'show_hidden' ) STACK_KEYS = ( diff --git a/heat/tests/test_api_openstack_v1.py b/heat/tests/test_api_openstack_v1.py index e5a7d2f74..308517982 100644 --- a/heat/tests/test_api_openstack_v1.py +++ b/heat/tests/test_api_openstack_v1.py @@ -607,7 +607,8 @@ class StackControllerTest(ControllerTest, common.HeatTestCase): filters=mock.ANY, tenant_safe=True, show_deleted=True, - show_nested=False) + show_nested=False, + show_hidden=False) @mock.patch.object(rpc_client.EngineClient, 'call') def test_detail(self, mock_call, mock_enforce):