Skip to content

Commit

Permalink
Update test_network_handler.py
Browse files Browse the repository at this point in the history
Added tests of interfaces with VLAN tags.
  • Loading branch information
zlion committed Jul 8, 2024
1 parent 07f6e30 commit 1ad0c3b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions fabric_am/test/test_network_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,9 @@ def test_PortMirror(self):
# mirror_port is the name of the port being mirrored - actual name the way
# service definition needs it. It comes directly from ASM network service sliver
# whatever the right name is - user must to know it when creating a slice
#sliver.mirror_port = "HundredGigE0/0/0/17"
sliver.mirror_port = "HundredGigE0/0/0/17.100"
sliver.mirror_port = "HundredGigE0/0/0/17"
# Optional: set the vlan tag
sliver.mirror_vlan = "100"
# direction also comes from ASM network service sliver
sliver.mirror_direction = MirrorDirection.Both

Expand All @@ -1079,8 +1080,11 @@ def test_PortMirror(self):
stp_to = InterfaceSliver()
stp_to.set_name('Interface_To_Which_We_Send_Mirrored_Traffic')
stp_to.set_type(InterfaceType.ServicePort)
#sliver_labels = Labels(local_name='HundredGigE0/0/0/19', device_name='renc-data-sw')
sliver_labels = Labels(local_name='HundredGigE0/0/0/19.100', device_name='renc-data-sw')
sliver_labels = Labels(local_name='HundredGigE0/0/0/19',
device_name='renc-data-sw',
# Optional: set VLAN tag
vlan="100"
)
sliver_capacities = Capacities(bw=2000)
stp_to.set_labels(sliver_labels)
stp_to.set_capacities(sliver_capacities)
Expand Down

0 comments on commit 1ad0c3b

Please sign in to comment.