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
CumulusCumulus.ADD_NETWORKCumulus.DELETE_NETWORKCumulus.DELETE_PORTCumulus.DISABLE_BONDCumulus.DISABLE_PORTCumulus.ENABLE_BONDCumulus.ENABLE_PORTCumulus.ERROR_MSG_PATTERNSCumulus.NETMIKO_DEVICE_TYPECumulus.PLUG_BOND_TO_NETWORKCumulus.PLUG_PORT_TO_NETWORKCumulus.SAVE_CONFIGURATIONCumulus.UNPLUG_BOND_FROM_NETWORK
- networking_generic_switch.devices.netmiko_devices.dell module
DellNosDellOS10DellPowerConnectDellPowerConnect.ADD_NETWORKDellPowerConnect.ADD_NETWORK_TO_TRUNKDellPowerConnect.DELETE_NETWORKDellPowerConnect.DELETE_PORTDellPowerConnect.DELETE_PORT_GENERALDellPowerConnect.ERROR_MSG_PATTERNSDellPowerConnect.PLUG_PORT_TO_NETWORKDellPowerConnect.PLUG_PORT_TO_NETWORK_GENERALDellPowerConnect.REMOVE_NETWORK_FROM_TRUNK
- 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
- networking_generic_switch.devices.netmiko_devices.pluribus module
- networking_generic_switch.devices.netmiko_devices.ruijie module
- networking_generic_switch.devices.netmiko_devices.sonic module
- Module contents
NetmikoSwitchNetmikoSwitch.ADD_NETWORKNetmikoSwitch.ADD_NETWORK_TO_TRUNKNetmikoSwitch.DELETE_NETWORKNetmikoSwitch.DELETE_PORTNetmikoSwitch.DISABLE_BONDNetmikoSwitch.DISABLE_PORTNetmikoSwitch.ENABLE_BONDNetmikoSwitch.ENABLE_PORTNetmikoSwitch.ERROR_MSG_PATTERNSNetmikoSwitch.NETMIKO_DEVICE_TYPENetmikoSwitch.PLUG_BOND_TO_NETWORKNetmikoSwitch.PLUG_PORT_TO_NETWORKNetmikoSwitch.REMOVE_NETWORK_FROM_TRUNKNetmikoSwitch.SAVE_CONFIGURATIONNetmikoSwitch.UNPLUG_BOND_FROM_NETWORKNetmikoSwitch.add_network()NetmikoSwitch.check_output()NetmikoSwitch.del_network()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.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)¶
Bases:
object- abstract add_network(segmentation_id, network_id)¶
- abstract del_network(segmentation_id, network_id)¶
- abstract delete_port(port_id, segmentation_id)¶
- plug_bond_to_network(bond_id, segmentation_id)¶
- abstract plug_port_to_network(port_id, segmentation_id)¶
- unplug_bond_from_network(bond_id, segmentation_id)¶
- networking_generic_switch.devices.device_manager(device_cfg)¶