diff --git a/networking_generic_switch/devices/netmiko_devices/dell.py b/networking_generic_switch/devices/netmiko_devices/dell.py index 90e44947..ea18720e 100644 --- a/networking_generic_switch/devices/netmiko_devices/dell.py +++ b/networking_generic_switch/devices/netmiko_devices/dell.py @@ -39,12 +39,25 @@ class DellOS10(netmiko_devices.NetmikoSwitch): "exit", ) + PLUG_BOND_TO_NETWORK = ( + "interface {bond}", + "switchport mode access", + "switchport access vlan {segmentation_id}", + "exit", + ) + DELETE_PORT = ( "interface {port}", "no switchport access vlan", "exit", ) + UNPLUG_BOND_FROM_NETWORK = ( + "interface {bond}", + "no switchport access vlan", + "exit", + ) + ADD_NETWORK_TO_TRUNK = ( "interface {port}", "switchport mode trunk", @@ -52,23 +65,47 @@ class DellOS10(netmiko_devices.NetmikoSwitch): "exit", ) + ADD_NETWORK_TO_BOND_TRUNK = ( + "interface {bond}", + "switchport mode trunk", + "switchport trunk allowed vlan {segmentation_id}", + "exit", + ) + REMOVE_NETWORK_FROM_TRUNK = ( "interface {port}", "no switchport trunk allowed vlan {segmentation_id}", "exit", ) + DELETE_NETWORK_ON_BOND_TRUNK = ( + "interface {bond}", + "no switchport trunk allowed vlan {segmentation_id}", + "exit", + ) + SET_NATIVE_VLAN = ( 'interface {port}', 'switchport mode trunk', 'switchport access vlan {segmentation_id}', ) + SET_NATIVE_VLAN_BOND = ( + 'interface {bond}', + 'switchport mode trunk', + 'switchport access vlan {segmentation_id}', + ) + DELETE_NATIVE_VLAN = ( 'interface {port}', 'no switchport access vlan', ) + DELETE_NATIVE_VLAN_BOND = ( + 'interface {bond}', + 'no switchport access vlan', + ) + ENABLE_PORT = ( "interface {port}", "no shutdown", diff --git a/networking_generic_switch/devices/utils.py b/networking_generic_switch/devices/utils.py index 429eaf59..9ce63100 100644 --- a/networking_generic_switch/devices/utils.py +++ b/networking_generic_switch/devices/utils.py @@ -46,7 +46,7 @@ def sanitise_config(config): :param config: a configuration dict to sanitise. :returns: a copy of the configuration, with sensitive fields removed. """ - sanitised_fields = {"password", "ip", "device_type", "username", + sanitised_fields = {"password", "secret", "ip", "device_type", "username", "session_log"} return { key: "******" if key in sanitised_fields else value diff --git a/releasenotes/notes/dell-os10-bond-trunk-8df03c8490ee94b0.yaml b/releasenotes/notes/dell-os10-bond-trunk-8df03c8490ee94b0.yaml new file mode 100644 index 00000000..e7929c72 --- /dev/null +++ b/releasenotes/notes/dell-os10-bond-trunk-8df03c8490ee94b0.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Add bond trunk commands so LACP bond trunk ports are supported on Dell OS10 + switches.