networking_generic_switch.devices package¶
Subpackages¶
- networking_generic_switch.devices.netmiko_devices package
- Submodules
- networking_generic_switch.devices.netmiko_devices.arista module
- networking_generic_switch.devices.netmiko_devices.aruba module
- networking_generic_switch.devices.netmiko_devices.brocade module
- networking_generic_switch.devices.netmiko_devices.cisco module
- networking_generic_switch.devices.netmiko_devices.cisco300 module
- networking_generic_switch.devices.netmiko_devices.cumulus module
Cumulus
Cumulus.ADD_NETWORK
Cumulus.DELETE_NETWORK
Cumulus.DELETE_PORT
Cumulus.DISABLE_BOND
Cumulus.DISABLE_PORT
Cumulus.ENABLE_BOND
Cumulus.ENABLE_PORT
Cumulus.ERROR_MSG_PATTERNS
Cumulus.NETMIKO_DEVICE_TYPE
Cumulus.PLUG_BOND_TO_NETWORK
Cumulus.PLUG_PORT_TO_NETWORK
Cumulus.SAVE_CONFIGURATION
Cumulus.UNPLUG_BOND_FROM_NETWORK
CumulusNVUE
CumulusNVUE.ADD_NETWORK
CumulusNVUE.ADD_NETWORK_TO_BOND_TRUNK
CumulusNVUE.ADD_NETWORK_TO_TRUNK
CumulusNVUE.DELETE_NATIVE_VLAN
CumulusNVUE.DELETE_NATIVE_VLAN_BOND
CumulusNVUE.DELETE_NETWORK
CumulusNVUE.DELETE_NETWORK_ON_BOND_TRUNK
CumulusNVUE.DELETE_PORT
CumulusNVUE.DISABLE_PORT
CumulusNVUE.ENABLE_PORT
CumulusNVUE.ERROR_MSG_PATTERNS
CumulusNVUE.NETMIKO_DEVICE_TYPE
CumulusNVUE.PLUG_PORT_TO_NETWORK
CumulusNVUE.REMOVE_NETWORK_FROM_TRUNK
CumulusNVUE.SAVE_CONFIGURATION
CumulusNVUE.SET_NATIVE_VLAN
CumulusNVUE.SET_NATIVE_VLAN_BOND
CumulusNVUE.send_config_set()
- networking_generic_switch.devices.netmiko_devices.dell module
DellNos
DellOS10
DellPowerConnect
DellPowerConnect.ADD_NETWORK
DellPowerConnect.ADD_NETWORK_TO_TRUNK
DellPowerConnect.DELETE_NETWORK
DellPowerConnect.DELETE_PORT
DellPowerConnect.DELETE_PORT_GENERAL
DellPowerConnect.ERROR_MSG_PATTERNS
DellPowerConnect.PLUG_PORT_TO_NETWORK
DellPowerConnect.PLUG_PORT_TO_NETWORK_GENERAL
DellPowerConnect.REMOVE_NETWORK_FROM_TRUNK
- networking_generic_switch.devices.netmiko_devices.fake module
- networking_generic_switch.devices.netmiko_devices.hpe module
- networking_generic_switch.devices.netmiko_devices.huawei module
- networking_generic_switch.devices.netmiko_devices.huawei_vrpv8 module
- networking_generic_switch.devices.netmiko_devices.juniper module
- networking_generic_switch.devices.netmiko_devices.mellanox_mlnxos module
- networking_generic_switch.devices.netmiko_devices.nokia module
- networking_generic_switch.devices.netmiko_devices.ovs module
OvsLinux
OvsLinux.ADD_NETWORK_TO_BOND_TRUNK
OvsLinux.ADD_NETWORK_TO_TRUNK
OvsLinux.DELETE_NATIVE_VLAN
OvsLinux.DELETE_NATIVE_VLAN_BOND
OvsLinux.DELETE_NETWORK_ON_BOND_TRUNK
OvsLinux.DELETE_PORT
OvsLinux.PLUG_PORT_TO_NETWORK
OvsLinux.REMOVE_NETWORK_FROM_TRUNK
OvsLinux.SET_NATIVE_VLAN
OvsLinux.SET_NATIVE_VLAN_BOND
- networking_generic_switch.devices.netmiko_devices.pluribus module
- networking_generic_switch.devices.netmiko_devices.ruijie module
- networking_generic_switch.devices.netmiko_devices.smc module
- networking_generic_switch.devices.netmiko_devices.sonic module
- Module contents
NetmikoSwitch
NetmikoSwitch.ADD_NETWORK
NetmikoSwitch.ADD_NETWORK_TO_BOND_TRUNK
NetmikoSwitch.ADD_NETWORK_TO_TRUNK
NetmikoSwitch.DELETE_NATIVE_VLAN
NetmikoSwitch.DELETE_NATIVE_VLAN_BOND
NetmikoSwitch.DELETE_NETWORK
NetmikoSwitch.DELETE_NETWORK_ON_BOND_TRUNK
NetmikoSwitch.DELETE_PORT
NetmikoSwitch.DISABLE_BOND
NetmikoSwitch.DISABLE_PORT
NetmikoSwitch.ENABLE_BOND
NetmikoSwitch.ENABLE_PORT
NetmikoSwitch.ERROR_MSG_PATTERNS
NetmikoSwitch.NETMIKO_DEVICE_TYPE
NetmikoSwitch.PLUG_BOND_TO_NETWORK
NetmikoSwitch.PLUG_PORT_TO_NETWORK
NetmikoSwitch.REMOVE_NETWORK_FROM_TRUNK
NetmikoSwitch.SAVE_CONFIGURATION
NetmikoSwitch.SET_NATIVE_VLAN
NetmikoSwitch.SET_NATIVE_VLAN_BOND
NetmikoSwitch.UNPLUG_BOND_FROM_NETWORK
NetmikoSwitch.add_network()
NetmikoSwitch.add_subports_on_trunk()
NetmikoSwitch.check_output()
NetmikoSwitch.del_network()
NetmikoSwitch.del_subports_on_trunk()
NetmikoSwitch.delete_port()
NetmikoSwitch.plug_bond_to_network()
NetmikoSwitch.plug_port_to_network()
NetmikoSwitch.save_configuration()
NetmikoSwitch.send_commands_to_device()
NetmikoSwitch.send_config_set()
NetmikoSwitch.support_trunk_on_bond_ports
NetmikoSwitch.support_trunk_on_ports
NetmikoSwitch.unplug_bond_from_network()
check_output()
Submodules¶
networking_generic_switch.devices.utils module¶
- networking_generic_switch.devices.utils.get_hostname()¶
Helper to allow isolation of CONF.host and plugin loading.
- networking_generic_switch.devices.utils.get_switch_device(switches, switch_info=None, ngs_mac_address=None)¶
Return switch device by specified identifier.
Returns switch device from switches array that matched with any of passed identifiers. ngs_mac_address takes precedence over switch_info, if didn’t match any address based on mac fallback to switch_info.
- Parameters:
switch_info – hostname of the switch or any other switch identifier.
ngs_mac_address – Normalized mac address of the switch.
- Returns:
switch device matches by specified identifier or None.
- networking_generic_switch.devices.utils.sanitise_config(config)¶
Return a sanitised configuration of a switch device.
- Parameters:
config – a configuration dict to sanitise.
- Returns:
a copy of the configuration, with sensitive fields removed.
Module contents¶
- class networking_generic_switch.devices.GenericSwitchDevice(device_cfg, device_name='')¶
Bases:
object
- abstract add_network(segmentation_id, network_id)¶
- add_subports_on_trunk(binding_profile, port_id, subports)¶
Allow subports on trunk
- Parameters:
binding_profile – Binding profile of parent port
port_id – The name of the switch port from Local Link Information
subports – List with subports objects.
- abstract del_network(segmentation_id, network_id)¶
- del_subports_on_trunk(binding_profile, port_id, subports)¶
Allow subports on trunk
- Parameters:
binding_profile – Binding profile of parent port
port_id – The name of the switch port from Local Link Information
subports – List with subports objects.
- abstract delete_port(port_id, segmentation_id, trunk_details=None)¶
Delete port from specific network.
- Parameters:
port_id – Then name of the switch interface
segmentation_id – VLAN identifier of the network used as access or native VLAN for port.
trunk_details – trunk information if port is a part of trunk
- is_allowed(port_id, segmentation_id)¶
- plug_bond_to_network(bond_id, segmentation_id, trunk_details=None)¶
Plug bond port into network.
- Parameters:
port_id – Then name of the switch interface
segmentation_id – VLAN identifier of the network used as access or native VLAN for port.
trunk_details – trunk information if port is a part of trunk
- abstract plug_port_to_network(port_id, segmentation_id, trunk_details=None)¶
Plug port into network.
- Parameters:
port_id – Then name of the switch interface
segmentation_id – VLAN identifier of the network used as access or native VLAN for port.
trunk_details – trunk information if port is a part of trunk
- property support_trunk_on_bond_ports¶
- property support_trunk_on_ports¶
- unplug_bond_from_network(bond_id, segmentation_id, trunk_details=None)¶
Unplug bond port from network.
- Parameters:
port_id – Then name of the switch interface
segmentation_id – VLAN identifier of the network used as access or native VLAN for port.
trunk_details – trunk information if port is a part of trunk
- networking_generic_switch.devices.device_manager(device_cfg, device_name='')¶