Jump to: navigation, search

Difference between revisions of "Neutron/RestProxyPlugin"

m (ThierryCarrez moved page Quantum/RestProxyPlugin to Neutron/RestProxyPlugin)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
= Quantum Rest Proxy Plugin =
 
= Quantum Rest Proxy Plugin =
  
 
== Scope ==
 
== Scope ==
This is a generic quantum plugin that translates quantum function calls to authenticated REST request to a set of redundant external network controllers.
+
This Quantum plugin translates Quantum function calls to authenticated REST request to a set of redundant external network controllers.
  
 
== Use Cases ==
 
== Use Cases ==
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 15: Line 55:
  
 
== Configuration variables ==
 
== Configuration variables ==
[List and explanation of the    new configuration variables (if they exist)]
+
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 ==
Line 24: Line 100:
  
 
== Required Plugin support ==
 
== Required Plugin support ==
[What should the plugins do to support this new feature? (If applicable)]
+
This is a plugin implementation.
  
 
== Dependencies ==
 
== Dependencies ==
[List of python packages and/or OpenStack components? (If applicable)]
+
No new packages. Will depend though on an external controller (e.g. Floodlight) to actually perform the network configuration.
  
 
== CLI Requirements ==
 
== CLI Requirements ==
[List of CLI requirements (If applicable)]
+
No new CLI.
  
 
== Horizon Requirements ==
 
== Horizon Requirements ==
[List of Horizon requirements (If applicable)]
+
None
  
 
== Usage Example ==
 
== Usage Example ==
[How to run/use/interface with the new feature.  (If applicable)]
+
Quantum CLI for network, subnets, and ports
  
 
== Test Cases ==
 
== Test Cases ==
[Description of various test cases. (If applicable)]
+
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

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.