[openstack-dev] [Heat] Referencing VPC resources across templates

Steve Baker sbaker at redhat.com
Thu Apr 4 01:01:51 UTC 2013


On 04/04/2013 12:21 PM, Zane Bitter wrote:
>>> I want to pass the VpcId value as a parameter to the second template
>>> but the stack creation fails. Looking at the code, this use case
>>> doesn't seem to be supported.
>>> Am I right? If yes, is it something planned for a future release?
>> What version of Heat are you running? There was actually a change
>> released in grizzly-rc1 which addressed this issue:
>> https://bugs.launchpad.net/heat/+bug/1142812
>> https://review.openstack.org/#/c/23391/
>
> The issue is that it's then looked up using stack.resource_by_refid(),
> which only looks at resources in the current stack:
> https://github.com/openstack/heat/commit/63882b7bcbc55e411db26b4689f9cfe30d5a722b#L3R51
>
>
> That's used to get the router_id from the VPC resource's metadata.
> What you need is to use the supplied ID (which is the network_id)
> directly so that you don't need to access the VPC resource at all. I
> have no idea if that's possible with Quantum.

Yes, a VPC consists of a Quantum net plus a router, but outside of Heat
the net and router are not coupled so it will currently not be possible
to pass in a VpcId.

As an aside, if your templates are only going to be run on OpenStack I
would recommend using the native quantum resources instead of VPC. The
VPC resource types are there so that you can support AWS and OpenStack
in a single template.

cheers



More information about the OpenStack-dev mailing list