[Openstack] How to use "floating_ip" under "OS::Nova::Server", Mitaka ?

Martinx - ジェームズ thiagocmartinsc at gmail.com
Thu Oct 13 21:21:40 UTC 2016


Guys,

 I'm trying to launch a stack via Heat, by using the following template
(I'm copying just part of it here):

---
  demosrv:
    type: OS::Nova::Server
    depends_on: ctrl_subnet
    properties:
      name: { str_replace: { params: { $stack_name: { get_param:
'OS::stack_name' } }, template: '$stack_name-demosrv' } }
      key_name: { get_param: 'ssh_key' }
      image: { get_param: 'demosrv_image' }
      flavor: "m1.small"
      networks:
        - network: { get_resource: ctrl_net }
---

 This works!

 However, I want to associate a Floating IP to it, then, I added:

---
 ....
*  floating_ip_1:*
*    type: OS::Neutron::FloatingIP*
*    depends_on: router-0-port-1*
*    properties:*
*      floating_network: { get_param: public_network }*
....
  demosrv:
    type: OS::Nova::Server
    depends_on: ctrl_subnet
    properties:
      name: { str_replace: { params: { $stack_name: { get_param:
'OS::stack_name' } }, template: '$stack_name-demosrv' } }
      key_name: { get_param: 'ssh_key' }
      image: { get_param: 'demosrv_image' }
      flavor: "m1.small"
      networks:
        - network: { get_resource: ctrl_net }
*        - floating_ip: { get_resource: floating_ip_1 }*
---

 Then, it does't work anymore!

 heat stack-create fails with:

-
ERROR: One of the properties "network", "port" or "subnet" should be set
for the specified network of server "demosrv".
-

 So, how to use it?

 If I use "OS::Neutron::Port" and "OS::Neutron::FloatingIPAssociation",
then, it works but, damn, I want a simpler Heat template, without fixed
ips, without Port definitions, something like this:

https://specs.openstack.org/openstack/heat-specs/specs/kilo/rich-network-prop.html

 Is it supported on Mitaka? If yes, how to do it?

Thanks!
Thiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20161013/f16a86d4/attachment.html>


More information about the Openstack mailing list