X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_nested_template_parameters.py;h=016ebc9ceb3d12f03c731c63e7e31782c322f025;hb=090dbf300bf4e20cf1571afdc21792789a768abd;hp=3bc52d7ea3d34c93e883149008cc8ea218d8af09;hpb=8540eb59f7e7f8ff2043a8eaf7edfc255a60874a;p=vvp%2Fvalidation-scripts.git diff --git a/ice_validator/tests/test_nested_template_parameters.py b/ice_validator/tests/test_nested_template_parameters.py index 3bc52d7..016ebc9 100644 --- a/ice_validator/tests/test_nested_template_parameters.py +++ b/ice_validator/tests/test_nested_template_parameters.py @@ -67,18 +67,26 @@ def validate_parms(dirname, basename, nested, nested_props, prop_type): " of %s resource %s" % (nested_filename, list(missing), prop_type, basename, rid) ) + else: + additional = props - parms + if additional: + bad.append( + "%s properties %s not defined as " + "parameters in %s" + % (rid, list(additional), nested_filepath) + ) return bad @validates("R-11041") -def test_nested_template_parameters(heat_template): +def test_nested_template_parameters(yaml_file): """ All parameters defined in a VNFs Nested YAML file **MUST** be passed in as properties of the resource calling the nested yaml file. """ - dirname, basename = os.path.split(heat_template) - heat = Heat(filepath=heat_template) + dirname, basename = os.path.split(yaml_file) + heat = Heat(filepath=yaml_file) if not heat.resources: pytest.skip("No resources found") nested_type = nested_files.get_type_nested_files(heat.yml, dirname)