Skip to content

Commit

Permalink
fixup! Add vlan aware VMs support
Browse files Browse the repository at this point in the history
(cherry picked from commit d940956)
(cherry picked from commit e57a5c5)
(cherry picked from commit 0ae4296)
  • Loading branch information
jovial authored and mnasiadka committed Sep 7, 2023
1 parent 443e65f commit 350949b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion networking_generic_switch/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ def add_network(self, segmentation_id, network_id):
def del_network(self, segmentation_id, network_id):
pass

@abc.abstractmethod
def plug_port_to_network_trunk(self, port_id, segmentation_id, trunk_details=None, vtr=False):
pass

Expand Down
2 changes: 2 additions & 0 deletions networking_generic_switch/devices/netmiko_devices/dell.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class DellOS10(netmiko_devices.NetmikoSwitch):

SET_NATIVE_VLAN = (
'interface {port}',
# Clean all the old trunked vlans by switching to access mode first
'switchport mode access',
'switchport mode trunk',
'switchport access vlan {segmentation_id}',
)
Expand Down
3 changes: 2 additions & 1 deletion networking_generic_switch/tests/unit/netmiko/test_dell.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def test_get_trunk_port_cmds_no_vlan_translation(self):
]
res = self.switch.get_trunk_port_cmds_no_vlan_translation(
'2222', 777, trunk_details)
self.assertEqual(['interface 2222', 'switchport mode trunk',
self.assertEqual(['interface 2222', 'switchport mode access',
'switchport mode trunk',
'switchport access vlan 777',
'interface 2222',
'switchport trunk allowed vlan 130'],
Expand Down

0 comments on commit 350949b

Please sign in to comment.