Ask Your Question
0

Can I use get_attr for existing resources that are outside the current template?

asked 2015-10-26 20:24:30 -0500

Lianjie gravatar image

Hi,

If I already have resources (e.g., a subnet) created, then how should I use get_attr in a new heat template to get some certain attributes (e.g., CIDR of a subnet) of an existing resource?

For instance, if I already have a demo-subnet created, now I want to create a heat template to launch an instance on the demo-subnet. However, only knowing the name "demo-subnet" is not enough. I also want to get the CIDR of demo-subnet to create a fixed IP address of XX.XX.XX.10 for the instance.

How should I do this?

Thanks a lot!

edit retag flag offensive close merge delete

Comments

you can just add A file, such as, file.yaml in the “type”in another new OS::Heat::ResourceGroup. define A new param in file.yaml. the valueof the new added param can be set by get_attr.

Jeffrey Guan gravatar imageJeffrey Guan ( 2015-12-06 03:34:54 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2016-02-01 11:35:37 -0500

zaneb gravatar image

No, you can't.

If you have created resources outside Heat, then you need to obtain whatever data you need from them yourself through their APIs and pass it in to Heat as parameters.

edit flag offensive delete link more

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: 2015-10-26 20:24:30 -0500

Seen: 576 times

Last updated: Feb 01 '16