Hi,
I have 3 Heat templates using ResourceGroup. There are 2 resource groups(rg_a
and rg_b) and rg_b depends on rg_a. and rg_b requires the IP address of rg_a
as the paremeter of rg_b. I use "rg_a_public_ip: {get_attr: [rg_a,
rg_a_public_ip]}" to get the IP address of rg_a both in the section of rg_b
parameters (rg_b/properties/resource_def/properties) and the section of outputs.
As per my observation, rg_a_public_ip shows "null" in the parameter section of
rg_b. while rg_a_public_ip shows the correct IP address in the outputs section
of the yaml file.
My questions are:
1) Does this behavior is expected as designed or this is a bug?
2) What is the alternative solution for the above case(user want to get
the run-time information of the instance when creating the second resource
group) if this behavior is expected?
------- a.yaml -------------------
resources:
rg_a:
type: OS::Heat::ResourceGroup
properties:
count: 1
resource_def:
type: b.yaml
properties:
...
rg_b:
type: OS::Heat::ResourceGroup
depends_on:
-rg_a
properties:
count: 2
resource_def:
type: c.yaml
properties:
rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]}
-------------------- the value is "null"
...
outputs:
rg_a_public_ip: {get_attr: [rg_a, rg_a_public_ip]}
--------------------- the value is correct.
--------------------------
------b.yaml --------------------
...
resources:
rg_a:
type: OS::Nova::Server
properties:
...
outputs:
rg_a_public_ip:
value: {get_attr: [rg_a, networks, public, 0]}
--------------------------
---------- c.yaml --------------------
parameters:
rg_a_public_ip:
type: string
description: IP of rg_a
...
resources:
rg_b:
type: OS::Nova::Server
properties:
...
outputs:
...
---------------------------------------
Regards,
Gary
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev