It would be a bit difficult if not impossible since you either address the aggregate values of all attributes in the group or the attribute of one specific member of the group. The ResourceGroup doesn't have a mechanism for applying sequential values to the members. That might be something you could raise a blueprint for.
On May 6, 2014, at 3:07 PM, "Janczuk, Tomasz" <[email protected]> wrote: > Could this be accomplished with 3 resource groups instead of one? The > first would create the ports, the second floating IPs, and the last the > VMs? In that case, would there be a way to construct a reference to a > particular instance of, say, a port, when creating an instance of a > floating IP? > > On 5/6/14, 12:41 PM, "Randall Burt" <[email protected]> wrote: > >> A resource group's definition contains only one resource and you seem to >> want groups of multiple resources. You would need to use a nested stack >> or provider template to do what you're proposing. >> >> On May 6, 2014, at 2:23 PM, "Janczuk, Tomasz" <[email protected]> >> wrote: >> >>> I am trying to create an OS::Heat::ResourceGroup of VMs and assign each >>> VM a floating IP. As far as I know this requires cross-referencing the >>> VM, port, and floating IP resources. How can I do that within a >>> OS::Heat::ResourceGroup definition? >>> >>> The `port: { get_resource: vm_cluster.vm_port.0 }` below is rejected by >>> Heat. >>> >>> Any help appreciated. >>> >>> Thanks, >>> Tomasz >>> >>> vm_cluster: >>> type: OS::Heat::ResourceGroup >>> properties: >>> count: { get_param: num_instances } >>> resource_def: >>> vm: >>> type: OS::Nova::Server >>> properties: >>> key_name: { get_param: key_name } >>> flavor: { get_param: flavor } >>> image: { get_param: image } >>> networks: >>> - port: { get_resource: vm_cluster.vm_port.0 } >>> vm_port: >>> type: OS::Neutron::Port >>> properties: >>> network_id: { get_param: private_net_id } >>> fixed_ips: >>> - subnet_id: { get_param: private_subnet_id } >>> security_groups: [{ get_resource: rabbit_security_group }] >>> vm_floating_ip: >>> type: OS::Neutron::FloatingIP >>> properties: >>> floating_network_id: { get_param: public_net_id } >>> port_id: { get_resource: vm_cluster.vm_port.0 } >>> >>> _______________________________________________ >>> OpenStack-dev mailing list >>> [email protected] >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> >> >> _______________________________________________ >> OpenStack-dev mailing list >> [email protected] >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > > _______________________________________________ > OpenStack-dev mailing list > [email protected] > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev _______________________________________________ OpenStack-dev mailing list [email protected] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
