Skip to content

Commit

Permalink
device mapping changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutshkumr committed Mar 26, 2021
1 parent bbb1bd5 commit 16ebaa2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.7
0.3.8
2 changes: 1 addition & 1 deletion snappi/snappigenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import requests
from jsonpath_ng import parse

MODELS_RELEASE = 'v0.3.1'
MODELS_RELEASE = 'v0.3.2'


class SnappiGenerator(object):
Expand Down
5 changes: 3 additions & 2 deletions snappi/tests/test_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ def test_choice(api):
config = api.config()
config.devices.device(name='d1').device(name='d2')
flow = config.flows.flow(name='f')[-1]
flow.tx_rx.device.tx_names = [config.devices[0].name]
flow.tx_rx.device.rx_names = [config.devices[1].name]
flow.tx_rx.device.maps.map(
tx_name=config.devices[0].name, rx_name=config.devices[1].name
)
flow.packet.ethernet().vlan().vlan().ipv4()
assert (flow.packet[0].parent.choice == 'ethernet')
assert (flow.packet[1].parent.choice == 'vlan')
Expand Down
6 changes: 4 additions & 2 deletions snappi/tests/test_create_meshed_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ def test_create_meshed_flow(api):
device.ethernet.ipv4.name = 'Ipv4 %s' % i

flow = config.flows.flow(name='Fully Meshed Flow')[0]
flow.tx_rx.device.tx_names = [device.name for device in config.devices]
flow.tx_rx.device.rx_names = [device.name for device in config.devices]
for tx in config.devices:
for rx in config.devices:
if tx.name != rx.name:
flow.tx_rx.device.maps.map(tx_name=tx.name, rx_name=rx.name)
flow.size.fixed = 128
flow.rate.pps = 1000
flow.duration.fixed_packets.packets = 10000
Expand Down

0 comments on commit 16ebaa2

Please sign in to comment.