X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2Flibraries%2Fpython%2FTrafficGenerator.py;h=7f538364948007cdcad78ee160d7df26b22f8fee;hb=35bee5e3075afa1f7084a6e1195a6a1403091560;hp=adc22b3de6bda4ed6fe6f0e14488176fc250eb9e;hpb=5eddf0d2dad050e9b03f6f41e1dfdcff0e3a21f6;p=csit.git diff --git a/resources/libraries/python/TrafficGenerator.py b/resources/libraries/python/TrafficGenerator.py index adc22b3de6..7f53836494 100644 --- a/resources/libraries/python/TrafficGenerator.py +++ b/resources/libraries/python/TrafficGenerator.py @@ -167,6 +167,9 @@ class TrafficGenerator(object): logger.error('trex-cfg failed: {0}'.format(stdout + stderr)) raise RuntimeError('trex-cfg failed') + (ret, _, _) = ssh.exec_command( + "sh -c 'pgrep t-rex && sudo pkill t-rex'") + (ret, _, _) = ssh.exec_command( "sh -c 'cd {0}/scripts/ && " "sudo nohup ./t-rex-64 -i -c 7 --iom 0 > /dev/null 2>&1 &'" @@ -236,6 +239,19 @@ class TrafficGenerator(object): "--p{4}_dst_start_ip 10.10.10.2'".\ format(duration, rate, framesize, _p0, _p1),\ timeout=int(duration)+60) + elif traffic_type in ["3-node-IPv6"]: + (ret, stdout, stderr) = ssh.exec_command( + "sh -c '/tmp/openvpp-testing/resources/tools/t-rex/" + "t-rex-stateless.py " + "-d {0} -r {1} -s {2} -6 " + "--p{3}_src_start_ip 2001:1::2 " + "--p{3}_src_end_ip 2001:1::FE " + "--p{3}_dst_start_ip 2001:2::2 " + "--p{4}_src_start_ip 2001:2::2 " + "--p{4}_src_end_ip 2001:2::FE " + "--p{4}_dst_start_ip 2001:1::2'".\ + format(duration, rate, framesize, _p0, _p1),\ + timeout=int(duration)+60) else: raise NotImplementedError('Unsupported traffic type')