Skip to main content

Generic Switch ML2 Neutron Driver

Project description

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

networking-generic-switch-1.1.0.tar.gz (51.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

networking_generic_switch-1.1.0-py2-none-any.whl (47.6 kB view details)

Uploaded Python 2

File details

Details for the file networking-generic-switch-1.1.0.tar.gz.

File metadata

File hashes

Hashes for networking-generic-switch-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f75dc64cc763d00e5a30ed8864a4bfc47f94a68998d2323736b1cac606cefd0b
MD5 24847efa1c962b0dfc67b3b5fb3ad68b
BLAKE2b-256 3e6e161201a444dc79d1a1eaa06f40f1f25c8263b29c733d1363a5a5ef156e35

See more details on using hashes here.

File details

Details for the file networking_generic_switch-1.1.0-py2-none-any.whl.

File metadata

File hashes

Hashes for networking_generic_switch-1.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 db9df8ea11aa08c7a468c52c9a1175e6ba618dbc2673a89861b47fb4740ba18f
MD5 e09544baf9fe9be3a07a36591043316b
BLAKE2b-256 7b1ca17c5f05c9cdd262ede414d87dba30c31dbc3a466cf7e3cbe56300b9e88f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page