Jump to: navigation, search

Difference between revisions of "Neutron/RestProxyPlugin"

Line 9: Line 9:
  
 
== Implementation Overview ==
 
== Implementation Overview ==
Provide an overview of the implementation and any algorithms that will be used
+
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 ==
Line 16: Line 56:
 
== Configuration variables ==
 
== Configuration variables ==
 
etc/quantum/plugins/restproxy/restproxy.ini
 
etc/quantum/plugins/restproxy/restproxy.ini
 +
 
[DATABASE]
 
[DATABASE]
 +
 
<!-- # This line MUST be changed to actually run the plugin. -->
 
<!-- # This line MUST be changed to actually run the plugin. -->
 +
 
<!-- # Example: -->
 
<!-- # Example: -->
 +
 
<!-- # sql_connection = mysql://root:pass@127.0.0.1:3306/restproxy_quantum -->
 
<!-- # 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 -->
 
<!-- # 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.) -->
 
<!-- # main quantum server. (Leave it as is if the database runs on this host.) -->
 +
 
<!-- # Database reconnection retry times - in event connectivity is lost -->
 
<!-- # Database reconnection retry times - in event connectivity is lost -->
 +
 
<!-- # set to -1 implies an infinite retry count -->
 
<!-- # set to -1 implies an infinite retry count -->
 +
 
<!-- # sql_max_retries = 10 -->
 
<!-- # sql_max_retries = 10 -->
 +
 
<!-- # Database reconnection interval in seconds - in event connectivity is lost -->
 
<!-- # Database reconnection interval in seconds - in event connectivity is lost -->
 +
 
<!-- #reconnect_interval = 2 -->
 
<!-- #reconnect_interval = 2 -->
  
 
[RESTPROXY]
 
[RESTPROXY]
 +
 
<!-- # All configuration for this plugin is in section '[restproxy]' -->
 
<!-- # All configuration for this plugin is in section '[restproxy]' -->
<!-- # -->
+
 
 
<!-- # The following parameters are supported: -->
 
<!-- # The following parameters are supported: -->
 +
 
<!-- #  servers    :  <host:port>[,<host:port>]*  (Error if not set) -->
 
<!-- #  servers    :  <host:port>[,<host:port>]*  (Error if not set) -->
 +
 
<!-- #  serverauth  :  <username:password>        (default: no auth) -->
 
<!-- #  serverauth  :  <username:password>        (default: no auth) -->
 +
 
<!-- #  serverssl  :  True | False                (default: False) -->
 
<!-- #  serverssl  :  True | False                (default: False) -->
 +
 
<!-- #  syncdata  :  True | False                (default: False) -->
 
<!-- #  syncdata  :  True | False                (default: False) -->
  
Line 62: Line 118:
 
directory:
 
directory:
 
>  ./run_tests.sh quantum.tests.unit.restproxy.test_restproxy_plugin
 
>  ./run_tests.sh quantum.tests.unit.restproxy.test_restproxy_plugin
 +
 +
== Plugin to Controller API details ==
 +
 +
See the attached document.

Revision as of 06:45, 30 October 2012

Quantum Rest Proxy Plugin

Scope

This Quantum plugin that 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.