Difference between revisions of "Neutron/RestProxyPlugin"
m (ThierryCarrez moved page Quantum/RestProxyPlugin to Neutron/RestProxyPlugin) |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ||
= Quantum Rest Proxy Plugin = | = Quantum Rest Proxy Plugin = | ||
− | |||
− | == Scope == | + | == Scope == |
− | + | This Quantum plugin translates Quantum function calls to authenticated REST request to a set of redundant external network controllers. | |
− | == Use Cases == | + | == Use Cases == |
− | + | Providing isolated virtual networks. | |
== Implementation Overview == | == Implementation Overview == | ||
− | + | This plugin inherits from the db plugin and relies on it for persisting the state of the core resources. | |
+ | |||
+ | It then proxies the request to the controller based on the following API exposed by the controller: | ||
+ | |||
+ | GET /quantum/1.0/topology | ||
+ | |||
+ | PUT /quantum/1.0/topology | ||
+ | |||
+ | DELETE /quantum/1.0/topology | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/ | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network/detail | ||
+ | |||
+ | POST /quantum/1.0/tenants/:tenant/networks | ||
+ | |||
+ | PUT /quantum/1.0/tenants/:tenant/networks/:network | ||
+ | |||
+ | DELETE /quantum/1.0/tenants/:tenant/networks/:network | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network/ports | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/detail | ||
+ | |||
+ | POST /quantum/1.0/tenants/:tenant/networks/:network/ports | ||
+ | |||
+ | PUT /quantum/1.0/tenants/:tenant/networks/:network/ports/:port | ||
+ | |||
+ | DELETE /quantum/1.0/tenants/:tenant/networks/:network/ports/:port | ||
+ | |||
+ | GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment | ||
+ | |||
+ | PUT /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment | ||
+ | |||
+ | DELETE /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment | ||
+ | |||
+ | API details are appended to the end of this spec. | ||
== Data Model Changes == | == Data Model Changes == | ||
− | + | None, uses the base Quantum DB model. | |
== Configuration variables == | == Configuration variables == | ||
− | [ | + | etc/quantum/plugins/restproxy/restproxy.ini |
+ | |||
+ | [DATABASE] | ||
+ | |||
+ | <!-- # This line MUST be changed to actually run the plugin. --> | ||
+ | |||
+ | <!-- # Example: --> | ||
+ | |||
+ | <!-- # sql_connection = mysql://root:pass@127.0.0.1:3306/restproxy_quantum --> | ||
+ | |||
+ | <!-- # Replace 127.0.0.1 above with the IP address of the database used by the --> | ||
+ | |||
+ | <!-- # main quantum server. (Leave it as is if the database runs on this host.) --> | ||
+ | |||
+ | <!-- # Database reconnection retry times - in event connectivity is lost --> | ||
+ | |||
+ | <!-- # set to -1 implies an infinite retry count --> | ||
+ | |||
+ | <!-- # sql_max_retries = 10 --> | ||
+ | |||
+ | <!-- # Database reconnection interval in seconds - in event connectivity is lost --> | ||
+ | |||
+ | <!-- #reconnect_interval = 2 --> | ||
+ | |||
+ | [RESTPROXY] | ||
+ | |||
+ | <!-- # All configuration for this plugin is in section '[restproxy]' --> | ||
+ | |||
+ | <!-- # The following parameters are supported: --> | ||
+ | |||
+ | <!-- # servers : <host:port>[,<host:port>]* (Error if not set) --> | ||
+ | |||
+ | <!-- # serverauth : <username:password> (default: no auth) --> | ||
+ | |||
+ | <!-- # serverssl : True | False (default: False) --> | ||
+ | |||
+ | <!-- # syncdata : True | False (default: False) --> | ||
== API's == | == API's == | ||
− | + | No new APIs/extensions. | |
== Plugin Interface == | == Plugin Interface == | ||
− | + | Implements standard plugin interface. | |
== Required Plugin support == | == Required Plugin support == | ||
− | + | This is a plugin implementation. | |
== Dependencies == | == Dependencies == | ||
− | + | No new packages. Will depend though on an external controller (e.g. Floodlight) to actually perform the network configuration. | |
== CLI Requirements == | == CLI Requirements == | ||
− | + | No new CLI. | |
== Horizon Requirements == | == Horizon Requirements == | ||
− | + | None | |
== Usage Example == | == Usage Example == | ||
− | + | Quantum CLI for network, subnets, and ports | |
== Test Cases == | == Test Cases == | ||
− | [ | + | Unit tests along with a dummy controller is provided. Tests can be run from the top level Quantum |
+ | directory: | ||
+ | > ./run_tests.sh quantum.tests.unit.restproxy.test_restproxy_plugin | ||
+ | |||
+ | == Plugin to Controller API details == | ||
+ | |||
+ | See the attached document [[attachment:api-details.txt]]. |
Latest revision as of 15:54, 21 June 2013
Contents
Quantum Rest Proxy Plugin
Scope
This Quantum plugin translates Quantum function calls to authenticated REST request to a set of redundant external network controllers.
Use Cases
Providing isolated virtual networks.
Implementation Overview
This plugin inherits from the db plugin and relies on it for persisting the state of the core resources.
It then proxies the request to the controller based on the following API exposed by the controller:
GET /quantum/1.0/topology
PUT /quantum/1.0/topology
DELETE /quantum/1.0/topology
GET /quantum/1.0/tenants/:tenant/networks/
GET /quantum/1.0/tenants/:tenant/networks/:network
GET /quantum/1.0/tenants/:tenant/networks/:network/detail
POST /quantum/1.0/tenants/:tenant/networks
PUT /quantum/1.0/tenants/:tenant/networks/:network
DELETE /quantum/1.0/tenants/:tenant/networks/:network
GET /quantum/1.0/tenants/:tenant/networks/:network/ports
GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port
GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/detail
POST /quantum/1.0/tenants/:tenant/networks/:network/ports
PUT /quantum/1.0/tenants/:tenant/networks/:network/ports/:port
DELETE /quantum/1.0/tenants/:tenant/networks/:network/ports/:port
GET /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment
PUT /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment
DELETE /quantum/1.0/tenants/:tenant/networks/:network/ports/:port/attachment
API details are appended to the end of this spec.
Data Model Changes
None, uses the base Quantum DB model.
Configuration variables
etc/quantum/plugins/restproxy/restproxy.ini
[DATABASE]
[RESTPROXY]
API's
No new APIs/extensions.
Plugin Interface
Implements standard plugin interface.
Required Plugin support
This is a plugin implementation.
Dependencies
No new packages. Will depend though on an external controller (e.g. Floodlight) to actually perform the network configuration.
CLI Requirements
No new CLI.
Horizon Requirements
None
Usage Example
Quantum CLI for network, subnets, and ports
Test Cases
Unit tests along with a dummy controller is provided. Tests can be run from the top level Quantum directory: > ./run_tests.sh quantum.tests.unit.restproxy.test_restproxy_plugin
Plugin to Controller API details
See the attached document attachment:api-details.txt.