- R-40551 specifies nested templates
MAY or MAY NOT contain a resource section
- remove check for get_param in allowed_address_pairs,
no requirement states get_param MUST be used
Change-Id: If133b4ec4d39c25a95c77482b1743562e2ae74a8
Issue-ID: VVP-158
Signed-off-by: stark, steven <steven.stark@att.com>
-def test_heat_template_structure_contains_resources(yaml_file):
+def test_heat_template_structure_contains_resources(heat_template):
"""
Check that all heat templates have the required sections
"""
required_key_values = ["resources"]
"""
Check that all heat templates have the required sections
"""
required_key_values = ["resources"]
- with open(yaml_file) as fh:
+ with open(heat_template) as fh:
yml = yaml.load(fh)
assert all(
[k in yml for k in required_key_values]
), "{} doesn't contain the {} section, but it is required".format(
yml = yaml.load(fh)
assert all(
[k in yml for k in required_key_values]
), "{} doesn't contain the {} section, but it is required".format(
- yaml_file, required_key_values[0]
+ heat_template, required_key_values[0]
@validates("R-90152")
@pytest.mark.base
@validates("R-90152")
@pytest.mark.base
-def test_06_heat_template_resource_section_has_resources(yaml_file):
+def test_06_heat_template_resource_section_has_resources(heat_template):
- with open(yaml_file) as fh:
+ with open(heat_template) as fh:
yml = yaml.load(fh)
resources = yml.get("resources")
yml = yaml.load(fh)
resources = yml.get("resources")
if field in allowed_address_pair:
param = heat.nested_get(allowed_address_pair, field, "get_param")
if param is None:
if field in allowed_address_pair:
param = heat.nested_get(allowed_address_pair, field, "get_param")
if param is None:
- error = 'allowed_address_pair %s requires "get_param"' % field
+ # error = 'allowed_address_pair %s requires "get_param"' % field
break
else:
# if v6 and testing v6, or inverse
break
else:
# if v6 and testing v6, or inverse