vmware-nsx/neutron/plugins/brocade
Akihiro Motoki 55737a749e Make SecurityGroupsRpcCallback a separate callback class
RPC has a version of itself. In Neutron a plugin implements
several RPC interface, so a single RPC version doesn't work.
In Mixin callback class approach, RPC versioning depends on
each plugin implementation and it makes harder to maintain
RPC version appropriately. This patch series replaces mixin
RPC callback of server side with a separate class.

This commit handles server-side callback of security group
RPC interface.
* The server-side callback of Security group RPC is moved to
  api/rpc/handler and db/securitygroups_rpc_base now only
  contains a mixin class to add agent-based security group
  implementation with db operations.
* get_port_from_device method in server-side callback class
  is moved to a mixin class of plugin implementation
  (SecurityGroupServerRpcMixin) because it involves DB lookup
  and is tightly coupled with plugin implementation rather
  than RPC interface definition.

Most unit tests for SGServerRpcCallBackTestCase were skipped
in the base class before, but now they are no longer skipped.

The following items will be planned in later patches
to avoid drastic changes in a single patch.
* Merge security group RPC API and agent callback classes in
  agent/securitygroups_rpc into api/rpc/handlers/securitygroup_rpc
* Remove completely duplicated db access code in get_port_from_device
  and get_port_and_sgs

Partial-Bug: #1359416
Change-Id: Ia6535217d2e3b849a95667c1b53dd09675002892
2014-08-30 10:19:42 +08:00
..
db Add 'server_default' parameter 2014-07-11 10:46:09 +04:00
nos Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
tests Use built-in print() instead of print statement 2013-09-21 07:30:33 -07:00
NeutronPlugin.py Make SecurityGroupsRpcCallback a separate callback class 2014-08-30 10:19:42 +08:00
README.md Remove last parts of Quantum compatibility shim 2014-03-31 23:31:23 -07:00
__init__.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
vlanbm.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00

README.md

Brocade Openstack Neutron Plugin

Openstack Brocade Neutron Plugin implements the Neutron v2.0 API.

This plugin is meant to orchestrate Brocade VCS switches running NOS, examples of these are:

  1. VDX 67xx series of switches
  2. VDX 87xx series of switches

Brocade Neutron plugin implements the Neutron v2.0 API. It uses NETCONF at the backend to configure the Brocade switch.

         +------------+        +------------+          +-------------+
         |            |        |            |          |             |
         |            |        |            |          |   Brocade   |
         | Openstack  |  v2.0  |  Brocade   |  NETCONF |  VCS Switch |
         | Neutron    +--------+  Neutron   +----------+             |
         |            |        |  Plugin    |          |  VDX 67xx   |
         |            |        |            |          |  VDX 87xx   |
         |            |        |            |          |             |
         |            |        |            |          |             |
         +------------+        +------------+          +-------------+

Directory Structure

Normally you will have your Openstack directory structure as follows:

     /opt/stack/nova/
     /opt/stack/horizon/
     ...
     /opt/stack/neutron/neutron/plugins/

Within this structure, Brocade plugin resides at:

     /opt/stack/neutron/neutron/plugins/brocade

Prerequsites

This plugin requires installation of the python netconf client (ncclient) library:

ncclient v0.3.1 - Python library for NETCONF clients available at http://github.com/brocade/ncclient

% git clone https://www.github.com/brocade/ncclient % cd ncclient; sudo python ./setup.py install

Configuration

  1. Specify to Neutron that you will be using the Brocade Plugin - this is done by setting the parameter core_plugin in Neutron:

     core_plugin = neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2
    
  2. Physical switch configuration parameters and Brocade specific database configuration is specified in the configuration file specified in the brocade.ini files:

     % cat /etc/neutron/plugins/brocade/brocade.ini
     [SWITCH]
     username = admin
     password = password
     address  = <switch mgmt ip address>
     ostype   = NOS
    
     [database]
     connection = mysql://root:pass@localhost/brocade_neutron?charset=utf8
    
     (please see list of more configuration parameters in the brocade.ini file)
    

Running Setup.py

Running setup.py with appropriate permissions will copy the default configuration file to /etc/neutron/plugins/brocade/brocade.ini. This file MUST be edited to suit your setup/environment.

  % cd /opt/stack/neutron/neutron/plugins/brocade
  % python setup.py

Devstack

Please see special notes for devstack at: http://wiki.openstack.org/brocade-neutron-plugin

In order to use Brocade Neutron Plugin, add the following lines in localrc, if localrc file doe not exist create one:

ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,neutron,q-svc,q-agt Q_PLUGIN=brocade

As part of running devstack/stack.sh, the configuration files is copied as:

% cp /opt/stack/neutron/etc/neutron/plugins/brocade/brocade.ini /etc/neutron/plugins/brocade/brocade.ini

(hence it is important to make any changes to the configuration in: /opt/stack/neutron/etc/neutron/plugins/brocade/brocade.ini)