config = _get_chain_config(sc=ChainType.EXT)
specs = Specs()
config.vlans = [100, 200]
- config.vnis = [5000, 6000]
config['traffic_generator']['mac_addrs_left'] = ['00:00:00:00:00:00']
config['traffic_generator']['mac_addrs_right'] = ['00:00:00:00:01:00']
if l2_loopback:
config.l2_loopback = True
config.vlans = [[100], [200]]
- config.vnis = [[5000], [6000]]
factory = BasicFactory()
config_plugin = factory.get_config_plugin_class()(config)
config = config_plugin.get_config()
'total': {'packets': [30000004, 30000004, 30000004, 30000004, 30000004, 30000004]}},
{0: {'packets': [15000002, '', 14000002, 14000002, '', 13000002]},
1: {'packets': [15000002, '', 15000002, 15000002, '', 15000002]},
- 'total': {'packets': [30000004, 29000004, 29000004, 29000004, 29000004, 28000004]}}]
+ 'total': {'packets': [30000004, 29000004, 29000004, 29000004, 29000004, 28000004]}},
+ # example with non-available rx count in last position
+ {0: {'packets': [2000054, 1999996, None]},
+ 1: {'packets': [2000054, 2000054, None]},
+ 'total': {'packets': [4000108, 4000050, 4000050]}}]
XP_CHAIN_STATS = [{0: {'packets': [2000054, '-58 (-0.0029%)', 1999996]}},
{0: {'packets': [2000054, '-58 (-0.0029%)', 1999996]},
1: {'packets': [2000054, '=>', 2000054]},
'-1,000,000 (-7.1429%)']},
1: {'packets': [15000002, '', '=>', '=>', '', 15000002]},
'total': {'packets': [30000004, '-1,000,000 (-3.3333%)', '=>', '=>', '=>',
- '-1,000,000 (-3.4483%)']}}]
+ '-1,000,000 (-3.4483%)']}},
+ {0: {'packets': [2000054, '-58 (-0.0029%)', 'n/a']},
+ 1: {'packets': [2000054, '=>', 'n/a']},
+ 'total': {'packets': [4000108, '-58 (-0.0014%)', 4000050]}}]
def test_summarizer():
config = _get_chain_config(ChainType.EXT, 1, True, rate='100%')
specs = Specs()
config.vlans = [100, 200]
- config.vnis = [5000, 6000]
config['traffic_generator']['mac_addrs_left'] = ['00:00:00:00:00:00']
config['traffic_generator']['mac_addrs_right'] = ['00:00:00:00:01:00']
config.no_arp = True