summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.rst6
-rwxr-xr-xansible/roles/download_pmu_tools/files/event_download_local.py213
-rw-r--r--ansible/roles/download_pmu_tools/tasks/main.yml7
-rwxr-xr-xnsb_setup.sh2
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_all-2.cfg48
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_all-4.cfg96
-rw-r--r--samples/vnf_samples/nsut/prox/configs/handle_none-2.cfg34
-rw-r--r--samples/vnf_samples/nsut/prox/configs/handle_none-4.cfg72
-rw-r--r--samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml6
-rw-r--r--samples/vnf_samples/nsut/prox/prox-baremetal-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/prox-baremetal-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch-2.yaml (renamed from samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml)10
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng_qos-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_lw_aftr-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-2.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp-2.yaml (renamed from samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml)11
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_vpe-4.yaml4
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml79
-rwxr-xr-xsamples/vnf_samples/nsut/vpe/vpe_config/full_tm_profile_10G.cfg37
-rw-r--r--samples/vnf_samples/traffic_profiles/prox_mpls_tag_untag.yaml2
-rwxr-xr-xtests/functional/test_cli_scenario.py20
-rw-r--r--tests/unit/benchmark/contexts/test_model.py48
-rw-r--r--tests/unit/benchmark/scenarios/test_base.py53
-rw-r--r--tests/unit/network_services/nfvi/test_resource.py4
-rw-r--r--tests/unit/network_services/traffic_profile/test_prox_mpls.py95
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py14
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py54
-rw-r--r--yardstick/benchmark/contexts/model.py11
-rw-r--r--yardstick/benchmark/core/scenario.py7
-rwxr-xr-xyardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash5
-rw-r--r--yardstick/benchmark/scenarios/base.py14
-rw-r--r--yardstick/network_services/nfvi/resource.py15
-rw-r--r--yardstick/network_services/traffic_profile/prox_mpls_tag_untag.py99
-rw-r--r--yardstick/network_services/traffic_profile/rfc2544.py4
-rw-r--r--yardstick/network_services/vnf_generic/vnf/prox_helpers.py5
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py4
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_trex.py32
-rw-r--r--yardstick/orchestrator/heat.py11
52 files changed, 331 insertions, 867 deletions
diff --git a/README.rst b/README.rst
index c6ff99185..76ea9723c 100644
--- a/README.rst
+++ b/README.rst
@@ -23,7 +23,7 @@ service performance to be within a certain level of agreement.
For more information on Yardstick project, please visit:
https://wiki.opnfv.org/display/yardstick/Yardstick
- http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-01-introduction
+ http://artifacts.opnfv.org/yardstick/docs/userguide/index.html#document-01-introduction
Architecture
@@ -42,7 +42,7 @@ records to a file.
For more information on Yardstick architecture, please read:
- http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-03-architecture
+ http://artifacts.opnfv.org/yardstick/docs/userguide/index.html#document-03-architecture
Installation
@@ -53,7 +53,7 @@ Yardstick supports installation on Ubuntu 14.04 or via a Docker image.
To learn how to install Yardstick, consult the documentation available online
at:
- http://artifacts.opnfv.org/yardstick/colorado/3.0/docs/userguide/index.html#document-07-installation
+ http://artifacts.opnfv.org/yardstick/docs/userguide/index.html#document-09-installation
Developers
diff --git a/ansible/roles/download_pmu_tools/files/event_download_local.py b/ansible/roles/download_pmu_tools/files/event_download_local.py
deleted file mode 100755
index 8eda2cd0d..000000000
--- a/ansible/roles/download_pmu_tools/files/event_download_local.py
+++ /dev/null
@@ -1,213 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014, Intel Corporation
-# Author: Andi Kleen
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms and conditions of the GNU General Public License,
-# version 2, as published by the Free Software Foundation.
-#
-# This program is distributed in the hope it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# Automatic event list downloader
-#
-# event_download.py download for current cpu
-# event_download.py -a download all
-# event_download.py cpustr... Download for specific CPU
-from __future__ import absolute_import
-from __future__ import print_function
-import sys
-
-import re
-import os
-import string
-from fnmatch import fnmatch
-from shutil import copyfile
-
-try:
- from urllib2 import URLError
-except ImportError:
- # python 3
- from urllib.error import URLError
-
-
-urlpath = 'https://download.01.org/perfmon'
-localpath = 'pmu_local_mirror/download.01.org/perfmon'
-mapfile = 'mapfile.csv'
-modelpath = localpath + "/" + mapfile
-NSB_JSON = os.environ.get("PMU_EVENTS_PATH", "/tmp/pmu_event.json")
-
-
-def get_cpustr():
- with open('/proc/cpuinfo', 'r') as f:
- cpu = [None, None, None]
- for j in f:
- n = j.split()
- if n[0] == 'vendor_id':
- cpu[0] = n[2]
- elif n[0] == 'model' and n[1] == ':':
- cpu[2] = int(n[2])
- elif n[0] == 'cpu' and n[1] == 'family':
- cpu[1] = int(n[3])
- if all(cpu):
- break
- return "%s-%d-%X" % (cpu[0], cpu[1], cpu[2])
-
-
-def sanitize(s, a):
- o = ""
- for j in s:
- if j in a:
- o += j
- return o
-
-
-def getdir():
- try:
- d = os.getenv("XDG_CACHE_HOME")
- xd = d
- if not d:
- home = os.getenv("HOME")
- d = "%s/.cache" % home
- d += "/pmu-events"
- if not os.path.isdir(d):
- # try to handle the sudo case
- if not xd:
- user = os.getenv("SUDO_USER")
- if user:
- nd = os.path.expanduser("~" + user) + "/.cache/pmu-events"
- if os.path.isdir(nd):
- return nd
- os.makedirs(d)
- return d
- except OSError:
- raise Exception('Cannot access ' + d)
-
-
-NUM_TRIES = 3
-
-
-def getfile(url, dir, fn):
- tries = 0
- print("Downloading", url, "to", fn)
- while True:
- try:
- f = open(url)
- data = f.read()
- except IOError:
- tries += 1
- if tries >= NUM_TRIES:
- raise
- print("retrying download")
- continue
- break
- with open(os.path.join(dir, fn), "w") as o:
- o.write(data)
- f.close()
-
-
-allowed_chars = string.ascii_letters + '_-.' + string.digits
-
-
-def download(match, key=None, link=True):
- found = 0
- dir = getdir()
- try:
- getfile(modelpath, dir, "mapfile.csv")
- models = open(os.path.join(dir, "mapfile.csv"))
- for j in models:
- n = j.rstrip().split(",")
- if len(n) < 4:
- if len(n) > 0:
- print("Cannot parse", n)
- continue
- cpu, version, name, type = n
- if not fnmatch(cpu, match) or (key is not None and type not in key) or type.startswith("EventType"):
- continue
- cpu = sanitize(cpu, allowed_chars)
- url = localpath + name
- fn = "%s-%s.json" % (cpu, sanitize(type, allowed_chars))
- try:
- os.remove(os.path.join(dir, fn))
- except OSError:
- pass
- getfile(url, dir, fn)
- if link:
- lname = re.sub(r'.*/', '', name)
- lname = sanitize(lname, allowed_chars)
- try:
- os.remove(os.path.join(dir, lname))
- except OSError:
- pass
- try:
- os.symlink(fn, os.path.join(dir, lname))
- except OSError as e:
- print("Cannot link %s to %s:" % (name, lname), e, file=sys.stderr)
- found += 1
- models.close()
- getfile(localpath + "/readme.txt", dir, "readme.txt")
- except URLError as e:
- print("Cannot access event server:", e, file=sys.stderr)
- print("If you need a proxy to access the internet please set it with:", file=sys.stderr)
- print("\texport https_proxy=http://proxyname...", file=sys.stderr)
- print("If you are not connected to the internet please run this on a connected system:", file=sys.stderr)
- print("\tevent_download.py '%s'" % match, file=sys.stderr)
- print("and then copy ~/.cache/pmu-events to the system under test", file=sys.stderr)
- print("To get events for all possible CPUs use:", file=sys.stderr)
- print("\tevent_download.py -a", file=sys.stderr)
- except OSError as e:
- print("Cannot write events file:", e, file=sys.stderr)
- return found
-
-
-def download_current(link=False):
- """Download JSON event list for current cpu.
- Returns >0 when a event list is found"""
- return download(get_cpustr(), link=link)
-
-
-def eventlist_name(name=None, key="core"):
- if not name:
- name = get_cpustr()
- cache = getdir()
- return "%s/%s-%s.json" % (cache, name, key)
-
-
-if __name__ == '__main__':
- # only import argparse when actually called from command line
- # this makes ocperf work on older python versions without it.
- import argparse
- p = argparse.ArgumentParser(usage='download Intel event files')
- p.add_argument('--all', '-a', help='Download all available event files', action='store_true')
- p.add_argument('--verbose', '-v', help='Be verbose', action='store_true')
- p.add_argument('--mine', help='Print name of current CPU', action='store_true')
- p.add_argument('--link', help='Create links with the original event file name',
- action='store_true', default=True)
- p.add_argument('cpus', help='CPU identifiers to download', nargs='*')
- args = p.parse_args()
-
- cpustr = get_cpustr()
- if args.verbose or args.mine:
- print("My CPU", cpustr)
- if args.mine:
- sys.exit(0)
- d = getdir()
- if args.all:
- found = download('*', link=args.link)
- elif len(args.cpus) == 0:
- found = download_current(link=args.link)
- else:
- found = 0
- for j in args.cpus:
- found += download(j, link=args.link)
-
- if found == 0:
- print("Nothing found", file=sys.stderr)
-
- el = eventlist_name()
- if os.path.exists(el):
- print("my event list", el)
- copyfile(el, NSB_JSON)
- print("File copied to ", NSB_JSON)
diff --git a/ansible/roles/download_pmu_tools/tasks/main.yml b/ansible/roles/download_pmu_tools/tasks/main.yml
index 59a63aa85..37375b668 100644
--- a/ansible/roles/download_pmu_tools/tasks/main.yml
+++ b/ansible/roles/download_pmu_tools/tasks/main.yml
@@ -34,10 +34,3 @@
failed_when: false #some of the links while creating mirror are not found, results in failure
no_log: True
-- name: Copy local event download file
- copy:
- src: event_download_local.py
- dest: "{{ INSTALL_BIN_PATH }}/event_download_local.py"
- owner: root
- group: root
- mode: 0755
diff --git a/nsb_setup.sh b/nsb_setup.sh
index 28d31967f..40293fef9 100755
--- a/nsb_setup.sh
+++ b/nsb_setup.sh
@@ -28,7 +28,7 @@ if [ $# -eq 1 ]; then
OPENRC=$(readlink -f -- "$1")
extra_args="-e openrc_file=${OPENRC}"
source "${OPENRC}"
- CONTROLLER_IP=$(echo ${OS_AUTH_URL} | sed -ne "s/http:\/\/\(.*\):.*/\1/p")
+ CONTROLLER_IP=$(echo ${OS_AUTH_URL} | sed -ne "s#http://\([0-9a-zA-Z.\-]*\):*[0-9]*/.*#\1#p")
export no_proxy="localhost,127.0.0.1,${CONTROLLER_IP},$no_proxy"
fi
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_all-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_all-2.cfg
index ac7f0475f..1ca3f7791 100644
--- a/samples/vnf_samples/nsut/prox/configs/gen_all-2.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/gen_all-2.cfg
@@ -1,16 +1,17 @@
-; Copyright (c) 2017 Intel Corporation
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-; http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
+# Copyright (c) 2016-2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
[eal options]
-n=4 ; force number of memory channels
@@ -18,36 +19,43 @@ no-output=no ; disable DPDK debug output
[port 0]
name=p0
-mac=70:00:00:00:00:01
+mac=hardware
[port 1]
name=p1
-mac=70:00:00:00:00:02
+mac=hardware
[defaults]
mempool size=4K
+[variables]
+$sut_mac0=@@dst_mac0
+$sut_mac1=@@dst_mac1
+
[global]
start time=5
-name=BNG gen
+name=Basic Gen
+
[core 0]
mode=master
[core 1]
-name=cpe0
+name=gen 0
task=0
mode=gen
tx port=p0
bps=1250000000
-pkt inline=50 00 00 00 00 01 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+; Ethernet + IP + UDP
+pkt inline=${sut_mac0} 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 00 00 00 01 00 00 00 02 13 88 13 88 00 08 55 7b
[core 2]
-name=cpe0
+name=gen 1
task=0
mode=gen
tx port=p1
bps=1250000000
-pkt inline=50 00 00 00 00 02 70 00 00 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+; Ethernet + IP + UDP
+pkt inline=${sut_mac1} 70 00 00 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 00 00 00 01 00 00 00 03 13 88 13 88 00 08 55 7b
[core 3]
task=0
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_all-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_all-4.cfg
deleted file mode 100644
index 7a23bf005..000000000
--- a/samples/vnf_samples/nsut/prox/configs/gen_all-4.cfg
+++ /dev/null
@@ -1,96 +0,0 @@
-; Copyright (c) 2017 Intel Corporation
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-; http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
-
-[eal options]
--n=4 ; force number of memory channels
-no-output=no ; disable DPDK debug output
-
-[port 0]
-name=p0
-mac=70:00:00:00:00:01
-[port 1]
-name=p1
-mac=70:00:00:00:00:02
-[port 2]
-name=p2
-mac=70:00:00:00:00:03
-[port 3]
-name=p3
-mac=70:00:00:00:00:04
-
-
-[defaults]
-mempool size=4K
-
-[global]
-start time=5
-name=BNG gen
-[core 0]
-mode=master
-
-[core 1]
-name=cpe0
-task=0
-mode=gen
-tx port=p0
-bps=1250000000
-pkt inline=50 00 00 00 00 01 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
-
-[core 2]
-name=cpe0
-task=0
-mode=gen
-tx port=p1
-bps=1250000000
-pkt inline=50 00 00 00 00 02 70 00 00 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
-
-[core 3]
-name=cpe0
-task=0
-mode=gen
-tx port=p2
-bps=1250000000
-pkt inline=50 00 00 00 00 03 70 00 00 00 00 03 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
-
-[core 4]
-name=cpe0
-task=0
-mode=gen
-tx port=p3
-bps=1250000000
-pkt inline=50 00 00 00 00 04 70 00 00 00 00 04 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
-
-[core 5]
-task=0
-mode=lat
-rx port=p0
-lat pos=42
-
-[core 6]
-task=0
-mode=lat
-rx port=p1
-lat pos=42
-
-[core 7]
-task=0
-mode=lat
-rx port=p2
-lat pos=42
-
-[core 8]
-task=0
-mode=lat
-rx port=p3
-lat pos=42
diff --git a/samples/vnf_samples/nsut/prox/configs/handle_none-2.cfg b/samples/vnf_samples/nsut/prox/configs/handle_none-2.cfg
index 256337bfb..b32e61f12 100644
--- a/samples/vnf_samples/nsut/prox/configs/handle_none-2.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/handle_none-2.cfg
@@ -1,16 +1,17 @@
-; Copyright (c) 2017 Intel Corporation
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-; http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
+# Copyright (c) 2016-2017 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
[eal options]
-n=4 ; force number of memory channels
@@ -18,17 +19,18 @@ no-output=no ; disable DPDK debug output
[port 0]
name=if0
-mac=50:00:00:00:00:01
+mac=hardware
+
[port 1]
name=if1
-mac=50:00:00:00:00:02
+mac=hardware
[defaults]
mempool size=4K
[global]
start time=5
-name=Handle None (4x)
+name=Handle None (2x)
[core 0]
mode=master
diff --git a/samples/vnf_samples/nsut/prox/configs/handle_none-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_none-4.cfg
deleted file mode 100644
index 26a0aac26..000000000
--- a/samples/vnf_samples/nsut/prox/configs/handle_none-4.cfg
+++ /dev/null
@@ -1,72 +0,0 @@
-; Copyright (c) 2017 Intel Corporation
-;
-; Licensed under the Apache License, Version 2.0 (the "License");
-; you may not use this file except in compliance with the License.
-; You may obtain a copy of the License at
-;
-; http://www.apache.org/licenses/LICENSE-2.0
-;
-; Unless required by applicable law or agreed to in writing, software
-; distributed under the License is distributed on an "AS IS" BASIS,
-; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-; See the License for the specific language governing permissions and
-; limitations under the License.
-
-[eal options]
--n=4 ; force number of memory channels
-no-output=no ; disable DPDK debug output
-
-[port 0]
-name=if0
-mac=50:00:00:00:00:01
-[port 1]
-name=if1
-mac=50:00:00:00:00:02
-[port 2]
-name=if2
-mac=50:00:00:00:00:03
-[port 3]
-name=if3
-mac=50:00:00:00:00:04
-
-[defaults]
-mempool size=4K
-
-[global]
-start time=5
-name=Handle None (4x)
-
-[core 0]
-mode=master
-
-[core 1]
-name=none
-task=0
-mode=none
-rx port=if0
-tx port=if1
-drop=no
-
-[core 2]
-name=none
-task=0
-mode=none
-rx port=if1
-tx port=if0
-drop=no
-
-[core 3]
-name=none
-task=0
-mode=none
-rx port=if2
-tx port=if3
-drop=no
-
-[core 4]
-name=none
-task=0
-mode=none
-rx port=if3
-tx port=if2
-drop=no
diff --git a/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml b/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml
index a6c286242..8b0ba3f9c 100644
--- a/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml
+++ b/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml
@@ -16,7 +16,7 @@
nodes:
-
- name: "trafficgen_1"
+ name: "tg_0"
role: TrafficGen
ip: 1.1.1.1
user: "root"
@@ -30,8 +30,8 @@ nodes:
local_ip: "152.16.100.19"
netmask: "255.255.255.0"
dpdk_port_num: 0
--
- name: "vnf"
+-
+ name: "vnf_0"
role: VNF
ip: 1.1.1.2
user: "root"
diff --git a/samples/vnf_samples/nsut/prox/prox-baremetal-2.yaml b/samples/vnf_samples/nsut/prox/prox-baremetal-2.yaml
index 4f081a7b8..1390e4a67 100644
--- a/samples/vnf_samples/nsut/prox/prox-baremetal-2.yaml
+++ b/samples/vnf_samples/nsut/prox/prox-baremetal-2.yaml
@@ -16,7 +16,7 @@
nodes:
-
- name: "trafficgen_1"
+ name: "tg_0"
role: TrafficGen
ip: 1.1.1.1
user: "root"
@@ -39,7 +39,7 @@ nodes:
netmask: "255.255.255.0"
dpdk_port_num: 1
-
- name: "vnf"
+ name: "vnf_0"
role: VNF
ip: 1.1.1.2
user: "root"
diff --git a/samples/vnf_samples/nsut/prox/prox-baremetal-4.yaml b/samples/vnf_samples/nsut/prox/prox-baremetal-4.yaml
index f9afa9c07..0b0986052 100644
--- a/samples/vnf_samples/nsut/prox/prox-baremetal-4.yaml
+++ b/samples/vnf_samples/nsut/prox/prox-baremetal-4.yaml
@@ -16,7 +16,7 @@
nodes:
-
- name: "trafficgen_1"
+ name: "tg_0"
role: TrafficGen
ip: 1.1.1.1
user: "root"
@@ -52,7 +52,7 @@ nodes:
netmask: "255.255.255.0"
dpdk_port_num: 3
-
- name: "vnf"
+ name: "vnf_0"
role: VNF
ip: 1.1.1.2
user: "root"
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-2.yaml
index 6972d4008..22216d108 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-2.yaml
@@ -30,8 +30,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-4.yaml
index d85a483ad..8c6d0a2d7 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_acl-4.yaml
@@ -30,8 +30,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch-2.yaml
index b80192363..2abbb9a46 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
@@ -40,9 +40,9 @@ scenarios:
"-t": ""
runner:
- type: Search
- interval: 5
- timeout: 1200
+ type: Duration
+ # we kill after duration, independent of test duration, so set this high
+ duration: 300
context:
type: Node
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng-4.yaml
index dd1fc1a27..914bace6c 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng_qos-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng_qos-4.yaml
index dd04271b5..599a6e09a 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng_qos-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_bng_qos-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml
index 6a019bfff..5cc4f3cc4 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-1.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
index 857c5eda3..b1fef6d45 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
index 31f5a3c8b..e17c5c2a1 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml
index 32fbfa024..0354dc78c 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml
index 206a3ff6d..ec49be722 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-2.yaml
index 1f4695938..8ee90ff93 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-4.yaml
index 94f0997e4..94f3a5629 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_pktTouch-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
index eb194de54..843073343 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
index 2f8acce0b..bfc1eead2 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml
index 5a02f4aaa..c1969d441 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml
@@ -27,8 +27,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lw_aftr-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lw_aftr-4.yaml
index 1b5d55331..37af37dcc 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lw_aftr-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lw_aftr-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-2.yaml
index fa8ab97c8..e74e59ada 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-4.yaml
index ab915534b..9c5edc117 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_mpls_tagging-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp-2.yaml
index 6d96c3ed1..1cf9d809d 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp-2.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-2.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
@@ -40,10 +40,9 @@ scenarios:
"-t": ""
runner:
- type: Search
- # we kill after timeout, independent of test duration, so set this high
- interval: 5
- timeout: 1200
+ type: Duration
+ # we kill after duration, independent of test duration, so set this high
+ duration: 300
context:
type: Node
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_vpe-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_vpe-4.yaml
index 295f019c2..16dfa1b32 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_vpe-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_vpe-4.yaml
@@ -22,8 +22,8 @@ scenarios:
topology: prox-tg-topology-4.yaml
nodes:
- tg__0: trafficgen_1.yardstick
- vnf__0: vnf.yardstick
+ tg__0: tg_0.yardstick
+ vnf__0: vnf_0.yardstick
options:
vnf__0:
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml
deleted file mode 100644
index 9e0654edf..000000000
--- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
----
-schema: "yardstick:task:0.1"
-
-scenarios:
--
- type: NSPerf
- traffic_profile: ../../traffic_profiles/prox_binsearch.yaml
- topology: prox-tg-topology-2.yaml
-
- nodes:
- tg__0: tg_0.yardstick
- vnf__0: vnf_0.yardstick
-
- options:
- vnf__0:
- prox_path: /root/dppd-PROX-v035/build/prox
- prox_config: "configs/l3-swap-2.cfg"
- prox_args:
- "-t": ""
-
- tg__0:
- prox_path: /root/dppd-PROX-v035/build/prox
- prox_config: "configs/l3-gen-2.cfg"
- prox_args:
- "-e": ""
- "-t": ""
-
- runner:
- type: Duration
- # we kill after duration, independent of test duration, so set this high
- duration: 600
-
-context:
- name: yardstick
- image: yardstick-samplevnfs
- user: ubuntu
- flavor:
-# name: yardstick-dpdk-flavor
- vcpus: 5
- ram: 20480
- disk: 6
- extra_specs:
- hw:cpu_sockets: 1
- hw:cpu_cores: 5
- hw:cpu_threads: 1
-# hw:mem_page_size: large
- placement_groups:
- pgrp1:
- policy: "availability"
-
- servers:
- vnf_0:
- floating_ip: true
- placement: "pgrp1"
- tg_0:
- floating_ip: true
- placement: "pgrp1"
-
- networks:
- mgmt:
- cidr: '10.0.1.0/24'
- uplink_0:
- cidr: '10.0.2.0/24'
- downlink_0:
- cidr: '10.0.3.0/24'
diff --git a/samples/vnf_samples/nsut/vpe/vpe_config/full_tm_profile_10G.cfg b/samples/vnf_samples/nsut/vpe/vpe_config/full_tm_profile_10G.cfg
index 502655fd0..8676a0774 100755
--- a/samples/vnf_samples/nsut/vpe/vpe_config/full_tm_profile_10G.cfg
+++ b/samples/vnf_samples/nsut/vpe/vpe_config/full_tm_profile_10G.cfg
@@ -1,33 +1,16 @@
-; BSD LICENSE
+; Copyright (c) 2017 Intel Corporation
;
-; Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-; All rights reserved.
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions
-; are met:
+; http://www.apache.org/licenses/LICENSE-2.0
;
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in
-; the documentation and/or other materials provided with the
-; distribution.
-; * Neither the name of Intel Corporation nor the names of its
-; contributors may be used to endorse or promote products derived
-; from this software without specific prior written permission.
-;
-; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
; This file enables the following hierarchical scheduler configuration for each
; 10GbE output port:
diff --git a/samples/vnf_samples/traffic_profiles/prox_mpls_tag_untag.yaml b/samples/vnf_samples/traffic_profiles/prox_mpls_tag_untag.yaml
index 9ac6e6ecf..b65fb0526 100644
--- a/samples/vnf_samples/traffic_profiles/prox_mpls_tag_untag.yaml
+++ b/samples/vnf_samples/traffic_profiles/prox_mpls_tag_untag.yaml
@@ -18,7 +18,7 @@ name: prox_mpls_tag_untag
description: MPLS tag/untag for max no-drop throughput over given packet sizes
traffic_profile:
- traffic_type: ProxMplsTagUntagProfile
+ traffic_type: ProxBinSearchProfile
tolerated_loss: 0.001
test_precision: 0.1
# packet_sizes: [64, 128, 256, 512, 1024, 1280, 1518]
diff --git a/tests/functional/test_cli_scenario.py b/tests/functional/test_cli_scenario.py
index 4741e8244..63b533b85 100755
--- a/tests/functional/test_cli_scenario.py
+++ b/tests/functional/test_cli_scenario.py
@@ -32,31 +32,25 @@ class ScenarioTestCase(unittest.TestCase):
def test_scenario_show_Lmbench(self):
res = self.yardstick("scenario show Lmbench")
- lmbench = "Execute lmbench memory read latency"
- "or memory bandwidth benchmark in a host" in res
- self.assertTrue(lmbench)
+ self.assertIn("Execute lmbench memory read latency or memory "
+ "bandwidth benchmark in a hos", res)
def test_scenario_show_Perf(self):
res = self.yardstick("scenario show Perf")
- perf = "Execute perf benchmark in a host" in res
- self.assertTrue(perf)
+ self.assertIn("Execute perf benchmark in a host", res)
def test_scenario_show_Fio(self):
res = self.yardstick("scenario show Fio")
- fio = "Execute fio benchmark in a host" in res
- self.assertTrue(fio)
+ self.assertIn("Execute fio benchmark in a host", res)
def test_scenario_show_Ping(self):
res = self.yardstick("scenario show Ping")
- ping = "Execute ping between two hosts" in res
- self.assertTrue(ping)
+ self.assertIn("Execute ping between two hosts", res)
def test_scenario_show_Iperf3(self):
res = self.yardstick("scenario show Iperf3")
- iperf3 = "Execute iperf3 between two hosts" in res
- self.assertTrue(iperf3)
+ self.assertIn("Execute iperf3 between two hosts", res)
def test_scenario_show_Pktgen(self):
res = self.yardstick("scenario show Pktgen")
- pktgen = "Execute pktgen between two hosts" in res
- self.assertTrue(pktgen)
+ self.assertIn("Execute pktgen between two hosts", res)
diff --git a/tests/unit/benchmark/contexts/test_model.py b/tests/unit/benchmark/contexts/test_model.py
index 5444c2bc8..48ee01cf0 100644
--- a/tests/unit/benchmark/contexts/test_model.py
+++ b/tests/unit/benchmark/contexts/test_model.py
@@ -179,6 +179,7 @@ class NetworkTestCase(unittest.TestCase):
test_network = model.Network('foo', self.mock_context, attrs)
self.assertIsNone(test_network.gateway_ip)
+
class ServerTestCase(unittest.TestCase):
def setUp(self):
@@ -190,7 +191,6 @@ class ServerTestCase(unittest.TestCase):
netattrs = {'cidr': '10.0.0.0/24', 'provider': None, 'external_network': 'ext_net'}
self.mock_context.networks = [model.Network("some-network", self.mock_context, netattrs)]
-
def test_construct_defaults(self):
attrs = None
@@ -227,8 +227,9 @@ class ServerTestCase(unittest.TestCase):
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test__add_instance(self, mock_template):
-
- attrs = {'image': 'some-image', 'flavor': 'some-flavor', 'floating_ip': '192.168.1.10', 'floating_ip_assoc': 'some-vm'}
+ attrs = {'image': 'some-image', 'flavor': 'some-flavor', 'floating_ip': '192.168.1.10',
+ 'floating_ip_assoc': 'some-vm',
+ 'availability_zone': 'zone'}
test_server = model.Server('foo', self.mock_context, attrs)
self.mock_context.flavors = ['flavor1', 'flavor2', 'some-flavor']
@@ -241,7 +242,8 @@ class ServerTestCase(unittest.TestCase):
mock_network.subnet_stack_name = 'some-network-stack-subnet'
mock_network.provider = 'sriov'
mock_network.external_network = 'ext_net'
- mock_network.router = model.Router('some-router', 'some-network', self.mock_context, 'ext_net')
+ mock_network.router = model.Router('some-router', 'some-network', self.mock_context,
+ 'ext_net')
test_server._add_instance(mock_template, 'some-server',
[mock_network], 'hints')
@@ -277,7 +279,8 @@ class ServerTestCase(unittest.TestCase):
user=self.mock_context.user,
key_name=self.mock_context.keypair_name,
user_data='',
- scheduler_hints='hints')
+ scheduler_hints='hints',
+ availability_zone='zone')
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test__add_instance_with_user_data(self, mock_template):
@@ -299,7 +302,30 @@ class ServerTestCase(unittest.TestCase):
user=self.mock_context.user,
key_name=self.mock_context.keypair_name,
user_data=user_data,
- scheduler_hints='hints')
+ scheduler_hints='hints',
+ availability_zone=None)
+
+ @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ def test__add_instance_with_availablity_zone(self, mock_template):
+ attrs = {
+ 'image': 'some-image', 'flavor': 'some-flavor',
+ 'availability_zone': 'zone',
+ }
+ test_server = model.Server('foo', self.mock_context, attrs)
+
+ test_server._add_instance(mock_template, 'some-server',
+ [], 'hints')
+
+ mock_template.add_server.assert_called_with(
+ 'some-server', 'some-image',
+ flavor='some-flavor',
+ flavors=self.mock_context.flavors,
+ ports=[],
+ user=self.mock_context.user,
+ key_name=self.mock_context.keypair_name,
+ user_data='',
+ scheduler_hints='hints',
+ availability_zone='zone')
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test__add_instance_plus_flavor(self, mock_template):
@@ -339,7 +365,8 @@ class ServerTestCase(unittest.TestCase):
user=self.mock_context.user,
key_name=self.mock_context.keypair_name,
user_data=user_data,
- scheduler_hints='hints')
+ scheduler_hints='hints',
+ availability_zone=None)
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test__add_instance_misc(self, mock_template):
@@ -351,7 +378,7 @@ class ServerTestCase(unittest.TestCase):
}
test_server = model.Server('ServerFlavor-3', self.mock_context, attrs)
- self.mock_context.flavors = ['flavor2']
+ self.mock_context.flavors = ['flavor2']
self.mock_context.flavor = {'vcpus': 4}
mock_network = mock.Mock()
mock_network.name = 'some-network'
@@ -361,7 +388,6 @@ class ServerTestCase(unittest.TestCase):
test_server._add_instance(mock_template, 'ServerFlavor-3',
[mock_network], 'hints')
-
mock_template.add_port(
'ServerFlavor-3-some-network-port',
mock_network.stack_name,
@@ -387,5 +413,5 @@ class ServerTestCase(unittest.TestCase):
user=self.mock_context.user,
key_name=self.mock_context.keypair_name,
user_data=user_data,
- scheduler_hints='hints')
-
+ scheduler_hints='hints',
+ availability_zone=None)
diff --git a/tests/unit/benchmark/scenarios/test_base.py b/tests/unit/benchmark/scenarios/test_base.py
new file mode 100644
index 000000000..78e342978
--- /dev/null
+++ b/tests/unit/benchmark/scenarios/test_base.py
@@ -0,0 +1,53 @@
+# Copyright 2017: Intel Ltd.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import unittest
+
+from yardstick.benchmark.scenarios import base
+
+
+class ScenarioTestCase(unittest.TestCase):
+
+ def test_get_scenario_type(self):
+ scenario_type = 'dummy scenario'
+
+ class DummyScenario(base.Scenario):
+ __scenario_type__ = scenario_type
+
+ self.assertEqual(scenario_type, DummyScenario.get_scenario_type())
+
+ def test_get_scenario_type_not_defined(self):
+ class DummyScenario(base.Scenario):
+ pass
+
+ self.assertEqual(str(None), DummyScenario.get_scenario_type())
+
+ def test_get_description(self):
+ docstring = """First line
+ Second line
+ Third line
+ """
+
+ class DummyScenario(base.Scenario):
+ __doc__ = docstring
+
+ self.assertEqual(docstring.splitlines()[0],
+ DummyScenario.get_description())
+
+ def test_get_description_empty(self):
+ class DummyScenario(base.Scenario):
+ pass
+
+ self.assertEqual(str(None), DummyScenario.get_description())
diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py
index 2eef784fc..5c2f890e8 100644
--- a/tests/unit/network_services/nfvi/test_resource.py
+++ b/tests/unit/network_services/nfvi/test_resource.py
@@ -134,10 +134,6 @@ class TestResourceProfile(unittest.TestCase):
self.assertIsNone(
self.resource_profile._prepare_collectd_conf("/opt/nsb_bin"))
- def test__setup_intel_pmu(self):
- self.assertIsNone(
- self.resource_profile._setup_intel_pmu(self.ssh_mock, "/opt/nsb_bin"))
-
def test__setup_ovs_stats(self):
self.assertIsNone(
self.resource_profile._setup_ovs_stats(self.ssh_mock))
diff --git a/tests/unit/network_services/traffic_profile/test_prox_mpls.py b/tests/unit/network_services/traffic_profile/test_prox_mpls.py
deleted file mode 100644
index 00a690d2a..000000000
--- a/tests/unit/network_services/traffic_profile/test_prox_mpls.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-from __future__ import absolute_import
-
-import unittest
-import mock
-
-from tests.unit import STL_MOCKS
-
-STLClient = mock.MagicMock()
-stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
-stl_patch.start()
-
-if stl_patch:
- from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxTestDataTuple
- from yardstick.network_services.traffic_profile.prox_mpls_tag_untag import ProxMplsTagUntagProfile
-
-
-class TestProxMplsTagUntagProfile(unittest.TestCase):
-
- def test_mpls_1(self):
- def target(*args, **kwargs):
- runs.append(args[2])
- if args[2] < 0 or args[2] > 100:
- raise RuntimeError(' '.join([str(args), str(runs)]))
- if args[2] > 75.0:
- return fail_tuple, {}
- return success_tuple, {}
-
- tp_config = {
- 'traffic_profile': {
- 'packet_sizes': [200],
- },
- }
-
- runs = []
- success_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.1, 5.2, 5.3], 995, 1000, 123.4)
- fail_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.6, 5.7, 5.8], 850, 1000, 123.4)
-
- traffic_generator = mock.MagicMock()
-
- profile = ProxMplsTagUntagProfile(tp_config)
- profile.init(mock.MagicMock())
- profile._profile_helper = profile_helper = mock.MagicMock()
- profile_helper.run_test = target
-
- profile.execute_traffic(traffic_generator)
- self.assertEqual(round(profile.current_lower, 2), 74.69)
- self.assertEqual(round(profile.current_upper, 2), 75.39)
- self.assertEqual(len(runs), 8)
-
- def test_mpls_2(self):
- def target(*args, **kwargs):
- runs.append(args[2])
- if args[2] < 0 or args[2] > 100:
- raise RuntimeError(' '.join([str(args), str(runs)]))
- if args[2] > 25.0:
- return fail_tuple, {}
- return success_tuple, {}
-
- tp_config = {
- 'traffic_profile': {
- 'packet_sizes': [200],
- 'test_precision': 2.0,
- },
- }
-
- runs = []
- success_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.1, 5.2, 5.3], 995, 1000, 123.4)
- fail_tuple = ProxTestDataTuple(10.0, 1, 2, 3, 4, [5.6, 5.7, 5.8], 850, 1000, 123.4)
-
- traffic_generator = mock.MagicMock()
-
- profile = ProxMplsTagUntagProfile(tp_config)
- profile.init(mock.MagicMock())
- profile._profile_helper = profile_helper = mock.MagicMock()
- profile_helper.run_test = target
-
- profile.execute_traffic(traffic_generator)
- self.assertEqual(round(profile.current_lower, 2), 24.06)
- self.assertEqual(round(profile.current_upper, 2), 25.47)
- self.assertEqual(len(runs), 7)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
index a04698d68..84eb5dc0d 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
@@ -534,20 +534,6 @@ class TestProxSocketHelper(unittest.TestCase):
result = prox.hz()
self.assertEqual(result, expected)
- def test_rx_stats(self, mock_time):
- core_stats = [
- '3,4,5,6',
- '7,8,9,10,NaN',
- '11,12,13,14,15',
- ]
-
- mock_socket = mock.MagicMock()
- prox = ProxSocketHelper(mock_socket)
- prox.get_data = mock.MagicMock(side_effect=core_stats)
- expected = 21, 24, 27, 14
- result = prox.rx_stats([3, 4, 5], 16)
- self.assertEqual(result, expected)
-
def test_core_stats(self, mock_time):
core_stats = [
'3,4,5,6',
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
index d08c62e0b..a2a5058fc 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
@@ -18,6 +18,8 @@
from __future__ import absolute_import
import unittest
+
+import copy
import mock
SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper'
@@ -75,6 +77,8 @@ class TestTrexTrafficGen(unittest.TestCase):
'driver': "i40e",
'dst_ip': '152.16.100.20',
'local_iface_name': 'xe0',
+ 'vld_id': 'downlink_0',
+ 'ifname': 'xe0',
'local_mac': '00:00:00:00:00:02'},
'vnfd-connection-point-ref': 'xe0',
'name': 'xe0'},
@@ -89,6 +93,8 @@ class TestTrexTrafficGen(unittest.TestCase):
'bandwidth': '10 Gbps',
'dst_ip': '152.16.40.20',
'local_iface_name': 'xe1',
+ 'vld_id': 'uplink_0',
+ 'ifname': 'xe1',
'local_mac': '00:00:00:00:00:01'},
'vnfd-connection-point-ref': 'xe1',
'name': 'xe1'}]}],
@@ -386,6 +392,8 @@ class TestTrexTrafficGen(unittest.TestCase):
self.sut._connect_client.get_stats = mock.Mock(return_value="0")
self.sut.resource_helper.RUN_DURATION = 0
self.sut.resource_helper.QUEUE_WAIT_TIME = 0
+ # must generate cfg before we can run traffic so Trex port mapping is created
+ self.sut.resource_helper.generate_cfg()
self.sut._traffic_runner(mock_traffic_profile)
@mock.patch(SSH_HELPER)
@@ -397,6 +405,52 @@ class TestTrexTrafficGen(unittest.TestCase):
self.assertIsNone(trex_traffic_gen.resource_helper.generate_cfg())
@mock.patch(SSH_HELPER)
+ def test_build_ports_reversed_pci_ordering(self, ssh):
+ mock_ssh(ssh)
+ vnfd = copy.deepcopy(self.VNFD['vnfd:vnfd-catalog']['vnfd'][0])
+ vnfd['vdu'][0]['external-interface'] = [
+ {'virtual-interface':
+ {'dst_mac': '00:00:00:00:00:04',
+ 'vpci': '0000:05:00.0',
+ 'local_ip': '152.16.100.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': 2,
+ 'bandwidth': '10 Gbps',
+ 'driver': "i40e",
+ 'dst_ip': '152.16.100.20',
+ 'local_iface_name': 'xe0',
+ 'vld_id': 'downlink_0',
+ 'ifname': 'xe0',
+ 'local_mac': '00:00:00:00:00:02'},
+ 'vnfd-connection-point-ref': 'xe0',
+ 'name': 'xe0'},
+ {'virtual-interface':
+ {'dst_mac': '00:00:00:00:00:03',
+ 'vpci': '0000:04:00.0',
+ 'local_ip': '152.16.40.19',
+ 'type': 'PCI-PASSTHROUGH',
+ 'driver': "i40e",
+ 'netmask': '255.255.255.0',
+ 'dpdk_port_num': 0,
+ 'bandwidth': '10 Gbps',
+ 'dst_ip': '152.16.40.20',
+ 'local_iface_name': 'xe1',
+ 'vld_id': 'uplink_0',
+ 'ifname': 'xe1',
+ 'local_mac': '00:00:00:00:00:01'},
+ 'vnfd-connection-point-ref': 'xe1',
+ 'name': 'xe1'}]
+ trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
+ trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock()
+ trex_traffic_gen.resource_helper.generate_cfg()
+ trex_traffic_gen.resource_helper._build_ports()
+ self.assertEqual(sorted(trex_traffic_gen.resource_helper.all_ports), [0, 1])
+ # there is a gap in ordering
+ self.assertEqual(dict(trex_traffic_gen.resource_helper.dpdk_to_trex_port_map),
+ {0: 0, 2: 1})
+
+ @mock.patch(SSH_HELPER)
def test_run_traffic(self, ssh):
mock_ssh(ssh)
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py
index facfab892..d3c03e100 100644
--- a/yardstick/benchmark/contexts/model.py
+++ b/yardstick/benchmark/contexts/model.py
@@ -237,6 +237,7 @@ class Server(Object): # pragma: no cover
self._flavor = attrs["flavor"]
self.user_data = attrs.get('user_data', '')
+ self.availability_zone = attrs.get('availability_zone')
Server.list.append(self)
@@ -329,12 +330,10 @@ class Server(Object): # pragma: no cover
mountpoint=self.volume_mountpoint)
template.add_server(server_name, self.image, flavor=self.flavor_name,
- flavors=self.context.flavors,
- ports=port_name_list,
- user=self.user,
- key_name=self.keypair_name,
- user_data=self.user_data,
- scheduler_hints=scheduler_hints)
+ flavors=self.context.flavors, ports=port_name_list,
+ scheduler_hints=scheduler_hints, user=self.user,
+ key_name=self.keypair_name, user_data=self.user_data,
+ availability_zone=self.availability_zone)
def add_to_template(self, template, networks, scheduler_hints=None):
"""adds to the template one or more servers (instances)"""
diff --git a/yardstick/benchmark/core/scenario.py b/yardstick/benchmark/core/scenario.py
index cd119c24c..28eb65230 100644
--- a/yardstick/benchmark/core/scenario.py
+++ b/yardstick/benchmark/core/scenario.py
@@ -10,7 +10,6 @@
""" Handler for yardstick command 'scenario' """
from __future__ import absolute_import
-from __future__ import print_function
from yardstick.benchmark.scenarios.base import Scenario
from yardstick.benchmark.core import print_hbar
@@ -27,9 +26,9 @@ class Scenarios(object): # pragma: no cover
print_hbar(78)
print("| %-16s | %-60s" % ("Type", "Description"))
print_hbar(78)
- for stype in types:
- print("| %-16s | %-60s" % (stype.__scenario_type__,
- stype.__doc__.split("\n")[0]))
+ for scenario_class in types:
+ print("| %-16s | %-60s" % (scenario_class.get_scenario_type(),
+ scenario_class.get_description()))
print_hbar(78)
def show(self, args):
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
index a865b6551..eec86e133 100755
--- a/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/fault_process_kill.bash
@@ -20,6 +20,11 @@ if [ "$process_name" = "keystone" ]; then
do
kill -9 "${pid}"
done
+elif [ "$process_name" = "haproxy" ]; then
+ for pid in $(pgrep -f "^/usr/[^ ]*/${process_name}");
+ do
+ kill -9 "${pid}"
+ done
else
for pid in $(pgrep -f "/usr/.*/${process_name}");
do
diff --git a/yardstick/benchmark/scenarios/base.py b/yardstick/benchmark/scenarios/base.py
index 3cb138dd8..7af85834c 100644
--- a/yardstick/benchmark/scenarios/base.py
+++ b/yardstick/benchmark/scenarios/base.py
@@ -64,6 +64,20 @@ class Scenario(object):
raise RuntimeError("No such scenario type %s" % scenario_type)
+ @classmethod
+ def get_scenario_type(cls):
+ """Return a string with the scenario type, if defined"""
+ return str(getattr(cls, '__scenario_type__', None))
+
+ @classmethod
+ def get_description(cls):
+ """Return a single line string with the class description
+
+ This function will retrieve the class docstring and return the first
+ line, or 'None' if it's empty.
+ """
+ return cls.__doc__.splitlines()[0] if cls.__doc__ else str(None)
+
def _push_to_outputs(self, keys, values):
return dict(zip(keys, values))
diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py
index 190e1f7bd..adf4d8ae6 100644
--- a/yardstick/network_services/nfvi/resource.py
+++ b/yardstick/network_services/nfvi/resource.py
@@ -243,19 +243,6 @@ class ResourceProfile(object):
}
self._provide_config_file(config_file_path, self.COLLECTD_CONF, kwargs)
- def _setup_intel_pmu(self, connection, bin_path):
- pmu_event_path = os.path.join(bin_path, "pmu_event.json")
- try:
- self.plugins["intel_pmu"]["pmu_event_path"] = pmu_event_path
- except KeyError:
- # if intel_pmu is not a dict, force it into a dict
- self.plugins["intel_pmu"] = {"pmu_event_path": pmu_event_path}
- LOG.debug("Downloading event list for pmu_stats plugin")
- cmd = 'cd {0}; PMU_EVENTS_PATH={1} python event_download_local.py'.format(
- bin_path, pmu_event_path)
- cmd = "sudo bash -c '{}'".format(cmd)
- connection.execute(cmd)
-
def _setup_ovs_stats(self, connection):
try:
socket_path = self.plugins["ovs_stats"].get("ovs_socket_path", self.OVS_SOCKET_PATH)
@@ -282,8 +269,6 @@ class ResourceProfile(object):
# connection.execute("sudo %s '%s' '%s'" % (
# collectd_installer, http_proxy, https_proxy))
return
- if "intel_pmu" in self.plugins:
- self._setup_intel_pmu(connection, bin_path)
if "ovs_stats" in self.plugins:
self._setup_ovs_stats(connection)
diff --git a/yardstick/network_services/traffic_profile/prox_mpls_tag_untag.py b/yardstick/network_services/traffic_profile/prox_mpls_tag_untag.py
deleted file mode 100644
index 0e1048b5d..000000000
--- a/yardstick/network_services/traffic_profile/prox_mpls_tag_untag.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright (c) 2016-2017 Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-""" Fixed traffic profile definitions """
-
-from __future__ import absolute_import
-
-import logging
-
-from yardstick.network_services.traffic_profile.prox_profile import ProxProfile
-
-LOG = logging.getLogger(__name__)
-
-
-class ProxMplsTagUntagProfile(ProxProfile):
- """
- This profile adds a single stream at the beginning of the traffic session
- """
-
- def __init__(self, tp_config):
- super(ProxMplsTagUntagProfile, self).__init__(tp_config)
- self.current_lower = self.lower_bound
- self.current_upper = self.upper_bound
-
- @property
- def delta(self):
- return self.current_upper - self.current_lower
-
- @property
- def mid_point(self):
- return (self.current_lower + self.current_upper) / 2
-
- def bounds_iterator(self, logger=None):
- self.current_lower = self.lower_bound
- self.current_upper = self.upper_bound
-
- test_value = self.current_upper
- while abs(self.delta) >= self.precision:
- if logger:
- logger.debug("New interval [%s, %s), precision: %d", self.current_lower,
- self.current_upper, self.step_value)
- logger.info("Testing with value %s", test_value)
-
- yield test_value
- test_value = self.mid_point
-
- def run_test_with_pkt_size(self, traffic_gen, pkt_size, duration):
- """Run the test for a single packet size.
-
- :param traffic_gen: traffic generator instance
- :type traffic_gen: TrafficGen
- :param pkt_size: The packet size to test with.
- :type pkt_size: int
- :param duration: The duration for each try.
- :type duration: int
-
- """
-
- LOG.info("Testing with packet size %d", pkt_size)
-
- # Binary search assumes the lower value of the interval is
- # successful and the upper value is a failure.
- # The first value that is tested, is the maximum value. If that
- # succeeds, no more searching is needed. If it fails, a regular
- # binary search is performed.
- #
- # The test_value used for the first iteration of binary search
- # is adjusted so that the delta between this test_value and the
- # upper bound is a power-of-2 multiple of precision. In the
- # optimistic situation where this first test_value results in a
- # success, the binary search will complete on an integer multiple
- # of the precision, rather than on a fraction of it.
-
- # throughput and packet loss from the most recent successful test
- successful_pkt_loss = 0.0
- for test_value in self.bounds_iterator(LOG):
- result, port_samples = self._profile_helper.run_test(pkt_size, duration,
- test_value, self.tolerated_loss)
-
- if result.success:
- LOG.debug("Success! Increasing lower bound")
- self.current_lower = test_value
- successful_pkt_loss = result.pkt_loss
- else:
- LOG.debug("Failure... Decreasing upper bound")
- self.current_upper = test_value
-
- samples = result.get_samples(pkt_size, successful_pkt_loss, port_samples)
- self.queue.put(samples)
diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py
index 16e809b65..b1ca8a345 100644
--- a/yardstick/network_services/traffic_profile/rfc2544.py
+++ b/yardstick/network_services/traffic_profile/rfc2544.py
@@ -62,7 +62,7 @@ class RFC2544Profile(TrexProfile):
self.generator.rfc2544_helper.correlated_traffic:
continue
for intf in intfs:
- port = self.generator.vnfd_helper.port_num(intf)
+ port = self.generator.port_num(intf)
self.ports.append(port)
self.generator.client.add_streams(self.get_streams(profile_data), ports=port)
@@ -170,7 +170,7 @@ class RFC2544Profile(TrexProfile):
self.generator.rfc2544_helper.correlated_traffic:
continue
for intf in intfs:
- port = self.generator.vnfd_helper.port_num(intf)
+ port = self.generator.port_num(intf)
self.ports.append(port)
self.generator.client.add_streams(self.get_streams(profile_data), ports=port)
diff --git a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
index d9acae2f2..ba066333d 100644
--- a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
+++ b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
@@ -509,11 +509,6 @@ class ProxSocketHelper(object):
def hz(self):
return self.get_all_tot_stats()[3]
- # Deprecated
- # TODO: remove
- def rx_stats(self, cores, task=0):
- return self.core_stats(cores, task)
-
def core_stats(self, cores, task=0):
"""Get the receive statistics from the remote system"""
rx = tx = drop = tsc = 0
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
index 75ed6227d..ff81b5f5f 100644
--- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -391,6 +391,10 @@ class ClientResourceHelper(ResourceHelper):
self.vnfd_helper.port_nums(self.vnfd_helper.port_pairs.downlink_ports)
self.all_ports = self.vnfd_helper.port_nums(self.vnfd_helper.port_pairs.all_ports)
+ def port_num(self, intf):
+ # by default return port num
+ return self.vnfd_helper.port_num(intf)
+
def get_stats(self, *args, **kwargs):
try:
return self.client.get_stats(*args, **kwargs)
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
index 458f1b844..93ba8557a 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
@@ -48,27 +48,38 @@ class TrexResourceHelper(ClientResourceHelper):
ASYNC_PORT = 4500
SYNC_PORT = 4501
+ def __init__(self, setup_helper):
+ super(TrexResourceHelper, self).__init__(setup_helper)
+ self.port_map = {}
+ self.dpdk_to_trex_port_map = {}
+
def generate_cfg(self):
port_names = self.vnfd_helper.port_pairs.all_ports
vpci_list = []
port_list = []
+ self.port_map = {}
+ self.dpdk_to_trex_port_map = {}
- port_nums = sorted(self.vnfd_helper.port_nums(port_names))
- for port_num in port_nums:
- interface = self.vnfd_helper.find_interface_by_port(port_num)
+ sorted_ports = sorted((self.vnfd_helper.port_num(port_name), port_name) for port_name in
+ port_names)
+ for index, (port_num, port_name) in enumerate(sorted_ports):
+ interface = self.vnfd_helper.find_interface(name=port_name)
virtual_interface = interface['virtual-interface']
dst_mac = virtual_interface["dst_mac"]
- # why skip?, ordering is based on DPDK port number so we can't skip
+ # this is to check for unused ports, all ports in the topology
+ # will always have dst_mac
if not dst_mac:
continue
- # TRex ports must be in DPDK port number, so order of append matters
+ # TRex ports are in logical order roughly based on DPDK port number sorting
vpci_list.append(virtual_interface["vpci"])
local_mac = virtual_interface["local_mac"]
port_list.append({
"src_mac": mac_address_to_hex_list(local_mac),
"dest_mac": mac_address_to_hex_list(dst_mac),
})
+ self.port_map[port_name] = index
+ self.dpdk_to_trex_port_map[port_num] = index
trex_cfg = {
'interfaces': vpci_list,
'port_info': port_list,
@@ -80,6 +91,17 @@ class TrexResourceHelper(ClientResourceHelper):
cfg_str = yaml.safe_dump(cfg_file, default_flow_style=False, explicit_start=True)
self.ssh_helper.upload_config_file(os.path.basename(self.CONF_FILE), cfg_str)
+ def _build_ports(self):
+ super(TrexResourceHelper, self)._build_ports()
+ # override with TRex logic port number
+ self.uplink_ports = [self.dpdk_to_trex_port_map[p] for p in self.uplink_ports]
+ self.downlink_ports = [self.dpdk_to_trex_port_map[p] for p in self.downlink_ports]
+ self.all_ports = [self.dpdk_to_trex_port_map[p] for p in self.all_ports]
+
+ def port_num(self, intf):
+ # return logical TRex port
+ return self.port_map[intf]
+
def check_status(self):
status, _, _ = self.ssh_helper.execute("sudo lsof -i:%s" % self.SYNC_PORT)
return status
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py
index 57847bfa9..d58ae5618 100644
--- a/yardstick/orchestrator/heat.py
+++ b/yardstick/orchestrator/heat.py
@@ -531,11 +531,10 @@ name (i.e. %s).\
'value': {'get_resource': name}
}
- def add_server(self, name, image, flavor, flavors, ports=None,
- networks=None, scheduler_hints=None, user=None,
- key_name=None, user_data=None, metadata=None,
- additional_properties=None):
- """add to the template a Nova Server"""
+ def add_server(self, name, image, flavor, flavors, ports=None, networks=None,
+ scheduler_hints=None, user=None, key_name=None, user_data=None, metadata=None,
+ additional_properties=None, availability_zone=None):
+ """add to the template a Nova Server """
log.debug("adding Nova::Server '%s', image '%s', flavor '%s', "
"ports %s", name, image, flavor, ports)
@@ -550,6 +549,8 @@ name (i.e. %s).\
'flavor': {},
'networks': [] # list of dictionaries
}
+ if availability_zone:
+ server_properties["availability_zone"] = availability_zone
if flavor in flavors:
self.resources[name]['depends_on'].append(flavor)