diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2017-07-17 17:40:59 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2017-07-17 17:40:59 +0800 |
commit | c7491340551cdd9d757d63b4bbe79132506e386a (patch) | |
tree | ae14fd406f3f0ebe415ce69bd9c6d0698af30d1e /tosca2heat/heat-translator/translator/common/utils.py | |
parent | 859e2826074aa51e0334d4607ccfcde5972e882e (diff) |
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 <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/heat-translator/translator/common/utils.py')
-rw-r--r-- | tosca2heat/heat-translator/translator/common/utils.py | 9 |
1 files changed, 8 insertions, 1 deletions
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] = \ |