Heat Provider template, how to reference networks defined in parent stack
I am attempting to use a OS::Heat::ResourceGroup in a stack but it fails when I try to allocate network ports.
I want to be able to assign the servers created by the ResourceGroup to a network/subnet referenced in the parent stack.
- Is this possible?
- I cannot find examples, are there any?
Thanks Andy
Extra details:
I can get simple ResorceGroups to execute correctly.
It fails with the following stack_status_reason
"stack_status_reason": "Resource CREATE failed: Error: Resource CREATE failed: Error: Resource CREATE failed: NetworkNotFoundClient: Network 4235e18a-79f3-4c05-8e6f-32adebfa0ae7 could not be found\n"
The NetworkID "4235e18a-79f3-4c05-8e6f-32adebfa0ae7" is created in the parent stack and is created.
I am trying this with both Horizon and heatclient. This is all in IceHouse 2014.1
Snippet of the ResourceGroup
PS_rg:
type: OS::Heat::ResourceGroup
properties:
count: 2
resource_def:
type: "http://xxx.xxx.xxx.xxx/heat/aim/v1/ps_v1.yaml"
properties:
private_net: { get_resource: private_subnet }
network_id: { get_resource: private_net }
private_subnet: { get_resource: private_subnet }
Key_name: { get_param: Key_name }
Sources_address: { get_param: Sources_address }
ADS_address: { get_param: ADS_address }
OSS_address: { get_param: OSS_address }
Private_net_name: { get_param: Private_net_name }
public_id: { get_param: public_id }
Instance_type_PS: { get_param: Instance_type_PS }
The ps_v1.yaml has a reference for a Neutron port which is assigned to a server.
PS_port:
type: OS::Neutron::Port
properties:
network_id: { get_param: private_net }
fixed_ips:
- subnet_id: { get_param: private_subnet }
You're doing everything correctly. It's possible you have an issue with your version of python-neutronclient being either too new or too old - the only thing that makes sense to me is that Heat may be passing an ID where it expects a name.