Neutron/Quantum-floating-ips

= Quantum Floating IPs = [deprecated by https://blueprints.launchpad.net/quantum/+spec/quantum-l3-fwd-nat]

Summary
Nova has a concept of Fixed IPs and Floating IPs. Fixed IPs are assigned to an instance on creation and stay the same until the instance is explicitly terminated. Floating ips are ip addresses that can be dynamically associated with an instance. This address can be disassociated and associated with another instance at any time.

We can see how the Floating IPs are implemented by nova at: https://www.ibm.com/developerworks/mydeveloperworks/blogs/e93514d3-c4f0-4aa0-8844-497f370090f5/entry/openstack_s_floating_ips7?lang=en

This page describes how this feature is implemented in quantum.

User stories

 * create IP ranges under a certain group, only available for admin role.
 * allocate an floating IP to a certain tenant, only available for admin role.
 * deallocate an floating IP from a certain tenant
 * associate an floating IP to a given instance
 * disassociate an floating IP from a certain instance

Assumptions
N/A

Components to consider
To implement floating IPs in quantum, we have to consider:


 * Quantum client floating features, just like the one in nova client
 * Quantum API for floating features
 * Agent to implement IP table rules and bind floating IP to public interface.

In addition, we need to integrate:


 * Nova network API floating features

Overview


Just as shown by above fiture, we will have nova-network-api to support nova client floating commands. nova-network-api will invoke quantum cli lib to interactive with quantum server via API. The data about floating IPs will be store in to quantum DB. Quantum Agent, which is running on compute host will enforce the floating IP.

floating-ip top level resource
POST /v2.0/floating-ips/
 * create a range of floating ips

GET /v2.0/floating-ips/
 * list floating ips under certain tenant or all tenants

DELETE /v2.0/floating-ips/{ipid}
 * delete a floating ip

POST /v2.0/floating-ips/action {"allocate": {"tenant_id": "xxxx"}}
 * allocate a floating IP to a certain tenant from a given IP pool

Note: tenant_id can be got from context if it is missing. POST /v2.0/floating-ips/{ipid}/action {"deallocate": {"tenant_id": "xxx"}}
 * deallocate one floating IP from a certain tenant

Note: tenant_id can be got from context if it is missing. POST /v2.0/floating-ips/{ipid}/action {"associate": {"instance_id": "xxx", "interface": "eth0"}}
 * associate a floating IP to a certain instance

POST /v2.0/floating-ips/{ipid}/action {"disassociate": {"instance_id": "xxx"}}
 * disassociate a floating IP from a certain instance

database table

 * floating_ips

Unresolved issues

 * Can a Floating IP be an IPv6 address?
 * Do we need to delete a range of floating ips?