From f416d7ba961edddfd956b556ed6566bf48824bf5 Mon Sep 17 00:00:00 2001 From: shangxdy Date: Fri, 1 Sep 2017 15:16:00 +0800 Subject: Support version of tosca_simple_yaml_1_1 Currently tosca-parser only support tosca_version_1_0, this patch will enable it to support tosca_version_1_1. This requirement is from ONAP, but not need to submit to OpenStack currently JIRA:PARSER-146 Change-Id: If1bc470e3f2d18a606b312425241f27be33b65b4 Signed-off-by: shangxdy --- tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py') diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py index 69dfb46..fd8ee90 100644 --- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py +++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py @@ -666,6 +666,17 @@ class ToscaTemplateTest(TestCase): self.assertEqual(tosca.version, "tosca_simple_yaml_1_0") + def test_yaml_dict_tpl_with_version_1_1(self): + test_tpl = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "data/tosca_helloworld_with_version_1_1.yaml") + + yaml_dict_tpl = toscaparser.utils.yamlparser.load_yaml(test_tpl) + + tosca = ToscaTemplate(yaml_dict_tpl=yaml_dict_tpl) + + self.assertEqual(tosca.version, "tosca_simple_yaml_1_1") + def test_yaml_dict_tpl_with_params_and_url_import(self): test_tpl = os.path.join( os.path.dirname(os.path.abspath(__file__)), -- cgit 1.2.3-korg