The problem is that now it takes multiple commands to determine to what network, or pool, a floating ip belongs to.
Previously, all it took was one command:
1) openstack ip floating list
But today, to determine if an available floating IP address belongs to network I would need to do the following:
1) List all networks and grab the ID of the network I'm interested: openstack network list
2) List all floating IPs to determine which are not allocated: openstack ip floating list
3) For each floating ip, get its details to determine its network: for ip in floating_ip: openstack ip floating show ip
4) If the 'floating_network_id' property matches the network from Step 1 then it belongs to that network.
It seems this change introduced the change to use Neutron floatingips extension:
Previously using python- openstackclient I could retrieve with a single command to which network, or pool, a floating IP belonged to.
For example, here is an example output from version 1.0.4:
# openstack --version && openstack ip floating list ------- ------- ------- ------- ------+ ------- -+----- ------- --+---- ------- ---+--- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------+ ------- -+----- ------- --+---- ------- ---+--- ------- ------- ------- ------- ------- + 0368-482c- 8e29-ceca430415 02 | public | 10.50.48.91 | 172.16.1.41 | 331e86ab- 6caf-45b2- bcd0-e29f105a32 b5 | 71fb-45ad- b8ef-5fec6827bd 80 | public | 10.50.48.102 | 172.16.1.50 | 77460666- 2cd9-4df7- 9e9e-c40289664d e7 | 0e84-43a7- a355-130226ea2f 7f | public | 10.50.48.240 | 172.16.1.201 | d0342efe- 174d-482f- b099-29441844f5 81 | b4e3-4b63- b6cd-86ca451236 4f | public | 10.50.48.239 | 172.16.1.202 | 51d87aff- adb5-4b77- 9c8f-85ba94fe59 c9 | 7965-4210- acf6-498c9e33fc 07 | public | 10.50.48.105 | 172.16.1.49 | 438fe1a5- 4714-460f- 848e-b021896201 45 | f900-4b27- ae37-53a66dc15e e6 | public | 10.50.48.103 | 172.16.1.48 | 56dcb4b6- 50f9-4720- a01f-288eda829a e2 | 4bc2-40a2- 9029-972c2d2a12 e3 | public | 10.50.48.130 | None | None | 3828-45b7- a7ce-4dc7fcef60 89 | public | 10.50.48.242 | None | None | 6246-4e1e- 8412-1a7a0d17f2 2b | public | 10.50.48.241 | None | None | caa9-48cc- ac66-af6baf285b 32 | public | 10.50.48.104 | 172.16.1.51 | c599fb79- b97a-431c- acc6-8088ed37b2 d7 | 84ce-4841- a275-a47af58915 2a | public | 10.50.48.106 | 172.16.1.47 | 4ce696dd- 1044-4872- af3d-c06774fd33 88 | ------- ------- ------- ------- ------+ ------- -+----- ------- --+---- ------- ---+--- ------- ------- ------- ------- ------- +
openstack 1.0.4
+----
| ID | Pool | IP | Fixed IP | Instance ID |
+----
| 07bdb6ca-
| 0b1bce87-
| 124dd71f-
| 1f2d97a0-
| 5babfd67-
| 94bb22ff-
| 993ccd2b-
| a8681eb8-
| ab3e9005-
| b6794d3f-
| e4803d10-
+----
On recent versions, the 'Pool' column now is missing, as well as the instance ID but that's for another day. Here's the output from version 2.3.0:
# openstack --version && openstack ip floating list ------- ------- ------- ------- ------+ ------- ------- ------- +------ ------- -----+- ------- ------- ------- ------- ------- --+ ------- ------- ------- ------- ------+ ------- ------- ------- +------ ------- -----+- ------- ------- ------- ------- ------- --+ 0368-482c- 8e29-ceca430415 02 | 10.50.48.91 | 172.16.1.41 | 58f42707- bc54-406b- 87d8-f93e54ae5d f5 | 71fb-45ad- b8ef-5fec6827bd 80 | 10.50.48.102 | 172.16.1.50 | f495cd9b- 99c9-4408- bac1-8a32c52e54 93 | 0e84-43a7- a355-130226ea2f 7f | 10.50.48.240 | 172.16.1.201 | b2142fa5- e2ec-444c- 801a-fd05d00f13 45 | b4e3-4b63- b6cd-86ca451236 4f | 10.50.48.239 | 172.16.1.202 | 9e06fe8e- e4f0-4d90- 8a77-66d0710b74 5c | 7965-4210- acf6-498c9e33fc 07 | 10.50.48.105 | 172.16.1.49 | a5ef5c63- fc7d-4b3b- 9a57-5cca63cd0f b1 | f900-4b27- ae37-53a66dc15e e6 | 10.50.48.103 | 172.16.1.48 | 8ebffa77- aff7-4e64- af51-c8df6cdc89 11 | 4bc2-40a2- 9029-972c2d2a12 e3 | 10.50.48.130 | None | None | 3828-45b7- a7ce-4dc7fcef60 89 | 10.50.48.242 | None | None | 6246-4e1e- 8412-1a7a0d17f2 2b | 10.50.48.241 | None | None | caa9-48cc- ac66-af6baf285b 32 | 10.50.48.104 | 172.16.1.51 | 780bf5ba- c79c-4360- a2ef-f1dfd5f4af 66 | 84ce-4841- a275-a47af58915 2a | 10.50.48.106 | 172.16.1.47 | 98151fda- 2b80-4194- 9d8f-4b5a2e2230 40 | ------- ------- ------- ------- ------+ ------- ------- ------- +------ ------- -----+- ------- ------- ------- ------- ------- --+
openstack 2.3.0
+----
| ID | Floating IP Address | Fixed IP Address | Port |
+----
| 07bdb6ca-
| 0b1bce87-
| 124dd71f-
| 1f2d97a0-
| 5babfd67-
| 94bb22ff-
| 993ccd2b-
| a8681eb8-
| ab3e9005-
| b6794d3f-
| e4803d10-
+----
The problem is that now it takes multiple commands to determine to what network, or pool, a floating ip belongs to.
Previously, all it took was one command:
1) openstack ip floating list
But today, to determine if an available floating IP address belongs to network I would need to do the following:
1) List all networks and grab the ID of the network I'm interested: openstack network list network_ id' property matches the network from Step 1 then it belongs to that network.
2) List all floating IPs to determine which are not allocated: openstack ip floating list
3) For each floating ip, get its details to determine its network: for ip in floating_ip: openstack ip floating show ip
4) If the 'floating_
It seems this change introduced the change to use Neutron floatingips extension:
https:/ /review. openstack. org/#/c/ 280535/
Perhaps it could be extended to also fetch this other information.