Jump to: navigation, search

Difference between revisions of "Os api floating ip"

Line 75: Line 75:
 
'''Allocate address'''
 
'''Allocate address'''
  
XML
+
Request XML
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 83: Line 83:
  
  
JSON
+
Request JSON
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 94: Line 94:
 
'''List of ips'''
 
'''List of ips'''
  
XML
+
Response XML
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 106: Line 106:
  
  
JSON
+
Response JSON
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 122: Line 122:
 
'''Release address'''
 
'''Release address'''
  
XML
+
Request XML
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 129: Line 129:
  
  
JSON
+
Request JSON
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 140: Line 140:
 
'''Associate address'''
 
'''Associate address'''
  
XML
+
Request XML
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 149: Line 149:
  
  
JSON
+
Request JSON
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 162: Line 162:
 
'''Disassociate address'''
 
'''Disassociate address'''
  
XML
+
Request XML
  
 
<pre><nowiki>
 
<pre><nowiki>
Line 170: Line 170:
  
  
JSON
+
Request JSON
  
 
<pre><nowiki>
 
<pre><nowiki>

Revision as of 22:35, 15 June 2011

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 /floating_ips/ n/a
GET /floating_ips/ n/a
GET /floating_ips/{ip} n/a
GET /floating_ips/{ip_id} n/a
DELETE ip_id} n/a
POST ip_id}/disassociate n/a
POST ip_id}/associate fixed ip

Allocate address

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<allocate_address/>


Request JSON

{
    "allocate_address" : null
}


List of ips

Response XML

<floating_ips>
    <floating_ip>
        <id>1</id>
        <ip>10.0.0.3/8</ip>
    </floating_ip>
</floating_ips>


Response JSON

{
    "floating_ips" : [
        {
            "id" : 1,
            "ip" : "10.0.0.3/8"
        }
    ]
}


Release address

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<release_address/>


Request JSON

{
    "release_address" : null
} 


Associate address

Request XML

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


Request JSON

{
    "associate_address" : {
       "fixed_ip":"10.0.0.3/8"
    }
}


Disassociate address

Request XML

<?xml version="1.0" encoding="UTF-8"?>
<diassociate_address/>


Request JSON

{
    "diassociate_address" : null
}

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

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

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.