summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/hot/syntax
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2017-07-17 17:40:59 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2017-07-17 17:40:59 +0800
commitc7491340551cdd9d757d63b4bbe79132506e386a (patch)
treeae14fd406f3f0ebe415ce69bd9c6d0698af30d1e /tosca2heat/heat-translator/translator/hot/syntax
parent859e2826074aa51e0334d4607ccfcde5972e882e (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/hot/syntax')
-rw-r--r--tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py3
-rw-r--r--tosca2heat/heat-translator/translator/hot/syntax/hot_template.py9
2 files changed, 7 insertions, 5 deletions
diff --git a/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py b/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py
index 80a62ff..ff2111a 100644
--- a/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py
+++ b/tosca2heat/heat-translator/translator/hot/syntax/hot_resource.py
@@ -30,7 +30,8 @@ policy_type = ['tosca.policies.Placement',
'tosca.policies.Scaling',
'tosca.policies.Scaling.Cluster',
'tosca.policies.Placement.Colocate',
- 'tosca.policies.Placement.Antilocate']
+ 'tosca.policies.Placement.Antilocate',
+ 'tosca.policies.Monitoring']
log = logging.getLogger('heat-translator')
diff --git a/tosca2heat/heat-translator/translator/hot/syntax/hot_template.py b/tosca2heat/heat-translator/translator/hot/syntax/hot_template.py
index 7fae022..f279997 100644
--- a/tosca2heat/heat-translator/translator/hot/syntax/hot_template.py
+++ b/tosca2heat/heat-translator/translator/hot/syntax/hot_template.py
@@ -46,7 +46,8 @@ class HotTemplate(object):
return yaml.nodes.MappingNode(u'tag:yaml.org,2002:map', nodes)
def output_to_yaml_files_dict(self, base_filename,
- hot_template_version=LATEST):
+ hot_template_version=LATEST,
+ embed_substack_templates=False):
yaml_files_dict = {}
base_filename, ext = os.path.splitext(base_filename)
@@ -55,9 +56,9 @@ class HotTemplate(object):
yaml_files_dict.update(
resource.extract_substack_templates(base_filename,
hot_template_version))
-
- yaml_files_dict[base_filename + ext] = \
- self.output_to_yaml(hot_template_version, False)
+ if not embed_substack_templates:
+ yaml_files_dict[base_filename + ext] = \
+ self.output_to_yaml(hot_template_version, False)
return yaml_files_dict