diff options
author | 2017-02-26 16:22:30 +0800 | |
---|---|---|
committer | 2017-02-26 20:23:51 +0800 | |
commit | f7b240c6893a48d71da29974e54cb560b6575eb3 (patch) | |
tree | 3d3b8ea171640465cd30bd3d91a88a52cb4487b9 /tosca2heat/heat-translator/translator/hot/translate_outputs.py | |
parent | 406214e5ca40ad57a1c40e4a8454336f6a26cac2 (diff) |
Sync heat-translator code
Sync heat-translator code from upstream
JIRA:PARSER-119
Change-Id: I2287b78ad38bc54f7740fd1ee5f08989d5e680bf
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/heat-translator/translator/hot/translate_outputs.py')
-rw-r--r-- | tosca2heat/heat-translator/translator/hot/translate_outputs.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tosca2heat/heat-translator/translator/hot/translate_outputs.py b/tosca2heat/heat-translator/translator/hot/translate_outputs.py index 4197cdd..87ec02a 100644 --- a/tosca2heat/heat-translator/translator/hot/translate_outputs.py +++ b/tosca2heat/heat-translator/translator/hot/translate_outputs.py @@ -33,16 +33,8 @@ class TranslateOutputs(object): def _translate_outputs(self): hot_outputs = [] for output in self.outputs: - if output.value.name == 'get_attribute': - get_parameters = output.value.args - hot_target = self.nodes.find_hot_resource(get_parameters[0]) - hot_value = hot_target.get_hot_attribute(get_parameters[1], - get_parameters) - hot_outputs.append(HotOutput(output.name, - hot_value, - output.description)) - else: - hot_outputs.append(HotOutput(output.name, - output.value, + hot_value = self.nodes.translate_param_value(output.value, None) + if hot_value is not None: + hot_outputs.append(HotOutput(output.name, hot_value, output.description)) return hot_outputs |