summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-03-16 20:04:28 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-03-16 20:04:28 +0200
commit027850daba11821c3c4eeb1d3711d5905c1ed95d (patch)
tree85681ec64d435f4c9bc03deb2e7e16cd3d0f105c
parentdaf8476c5602d026364df9816ade07a3d4831a0a (diff)
parentaa334e0ef9258ffc70f0741627861b832d79a69b (diff)
Merge branch 'master' of csi-sceasr-b32:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
-rw-r--r--scripts/automation/regression/setups/trex14/benchmark.yaml14
-rw-r--r--scripts/automation/regression/setups/trex14/config.yaml8
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nbar_test.py11
-rwxr-xr-xscripts/automation/regression/stateless_tests/__init__.py0
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py7
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py72
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py33
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py71
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py22
-rw-r--r--scripts/stl/burst_3st_1000pkt.py2
-rw-r--r--scripts/stl/burst_3st_600pkt.py2
-rw-r--r--scripts/stl/burst_3st_loop_x_times.py2
-rw-r--r--scripts/stl/burst_split.py2
-rw-r--r--scripts/stl/flow_stats.py2
-rwxr-xr-xscripts/stl/hlt/hlt_4vlans.py2
-rwxr-xr-xscripts/stl/hlt/hlt_david1.py2
-rwxr-xr-xscripts/stl/hlt/hlt_david2.py2
-rwxr-xr-xscripts/stl/hlt/hlt_david3.py2
-rwxr-xr-xscripts/stl/hlt/hlt_david4.py2
-rwxr-xr-xscripts/stl/hlt/hlt_framesize_vm.py2
-rwxr-xr-xscripts/stl/hlt/hlt_imix_4rates.py2
-rwxr-xr-xscripts/stl/hlt/hlt_imix_default.py2
-rwxr-xr-xscripts/stl/hlt/hlt_ip_ranges.py2
-rwxr-xr-xscripts/stl/hlt/hlt_ipv6_default.py2
-rwxr-xr-xscripts/stl/hlt/hlt_ipv6_ranges.py2
-rwxr-xr-xscripts/stl/hlt/hlt_l3_length_vm.py2
-rwxr-xr-xscripts/stl/hlt/hlt_mac_ranges.py2
-rwxr-xr-xscripts/stl/hlt/hlt_tcp_ranges.py2
-rwxr-xr-xscripts/stl/hlt/hlt_udp_inc_dec_len_9k.py2
-rwxr-xr-xscripts/stl/hlt/hlt_udp_ports.py2
-rwxr-xr-xscripts/stl/hlt/hlt_udp_random_ports.py2
-rwxr-xr-xscripts/stl/hlt/hlt_vlan_default.py2
-rwxr-xr-xscripts/stl/hlt/hlt_vlans_vm.py2
-rwxr-xr-xscripts/stl/hlt/hlt_wentong1.py2
-rwxr-xr-xscripts/stl/hlt/hlt_wentong2.py2
-rw-r--r--scripts/stl/imix.py2
-rw-r--r--scripts/stl/multi_burst_2st_1000pkt.py2
-rw-r--r--scripts/stl/pcap.py4
-rw-r--r--scripts/stl/pcap_with_vm.py10
-rw-r--r--scripts/stl/simple_3st.py2
-rw-r--r--scripts/stl/syn_attack.py2
-rw-r--r--scripts/stl/udp_1pkt.py2
-rw-r--r--scripts/stl/udp_1pkt_1mac.py2
-rw-r--r--scripts/stl/udp_1pkt_1mac_override.py2
-rw-r--r--scripts/stl/udp_1pkt_1mac_step.py2
-rw-r--r--scripts/stl/udp_1pkt_dns.py2
-rw-r--r--scripts/stl/udp_1pkt_ipv6_in_ipv4.py2
-rw-r--r--scripts/stl/udp_1pkt_mac.py2
-rw-r--r--scripts/stl/udp_1pkt_mac_mask1.py2
-rw-r--r--scripts/stl/udp_1pkt_mac_mask2.py2
-rw-r--r--scripts/stl/udp_1pkt_mac_mask3.py2
-rw-r--r--scripts/stl/udp_1pkt_mac_mask5.py2
-rw-r--r--scripts/stl/udp_1pkt_mac_step.py2
-rw-r--r--scripts/stl/udp_1pkt_mpls.py2
-rw-r--r--scripts/stl/udp_1pkt_mpls_vm.py2
-rw-r--r--scripts/stl/udp_1pkt_pcap.py2
-rw-r--r--scripts/stl/udp_1pkt_pcap_relative_path.py2
-rw-r--r--scripts/stl/udp_1pkt_range_clients.py2
-rw-r--r--scripts/stl/udp_1pkt_range_clients_split.py2
-rw-r--r--scripts/stl/udp_1pkt_range_clients_split_garp.py2
-rw-r--r--scripts/stl/udp_1pkt_simple.py2
-rw-r--r--scripts/stl/udp_1pkt_simple_bdir.py12
-rw-r--r--scripts/stl/udp_1pkt_simple_mac_dst.py2
-rw-r--r--scripts/stl/udp_1pkt_simple_mac_dst_src.py2
-rw-r--r--scripts/stl/udp_1pkt_simple_mac_src.py2
-rw-r--r--scripts/stl/udp_1pkt_simple_test.py2
-rw-r--r--scripts/stl/udp_1pkt_simple_test2.py2
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen.py2
-rw-r--r--scripts/stl/udp_1pkt_tuple_gen_split.py2
-rw-r--r--scripts/stl/udp_1pkt_vxlan.py2
-rw-r--r--scripts/stl/udp_3pkt_pcap.py2
-rw-r--r--scripts/stl/udp_inc_len_9k.py2
-rw-r--r--scripts/stl/udp_rand_len_9k.py2
73 files changed, 270 insertions, 116 deletions
diff --git a/scripts/automation/regression/setups/trex14/benchmark.yaml b/scripts/automation/regression/setups/trex14/benchmark.yaml
index 4870eefe..28e287bf 100644
--- a/scripts/automation/regression/setups/trex14/benchmark.yaml
+++ b/scripts/automation/regression/setups/trex14/benchmark.yaml
@@ -12,20 +12,18 @@ test_nbar_simple :
exp_max_latency : 1000
nbar_classification:
- http : 30.44
- rtp-audio : 21.19
- rtp : 11.31
- oracle_sqlnet : 11.17
- exchange : 10.86
+ rtp : 35.24
+ http : 30.41
+ oracle_sqlnet : 11.3
+ ssl : 6.03
citrix : 5.65
- rtsp : 2.86
+ exchange : 4.99
dns : 1.96
smtp : 0.57
pop3 : 0.37
- ssl : 0.17
sctp : 0.13
sip : 0.09
- unknown : 3.21
+ unknown : 3.22
test_rx_check :
multiplier : 13
diff --git a/scripts/automation/regression/setups/trex14/config.yaml b/scripts/automation/regression/setups/trex14/config.yaml
index 2b123128..10938ff3 100644
--- a/scripts/automation/regression/setups/trex14/config.yaml
+++ b/scripts/automation/regression/setups/trex14/config.yaml
@@ -41,7 +41,7 @@ router:
model : ASR1001x
hostname : csi-asr-01
ip_address : 10.56.216.103
- image : asr1001x-universalk9_npe.BLD_V155_2_S_XE315_THROTTLE_LATEST_20151121_110441-std_2.SSA.bin
+ image : asr1001x-universalk9.03.17.00.S.156-1.S-std.SPA.bin
line_password : cisco
en_password : cisco
mgmt_interface : GigabitEthernet0
@@ -61,6 +61,6 @@ router:
tftp:
hostname : ats-asr-srv-1
- ip_address : 10.56.128.23
- root_dir : /auto/avc-devtest/
- images_path : /images/RP2/
+ ip_address : 10.56.217.7
+ root_dir : /scratch/tftp/
+ images_path : /asr1001x/
diff --git a/scripts/automation/regression/stateful_tests/trex_nbar_test.py b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
index 74d0227b..1453c02b 100755
--- a/scripts/automation/regression/stateful_tests/trex_nbar_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nbar_test.py
@@ -26,20 +26,11 @@ class CTRexNbar_Test(CTRexGeneral_Test):
missmatchFlag = False
missmatchMsg = "NBAR classification contians a missmatch on the following protocols:"
fmt = '\n\t{0:15} | Expected: {1:>3.2f}%, Got: {2:>3.2f}%'
- noise_level = 0.045 # percents
+ noise_level = 0.045
for cl_intf in self.router.get_if_manager().get_if_list(if_type = IFType.Client):
client_intf = cl_intf.get_name()
- # removing noise classifications
- for key, value in test_classification[client_intf]['percentage'].items():
- if value <= noise_level:
- print 'Removing noise classification: %s' % key
- del test_classification[client_intf]['percentage'][key]
-
- if len(test_classification[client_intf]['percentage']) != (len(nbar_benchmark) + 1): # adding 'total' key to nbar_benchmark
- raise ClassificationMissmatchError ('The total size of classification result does not match the provided benchmark.')
-
for protocol, bench in nbar_benchmark.iteritems():
if protocol != 'total':
try:
diff --git a/scripts/automation/regression/stateless_tests/__init__.py b/scripts/automation/regression/stateless_tests/__init__.py
new file mode 100755
index 00000000..e69de29b
--- /dev/null
+++ b/scripts/automation/regression/stateless_tests/__init__.py
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py
index 4b5e5f54..9dbe82c8 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -548,6 +548,13 @@ class TRexConsole(TRexGeneralCmd):
print format_text("\n\nEvent log was cleared\n\n")
+ def complete_profile(self, text, line, begidx, endidx):
+ return self.complete_start(text,line, begidx, endidx)
+
+ def do_profile (self, line):
+ '''shows information about a profile'''
+ self.stateless_client.show_profile_line(line)
+
# tui
@verify_connected
def do_tui (self, line):
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index f7e63ccf..de07e9e4 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -1930,6 +1930,7 @@ class STLClient(object):
parsing_opts.FORCE,
parsing_opts.FILE_PATH,
parsing_opts.DURATION,
+ parsing_opts.TUNABLES,
parsing_opts.MULTIPLIER_STRICT,
parsing_opts.DRY_RUN)
@@ -1950,21 +1951,47 @@ class STLClient(object):
else:
self.stop(active_ports)
+
+ # default value for tunables (empty)
+ tunables = [{}] * len(opts.ports)
+
+ # process tunables
+ if opts.tunables:
+
+ # for one tunable - duplicate for all ports
+ if len(opts.tunables) == 1:
+ tunables = opts.tunables * len(opts.ports)
+
+ else:
+ # must be exact
+ if len(opts.ports) != len(opts.tunables):
+ self.logger.log('tunables section count must be 1 or exactly as the number of ports: got {0}'.format(len(opts.tunables)))
+ return
+ tunables = opts.tunables
+
+
# remove all streams
self.remove_all_streams(opts.ports)
# pack the profile
try:
- profile = STLProfile.load(opts.file[0])
+ for port, t in zip(opts.ports, tunables):
+
+ # give priority to the user configuration over default direction
+ if not 'direction' in t:
+ t['direction'] = (port % 2)
+
+ profile = STLProfile.load(opts.file[0], **t)
+
+ self.add_streams(profile.get_streams(), ports = port)
+
except STLError as e:
self.logger.log(format_text("\nError while loading profile '{0}'\n".format(opts.file[0]), 'bold'))
self.logger.log(e.brief() + "\n")
return
- self.add_streams(profile.get_streams(), ports = opts.ports)
-
if opts.dry:
self.validate(opts.ports, opts.mult, opts.duration, opts.total)
else:
@@ -2249,3 +2276,42 @@ class STLClient(object):
return
+
+ @__console
+ def show_profile_line (self, line):
+ '''Shows profile information'''
+
+ parser = parsing_opts.gen_parser(self,
+ "port",
+ self.show_profile_line.__doc__,
+ parsing_opts.FILE_PATH)
+
+ opts = parser.parse_args(line.split())
+ if opts is None:
+ return
+
+ info = STLProfile.get_info(opts.file[0])
+
+ self.logger.log(format_text('\nProfile Information:\n', 'bold'))
+
+ # general info
+ self.logger.log(format_text('\nGeneral Information:', 'underline'))
+ self.logger.log('Filename: {:^12}'.format(opts.file[0]))
+ self.logger.log('Stream count: {:^12}'.format(info['stream_count']))
+
+ # specific info
+ profile_type = info['type']
+ self.logger.log(format_text('\nSpecific Information:', 'underline'))
+
+ if profile_type == 'python':
+ self.logger.log('Type: {:^12}'.format('Python Module'))
+ self.logger.log('Tunables: {:^12}'.format(['{0} = {1}'.format(k ,v) for k, v in info['tunables'].iteritems()]))
+
+ elif profile_type == 'yaml':
+ self.logger.log('Type: {:^12}'.format('YAML'))
+
+ elif profile_type == 'pcap':
+ self.logger.log('Type: {:^12}'.format('PCAP file'))
+
+ self.logger.log("")
+
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
index 614d8b77..00fa6a93 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
@@ -122,7 +122,8 @@ class STLSim(object):
mult = "1",
duration = -1,
mode = 'none',
- silent = False):
+ silent = False,
+ tunables = None):
if not mode in ['none', 'gdb', 'valgrind', 'json', 'yaml','pkt','native']:
raise STLArgumentError('mode', mode)
@@ -139,9 +140,18 @@ class STLSim(object):
stream_list = [x for x in input_list if isinstance(x, STLStream)]
# handle YAMLs
+ if tunables == None:
+ tunables = {}
+ else:
+ tunables = tunables[0]
+
for input_file in input_files:
try:
- profile = STLProfile.load(input_file)
+ if not 'direction' in tunables:
+ tunables['direction'] = self.port_id % 2
+
+ profile = STLProfile.load(input_file, **tunables)
+
except STLError as e:
s = format_text("\nError while loading profile '{0}'\n".format(input_file), 'bold')
s += "\n" + e.brief()
@@ -360,6 +370,13 @@ def setParserOptions():
default = None,
type = int)
+ parser.add_argument("-i", "--port",
+ help = "Simulate a specific port ID [default is 0]",
+ dest = "port_id",
+ default = 0,
+ type = int)
+
+
parser.add_argument("-r", "--release",
help = "runs on release image instead of debug [default is False]",
action = "store_true",
@@ -388,6 +405,13 @@ def setParserOptions():
default = -1,
type = float)
+
+ parser.add_argument('-t',
+ help = 'sets tunable for a profile',
+ dest = 'tunables',
+ default = None,
+ type = parsing_opts.decode_tunables)
+
parser.add_argument('-p', '--path',
help = "BP sim path",
dest = 'bp_sim_path',
@@ -465,7 +489,7 @@ def main (args = None):
mode = 'none'
try:
- r = STLSim(bp_sim_path = options.bp_sim_path)
+ r = STLSim(bp_sim_path = options.bp_sim_path, port_id = options.port_id)
r.run(input_list = options.input_file,
outfile = options.output_file,
@@ -476,7 +500,8 @@ def main (args = None):
mult = options.mult,
duration = options.duration,
mode = mode,
- silent = options.silent)
+ silent = options.silent,
+ tunables = options.tunables)
except KeyboardInterrupt as e:
print "\n\n*** Caught Ctrl + C... Exiting...\n\n"
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index b1bde030..8a42145d 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -508,7 +508,13 @@ class STLStream(object):
def to_code (self):
""" convert to Python code as profile """
packet = Ether(self.pkt)
- packet.hide_defaults()
+ layer = packet
+ while layer: # remove checksums
+ for chksum_name in ('cksum', 'chksum'):
+ if chksum_name in layer.fields:
+ del layer.fields[chksum_name]
+ layer = layer.payload
+ packet.hide_defaults() # remove fields with default values
payload = packet.getlayer('Raw')
packet_command = packet.command()
imports_arr = []
@@ -790,7 +796,6 @@ class STLProfile(object):
streams : list of :class:`trex_stl_lib.trex_stl_streams.STLStream`
a list of stream objects
-
"""
@@ -804,6 +809,7 @@ class STLProfile(object):
raise STLArgumentError('streams', streams, valid_values = STLStream)
self.streams = streams
+ self.meta = None
def get_streams (self):
@@ -825,11 +831,32 @@ class STLProfile(object):
yaml_loader = YAMLLoader(yaml_file)
streams = yaml_loader.parse()
- return STLProfile(streams)
+ profile = STLProfile(streams)
+ profile.meta = {'type': 'yaml'}
+
+ return profile
+
+ @staticmethod
+ def get_module_tunables(module):
+ # remove self and variables
+ func = module.register().get_streams
+ argc = func.__code__.co_argcount
+ tunables = func.__code__.co_varnames[1:argc]
+
+ # fetch defaults
+ defaults = func.func_defaults
+ if len(defaults) != (argc - 1):
+ raise STLError("Module should provide default values for all arguments on get_streams()")
+
+ output = {}
+ for t, d in zip(tunables, defaults):
+ output[t] = d
+
+ return output
@staticmethod
- def load_py (python_file):
+ def load_py (python_file, direction = 0, **kwargs):
""" load from Python profile """
# check filename
@@ -844,9 +871,18 @@ class STLProfile(object):
module = __import__(file, globals(), locals(), [], -1)
reload(module) # reload the update
- streams = module.register().get_streams()
+ t = STLProfile.get_module_tunables(module)
+ for arg in kwargs:
+ if not arg in t:
+ raise STLError("profile {0} does not support tunable '{1}' - supported tunables are: '{2}'".format(python_file, arg, t))
+
+ streams = module.register().get_streams(direction = direction, **kwargs)
+ profile = STLProfile(streams)
- return STLProfile(streams)
+ profile.meta = {'type': 'python',
+ 'tunables': t}
+
+ return profile
except Exception as e:
a, b, tb = sys.exc_info()
@@ -896,6 +932,8 @@ class STLProfile(object):
if ipg_usec < 1:
raise STLError("ipg_usec cannot be less than 1 usec: '{0}'".format(ipg_usec))
+ if loop_count < 0:
+ raise STLError("'loop_count' cannot be negative")
streams = []
last_ts_usec = 0
@@ -928,20 +966,25 @@ class STLProfile(object):
last_ts_usec = ts_usec
+
+ profile = STLProfile(streams)
+ profile.meta = {'type': 'pcap'}
- return STLProfile(streams)
+ return profile
@staticmethod
- def load (filename):
+ def load (filename, direction = 0, **kwargs):
""" load a profile by its type supported type are
* py
* yaml
* pcap file that converted to profile automaticly
:parameters:
- filename : string as filename
+ filename : string as filename
+ direction : profile's direction (if supported by the profile)
+ kwargs : forward those key-value pairs to the profile
"""
@@ -949,7 +992,7 @@ class STLProfile(object):
suffix = x[1] if (len(x) == 2) else None
if suffix == 'py':
- profile = STLProfile.load_py(filename)
+ profile = STLProfile.load_py(filename, direction, **kwargs)
elif suffix == 'yaml':
profile = STLProfile.load_yaml(filename)
@@ -960,8 +1003,14 @@ class STLProfile(object):
else:
raise STLError("unknown profile file type: '{0}'".format(suffix))
+ profile.meta['stream_count'] = len(profile.get_streams()) if isinstance(profile.get_streams(), list) else 1
return profile
+ @staticmethod
+ def get_info (filename):
+ profile = STLProfile.load(filename)
+ return profile.meta
+
def dump_as_pkt (self):
""" dump the profile as scapy packet. in case it is raw convert to scapy and dump it"""
cnt=0;
@@ -990,7 +1039,7 @@ class STLProfile(object):
from trex_stl_lib.api import *
class STLS1(object):
- def get_streams(self):
+ def get_streams(self, direction = 0, **kwargs):
streams = []
'''
for stream in self.streams:
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
index 0390ac9c..c4f2b358 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/parsing_opts.py
@@ -30,6 +30,7 @@ COUNT = 18
PROMISCUOUS = 19
NO_PROMISCUOUS = 20
PROMISCUOUS_SWITCH = 21
+TUNABLES = 22
GLOBAL_STATS = 50
PORT_STATS = 51
@@ -190,6 +191,19 @@ def is_valid_file(filename):
return filename
+def decode_tunables_to_dict (**kwargs):
+ return kwargs
+
+def decode_tunables (tunable_str):
+ try:
+ tunables = [eval('decode_tunables_to_dict({0})'.format(t)) for t in tunable_str.split('#')]
+
+ except (SyntaxError, NameError):
+ raise argparse.ArgumentTypeError("bad syntax for tunables: {0}".format(tunable_str))
+
+ return tunables
+
+
OPTIONS_DB = {MULTIPLIER: ArgumentPack(['-m', '--multiplier'],
{'help': match_multiplier_help,
'dest': "mult",
@@ -233,6 +247,14 @@ OPTIONS_DB = {MULTIPLIER: ArgumentPack(['-m', '--multiplier'],
'default': None,
'action': "store_true"}),
+
+ TUNABLES: ArgumentPack(['-t'],
+ {'help': "sets tunable for a profile",
+ 'dest': "tunables",
+ 'default': None,
+ 'type': decode_tunables}),
+
+
NO_PROMISCUOUS: ArgumentPack(['--no_prom'],
{'help': "sets port promiscuous off",
'dest': "prom",
diff --git a/scripts/stl/burst_3st_1000pkt.py b/scripts/stl/burst_3st_1000pkt.py
index 849bbd1f..8fcdca57 100644
--- a/scripts/stl/burst_3st_1000pkt.py
+++ b/scripts/stl/burst_3st_1000pkt.py
@@ -38,7 +38,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/burst_3st_600pkt.py b/scripts/stl/burst_3st_600pkt.py
index 817b6777..978c8920 100644
--- a/scripts/stl/burst_3st_600pkt.py
+++ b/scripts/stl/burst_3st_600pkt.py
@@ -37,7 +37,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/burst_3st_loop_x_times.py b/scripts/stl/burst_3st_loop_x_times.py
index 2604124b..175b8315 100644
--- a/scripts/stl/burst_3st_loop_x_times.py
+++ b/scripts/stl/burst_3st_loop_x_times.py
@@ -39,7 +39,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/burst_split.py b/scripts/stl/burst_split.py
index 393ea70e..e1a8f88d 100644
--- a/scripts/stl/burst_split.py
+++ b/scripts/stl/burst_split.py
@@ -32,7 +32,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/flow_stats.py b/scripts/stl/flow_stats.py
index e2701d23..69e1166c 100644
--- a/scripts/stl/flow_stats.py
+++ b/scripts/stl/flow_stats.py
@@ -4,7 +4,7 @@ from trex_stl_lib.api import *
class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLStream(packet = STLPktBuilder(pkt ="stl/yaml/udp_64B_no_crc.pcap"), # path relative to pwd
mode = STLTXCont(pps=1000),
flow_stats = STLFlowStats(pg_id = 7)),
diff --git a/scripts/stl/hlt/hlt_4vlans.py b/scripts/stl/hlt/hlt_4vlans.py
index f93ffc23..be612e55 100755
--- a/scripts/stl/hlt/hlt_4vlans.py
+++ b/scripts/stl/hlt/hlt_4vlans.py
@@ -7,7 +7,7 @@ class STLS1(object):
Missing values will be filled with defaults
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(frame_size = 100,
vlan_id = [1, 2, 3, 4], # can be either array or string separated by spaces
vlan_protocol_tag_id = '8100 0x8100', # hex with optional prefix '0x'
diff --git a/scripts/stl/hlt/hlt_david1.py b/scripts/stl/hlt/hlt_david1.py
index 312c8971..bac8a09e 100755
--- a/scripts/stl/hlt/hlt_david1.py
+++ b/scripts/stl/hlt/hlt_david1.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates 3 streams (imix) Eth/802.1Q/IP/TCP without VM
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
#'''
return STLHltStream(
#enable_auto_detect_instrumentation = '1', # not supported yet
diff --git a/scripts/stl/hlt/hlt_david2.py b/scripts/stl/hlt/hlt_david2.py
index af40c2ae..1fc7b84d 100755
--- a/scripts/stl/hlt/hlt_david2.py
+++ b/scripts/stl/hlt/hlt_david2.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates 3 streams (imix) Eth/802.1Q/IP/TCP without VM
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(
#enable_auto_detect_instrumentation = '1', # not supported yet
ip_dst_addr = '192.168.3.3',
diff --git a/scripts/stl/hlt/hlt_david3.py b/scripts/stl/hlt/hlt_david3.py
index 7b5442a3..6192a7df 100755
--- a/scripts/stl/hlt/hlt_david3.py
+++ b/scripts/stl/hlt/hlt_david3.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/802.1Q/IP/TCP stream
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(
l3_protocol = 'ipv4',
ip_src_addr = '100.1.1.1',
diff --git a/scripts/stl/hlt/hlt_david4.py b/scripts/stl/hlt/hlt_david4.py
index 2f88b329..9e5d3eab 100755
--- a/scripts/stl/hlt/hlt_david4.py
+++ b/scripts/stl/hlt/hlt_david4.py
@@ -10,7 +10,7 @@ class STLS1(object):
MAC dst will have <mac_dst_count> number of incremental values
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
mac_dst_count = 10
mac_src_count = 10
pkts_per_burst = 10
diff --git a/scripts/stl/hlt/hlt_framesize_vm.py b/scripts/stl/hlt/hlt_framesize_vm.py
index 5653e435..54ac41a0 100755
--- a/scripts/stl/hlt/hlt_framesize_vm.py
+++ b/scripts/stl/hlt/hlt_framesize_vm.py
@@ -6,7 +6,7 @@ class STLS1(object):
Two Eth/IP/UDP streams with VM to get different size of packet by frame_size
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLHltStream(length_mode = 'increment',
frame_size_min = 100,
frame_size_max = 3000,
diff --git a/scripts/stl/hlt/hlt_imix_4rates.py b/scripts/stl/hlt/hlt_imix_4rates.py
index 5b55d641..2764866b 100755
--- a/scripts/stl/hlt/hlt_imix_4rates.py
+++ b/scripts/stl/hlt/hlt_imix_4rates.py
@@ -7,7 +7,7 @@ class STLS1(object):
Each stream will get rate_pps * his ratio / sum of ratios
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(length_mode = 'imix', rate_pps = 2,
l3_imix1_size = 60, l3_imix1_ratio = 4,
l3_imix2_size = 400, l3_imix2_ratio = 3,
diff --git a/scripts/stl/hlt/hlt_imix_default.py b/scripts/stl/hlt/hlt_imix_default.py
index 3871924b..607077b5 100755
--- a/scripts/stl/hlt/hlt_imix_default.py
+++ b/scripts/stl/hlt/hlt_imix_default.py
@@ -3,7 +3,7 @@ from trex_stl_lib.trex_stl_hltapi import STLHltStream
class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(length_mode = 'imix', rate_pps = 2,
l3_protocol = 'ipv4', l4_protocol = 'udp')
diff --git a/scripts/stl/hlt/hlt_ip_ranges.py b/scripts/stl/hlt/hlt_ip_ranges.py
index 3b6a0407..7679e09e 100755
--- a/scripts/stl/hlt/hlt_ip_ranges.py
+++ b/scripts/stl/hlt/hlt_ip_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IP/TCP stream with VM to get different ip addresses
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(split_by_cores = 'duplicate',
l3_protocol = 'ipv4',
ip_src_addr = '192.168.1.1',
diff --git a/scripts/stl/hlt/hlt_ipv6_default.py b/scripts/stl/hlt/hlt_ipv6_default.py
index f90e7157..2f6264d9 100755
--- a/scripts/stl/hlt/hlt_ipv6_default.py
+++ b/scripts/stl/hlt/hlt_ipv6_default.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IPv6/UDP stream without VM, default values
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLHltStream(l3_protocol = 'ipv6',
l3_length = 150,
l4_protocol = 'udp',
diff --git a/scripts/stl/hlt/hlt_ipv6_ranges.py b/scripts/stl/hlt/hlt_ipv6_ranges.py
index f9a83b55..b50cc481 100755
--- a/scripts/stl/hlt/hlt_ipv6_ranges.py
+++ b/scripts/stl/hlt/hlt_ipv6_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IPv6/UDP stream with VM, to change the ipv6 addr (only 32 lsb)
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(l3_protocol = 'ipv6', l3_length = 150, l4_protocol = 'udp',
ipv6_src_addr = '1111:2222:3333:4444:5555:6666:7777:8888',
ipv6_dst_addr = '1111:1111:1111:1111:1111:1111:1111:1111',
diff --git a/scripts/stl/hlt/hlt_l3_length_vm.py b/scripts/stl/hlt/hlt_l3_length_vm.py
index 7b04fbec..bf22f120 100755
--- a/scripts/stl/hlt/hlt_l3_length_vm.py
+++ b/scripts/stl/hlt/hlt_l3_length_vm.py
@@ -6,7 +6,7 @@ class STLS1(object):
Two Eth/IP/UDP streams with VM to get different size of packet by l3_length
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLHltStream(length_mode = 'increment',
l3_length_min = 100,
l3_length_max = 3000,
diff --git a/scripts/stl/hlt/hlt_mac_ranges.py b/scripts/stl/hlt/hlt_mac_ranges.py
index e6c4f0a4..2ede1c48 100755
--- a/scripts/stl/hlt/hlt_mac_ranges.py
+++ b/scripts/stl/hlt/hlt_mac_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IP/UDP stream with VM, to change the MAC addr (only 32 lsb)
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(l3_protocol = 'ipv4', l4_protocol = 'udp',
mac_src = '10:00:00:00:00:01', mac_dst = '10:00:00:00:01:00',
mac_src2 = '11:11:00:00:00:01', mac_dst2 = '11:11:00:00:01:00',
diff --git a/scripts/stl/hlt/hlt_tcp_ranges.py b/scripts/stl/hlt/hlt_tcp_ranges.py
index c29b707d..e2045333 100755
--- a/scripts/stl/hlt/hlt_tcp_ranges.py
+++ b/scripts/stl/hlt/hlt_tcp_ranges.py
@@ -6,7 +6,7 @@ class STLS1(object):
Eth/IP/TCP stream with VM to get 10 different TCP ports
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(l3_protocol = 'ipv4',
l4_protocol = 'tcp',
tcp_src_port_mode = 'decrement',
diff --git a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
index 10c778e1..711ced3d 100755
--- a/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
+++ b/scripts/stl/hlt/hlt_udp_inc_dec_len_9k.py
@@ -8,7 +8,7 @@ class STLS1(object):
Seconds stream will decrease the packet size in reverse way
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
max_size = 9*1024
return [STLHltStream(length_mode = 'increment',
frame_size_max = max_size,
diff --git a/scripts/stl/hlt/hlt_udp_ports.py b/scripts/stl/hlt/hlt_udp_ports.py
index 9e551b94..52b49ad3 100755
--- a/scripts/stl/hlt/hlt_udp_ports.py
+++ b/scripts/stl/hlt/hlt_udp_ports.py
@@ -7,7 +7,7 @@ class STLS1(object):
The ports overlap the max and min at very first packets
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(l3_protocol = 'ipv4',
l4_protocol = 'udp',
udp_src_port_mode = 'decrement',
diff --git a/scripts/stl/hlt/hlt_udp_random_ports.py b/scripts/stl/hlt/hlt_udp_random_ports.py
index 1ba0227d..8fdde418 100755
--- a/scripts/stl/hlt/hlt_udp_random_ports.py
+++ b/scripts/stl/hlt/hlt_udp_random_ports.py
@@ -7,7 +7,7 @@ class STLS1(object):
Using "consistent_random = True" to have same random ports each test
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLHltStream(l3_protocol = 'ipv4',
l4_protocol = 'udp',
udp_src_port_mode = 'random',
diff --git a/scripts/stl/hlt/hlt_vlan_default.py b/scripts/stl/hlt/hlt_vlan_default.py
index ea5c66d1..86851c99 100755
--- a/scripts/stl/hlt/hlt_vlan_default.py
+++ b/scripts/stl/hlt/hlt_vlan_default.py
@@ -6,7 +6,7 @@ class STLS1(object):
Default Eth/802.1Q/IP/TCP stream without VM
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(l2_encap = 'ethernet_ii_vlan',
l3_protocol = 'ipv4', l4_protocol = 'tcp',
direction = direction)
diff --git a/scripts/stl/hlt/hlt_vlans_vm.py b/scripts/stl/hlt/hlt_vlans_vm.py
index a2ad1023..70bf1aad 100755
--- a/scripts/stl/hlt/hlt_vlans_vm.py
+++ b/scripts/stl/hlt/hlt_vlans_vm.py
@@ -7,7 +7,7 @@ class STLS1(object):
Missing values will be filled with defaults
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return STLHltStream(frame_size = 100,
vlan_id = '1 2 1000 4 5', # 5 vlans
vlan_id_mode = 'increment fixed decrement random', # 5th vlan will be default fixed
diff --git a/scripts/stl/hlt/hlt_wentong1.py b/scripts/stl/hlt/hlt_wentong1.py
index 6016c73a..4cf949ca 100755
--- a/scripts/stl/hlt/hlt_wentong1.py
+++ b/scripts/stl/hlt/hlt_wentong1.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/IP/UDP stream with VM on src IP
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
ipv4_address_step = '0.0.1.0'
num_of_sessions_per_spoke = 1000
ip_tgen_hub = '190.1.0.1'
diff --git a/scripts/stl/hlt/hlt_wentong2.py b/scripts/stl/hlt/hlt_wentong2.py
index 82503343..137e57b9 100755
--- a/scripts/stl/hlt/hlt_wentong2.py
+++ b/scripts/stl/hlt/hlt_wentong2.py
@@ -7,7 +7,7 @@ class STLS1(object):
Creates Eth/802.1Q/IPv6/UDP stream without VM (if num_of_sessions_per_spoke is 1)
'''
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
ipv6_tgen_rtr = '2005:0:1::1'
num_of_sessions_per_spoke = 1 # in given example is not passed forward, taking default
ipv6_address_step = '0:0:0:1:0:0:0:0'
diff --git a/scripts/stl/imix.py b/scripts/stl/imix.py
index 54208af7..65e35108 100644
--- a/scripts/stl/imix.py
+++ b/scripts/stl/imix.py
@@ -30,7 +30,7 @@ class STLImix(object):
mode = STLTXCont(pps = pps))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
if direction == 0:
src = self.ip_range['src']
diff --git a/scripts/stl/multi_burst_2st_1000pkt.py b/scripts/stl/multi_burst_2st_1000pkt.py
index 9922458e..1a43ae96 100644
--- a/scripts/stl/multi_burst_2st_1000pkt.py
+++ b/scripts/stl/multi_burst_2st_1000pkt.py
@@ -32,7 +32,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/pcap.py b/scripts/stl/pcap.py
index d4b88a53..3dd46588 100644
--- a/scripts/stl/pcap.py
+++ b/scripts/stl/pcap.py
@@ -7,9 +7,7 @@ class STLPcap(object):
def __init__ (self, pcap_file):
self.pcap_file = pcap_file
- def get_streams (self,
- ipg_usec = 10.0,
- loop_count = 1):
+ def get_streams (self, direction = 0, ipg_usec = 10.0, loop_count = 1, **kwargs):
profile = STLProfile.load_pcap(self.pcap_file, ipg_usec = ipg_usec, loop_count = loop_count)
diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py
index a073f959..7cf2906b 100644
--- a/scripts/stl/pcap_with_vm.py
+++ b/scripts/stl/pcap_with_vm.py
@@ -30,13 +30,19 @@ class STLPcap(object):
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'}):
+ 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 = ipg_usec, loop_count = loop_count, vm = vm)
+
+ profile = STLProfile.load_pcap(self.pcap_file,
+ ipg_usec = ipg_usec,
+ loop_count = loop_count,
+ vm = vm)
return profile.get_streams()
diff --git a/scripts/stl/simple_3st.py b/scripts/stl/simple_3st.py
index e47d6e52..8979057c 100644
--- a/scripts/stl/simple_3st.py
+++ b/scripts/stl/simple_3st.py
@@ -34,7 +34,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/syn_attack.py b/scripts/stl/syn_attack.py
index f6edcdd2..b01a0c07 100644
--- a/scripts/stl/syn_attack.py
+++ b/scripts/stl/syn_attack.py
@@ -43,7 +43,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt.py b/scripts/stl/udp_1pkt.py
index 6b86a037..13516ecd 100644
--- a/scripts/stl/udp_1pkt.py
+++ b/scripts/stl/udp_1pkt.py
@@ -33,7 +33,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_1mac.py b/scripts/stl/udp_1pkt_1mac.py
index 0eeb2147..4adffd7a 100644
--- a/scripts/stl/udp_1pkt_1mac.py
+++ b/scripts/stl/udp_1pkt_1mac.py
@@ -21,7 +21,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_1mac_override.py b/scripts/stl/udp_1pkt_1mac_override.py
index 00d7a97e..04700420 100644
--- a/scripts/stl/udp_1pkt_1mac_override.py
+++ b/scripts/stl/udp_1pkt_1mac_override.py
@@ -25,7 +25,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_1mac_step.py b/scripts/stl/udp_1pkt_1mac_step.py
index 1dc001c5..1e5e4bd8 100644
--- a/scripts/stl/udp_1pkt_1mac_step.py
+++ b/scripts/stl/udp_1pkt_1mac_step.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_dns.py b/scripts/stl/udp_1pkt_dns.py
index 6b36ca0b..b9fac9b2 100644
--- a/scripts/stl/udp_1pkt_dns.py
+++ b/scripts/stl/udp_1pkt_dns.py
@@ -16,7 +16,7 @@ class STLS1(object):
mode = STLTXSingleBurst( pps = 1, total_pkts = 17) )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_ipv6_in_ipv4.py b/scripts/stl/udp_1pkt_ipv6_in_ipv4.py
index fd862394..d53416ba 100644
--- a/scripts/stl/udp_1pkt_ipv6_in_ipv4.py
+++ b/scripts/stl/udp_1pkt_ipv6_in_ipv4.py
@@ -23,7 +23,7 @@ class STLS1(object):
mode = STLTXSingleBurst( pps = 1, total_pkts = 17) )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac.py b/scripts/stl/udp_1pkt_mac.py
index 94c92117..598e2074 100644
--- a/scripts/stl/udp_1pkt_mac.py
+++ b/scripts/stl/udp_1pkt_mac.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac_mask1.py b/scripts/stl/udp_1pkt_mac_mask1.py
index cc8dd407..efb45da7 100644
--- a/scripts/stl/udp_1pkt_mac_mask1.py
+++ b/scripts/stl/udp_1pkt_mac_mask1.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac_mask2.py b/scripts/stl/udp_1pkt_mac_mask2.py
index c3b242e9..b95a32e3 100644
--- a/scripts/stl/udp_1pkt_mac_mask2.py
+++ b/scripts/stl/udp_1pkt_mac_mask2.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac_mask3.py b/scripts/stl/udp_1pkt_mac_mask3.py
index 47b8a63d..7a5d2864 100644
--- a/scripts/stl/udp_1pkt_mac_mask3.py
+++ b/scripts/stl/udp_1pkt_mac_mask3.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac_mask5.py b/scripts/stl/udp_1pkt_mac_mask5.py
index ed09cbae..75f9bbf1 100644
--- a/scripts/stl/udp_1pkt_mac_mask5.py
+++ b/scripts/stl/udp_1pkt_mac_mask5.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mac_step.py b/scripts/stl/udp_1pkt_mac_step.py
index 5e46b8ad..0ebd035d 100644
--- a/scripts/stl/udp_1pkt_mac_step.py
+++ b/scripts/stl/udp_1pkt_mac_step.py
@@ -22,7 +22,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mpls.py b/scripts/stl/udp_1pkt_mpls.py
index 83093dbd..bd98416e 100644
--- a/scripts/stl/udp_1pkt_mpls.py
+++ b/scripts/stl/udp_1pkt_mpls.py
@@ -16,7 +16,7 @@ class STLS1(object):
mode = STLTXSingleBurst( pps = 1, total_pkts = 17) )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_mpls_vm.py b/scripts/stl/udp_1pkt_mpls_vm.py
index 01ad5fec..366344b8 100644
--- a/scripts/stl/udp_1pkt_mpls_vm.py
+++ b/scripts/stl/udp_1pkt_mpls_vm.py
@@ -21,7 +21,7 @@ class STLS1(object):
mode = STLTXSingleBurst( pps = 1, total_pkts = 100) )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_pcap.py b/scripts/stl/udp_1pkt_pcap.py
index a0d2ee49..9fb0e269 100644
--- a/scripts/stl/udp_1pkt_pcap.py
+++ b/scripts/stl/udp_1pkt_pcap.py
@@ -4,7 +4,7 @@ from trex_stl_lib.api import *
class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLStream(packet = STLPktBuilder(pkt ="stl/yaml/udp_64B_no_crc.pcap"), # path relative to pwd
mode = STLTXCont(pps=10)) ] #rate continues, could be STLTXSingleBurst,STLTXMultiBurst
diff --git a/scripts/stl/udp_1pkt_pcap_relative_path.py b/scripts/stl/udp_1pkt_pcap_relative_path.py
index 91b32d0f..00b5e5df 100644
--- a/scripts/stl/udp_1pkt_pcap_relative_path.py
+++ b/scripts/stl/udp_1pkt_pcap_relative_path.py
@@ -5,7 +5,7 @@ from trex_stl_lib.api import *
class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
return [STLStream(packet = STLPktBuilder(pkt ="yaml/udp_64B_no_crc.pcap",
path_relative_to_profile = True), # path relative to profile and not to loader path
mode = STLTXCont(pps=10)) ] #rate continues, could be STLTXSingleBurst,STLTXMultiBurst
diff --git a/scripts/stl/udp_1pkt_range_clients.py b/scripts/stl/udp_1pkt_range_clients.py
index 2754b3aa..9bd3c335 100644
--- a/scripts/stl/udp_1pkt_range_clients.py
+++ b/scripts/stl/udp_1pkt_range_clients.py
@@ -32,7 +32,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_range_clients_split.py b/scripts/stl/udp_1pkt_range_clients_split.py
index 69c2dfcb..a8c71c0a 100644
--- a/scripts/stl/udp_1pkt_range_clients_split.py
+++ b/scripts/stl/udp_1pkt_range_clients_split.py
@@ -32,7 +32,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt/pad,vm = vm),
mode = STLTXCont( pps=10 ))
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_range_clients_split_garp.py b/scripts/stl/udp_1pkt_range_clients_split_garp.py
index 6e20edea..d7f48ed7 100644
--- a/scripts/stl/udp_1pkt_range_clients_split_garp.py
+++ b/scripts/stl/udp_1pkt_range_clients_split_garp.py
@@ -26,7 +26,7 @@ class STLS1(object):
return STLStream(packet = STLPktBuilder(pkt = base_pkt,vm = vm),
mode = STLTXSingleBurst( pps=10, total_pkts = self.num_clients )) # single burst of G-ARP
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple.py b/scripts/stl/udp_1pkt_simple.py
index 09643fe9..0407f9c9 100644
--- a/scripts/stl/udp_1pkt_simple.py
+++ b/scripts/stl/udp_1pkt_simple.py
@@ -11,7 +11,7 @@ class STLS1(object):
),
mode = STLTXCont())
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple_bdir.py b/scripts/stl/udp_1pkt_simple_bdir.py
index c3371974..8ec8d97c 100644
--- a/scripts/stl/udp_1pkt_simple_bdir.py
+++ b/scripts/stl/udp_1pkt_simple_bdir.py
@@ -2,16 +2,8 @@ from trex_stl_lib.api import *
class STLS1(object):
- def create_stream (self):
- return STLStream(
- packet =
- STLPktBuilder(
- pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/
- UDP(dport=12,sport=1025)/(10*'x')
- ),
- mode = STLTXCont())
-
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
+
# create 1 stream
if direction==0:
src_ip="16.0.0.1"
diff --git a/scripts/stl/udp_1pkt_simple_mac_dst.py b/scripts/stl/udp_1pkt_simple_mac_dst.py
index 6b728881..20b87cd3 100644
--- a/scripts/stl/udp_1pkt_simple_mac_dst.py
+++ b/scripts/stl/udp_1pkt_simple_mac_dst.py
@@ -9,7 +9,7 @@ class STLS1(object):
#mac_dst_override_mode=STLStreamDstMAC_PKT # another way to explictly take it
)
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple_mac_dst_src.py b/scripts/stl/udp_1pkt_simple_mac_dst_src.py
index e3df0d0d..9bdd4edd 100644
--- a/scripts/stl/udp_1pkt_simple_mac_dst_src.py
+++ b/scripts/stl/udp_1pkt_simple_mac_dst_src.py
@@ -9,7 +9,7 @@ class STLS1(object):
#mac_dst_override_mode=STLStreamDstMAC_PKT # another way to explictly take it
)
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple_mac_src.py b/scripts/stl/udp_1pkt_simple_mac_src.py
index fe5a2a80..ec930fe5 100644
--- a/scripts/stl/udp_1pkt_simple_mac_src.py
+++ b/scripts/stl/udp_1pkt_simple_mac_src.py
@@ -9,7 +9,7 @@ class STLS1(object):
#mac_src_override_by_pkt=True # another way to explictly take it
)
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple_test.py b/scripts/stl/udp_1pkt_simple_test.py
index 843d9bcf..b2f80233 100644
--- a/scripts/stl/udp_1pkt_simple_test.py
+++ b/scripts/stl/udp_1pkt_simple_test.py
@@ -30,7 +30,7 @@ class STLS1(object):
return STLStream( packet = pkt_a ,
mode = STLTXCont() )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_simple_test2.py b/scripts/stl/udp_1pkt_simple_test2.py
index 52c93a7c..c261d3f8 100644
--- a/scripts/stl/udp_1pkt_simple_test2.py
+++ b/scripts/stl/udp_1pkt_simple_test2.py
@@ -30,7 +30,7 @@ class STLS1(object):
return STLStream( packet = pkt_a ,
mode = STLTXCont() )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_tuple_gen.py b/scripts/stl/udp_1pkt_tuple_gen.py
index a278e4bf..be8620c8 100644
--- a/scripts/stl/udp_1pkt_tuple_gen.py
+++ b/scripts/stl/udp_1pkt_tuple_gen.py
@@ -31,7 +31,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_tuple_gen_split.py b/scripts/stl/udp_1pkt_tuple_gen_split.py
index c7a98942..304ed9c0 100644
--- a/scripts/stl/udp_1pkt_tuple_gen_split.py
+++ b/scripts/stl/udp_1pkt_tuple_gen_split.py
@@ -35,7 +35,7 @@ class STLS1(object):
return stream
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_1pkt_vxlan.py b/scripts/stl/udp_1pkt_vxlan.py
index 9d56fe36..eaebb9a6 100644
--- a/scripts/stl/udp_1pkt_vxlan.py
+++ b/scripts/stl/udp_1pkt_vxlan.py
@@ -38,7 +38,7 @@ class STLS1(object):
mode = STLTXSingleBurst( pps = 1, total_pkts = 17) )
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_3pkt_pcap.py b/scripts/stl/udp_3pkt_pcap.py
index 633c4b64..fd2c609e 100644
--- a/scripts/stl/udp_3pkt_pcap.py
+++ b/scripts/stl/udp_3pkt_pcap.py
@@ -26,7 +26,7 @@ class STLS1(object):
]).get_streams()
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return self.create_stream()
diff --git a/scripts/stl/udp_inc_len_9k.py b/scripts/stl/udp_inc_len_9k.py
index b76b9fb7..3628a07f 100644
--- a/scripts/stl/udp_inc_len_9k.py
+++ b/scripts/stl/udp_inc_len_9k.py
@@ -34,7 +34,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]
diff --git a/scripts/stl/udp_rand_len_9k.py b/scripts/stl/udp_rand_len_9k.py
index c9339d2d..c24101cb 100644
--- a/scripts/stl/udp_rand_len_9k.py
+++ b/scripts/stl/udp_rand_len_9k.py
@@ -35,7 +35,7 @@ class STLS1(object):
- def get_streams (self, direction = 0):
+ def get_streams (self, direction = 0, **kwargs):
# create 1 stream
return [ self.create_stream() ]