OpenStack Floating IPs API (draft)

Summary

Our goal is to add support for floating ips management in OpenStack API.

Release Note

Support for floating ips management in OpenStack API.

Rationale

User stories

Eldar wants to associate additional IP with instance. He should to have possibility to associate address. Then he wants to disassociate address. He also should have such possibility.

Assumptions

Design

At this moment we have implementation of floating IP in EC2 API. That contains next command

verb

URI

Request

Response

Comment

POST

/os-floating-ips

n/a

Allocate one ip to project

GET

/os-floating-ips

n/a

List of all available floating ips

GET

/os-floating-ips/id

n/a

Floating ip details

DELETE

/os-floating-ips/id

n/a

Release floating ip from project

POST

/os-floating-ips/id/removeFloatingIp

n/a

Dissociate floating ip

POST

/os-floating-ips/id/addFloatingIp

fixed ip

Associate floating ip to fixed ip

List of floating IPs

Response XML

<floating_ips>
    <floating_ip>
        <id>1</id>
        <ip>10.0.0.3</ip>
        <fixed_ip>11.0.0.1</fixed_ip>
        <instance_id>12</instance_id>
    </floating_ip>
</floating_ips>

Response JSON

{
    "floating_ips" : [
        {
            "id" : 1,
            "ip" : "10.0.0.3",
            "fixed_ip":"11.0.0.1",
            "instance_id":12
        }
    ]
}

Floating IP details

Response XML

<floating_ip>
    <id>1</id>
    <ip>10.0.0.3</ip>
    <fixed_ip>null</fixed_ip>
    <instance_id>null</instance_id>
</floating_ip>

Response JSON

{
    "floating_ip" : 
        {
            "id" : 1,
            "ip" : "10.0.0.3",
            "fixed_ip" : null,
            "instance_id" : null
        }
}

Associate address

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<associate_address>
    <fixed_ip>10.0.0.3</fixed_ip>
</associate_address>

Request JSON

{
    "associate_address" : {
       "fixed_ip":"10.0.0.3"
    }
}

Implementation

Add such methods to OS API.

Code Changes

Implementation for autoassociation floating ip was added in http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/1025

BoF agenda and discussion

Add information about floating IP in server details. http://etherpad.openstack.org/os-floating-ip


CategorySpec

Wiki: os_api_floating_ip (last edited 2012-01-30 15:47:20 by VishvanandaIshaya)