Ask Your Question

declaring variable/params in user_data tosca template [closed]

asked 2017-01-20 02:11:19 -0500

AB239 gravatar image

Hello There,

I have recently writing a TOSCA template for already existing HEAT template for orchestration. There are few functionalities that I couldn't find any reference/documentation about in TOSCA documentation and I feel are a must for achieving what HEAT template could:

1) Floating IP address support isn't available. 2) What is the way to declare params/variables in tosca template. In heat we could do it inside str_replace and then use them in user_data but I couldn't find any references of same in TOSCA. I have tried multiple ways to add them in user_data under cloud_config section but just couldn't get the required param working.

Please let me know if there are any advancements related to these 2 specific functionalities or if there exists any work around to achieve them.

Regards Amit

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by AB239
close date 2020-03-05 00:06:27.029592

1 answer

Sort by » oldest newest most voted

answered 2017-01-26 13:31:06 -0500

sp_zala gravatar image

@zaneb, thanks for bringing this question to my attention.

Hi Amit,

As you noticed, there are differences between HOT and TOSCA DSL. We have Heat-Translator project in main Heat program ( ( to support translation of TOSCA to HOT and then deploy translated HOT with Heat. The translator try to map TOSCA entities in HOT though we run into challenges where there is no 1-1 mapping. I can discuss the detail about project offline, you can reach out to me on IRC @spzala or email me Since you are creating TOSCA templates, I am sure you read TOSCA specification. And it seems like you are translating HOT to TOSCA? About your specific questions: 1) str_replace can be mapped to TOSCA function like “concat” (the function is used to concatenate two or more string values within a TOSCA service template. Please look at this function definition in the TOSCA spec. 2) For floating IP, TOSCA capabilities tosca.capabilities.Endpoint.Public is something you can use. Please refer to it’s definition in the spec.

edit flag offensive delete link more


Hey @sp_zala, I never got the notification from about your reply. Just trying to get it working with the help of your reply. Will get back to you here or in person.

AB239 gravatar imageAB239 ( 2017-02-06 01:31:32 -0500 )edit

@AB239 Hi Amit, yup it happens. Cool, I got your email. I will be sending concat function example template soon. Also will clarify the difference between tosca_simple_profile_for_nfv_1_0_0 and tosca_simple_yaml_1_0

sp_zala gravatar imagesp_zala ( 2017-02-06 09:03:16 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-01-20 02:11:19 -0500

Seen: 535 times

Last updated: Jan 20 '17