diff options
author | Michael Pedersen <michael.soelvkaer@gmail.com> | 2017-12-20 14:38:22 -0700 |
---|---|---|
committer | Michael Pedersen <michaelx.pedersen@intel.com> | 2018-01-17 16:09:32 -0700 |
commit | 5a7cb16e9b178ee70b29a554fcbd6f582a1f031a (patch) | |
tree | cee7a9cc640864d08e4cd6aa5c3a3219c047d2a8 /test/test_nfvbench.py | |
parent | 02c8ed97e27b6e417945d27d4d3c2ab8e7dbfa7e (diff) |
[NFVBENCH-58] Add option to specify dest MAC with EXT CHAIN when ARP is
disabled
Change-Id: Ia605d7314d8047e84c5e17088ed5ce588a50e256
Signed-off-by: Michael Pedersen <michael.soelvkaer@gmail.com>
Diffstat (limited to 'test/test_nfvbench.py')
-rw-r--r-- | test/test_nfvbench.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py index 113ecfd..16784d8 100644 --- a/test/test_nfvbench.py +++ b/test/test_nfvbench.py @@ -465,11 +465,12 @@ def check_config(configs, cc, fc, src_ip, dst_ip, step_ip): assert cfc == fc -def create_device(fc, cc, ip, gip, tggip, step_ip): +def create_device(fc, cc, ip, gip, tggip, step_ip, mac): return Device(0, 0, flow_count=fc, chain_count=cc, ip=ip, gateway_ip=gip, tg_gateway_ip=tggip, ip_addrs_step=step_ip, tg_gateway_ip_addrs_step=step_ip, - gateway_ip_addrs_step=step_ip) + gateway_ip_addrs_step=step_ip, + dst_mac=mac) def check_device_flow_config(step_ip): @@ -479,8 +480,9 @@ def check_device_flow_config(step_ip): ip1 = '20.0.0.0' tggip = '50.0.0.0' gip = '60.0.0.0' - dev0 = create_device(fc, cc, ip0, gip, tggip, step_ip) - dev1 = create_device(fc, cc, ip1, gip, tggip, step_ip) + mac = ['00:11:22:33:44:55'] * cc + dev0 = create_device(fc, cc, ip0, gip, tggip, step_ip, mac) + dev1 = create_device(fc, cc, ip1, gip, tggip, step_ip, mac) dev0.set_destination(dev1) configs = dev0.get_stream_configs(ChainType.EXT) check_config(configs, cc, fc, ip0, ip1, step_ip) @@ -495,8 +497,9 @@ def test_device_ip_range(): def ip_range_overlaps(ip0, ip1, flows): tggip = '50.0.0.0' gip = '60.0.0.0' - dev0 = create_device(flows, 10, ip0, gip, tggip, '0.0.0.1') - dev1 = create_device(flows, 10, ip1, gip, tggip, '0.0.0.1') + mac = ['00:11:22:33:44:55'] * 10 + dev0 = create_device(flows, 10, ip0, gip, tggip, '0.0.0.1', mac) + dev1 = create_device(flows, 10, ip1, gip, tggip, '0.0.0.1', mac) dev0.set_destination(dev1) return dev0.ip_range_overlaps() @@ -609,6 +612,8 @@ def get_dummy_tg_config(chain_type, rate): 'tg_gateway_ip_addrs_step': '0.0.0.1', 'gateway_ip_addrs': ['1.1.0.2', '2.2.0.2'], 'gateway_ip_addrs_step': '0.0.0.1', + 'mac_addrs_left': None, + 'mac_addrs_right': None, 'udp_src_port': None, 'udp_dst_port': None}, 'service_chain': chain_type, |