+
+
+@validates("R-25877")
+def test_parameter_names(yaml_file):
+ """
+ A VNF's Heat Orchestration Template's parameter name
+ (i.e., <param name>) **MUST** contain only alphanumeric
+ characters and underscores ('_').
+ """
+ with open(yaml_file) as fh:
+ yml = yaml.load(fh)
+
+ # skip if parameters are not defined
+ if "parameters" not in yml:
+ pytest.skip("No parameters specified in the heat template")
+
+ for key in yml["parameters"]:
+ assert RE_VALID_PARAMETER_NAME.match(
+ key
+ ), '%s parameter "%s" not alphanumeric or underscore' % (yaml_file, key)