Jump to: navigation, search

Difference between revisions of "Os api floating ip"

m (Text replace - "NovaSpec" to "NovaSpec")
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
[[OpenStack]] Floating IPs API (draft)
 
[[OpenStack]] Floating IPs API (draft)
  
* '''Launchpad Entry''': [[NovaSpec]]:openstack-api-floating-ips
+
* '''Launchpad Entry''': NovaSpec:openstack-api-floating-ips
 
* '''Created''':
 
* '''Created''':
 
* '''Contributors''': Ilya Alekseyev, Eldar Nugaev, Kirill Shileev
 
* '''Contributors''': Ilya Alekseyev, Eldar Nugaev, Kirill Shileev
Line 38: Line 38:
 
|-
 
|-
 
| POST
 
| POST
| /floating_ips/
+
| /os-floating-ips
 
| n/a
 
| n/a
 
|   
 
|   
 
|-
 
|-
 
| GET
 
| GET
| /floating_ips/
+
| /os-floating-ips
 
| n/a
 
| n/a
 
|   
 
|   
 
|-
 
|-
 
| GET
 
| GET
| /floating_ips/{ip}
+
| /os-floating-ips/id
| n/a
 
 
|-
 
| GET
 
| /floating_ips/{ip_id}
 
 
| n/a
 
| n/a
 
|   
 
|   
 
|-
 
|-
 
| DELETE
 
| DELETE
| /floating_ips/{ip | ip_id}
+
| /os-floating-ips/id
 
| n/a  
 
| n/a  
 
|   
 
|   
 
|-
 
|-
 
| POST
 
| POST
| /floating_ips/{ip | ip_id}/disassociate
+
| /os-floating-ips/id/removeFloatingIp
 
| n/a  
 
| n/a  
 
|   
 
|   
 
|-
 
|-
 
| POST
 
| POST
| /floating_ips/{ip | ip_id}/associate
+
| /os-floating-ips/id/addFloatingIp
 
|  fixed ip  
 
|  fixed ip  
 
|   
 
|   
Line 82: Line 77:
 
         <id>1</id>
 
         <id>1</id>
 
         <ip>10.0.0.3</ip>
 
         <ip>10.0.0.3</ip>
 +
        <fixed_ip>11.0.0.1</fixed_ip>
 +
        <instance_id>12</instance_id>
 
     </floating_ip>
 
     </floating_ip>
 
</floating_ips>
 
</floating_ips>
Line 94: Line 91:
 
         {
 
         {
 
             "id" : 1,
 
             "id" : 1,
             "ip" : "10.0.0.3"
+
             "ip" : "10.0.0.3",
 +
            "fixed_ip":"11.0.0.1",
 +
            "instance_id":12
 
         }
 
         }
 
     ]
 
     ]
Line 109: Line 108:
 
     <id>1</id>
 
     <id>1</id>
 
     <ip>10.0.0.3</ip>
 
     <ip>10.0.0.3</ip>
     <fixed_id>null</fixed_ip>
+
     <fixed_ip>null</fixed_ip>
 
     <instance_id>null</instance_id>
 
     <instance_id>null</instance_id>
 
</floating_ip>
 
</floating_ip>
Line 159: Line 158:
 
Implementation for autoassociation floating ip was added in
 
Implementation for autoassociation floating ip was added in
 
http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/1025
 
http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/1025
 
=== Migration ===
 
 
Include:
 
* data migration, if any
 
* redirects from old URLs to new ones, if any
 
* how users will be pointed to the new way of doing things, if necessary.
 
 
== Test/Demo Plan ==
 
 
This need not be added or completed until the specification is nearing beta.
 
 
== Unresolved issues ==
 
 
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
 
  
 
== BoF agenda and discussion ==
 
== BoF agenda and discussion ==
  
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
+
Add information about floating IP in server details.
 
+
http://etherpad.openstack.org/os-floating-ip
 
----
 
----
 
[[Category:Spec]]
 
[[Category:Spec]]

Latest revision as of 23:31, 17 February 2013

OpenStack Floating IPs API (draft)

  • Launchpad Entry: NovaSpec:openstack-api-floating-ips
  • Created:
  • Contributors: Ilya Alekseyev, Eldar Nugaev, Kirill Shileev

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

  • allocate_address
  • release_address
  • associate_address
  • disassociate_address
verb URI Request Response
POST /os-floating-ips n/a
GET /os-floating-ips n/a
GET /os-floating-ips/id n/a
DELETE /os-floating-ips/id n/a
POST /os-floating-ips/id/removeFloatingIp n/a
POST /os-floating-ips/id/addFloatingIp 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