ansible-collections-openstack/ci
Jakob Meng 3a08a9c07c Allow to attach multiple floating ips to a server
OpenStack allows to attach multiple floating ips to a single server.
Previously, only one floating ip was supported by this module. It
would call openstacksdk's get_server_public_ip(), which in turn
would return just one of the attached floating ips. If this floating
ip would not point to the right nat_destination or fixed_address,
then the module would fail.

If no floating ip had been attached to a server, then this module
would call openstacksdk's add_ips_to_server() with both parameters
"floating_ip_address" and "network" to attach a floating ip to the
server. But both parameters are mutually exclusive [1], i.e.
add_ips_to_server() will ignore "floating_ip_address" if "network"
is set and then choose any non-attached floating ip from "network".
If "floating_ip_address" has not been created in OpenStack and
"network" is not given, then this module would not create this
floating ip [2].

The new module code allows to create and add more than one floating
ip to a server. It priorizes more specific parameters over generic
ones, i.e. if both "floating_ip_address" and "network" are given,
then "floating_ip_address" precedes "network".

Parameter "network" is now required if "floating_ip_address" is
specified, because both are necessary when creating floating ips.

Module documentation and args have been updated accordingly.

Ref.:
[1] a6b0ece282/openstack/cloud/_floating_ip.py (L987)
[2] a6b0ece282/openstack/cloud/_floating_ip.py (L907)

Task: 40939
Story: 2008181
Change-Id: I1ada1be0994f526f72f81f7458782afbcca3c92c
2021-08-06 15:02:20 +02:00
..
playbooks Add Octavia job for testing Load Balancer 2021-02-20 17:57:20 +02:00
publish Remove semver check from release job 2021-07-29 10:20:32 +03:00
roles Allow to attach multiple floating ips to a server 2021-08-06 15:02:20 +02:00
run-ansible-tests-collection.sh Add Octavia job for testing Load Balancer 2021-02-20 17:57:20 +02:00
run-collection.yml Allow to attach multiple floating ips to a server 2021-08-06 15:02:20 +02:00