I currently have a service catalog item where users can select various options such as an OpenStack tenant, network and floating IPs. The code that builds the floating IP looks like this
cloud_tenant.floating_ips.each do |floating_ip|
if floating_ip.status == "DOWN"
floating_ips[floating_ip.id] = floating_ip.address
end
end
And the dialog options has the name floating_ip_address
so that ManageIQ handles allocating the address. Everything works but it doesn’t seem like the floating IP is unallocated from the MIQ db until the next provider refresh so if someone performs another provision before then, they will see the IP as still being available.
I could make a REST call directly to OpenStack to build up the floating ip address dropdown or maybe the fog gem, but I’d rather use the MIQ as a “record of truth”.
In the code that builds up the dropdown is there a way I could have MIQ go get the latest data from OpenStack just for the floating IPs and not all of OpenStack’s inventory as that would probably take a while.
This issue also happens if I use the built in Clouds > Instances > Lifecycle > Provision Instances
Thanks.