diff options
author | Jing Zhang <jing.c.zhang@nokia.com> | 2017-04-07 21:35:00 -0400 |
---|---|---|
committer | Jing Zhang <jing.c.zhang@nokia.com> | 2017-05-01 10:05:58 -0400 |
commit | ebddbcb0f76d5320853b3d342e0db36bbf8c6626 (patch) | |
tree | 6aca906c5f024a1f83c9a1481b0f7d50d69e1d40 /yardstick/common/utils.py | |
parent | 942b41170ebb412cef1ccc0c134ea8984e82171d (diff) |
Extend TC008 to run pktgen-dpdk inside VM
Need a fast path inside VM to verify full throughput of SRIOV and OVS-dpdk.
Update 1: Change newly added file names to avoid conflict
Update 2: Add more unit test cases
Update 3: Fix default parameter typo for testpmd
Update 4: Adapted to the pktgen-dpdk prompt change from "Pktgen>" to "Pktgen:/>", now just expect "Pktgen"
Update 5: Per comment, merge common functions between latency and throughput tests to utils.py
Update 6: Per comment, seperate the test case from TC008 to a new test case TC077
Change-Id: I1f7471d4ba77636a3a66c79c2652578321312185
JIRA: YARDSTICK-614
Signed-off-by: Jing Zhang <jing.c.zhang@nokia.com>
Diffstat (limited to 'yardstick/common/utils.py')
-rw-r--r-- | yardstick/common/utils.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index 7035f3374..f4def8533 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -167,3 +167,22 @@ def parse_ini_file(path): s)} for s in parser.sections()}) return config + + +def get_port_mac(sshclient, port): + cmd = "ifconfig |grep HWaddr |grep %s |awk '{print $5}' " % port + status, stdout, stderr = sshclient.execute(cmd) + + if status: + raise RuntimeError(stderr) + return stdout.rstrip() + + +def get_port_ip(sshclient, port): + cmd = "ifconfig %s |grep 'inet addr' |awk '{print $2}' " \ + "|cut -d ':' -f2 " % port + status, stdout, stderr = sshclient.execute(cmd) + + if status: + raise RuntimeError(stderr) + return stdout.rstrip() |