# list all floating IPs
openstack floating ip list
openstack floating ip show 1.2.3.4
openstack floating ip list --project ${PROJECT_ID} --long
# Allocate floating IP
openstack floating ip create public
# Allocate specific floating IP for a project (as cloud admin)
openstack floating ip create public --floating-ip-address 10.11.12.13 --project foo-project
FLOATING_IP=$(openstack floating ip create public -c floating_ip_address -f value --floating-ip-address 10.11.12.13)
# Associate floating IP to instance
openstack server add floating ip ${INSTANCE_NAME_OR_ID} ${FLOATING_IP}
# Disassociate floating IP
openstack server remove floating ip ${INSTANCE_NAME_OR_ID} ${FLOATING_IP}
# Release floating IP
openstack floating ip delete ${FLOATING_IP}
# show used floating IPs
NETWORK_ID=$(openstack subnet list --network public -c Network -f value)
openstack ip availability show -c total_ips -c used_ips ${NETWORK_ID}
# Add floating IP to port
openstack floating ip set --port ${PORT_ID} ${FLOATING_IP}
List reserved floating IPs per project