- required_key_values = ["heat_template_version"]
-
- with open(yaml_file) 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(
- yaml_file, required_key_values[0]
- )
+ template = load_yaml(yaml_file)
+ assert "heat_template_version" in template, "This template must contain a heat_template_version section"