From c7491340551cdd9d757d63b4bbe79132506e386a Mon Sep 17 00:00:00 2001 From: shangxdy Date: Mon, 17 Jul 2017 17:40:59 +0800 Subject: Synchronize upstream version of 0.9 Synchronize heat-translator wiht upstream versionn of 0.9 JIRA: PARSER-128 Change-Id: I4d2c62a0e81119d5c0305e3ac052415a6d5acee3 Signed-off-by: shangxdy --- tosca2heat/heat-translator/translator/common/utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tosca2heat/heat-translator/translator/common/utils.py') diff --git a/tosca2heat/heat-translator/translator/common/utils.py b/tosca2heat/heat-translator/translator/common/utils.py index 874c8ec..85af60a 100644 --- a/tosca2heat/heat-translator/translator/common/utils.py +++ b/tosca2heat/heat-translator/translator/common/utils.py @@ -216,7 +216,8 @@ class YamlUtils(object): class TranslationUtils(object): @staticmethod - def compare_tosca_translation_with_hot(tosca_file, hot_files, params): + def compare_tosca_translation_with_hot(tosca_file, hot_files, params, + nested_resources=False): '''Verify tosca translation against the given hot specification. inputs: @@ -247,6 +248,12 @@ class TranslationUtils(object): basename = os.path.basename(hot_files[0]) output_hot_templates = translate.translate_to_yaml_files_dict(basename) + + if nested_resources: + basename = os.path.basename(hot_files[0]) + output_hot_templates =\ + translate.translate_to_yaml_files_dict(basename, True) + output_dict = {} for output_hot_template_name in output_hot_templates: output_dict[output_hot_template_name] = \ -- cgit 1.2.3-korg