On Tue, Feb 12, 2019 at 7:48 PM NANTHINI A A nanthini.a.a@ericsson.com wrote:
Hi ,
I followed the example given in random.yaml .But getting below error
.Can you please tell me what is wrong here .
root@cic-1:~# heat stack-create test -f main.yaml
WARNING (shell) "heat stack-create" is deprecated, please use "openstack stack create" instead
ERROR: Property error: : resources.rg<nested_stack>.resources[0].properties: : Unknown Property names
root@cic-1:~# cat main.yaml
heat_template_version: 2015-04-30
description: Shows how to look up list/map values by group index
parameters:
net_names:
type: json default: - network1: NetworkA1 network2: NetworkA2 - network1: NetworkB1 network2: NetworkB2
resources:
rg:
type: OS::Heat::ResourceGroup properties: count: 3 resource_def: type: nested.yaml properties: # Note you have to pass the index and the entire list into the # nested template, resolving via %index% doesn't work directly # in the get_param here index: "%index%"
names: {get_param: net_names}
property name should be same as parameter name in you nested.yaml
outputs:
all_values:
value: {get_attr: [rg, value]}
root@cic-1:~# cat nested.yaml
heat_template_version: 2013-05-23
description:
This is the template for I&V R6.1 base configuration to create neutron resources other than sg and vm for vyos vms
parameters:
net_names:
changing this to 'names' should fix your error.
type: json
index:
type: number
resources:
neutron_Network_1:
type: OS::Neutron::Net properties: name: {get_param: [names, {get_param: index}, network1]}
Thanks,
A.Nanthini
*From:* Rabi Mishra [mailto:ramishra@redhat.com] *Sent:* Tuesday, February 12, 2019 6:34 PM *To:* NANTHINI A A nanthini.a.a@ericsson.com *Cc:* hjensas@redhat.com; openstack-dev@lists.openstack.org *Subject:* Re: [Heat] Reg accessing variables of resource group heat api
On Tue, Feb 12, 2019 at 11:14 AM NANTHINI A A nanthini.a.a@ericsson.com wrote:
Hi ,
May I know in the following example given
parameters: resource_name_map: - network1: foo_custom_name_net1 network2: foo_custom_name_net2 - network1: bar_custom_name_net1 network2: bar_custom_name_net2
what is the parameter type ?
json