Skip to content

Commit 426be01

Browse files
jovialmarkgoddard
authored andcommitted
fixup! Add vlan aware VMs support
(cherry picked from commit d940956)
1 parent 888b12d commit 426be01

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

networking_generic_switch/devices/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def add_network(self, segmentation_id, network_id):
145145
def del_network(self, segmentation_id, network_id):
146146
pass
147147

148-
@abc.abstractmethod
149148
def plug_port_to_network_trunk(self, port_id, segmentation_id, trunk_details=None, vtr=False):
150149
pass
151150

networking_generic_switch/devices/netmiko_devices/dell.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ class DellOS10(netmiko_devices.NetmikoSwitch):
7171

7272
SET_NATIVE_VLAN = (
7373
'interface {port}',
74+
# Clean all the old trunked vlans by switching to access mode first
75+
'switchport mode access',
7476
'switchport mode trunk',
7577
'switchport access vlan {segmentation_id}',
7678
)

networking_generic_switch/tests/unit/netmiko/test_dell.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def test_get_trunk_port_cmds_no_vlan_translation(self):
5959
]
6060
res = self.switch.get_trunk_port_cmds_no_vlan_translation(
6161
'2222', 777, trunk_details)
62-
self.assertEqual(['interface 2222', 'switchport mode trunk',
62+
self.assertEqual(['interface 2222', 'switchport mode access',
63+
'switchport mode trunk',
6364
'switchport access vlan 777',
6465
'interface 2222',
6566
'switchport trunk allowed vlan 130'],

0 commit comments

Comments
 (0)