Multi-vendor Modular Layer 2 (ML2) driver.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Charles Short eb3187863b Switch to using stestr 11 months ago
devstack Use userdel/groupdel instead of deluser/delgroup 1 year ago
doc Updated from global requirements 1 year ago
etc/neutron/plugins/ml2 Correct cisco device_type in docs and conf sample file 3 years ago
networking_generic_switch Add ruijie switch driver 11 months ago
playbooks/legacy/networking-generic-switch-tempest-dsvm-dlm Add -dlm to the tempest job name 1 year ago
releasenotes Add ruijie switch driver 11 months ago
tempest_plugin Add tempest test for DLM functionality 1 year ago
tools Avoid tox-install.sh 1 year ago
zuul.d add lower-constraints job 1 year ago
.gitignore Switch to using stestr 11 months ago
.gitreview Added .gitreview 3 years ago
.stestr.conf Switch to using stestr 11 months ago
.testr.conf Switch untittest to ostestr 2 years ago
CONTRIBUTING.rst Change launchpad to storyboard references 1 year ago
LICENSE Preparing to release 3 years ago
README.rst Add ruijie switch driver 11 months ago
lower-constraints.txt Sync hacking requirement with ironic 1 year ago
requirements.txt Updated from global requirements 1 year ago
setup.cfg Add ruijie switch driver 11 months ago
setup.py Updated from global requirements 2 years ago
test-requirements.txt Switch to using stestr 11 months ago
tox.ini Switch to using stestr 11 months ago

README.rst

Networking-generic-switch Neutron ML2 driver

This is a Modular Layer 2 Neutron Mechanism driver. The mechanism driver is responsible for applying configuration information to hardware equipment. GenericSwitch provides a pluggable framework to implement functionality required for use-cases like OpenStack Ironic multi-tenancy mode. It abstracts applying changes to all switches managed by this ML2 plugin and handling local_link_information field of Neutron port.

Contents:

Supported Devices

  • Cisco 300-series switches
  • Cisco IOS switches
  • Huawei switches
  • OpenVSwitch
  • Arista EOS
  • Dell Force10
  • Brocade ICX (FastIron)
  • Ruijie switches

This Mechanism Driver architecture allows easily to add more devices of any type.

OpenStack Neutron v2.0 => ML2 plugin => Generic Mechanism Driver => Device plugin

As example plugins, Cisco IOS and Linux OpenVSwitch are provided. These device plugins use Netmiko library, which in turn uses Paramiko library to access and configure the switches via SSH protocol.

Configuration

In order to use this mechanism the generic configuration file needs to be created/updated with the appropriate configuration information.

Switch configuration format:

[genericswitch:<switch name>]
device_type = <netmiko device type>
ngs_mac_address = <switch mac address>
ip = <IP address of switch>
port = <ssh port>
username = <credential username>
password = <credential password>
key_file = <ssh key file>
secret = <enable secret>

# If set ngs_port_default_vlan to default_vlan, switch's
# interface will restore the default_vlan.
ngs_port_default_vlan = <port default vlan>

..note:

Switch will be selected by local_link_connection/switch_info
or ngs_mac_address. So, you can use the switch MAC address to identify
switches if local_link_connection/switch_info is not set.

Here is an example of /etc/neutron/plugins/ml2/ml2_conf_genericswitch.ini for the Cisco 300 series device:

[genericswitch:sw-hostname]
device_type = netmiko_cisco_s300
ngs_mac_address = <switch mac address>
username = admin
password = password
ip = <switch mgmt ip address>

for the Cisco IOS device:

[genericswitch:sw-hostname]
device_type = netmiko_cisco_ios
ngs_mac_address = <switch mac address>
username = admin
password = password
secret = secret
ip = <switch mgmt ip address>

for the Huawei VRPV3 or VRPV5 device:

[genericswitch:sw-hostname]
device_type = netmiko_huawei
ngs_mac_address = <switch mac address>
username = admin
password = password
port = 8222
secret = secret
ip = <switch mgmt ip address>

for the Huawei VRPV8 device:

[genericswitch:sw-hostname]
device_type = netmiko_huawei_vrpv8
ngs_mac_address = <switch mac address>
username = admin
password = password
port = 8222
secret = secret
ip = <switch mgmt ip address>

for the Arista EOS device:

[genericswitch:arista-hostname]
device_type = netmiko_arista_eos
ngs_mac_address = <switch mac address>
ip = <switch mgmt ip address>
username = admin
key_file = /opt/data/arista_key

for the Dell Force10 device:

[genericswitch:dell-hostname]
device_type = netmiko_dell_force10
ngs_mac_address = <switch mac address>
ip = <switch mgmt ip address>
username = admin
password = password
secret = secret

for the Brocade FastIron (ICX) device:

[genericswitch:hostname-for-fast-iron]
device_type = netmiko_brocade_fastiron
ngs_mac_address = <switch mac address>
ip = <switch mgmt ip address>
username = admin
password = password

for the Ruijie device:

[genericswitch:sw-hostname]
device_type = netmiko_ruijie
ngs_mac_address = <switch mac address>
username = admin
password = password
secret = secret
ip = <switch mgmt ip address>

Additionally the GenericSwitch mechanism driver needs to be enabled from the ml2 config file /etc/neutron/plugins/ml2/ml2_conf.ini:

[ml2]
tenant_network_types = vlan
type_drivers = local,flat,vlan,gre,vxlan
mechanism_drivers = openvswitch,genericswitch
...
...

(Re)start neutron-server specifying this additional configuration file:

neutron-server \
    --config-file /etc/neutron/neutron.conf \
    --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
    --config-file /etc/neutron/plugins/ml2/ml2_conf_genericswitch.ini