Refactored floating_ip and floating_ip_info modules
Use service proxies from openstacksdk wherever reasonable in order to reduce calls to OpenStack API. Renamed floating_ip_info's attribute 'project_id' to 'project' to be consistent with other attributes and added the former as an alias to keep backward compatibility. The latter can now also be used to search for floating ips by project names, not only project ids. Sorted argument specs and documentation of both modules. Reworked integration tests, e.g. replaced references to server's 'addresses' attribute with calls to our port_info and floating_ip_info modules. Also reformatted tests and added assertion on return values. Merged integration tests of floating_ip_info module into floating_ip module, because the former does not create any floating ips and assumes that they have been created earlier. For Zuul CI job ansible-collections-openstack-functional-devstack-\ releases to pass, the minimum required openstacksdk release must be 0.102.0 because [1],[2],[3],[4] are available since that release only. [1] https://review.opendev.org/c/openstack/openstacksdk/+/851976 [2] https://github.com/openstack/openstacksdk/commit/0ded7ac398843b6b1ce46668eb3b45ce02628428 [3] https://review.opendev.org/c/openstack/openstacksdk/+/859672 [4] https://github.com/openstack/openstacksdk/commit/2535ba7a28ae081f064ae20f9ddb19f48a973625 Change-Id: I129f866e7ed8d5c0499c93e78ebbe2c424e09423
Showing
- .zuul.yaml 1 addition, 2 deletions.zuul.yaml
- ci/roles/floating_ip/defaults/main.yml 21 additions, 0 deletionsci/roles/floating_ip/defaults/main.yml
- ci/roles/floating_ip/tasks/main.yml 318 additions, 262 deletionsci/roles/floating_ip/tasks/main.yml
- ci/roles/floating_ip_info/tasks/main.yml 0 additions, 21 deletionsci/roles/floating_ip_info/tasks/main.yml
- ci/run-collection.yml 1 addition, 2 deletionsci/run-collection.yml
- plugins/modules/floating_ip.py 378 additions, 183 deletionsplugins/modules/floating_ip.py
- plugins/modules/floating_ip_info.py 47 additions, 47 deletionsplugins/modules/floating_ip_info.py
Loading
Please register or sign in to comment