summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tosca_template.py
diff options
context:
space:
mode:
authorjulien zhang <zhang.jun3g@zte.com.cn>2017-09-05 13:28:08 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-05 13:28:08 +0000
commitb33570b6ae9b744e489397cc746dbdbc051e5d29 (patch)
treef2d825c58ef12ee6113c370dfdcd4fd0f95d196a /tosca2heat/tosca-parser/toscaparser/tosca_template.py
parenta9eee2ea67be0b45cec1cfe84ac760293d9473fa (diff)
parentf416d7ba961edddfd956b556ed6566bf48824bf5 (diff)
Merge "Support version of tosca_simple_yaml_1_1"0.5.0
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tosca_template.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tosca_template.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
index 4832bbb..c961941 100644
--- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py
@@ -56,11 +56,13 @@ YAML_LOADER = toscaparser.utils.yamlparser.load_yaml
class ToscaTemplate(object):
exttools = ExtTools()
- VALID_TEMPLATE_VERSIONS = ['tosca_simple_yaml_1_0']
+ VALID_TEMPLATE_VERSIONS = ['tosca_simple_yaml_1_0',
+ 'tosca_simple_yaml_1_1']
VALID_TEMPLATE_VERSIONS.extend(exttools.get_versions())
- ADDITIONAL_SECTIONS = {'tosca_simple_yaml_1_0': SPECIAL_SECTIONS}
+ ADDITIONAL_SECTIONS = {'tosca_simple_yaml_1_0': SPECIAL_SECTIONS,
+ 'tosca_simple_yaml_1_1': SPECIAL_SECTIONS}
ADDITIONAL_SECTIONS.update(exttools.get_sections())
@@ -289,7 +291,8 @@ class ToscaTemplate(object):
what=version,
valid_versions=', '. join(self.VALID_TEMPLATE_VERSIONS)))
else:
- if version != 'tosca_simple_yaml_1_0':
+ if (version != 'tosca_simple_yaml_1_0' and
+ version != 'tosca_simple_yaml_1_1'):
update_definitions(version)
def _get_path(self, path):