0

I found the following REST API in Openstack [1] to associate a floating IP to a given server. There you can specify to which server this IP should be allocated to. My instance have multiple network interfaces (lets say eth0, eth1 eth2). This IP allocations always allocate the IP to the first nic which is eth0. My requirement is to assign the IP to a nic which I prefer (say eth1). Is there a way to specify the nic when allocating floating IPs.

POST /v2/{tenant_id}/servers/{server_id}/action

{
    "addFloatingIp": {
        "address": "10.10.10.1"
    }
}

I expect a API something like below. How can I know the list of parameters available in the request payload under "addFloatingIp"

{
    "addFloatingIp": {
        "address": "10.10.10.1", 
        "nic":"eth2"
    }
}

Openstack version : IceHouse

[1]http://docs.openstack.org/api/openstack-compute/2/content/POST_os-floating-ips-v2_AddFloatingIP__v2__tenant_id__servers__server_id__action_ext-os-floating-ips.html

Udara S.S Liyanage
  • 6,189
  • 9
  • 33
  • 34

1 Answers1

0

I think you might want to use the Neutron restful API for this Operation

POST /v2.0/floatingips Creates a floating IP, and, if you specify port information, associates the floating IP with an internal port

With this operation you can specify the floating IP, but also the fixed IP to associate it with.

Dave
  • 656
  • 2
  • 6
  • 22