Ask Your Question
0

declaring variable/params in user_data tosca template

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 close merge delete

1 answer

Sort by » oldest newest most voted
1

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 (https://github.com/openstack/heat-translator (https://github.com/openstack/heat-tra...)) 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 spzala@us.ibm.com. 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

Comments

Hey @sp_zala, I never got the notification from ask.openstack.org 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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 354 times

Last updated: Jan 20 '17