Merge "Fix get_operation_output function translation"
This commit is contained in:
commit
6dcadc214e
|
@ -21,6 +21,7 @@ from collections import OrderedDict
|
|||
from toscaparser.functions import Concat
|
||||
from toscaparser.functions import GetAttribute
|
||||
from toscaparser.functions import GetInput
|
||||
from toscaparser.functions import GetOperationOutput
|
||||
from toscaparser.functions import GetProperty
|
||||
from toscaparser.properties import Property
|
||||
from toscaparser.relationship_template import RelationshipTemplate
|
||||
|
@ -460,6 +461,11 @@ class TranslateNodeTemplates(object):
|
|||
else:
|
||||
return {'get_param': self.translate_param_value(
|
||||
get_input_args, resource)}
|
||||
elif isinstance(param_value, GetOperationOutput):
|
||||
res = self._translate_get_operation_output_function(
|
||||
param_value.args, tosca_template)
|
||||
if res:
|
||||
return res
|
||||
elif isinstance(param_value, dict) \
|
||||
and 'get_operation_output' in param_value:
|
||||
res = self._translate_get_operation_output_function(
|
||||
|
|
|
@ -500,15 +500,11 @@ class ToscaHotTranslationTest(TestCase):
|
|||
params = {}
|
||||
self._test_successful_translation(tosca_file, hot_file, params)
|
||||
|
||||
# The test is failing tosca-parser gate job due to latest support of
|
||||
# get_operation_output function in the tosca-parser. The temporary fix
|
||||
# is to disable this test. Refer to bug#1641734 for real solution.
|
||||
# TODO(spzala): after tosca-parser 0.7.0 is created
|
||||
'''def test_hot_exchange_public_ssh_key(self):
|
||||
def test_hot_exchange_public_ssh_key(self):
|
||||
tosca_file = '../tests/data/tosca_exchange_public_ssh_key.yaml'
|
||||
hot_file = '../tests/data/hot_output/hot_exchange_public_ssh_key.yaml'
|
||||
params = {}
|
||||
self._test_successful_translation(tosca_file, hot_file, params)'''
|
||||
self._test_successful_translation(tosca_file, hot_file, params)
|
||||
|
||||
def test_hot_translate_scaling_policy(self):
|
||||
tosca_file = '../tests/data/autoscaling/tosca_autoscaling.yaml'
|
||||
|
|
Loading…
Reference in New Issue