Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't really understand what you are trying to do..but if you are just concerned how to attach a floating ip. You may want to check my template. I used a combination of str_replace and get_attr.

mysql_master:
type: "OS::Nova::Server"
properties:
  name: { get_param: master }
  key_name: { get_param: key_name }
  image: { get_param: image }
  networks: 
    - port: { get_resource: mysql_master_port1 }
  flavor: { get_param: flavor }
  admin_user: { get_param: admin_user }
  admin_pass: { get_param: admin_pass }
  user_data_format: RAW
  user_data:
    str_replace:
      params:
        __vm_name__: { get_param: master }
        ipaddy: { get_attr: [ mysql_master_floating_ip, floating_ip_address ] }
      template: |
                     :
                     :
                     :

  mysql_master_port1:
      type: OS::Neutron::Port
      properties:
          network_id: { get_param: data_net_id }
          fixed_ips:
            - subnet_id: { get_param: data_subnet_id }

  mysql_master_floating_ip:
      type: OS::Neutron::FloatingIP
      properties:
           floating_network_id: { get_param: public_net_id }
           port_id: { get_resource: mysql_master_port1 }

Hope that helps. Cheers :)