[openstack-dev] [nova][neutron][openstackclient] The way to assign floating IPs to VM

Andrey Kurilin andr.kurilin at gmail.com
Mon Mar 5 12:26:25 UTC 2018


Hi stackers!

A year ago, Nova team decided to deprecate the addFixedIP, removeFixedIP,
addFloatingIP, removeFloatingIP server action APIs and it was done[1].

It looks like not all the consumers paid attention to this change so after
novaclient 10.0.0 release (which includes removal of these interfaces[2])
got in u-c file [3] I found broken code in my repo :(

I tried to find an alternative way to associate a floating ip with an
instance and I faced several new issues:

- openstackclient

* command `openstack server add floating ip` calls `add_floating_ip` method
of novaclient's server object[4]. This method is missed in the latest
novaclient (see [2]).
  It means that this command is broken now.

- neutronclient

* CLI is deprecated
* the python binding accepts floating ip id (need to list all floating IPs
to find the id)  and port id to attach floating to (where should I take
port id?!).


So here we have 2 global issues:
- openstackclient has a broken command (or I missed something?)
- there is no easy way to associate a floating ip with a vm using CLI or
via python.

[1]
https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/microversion-v2_44-d60c8834e436ad3d.yaml
[2]
https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/remove-virt-interfaces-add-rm-fixed-floating-398c905d9c91cca8.yaml
[3]
https://github.com/openstack/requirements/commit/c126685c2007c818e65c53cc9c32885fae16fd34
[4]
https://github.com/openstack/python-openstackclient/blob/b10941ddf6f7f6894b7d87f25c173f227b111e4e/openstackclient/compute/v2/server.py#L266-L267

-- 
Best regards,
Andrey Kurilin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180305/5f0b1e9b/attachment.html>


More information about the OpenStack-dev mailing list