X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ice_validator%2Ftests%2Ftest_nested_template_parameters.py;h=66d8adc3daedbccc6cc09949da478ef5c4d2d6ac;hb=4c2a2033d927552f7e9281e516afba38f146c242;hp=26a0fb3a449856b42a7e6a34be083d3d5103ee8f;hpb=1f4df7c7ad27b23773ad9cdbe4db1632ce388cf1;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 26a0fb3..66d8adc 100644 --- a/ice_validator/tests/test_nested_template_parameters.py +++ b/ice_validator/tests/test_nested_template_parameters.py @@ -35,7 +35,6 @@ # # ============LICENSE_END============================================ # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. # """nested template parameters @@ -68,18 +67,25 @@ 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)