From 9f3ed0229e059c913971e4cedfd9491dd26b5d66 Mon Sep 17 00:00:00 2001 From: doantungbk Date: Wed, 5 Jul 2017 00:14:54 -0700 Subject: [PATCH] No need to write down the nested template file Method output_to_yaml_files_dict() in hot_template.py was already returned a nested template. Tacker can use this method to achieve the nested template. However, the nested template file still requires to write down in Heat Translator. That made permission denied in Tacker function test when the nested template tries to write in remote repository. This patch will fix the above issue. Change-Id: I3087cdc92fcab2d76566719d8a6e206e3d948523 --- translator/hot/tosca_translator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translator/hot/tosca_translator.py b/translator/hot/tosca_translator.py index a637a8ca..042125b0 100644 --- a/translator/hot/tosca_translator.py +++ b/translator/hot/tosca_translator.py @@ -65,7 +65,7 @@ class TOSCATranslator(object): "output.yaml", self.node_translator.hot_template_version) for name, content in six.iteritems(yaml_files): - if name != "output.yaml": + if name != "output.yaml" and "_res.yaml" not in name: with open(name, 'w+') as f: f.write(content)