aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/utils/nested_iterables.py
diff options
context:
space:
mode:
authorstark, steven <steven.stark@att.com>2019-02-01 13:02:56 -0800
committerstark, steven <steven.stark@att.com>2019-02-01 13:15:47 -0800
commit912ea4cdf9721f66339c47bbfdcf4315ca7bd424 (patch)
treef0e5e4e66c103e866e4fed8e660a1063e268b329 /ice_validator/tests/utils/nested_iterables.py
parentab01f96b1405bc037853847138a121581bb98f05 (diff)
[VVP] pseudo-parameters nested parameters
Change-Id: Iff7630a6f62fa8b83c80048d6efc12d187037412 Issue-ID: VVP-157 Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'ice_validator/tests/utils/nested_iterables.py')
-rw-r--r--ice_validator/tests/utils/nested_iterables.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ice_validator/tests/utils/nested_iterables.py b/ice_validator/tests/utils/nested_iterables.py
index 5966201..44ca2bc 100644
--- a/ice_validator/tests/utils/nested_iterables.py
+++ b/ice_validator/tests/utils/nested_iterables.py
@@ -38,6 +38,11 @@
#
+def is_pseudo_param(parameter):
+ pseudo_parameters = ["OS::stack_name", "OS::stack_id", "OS::project_id"]
+ return parameter in pseudo_parameters
+
+
def parse_nested_dict(d, key=""):
"""
parse the nested dictionary and return values of
@@ -63,13 +68,12 @@ def find_all_get_param_in_yml(yml):
Recursively find all referenced parameters in a parsed yaml body
and return a list of parameters
"""
- os_pseudo_parameters = ["OS::stack_name", "OS::stack_id", "OS::project_id"]
if not hasattr(yml, "items"):
return []
params = []
for k, v in yml.items():
- if k == "get_param" and v not in os_pseudo_parameters:
+ if k == "get_param" and not is_pseudo_param(v):
if isinstance(v, list) and not isinstance(v[0], dict):
params.append(v[0])
elif not isinstance(v, dict) and isinstance(v, str):