Score:0

isse while accessing synthetic attributes within resource group in heat

za flag

The question is related to openstack heat templates.

I am not sure about what's the wrong with the below situation.

I have a resource group that creates multiple neutron Ports.

While trying to use the output of this resource group, i am trying to use the synthetic attributes but it is just impossible. the error was that the attribut is not there actually. and by showing the strcture of the resource effectively i cannot see the attribut resource. here after the code to clarify more.

The definition of my resource group.

  bckg1_ports_group:
    depends_on:
      - datag1_subnet
    type: OS::Heat::ResourceGroup
    condition: create_g1
    properties:
      count: { get_param: bck_nbrg1 }
      resource_def:
        type: OS::Neutron::Port
        properties:
          name: 
            list_join: ['', ['backg1vm', '%index%', '_data_port']]
          network: { get_resource: "datag1_network" }
          fixed_ips: [{"subnet": { get_resource: "datag1_subnet" }, "ip_address": 192.168.10.3%index%}]
          allowed_address_pairs: [{"ip_address": "0.0.0.0/0"}]
          security_groups: [{ get_resource: open_secgroup }]

To access the attributes of the resources inside the resource group i use.

   portgroup_rsc:
     condition: create_g1
     description: G1 group RSC
     value: { get_attr: [bckg1_ports_group, resource] }

   portgroup_rsc0:
     condition: create_g1
     description: G1 group RSC
     value: { get_attr: [bckg1_ports_group, resource.0] }

   portgroup_rsc0_mac:
     condition: create_g1
     description: G1 group RSC
     value: { get_attr: [bckmg1_ports_group, resource.0.mac_address] }

None of these works because the upper attribute resource is not there. i can use refs or refs_map but only to get IDs.

the error.

ERROR: resources.bckg1_ports_group<nested_stack>.outputs.resource.Value[0].get_attr: : The Referenced Attribute (0 resource) is incorrect.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.