Device driver - netconf-openconfig¶
The netconf-openconfig
device driver uses the Network Configuration
Protocol (NETCONF)
and open source vendor-neutral OpenConfig YANG
models.
This driver has been tested with the following switch vendor/operating systems:
Cisco NXOS
Arista vEOS
Example configuration for Cisco NXOS device:
[networking_baremetal]
enabled_devices = nexus.example.net
[nexus.example.net]
driver = netconf-openconfig
device_params = name:nexus
switch_info = nexus
switch_id = 00:53:00:0a:0a:0a
host = nexus.example.net
username = user
key_filename = /etc/neutron/ssh_keys/nexus_sshkey
Example configuration for Arista EOS device:
[networking_baremetal]
enabled_devices = arista.example.net
[arista.example.net]
driver = netconf-openconfig
device_params = name:default
switch_info = arista
switch_id = 00:53:00:0b:0b:0b
host = arista.example.net
username = user
key_filename = /etc/neutron/ssh_keys/arista_sshkey
Configuration options¶
netconf-openconfig-example¶
- driver¶
- Type:
string
- Default:
<None>
The driver to use when configuring the device
- switch_id¶
- Type:
string
- Default:
<None>
The switch ID, MAC address of the device.
- switch_info¶
- Type:
string
- Default:
<None>
Optional string field to be used to store any vendor-specific information.
- physical_networks¶
- Type:
list
- Default:
[]
A list of physical networks mapped to this device.
- manage_vlans¶
- Type:
boolean
- Default:
True
Set this to False for the device if VLANs should not be create and deleted on the device.
- network_instance¶
- Type:
string
- Default:
default
- Advanced Option:
Intended for advanced users and not used by the majority of users, and might have a significant effect on stability and/or performance.
The L2, L3, or L2+L3 forwarding instance to use when defining VLANs on the device.
- port_id_re_sub¶
- Type:
dict
- Default:
{'pattern': 'Ethernet', 'repl': 'eth'}
This option has a sample default set, which means that its actual default value may vary from the one documented above.
Regular expression pattern and replacement string. Some devices do not use the port description from LLDP in Netconf configuration. If the regular expression pattern and replacement string is set the port_id will be modified before passing configuration to the device.
- disabled_properties¶
- Type:
list
- Default:
[]
A list of properties that should not be used, currently only “port_mtu” is valid
- manage_lacp_aggregates¶
- Type:
boolean
- Default:
True
When set to true the driver will manage LACP aggregates if link_group_information is defined in the binding:profile. When this is false the driver expect the link aggregation to be pre-configured on the device, and only perform vlan plugging.
- link_aggregate_prefix¶
- Type:
string
- Default:
Port-Channel
The device specific prefix used for link-aggregation ports. Common values: “po”, “port-channel” or “Port-Channel”.
- link_aggregate_range¶
- Type:
string
- Default:
1000..2000
Range of link aggregation interface IDs that the driver can use when managing link aggregates.
- host¶
- Type:
string
- Default:
device.example.com
This option has a sample default set, which means that its actual default value may vary from the one documented above.
The hostname or IP address to use for connecting to the netconf device.
- username¶
- Type:
string
- Default:
netconf
This option has a sample default set, which means that its actual default value may vary from the one documented above.
The username to use for SSH authentication.
- port¶
- Type:
integer
- Default:
830
The port to use for connection to the netconf device.
- password¶
- Type:
string
- Default:
secret
This option has a sample default set, which means that its actual default value may vary from the one documented above.
The password used if using password authentication, or the passphrase to use for unlocking keys that require it. (To disable attempting key authentication altogether, set options allow_agent and look_for_keys to False.
- key_filename¶
- Type:
string
- Default:
~/.ssh/id_rsa
Private key filename
- hostkey_verify¶
- Type:
boolean
- Default:
True
Enables hostkey verification from ~/.ssh/known_hosts
- device_params¶
- Type:
dict
- Default:
{'name': 'default'}
ncclient device handler parameters, see ncclient documentation for supported device handlers.
- allow_agent¶
- Type:
boolean
- Default:
True
Enables querying SSH agent (if found) for keys.
- look_for_keys¶
- Type:
boolean
- Default:
True
Enables looking in the usual locations for ssh keys (e.g.
~/.ssh/id_*
)
networking_baremetal¶
- enabled_devices¶
- Type:
list
- Default:
['common-example', 'netconf-openconfig-example']
This option has a sample default set, which means that its actual default value may vary from the one documented above.
Enabled devices for which the plugin should manageconfiguration. Driver specific configuration for each device must be added in separate sections.
Sample Configuration File¶
The following is a sample configuration section that would be added to
/etc/neutron/plugins/ml2/ml2_conf.ini
.
The sample configuration can also be viewed in file form
.
Important
The sample configuration file is auto-generated from networking-baremetal when this documentation is built. You must ensure your version of networking-baremetal matches the version of this documentation.
[DEFAULT]
[netconf-openconfig-example]
#
# From netconf-openconfig-driver-opts
#
# The driver to use when configuring the device (string value)
#driver = <None>
# The switch ID, MAC address of the device. (string value)
#switch_id = <None>
# Optional string field to be used to store any vendor-specific information.
# (string value)
#switch_info = <None>
# A list of physical networks mapped to this device. (list value)
#physical_networks =
# Set this to False for the device if VLANs should not be create and deleted on
# the device. (boolean value)
#manage_vlans = true
# Regular expression pattern and replacement string. Some devices do not use
# the port description from LLDP in Netconf configuration. If the regular
# expression pattern and replacement string is set the port_id will be modified
# before passing configuration to the device. (dict value)
#
# This option has a sample default set, which means that
# its actual default value may vary from the one documented
# below.
#port_id_re_sub = pattern:Ethernet,repl:eth
# A list of properties that should not be used, currently only "port_mtu" is
# valid (list value)
#disabled_properties =
# When set to true the driver will manage LACP aggregates if
# link_group_information is defined in the binding:profile. When this is false
# the driver expect the link aggregation to be pre-configured on the device,
# and only perform vlan plugging. (boolean value)
#manage_lacp_aggregates = true
# The device specific prefix used for link-aggregation ports. Common values:
# "po", "port-channel" or "Port-Channel". (string value)
#link_aggregate_prefix = Port-Channel
# Range of link aggregation interface IDs that the driver can use when managing
# link aggregates. (string value)
#link_aggregate_range = 1000..2000
# The hostname or IP address to use for connecting to the netconf device.
# (string value)
#
# This option has a sample default set, which means that
# its actual default value may vary from the one documented
# below.
#host = device.example.com
# The username to use for SSH authentication. (string value)
#
# This option has a sample default set, which means that
# its actual default value may vary from the one documented
# below.
#username = netconf
# The port to use for connection to the netconf device. (integer value)
#port = 830
# The password used if using password authentication, or the passphrase to use
# for unlocking keys that require it. (To disable attempting key authentication
# altogether, set options *allow_agent* and *look_for_keys* to `False`. (string
# value)
#
# This option has a sample default set, which means that
# its actual default value may vary from the one documented
# below.
#password = secret
# Private key filename (string value)
#key_filename = ~/.ssh/id_rsa
# Enables hostkey verification from ~/.ssh/known_hosts (boolean value)
#hostkey_verify = true
# ncclient device handler parameters, see ncclient documentation for supported
# device handlers. (dict value)
#device_params = name:default
# Enables querying SSH agent (if found) for keys. (boolean value)
#allow_agent = true
# Enables looking in the usual locations for ssh keys (e.g.
# :file:`~/.ssh/id_*`) (boolean value)
#look_for_keys = true
# The L2, L3, or L2+L3 forwarding instance to use when defining VLANs on the
# device. (string value)
# Advanced Option: intended for advanced users and not used
# by the majority of users, and might have a significant
# effect on stability and/or performance.
#network_instance = default
[networking_baremetal]
#
# From netconf-openconfig-driver-opts
#
# Enabled devices for which the plugin should manageconfiguration. Driver
# specific configuration for each device must be added in separate sections.
# (list value)
#
# This option has a sample default set, which means that
# its actual default value may vary from the one documented
# below.
#enabled_devices = common-example,netconf-openconfig-example