Sure it's possible, if you're willing to write some code. For example, I have an instance with floating ip address "192.168.200.4". I can get information about floating ip from the network api:
curl -H 'x-auth-token: ...' http://localhost:9696/v2.0/floatingips
Which will get me something like:
{
"floatingips": [
{
"id": "8dcbbc48-16d3-4a70-a77c-db7f5e31d604",
"port_id": "2bc943e3-d575-4a67-ba37-19cc8516ca48",
"floating_ip_address": "192.168.200.4",
"fixed_ip_address": "10.0.0.2",
"floating_network_id": "93c8ddfc-7baa-4667-a01c-dfbdf5d47f15",
"tenant_id": "28a490a259974817b88ce490a74df8d2",
"router_id": "acc6b46f-d040-490f-8d1f-7d6f9a0df8d9"
},
],
}
This gets me a port ID, and I can find details about ports like this:
curl -H 'x-auth-token: ...' http://localhost:9696/v2.0/ports/2bc943e3-d575-4a67-ba37-19cc8516ca48
Which gives me:
{
"port": {
"device_id": "71d68b44-625e-4aca-81e0-fa02c80da6b3",
"security_groups": [
"0409e06d-f613-4732-ab66-9e2f482b369b",
"bf0cb82a-fee9-4e6a-8a8e-4609966ed898"
],
.
.
.
Here the device_id
is the UUID of the instance attached to this
port. And if I run:
nova show 71d68b44-625e-4aca-81e0-fa02c80da6b3
I get the information about my instance.