diff options
author | 2016-03-16 18:32:45 +0200 | |
---|---|---|
committer | 2016-03-16 19:17:55 +0200 | |
commit | aa334e0ef9258ffc70f0741627861b832d79a69b (patch) | |
tree | 2ea277e05acd3c45fafa308fcdfe695bdcfc32e5 /scripts/stl | |
parent | 9518c16c5f10bef7a87b2237b635ea47ef5c183a (diff) |
tunables show on the console
Diffstat (limited to 'scripts/stl')
-rw-r--r-- | scripts/stl/pcap.py | 4 | ||||
-rw-r--r-- | scripts/stl/pcap_with_vm.py | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/scripts/stl/pcap.py b/scripts/stl/pcap.py index bcf2257f..3dd46588 100644 --- a/scripts/stl/pcap.py +++ b/scripts/stl/pcap.py @@ -7,9 +7,9 @@ class STLPcap(object): def __init__ (self, pcap_file): self.pcap_file = pcap_file - def get_streams (self, direction = 0, **kwargs): + def get_streams (self, direction = 0, ipg_usec = 10.0, loop_count = 1, **kwargs): - profile = STLProfile.load_pcap(self.pcap_file, ipg_usec = kwargs.get('ipg_usec', 10.0), loop_count = kwargs.get('loop_count', 1)) + profile = STLProfile.load_pcap(self.pcap_file, ipg_usec = ipg_usec, loop_count = loop_count) return profile.get_streams() diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py index 6531a129..7cf2906b 100644 --- a/scripts/stl/pcap_with_vm.py +++ b/scripts/stl/pcap_with_vm.py @@ -29,16 +29,19 @@ class STLPcap(object): return vm - def get_streams (self, direction = 0, **kwargs): - - ip_src_range = kwargs.get('ip_src_range', None) - ip_dst_range = kwargs.get('up_dst_range', {'start' : '10.0.0.1', 'end': '10.0.0.254'}) + def get_streams (self, + direction = 0, + ipg_usec = 10.0, + loop_count = 5, + ip_src_range = None, + ip_dst_range = {'start' : '10.0.0.1', 'end': '10.0.0.254'}, + **kwargs): vm = self.create_vm(ip_src_range, ip_dst_range) profile = STLProfile.load_pcap(self.pcap_file, - ipg_usec = kwargs.get('ipg_usec', 10.0), - loop_count = kwargs.get('loop_count', 5), + ipg_usec = ipg_usec, + loop_count = loop_count, vm = vm) return profile.get_streams() |