Skip to content

Commit

Permalink
Your commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
selldinesh committed Jul 19, 2023
1 parent d78288d commit 85c4393
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions common/sai_dataplane/snappi/sai_snappi_dataplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ def init(self):
for pid, port in enumerate(self.config['port_groups']):
if self.mode == 'ixnet':
location = port['location']
self.configuration.ports.port(name=port["name"], location=location)
assert not location.startswith("localhost"), f"Invalid {self.mode} port location {location}"
else:
location = port.get('location', f"localhost:{BASE_TENGINE_PORT+pid}")
self.configuration.ports.port(name=port["name"], location=location)

self.configuration.ports.port(name=port["name"], location=location)
cap = self.configuration.captures.capture(name="c1")[-1]
cap.port_names = [p.name for p in self.configuration.ports]
cap.format = cap.PCAP
Expand Down

0 comments on commit 85c4393

Please sign in to comment.