Skip to content

Commit

Permalink
pass vlan when adding pm service
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Jun 26, 2024
1 parent 2b39b91 commit 06fb3b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fabrictestbed_extensions/fablib/network_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def new_portmirror_service(
slice: Slice = None,
name: str = None,
mirror_interface_name: str = None,
mirror_interface_vlan: str = None,
receive_interface: Interface or None = None,
mirror_direction: str = "both",
) -> NetworkService:
Expand Down Expand Up @@ -344,6 +345,7 @@ def new_portmirror_service(
fim_network_service = slice.topology.add_port_mirror_service(
name=name,
from_interface_name=mirror_interface_name,
from_interface_vlan=mirror_interface_vlan,
to_interface=receive_interface.fim_interface,
direction=direction,
)
Expand Down
3 changes: 3 additions & 0 deletions fabrictestbed_extensions/fablib/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ def add_port_mirror_service(
name: str,
mirror_interface_name: str,
receive_interface: Interface or None = None,
mirror_interface_vlan: str = None,
mirror_direction: str = "both",
) -> NetworkService:
"""
Expand All @@ -921,6 +922,7 @@ def add_port_mirror_service(
:param name: Name of the service
:param mirror_interface_name: Name of the interface on the
dataplane switch to mirror
:param mirror_interface_vlan: Vlan of the interface
:param receive_interface: Interface in the topology belonging
to a SmartNIC component
:param mirror_direction: String 'rx', 'tx' or 'both'
Expand All @@ -932,6 +934,7 @@ def add_port_mirror_service(
slice=self,
name=name,
mirror_interface_name=mirror_interface_name,
mirror_interface_vlan=mirror_interface_vlan,
receive_interface=receive_interface,
mirror_direction=mirror_direction,
)
Expand Down

0 comments on commit 06fb3b2

Please sign in to comment.