[Heat] Reg accessing variables of resource group heat api

NANTHINI A A nanthini.a.a at ericsson.com
Tue Feb 12 14:18:12 UTC 2019


Hi ,
    I followed the example given in random.yaml .But getting below error .Can you please tell me what is wrong here .

root at 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 at 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}

outputs:
  all_values:
    value: {get_attr: [rg, value]}
root at 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:
     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 at redhat.com]
Sent: Tuesday, February 12, 2019 6:34 PM
To: NANTHINI A A <nanthini.a.a at ericsson.com>
Cc: hjensas at redhat.com; openstack-dev at 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 at ericsson.com<mailto:nanthini.a.a at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190212/cfc9f464/attachment.html>


More information about the openstack-discuss mailing list