diff options
319 files changed, 31414 insertions, 4257 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml index 5f9158576..35d9da45e 100644 --- a/ansible/build_yardstick_image.yml +++ b/ansible/build_yardstick_image.yml @@ -87,6 +87,12 @@ - name: convert image to raw command: "qemu-img convert {{ image_dest }} {{ raw_imgfile }}" + - name: resize image to allow for more VNFs + command: "qemu-img resize -f raw {{ raw_imgfile }} +2G" + + - name: resize parition to allow for more VNFs + command: "parted -s -a optimal {{ raw_imgfile }} resizepart 1 100%" + - name: create mknod devices in chroot command: "mknod -m 0660 /dev/loop{{ item }} b 7 {{ item }}" args: @@ -124,6 +130,18 @@ - set_fact: image_fs_type: "{{ blkid_res.stdout.strip() }}" + - fail: + msg: "We only support ext4 image filesystems because we have to resize" + when: image_fs_type != "ext4" + + - name: fsck the image filesystem + command: "e2fsck -y -f {{ image_first_partition_device }}" + + - name: resize filesystem to full partition size + command: resize2fs {{ image_first_partition_device }} + + - name: fsck the image filesystem + command: "e2fsck -y -f {{ image_first_partition_device }}" - name: make tmp disposable fstab command: mktemp --tmpdir fake_fstab.XXXXXXXXXX diff --git a/ansible/nsb_setup.yml b/ansible/nsb_setup.yml index e79ccabea..fcb518899 100644 --- a/ansible/nsb_setup.yml +++ b/ansible/nsb_setup.yml @@ -44,13 +44,14 @@ - name: Start yardstick container docker_container: name: yardstick + pull: yes + recreate: yes image: opnfv/yardstick:latest recreate: yes state: started restart_policy: always - network_mode: host - privileged: True - interactive: True + privileged: yes + interactive: yes volumes: - "{{ openrc_file|default('/dev/null') }}:/etc/yardstick/openstack.creds:ro" - /var/run/docker.sock:/var/run/docker.sock diff --git a/ansible/roles/convert_openrc/defaults/main.yml b/ansible/roles/convert_openrc/defaults/main.yml index dffca1078..24a7129cc 100644 --- a/ansible/roles/convert_openrc/defaults/main.yml +++ b/ansible/roles/convert_openrc/defaults/main.yml @@ -12,6 +12,5 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -openrc_file: "openrc" cloud_yaml_path: "{{ playbook_dir }}/clouds.yaml" diff --git a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml index be4a328a2..6e7657a39 100755 --- a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml +++ b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml @@ -28,7 +28,7 @@ - name: use 16 for auto num_hugepages and 1G size set_fact: - num_hugepages: 16 + num_hugepages: 8 when: num_hugepages|default("auto") == "auto" - name: set hugepages in grub diff --git a/ansible/roles/install_dependencies/tasks/Debian.yml b/ansible/roles/install_dependencies/tasks/Debian.yml index 7a9911ebf..bba6fb13c 100755 --- a/ansible/roles/install_dependencies/tasks/Debian.yml +++ b/ansible/roles/install_dependencies/tasks/Debian.yml @@ -47,3 +47,4 @@ - uwsgi-plugin-python - supervisor - python-setuptools + - lsof diff --git a/ansible/roles/install_image_dependencies/tasks/main.yml b/ansible/roles/install_image_dependencies/tasks/main.yml index f3a3151c5..ffd30f33e 100644 --- a/ansible/roles/install_image_dependencies/tasks/main.yml +++ b/ansible/roles/install_image_dependencies/tasks/main.yml @@ -16,7 +16,7 @@ include: "{{ ansible_os_family }}.yml" - name: Install core packages - action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest" + action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes" register: pkg_mgr_results retries: "{{ pkg_mgr_retries }}" until: pkg_mgr_results|success diff --git a/ansible/roles/set_package_installer_proxy/tasks/Debian.yml b/ansible/roles/set_package_installer_proxy/tasks/Debian.yml index 11117e5ed..d3891ab18 100644 --- a/ansible/roles/set_package_installer_proxy/tasks/Debian.yml +++ b/ansible/roles/set_package_installer_proxy/tasks/Debian.yml @@ -1,27 +1,16 @@ -# Copyright (c) 2016, Intel Corporation. +# Copyright (c) 2016-2017 Intel Corporation # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: +# 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 # -# * 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. +# http://www.apache.org/licenses/LICENSE-2.0 # -# 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. --- - name: Create apt.conf.d/ proxy config template: @@ -29,7 +18,7 @@ dest: "/etc/apt/apt.conf.d/20proxy" - name: Test proxy connection -# async: "{{ connection_timeout }}" + async: "{{ connection_timeout }}" action: "{{ ansible_pkg_mgr }} name=tar state=latest update_cache=yes" -# poll: 0 + poll: 0 register: test_proxy_job_id diff --git a/ansible/roles/set_package_installer_proxy/tasks/RedHat.yml b/ansible/roles/set_package_installer_proxy/tasks/RedHat.yml index 809e43a60..1c3e9fb0f 100644 --- a/ansible/roles/set_package_installer_proxy/tasks/RedHat.yml +++ b/ansible/roles/set_package_installer_proxy/tasks/RedHat.yml @@ -1,27 +1,16 @@ -# Copyright (c) 2016, Intel Corporation. +# Copyright (c) 2016-2017 Intel Corporation # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: +# 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 # -# * 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. +# http://www.apache.org/licenses/LICENSE-2.0 # -# 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. --- # must do this before setting yum proxy - name: find yum/dnf config @@ -48,10 +37,14 @@ with_items: "{{ packager_conf_stat.results }}" register: yum_proxy_lines -# - name: Test proxy connection -# # try workaround call makecache directly -# # yum module was failing for some reason -# async: "{{ connection_timeout }}" -# command: "{{ ansible_pkg_mgr }} -d2 -y makecache" -# poll: 0 -# register: test_proxy_job_id + - name: yum disable fastest mirrors + include: yum_disable_fastestmirrors.yml + when: ansible_pkg_mgr == 'yum' + + - name: Test proxy connection + # try workaround call makecache directly + # yum module was failing for some reason + async: "{{ connection_timeout }}" + command: "{{ ansible_pkg_mgr }} -d2 -y makecache" + poll: 0 + register: test_proxy_job_id diff --git a/ansible/roles/set_package_installer_proxy/tasks/main.yml b/ansible/roles/set_package_installer_proxy/tasks/main.yml index 9838cd489..fea424bf3 100644 --- a/ansible/roles/set_package_installer_proxy/tasks/main.yml +++ b/ansible/roles/set_package_installer_proxy/tasks/main.yml @@ -1,40 +1,29 @@ -# Copyright (c) 2016, Intel Corporation. +# Copyright (c) 2016-2017 Intel Corporation # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: +# 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 # -# * 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. +# http://www.apache.org/licenses/LICENSE-2.0 # -# 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. --- - name: Configure package manager proxy include: "{{ ansible_os_family }}.yml" -# - async_status: jid={{ test_proxy_job_id.ansible_job_id }} -# register: test_proxy_result -# until: test_proxy_result.finished -# retries: 60 -# delay: 10 -# -# - debug: var=hostvars[item]['test_proxy_result'] -# with_items: "{{ hostvars }}" -# -# - name: Verify proxy test -# fail: msg="proxy test timeout" -# when: "{{ test_proxy_result.get('finished', 0) == 0 }}" + - async_status: jid={{ test_proxy_job_id.ansible_job_id }} + register: test_proxy_result + until: test_proxy_result.finished + retries: 60 + delay: 10 + + - debug: var=hostvars[item]['test_proxy_result'] + with_items: "{{ hostvars }}" + + - name: Verify proxy test + fail: msg="proxy test timeout" + when: "test_proxy_result.get('finished', 0) == 0" diff --git a/ansible/roles/set_package_installer_proxy/tasks/yum_disable_fastestmirrors.yml b/ansible/roles/set_package_installer_proxy/tasks/yum_disable_fastestmirrors.yml new file mode 100644 index 000000000..42388bcd9 --- /dev/null +++ b/ansible/roles/set_package_installer_proxy/tasks/yum_disable_fastestmirrors.yml @@ -0,0 +1,11 @@ +--- + - name: yum disable fastest mirrors + lineinfile: + dest: "/etc/yum/pluginconf.d/fastestmirror.conf" + regexp: "^enabled=1" + line: "enabled=0" + ignore_errors: true + + - name: yum clean all + command: yum clean all + diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py index 47ea91643..04cc659c7 100644 --- a/api/resources/v1/env.py +++ b/api/resources/v1/env.py @@ -123,7 +123,7 @@ class V1Env(ApiResource): "isDefault": True, } try: - HttpClient().post(url, data) + HttpClient().post(url, data, timeout=10) except Exception: LOG.exception('Create datasources failed') raise diff --git a/api/resources/v1/tasks.py b/api/resources/v1/tasks.py new file mode 100644 index 000000000..52455fbf5 --- /dev/null +++ b/api/resources/v1/tasks.py @@ -0,0 +1,50 @@ +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +import os +import errno +import uuid + +from api import ApiResource +from api.database.v1.handlers import TasksHandler +from yardstick.common import constants as consts +from yardstick.common.utils import result_handler + + +class V1TaskLog(ApiResource): + def get(self, task_id): + + try: + uuid.UUID(task_id) + except ValueError: + return result_handler(consts.API_ERROR, 'invalid task_id') + + task_handler = TasksHandler() + try: + task = task_handler.get_task_by_taskid(task_id) + except ValueError: + return result_handler(consts.API_ERROR, 'invalid task_id') + + index = int(self._get_args().get('index', 0)) + + try: + with open(os.path.join(consts.TASK_LOG_DIR, '{}.log'.format(task_id))) as f: + f.seek(index) + data = f.readlines() + index = f.tell() + except OSError as e: + if e.errno == errno.ENOENT: + return result_handler(consts.API_ERROR, 'log file does not exist') + return result_handler(consts.API_ERROR, 'error with log file') + + return_data = { + 'index': index, + 'data': data + } + + return result_handler(task.status, return_data) diff --git a/api/resources/v2/testcases.py b/api/resources/v2/testcases.py index 316ef2664..0edbf6285 100644 --- a/api/resources/v2/testcases.py +++ b/api/resources/v2/testcases.py @@ -60,7 +60,13 @@ class V2Testcase(ApiResource): options = {k: {'description': '', 'type': v.__class__.__name__} for k, v in jinja2schema.infer(data).items()} - + # [('segmentation_id', < scalar >), ('image', < string >), ('provider', < scalar >), + # ('physical_network', < string >), ('packetsize', < number >)] + for k, v in options.items(): + if k == 'segmentation_id': + options[k]['type'] = 'Number' + if k == 'provider': + options[k]['type'] = 'String' return result_handler(consts.API_SUCCESS, {'testcase': data, 'args': options}) def delete(self, case_name): diff --git a/api/urls.py b/api/urls.py index 9b0040b6c..4b8e39e8f 100644 --- a/api/urls.py +++ b/api/urls.py @@ -20,6 +20,7 @@ urlpatterns = [ Url('/yardstick/testsuites/action', 'v1_test_suite'), Url('/yardstick/results', 'v1_result'), Url('/yardstick/env/action', 'v1_env'), + Url('/yardstick/tasks/<task_id>/log', 'v1_task_log'), # api v2 Url('/api/v2/yardstick/environments', 'v2_environments'), diff --git a/dashboard/KVMFORNFV-Packet-Forwarding b/dashboard/KVMFORNFV-Packet-Forwarding index 83000011f..a8d0c71e4 100644 --- a/dashboard/KVMFORNFV-Packet-Forwarding +++ b/dashboard/KVMFORNFV-Packet-Forwarding @@ -129,7 +129,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "phy2phy_tput 64", + "title": "phy2phy_tput 64(latency)", "tooltip": { "shared": true, "sort": 0, @@ -184,6 +184,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 28, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "phy2phy_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "64" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "phy2phy_tput 64(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 8, "leftYAxisLabel": "latency", "legend": { @@ -255,7 +365,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "phy2phy_tput 128", + "title": "phy2phy_tput 128(latency)", "tooltip": { "shared": true, "sort": 0, @@ -310,6 +420,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 29, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "phy2phy_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "128" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "phy2phy_tput 128(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 9, "leftYAxisLabel": "latency", "legend": { @@ -381,7 +601,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "phy2phy_tput 512", + "title": "phy2phy_tput 512(latency)", "tooltip": { "shared": true, "sort": 0, @@ -436,6 +656,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 30, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "phy2phy_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "512" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "phy2phy_tput 512(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 10, "leftYAxisLabel": "latency", "legend": { @@ -507,7 +837,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "phy2phy_tput 1024", + "title": "phy2phy_tput 1024(latency)", "tooltip": { "shared": true, "sort": 0, @@ -562,6 +892,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 32, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "phy2phy_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "phy2phy_tput 1024(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 11, "leftYAxisLabel": "latency", "legend": { @@ -633,7 +1073,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "phy2phy_tput 1518", + "title": "phy2phy_tput 1518(latency)", "tooltip": { "shared": true, "sort": 0, @@ -670,6 +1110,116 @@ "show": false } ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 31, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "phy2phy_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "128" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "phy2phy_tput 1518(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] } ], "repeat": null, @@ -771,7 +1321,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput 64", + "title": "pvp_tput 64(latency)", "tooltip": { "shared": true, "sort": 0, @@ -807,7 +1357,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 33, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "64" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput 64(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -896,7 +1557,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput 128", + "title": "pvp_tput 128(latency)", "tooltip": { "shared": true, "sort": 0, @@ -932,7 +1593,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 35, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput 128(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1021,7 +1793,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput 512", + "title": "pvp_tput 512(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1057,7 +1829,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 34, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput 512(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1146,7 +2029,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput 1024", + "title": "pvp_tput 1024(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1182,7 +2065,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 37, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput 1024(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1271,7 +2265,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput 1518", + "title": "pvp_tput 1518(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1307,7 +2301,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 36, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1518" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput 1518(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] } ], "repeat": null, @@ -1409,7 +2514,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput_SRIOV 64", + "title": "pvp_tput_SRIOV 64(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1445,7 +2550,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 38, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_SRIOV", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "64" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput_SRIOV 64(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1534,7 +2750,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput_SRIOV 128", + "title": "pvp_tput_SRIOV 128(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1570,7 +2786,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 40, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_SRIOV", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "128" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput_SRIOV 128(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1659,7 +2986,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput_SRIOV 512", + "title": "pvp_tput_SRIOV 512(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1695,7 +3022,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 39, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_SRIOV", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "512" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput_SRIOV 512(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1784,7 +3222,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput_SRIOV 1024", + "title": "pvp_tput_SRIOV 1024(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1820,7 +3258,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 42, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_SRIOV", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput_SRIOV 1024(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] }, { "aliasColors": {}, @@ -1909,7 +3458,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvp_tput_SRIOV 1518", + "title": "pvp_tput_SRIOV 1518(latency)", "tooltip": { "shared": true, "sort": 0, @@ -1945,7 +3494,118 @@ "min": null, "show": false } - ] + ], + "links": [] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 41, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvp_tput_SRIOV", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1518" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvp_tput_SRIOV 1518(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "links": [] } ], "repeat": null, @@ -2007,7 +3667,7 @@ "groupBy": [], "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_mod_vlan_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2048,7 +3708,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput 64", + "title": "pvvp_tput 64(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2103,6 +3763,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 43, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "64" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvvp_tput 64(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 13, "leftYAxisLabel": "latency", "legend": { @@ -2133,7 +3903,7 @@ "groupBy": [], "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_mod_vlan_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '128' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '128' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2174,7 +3944,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput 128", + "title": "pvvp_tput 128(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2229,6 +3999,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 45, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "128" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvvp_tput 128(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 14, "leftYAxisLabel": "latency", "legend": { @@ -2259,7 +4139,7 @@ "groupBy": [], "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_mod_vlan_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '512' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '512' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2300,7 +4180,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput 512", + "title": "pvvp_tput 512(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2355,6 +4235,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 47, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "512" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvvp_tput 512(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 15, "leftYAxisLabel": "latency", "legend": { @@ -2385,7 +4375,7 @@ "groupBy": [], "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_mod_vlan_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1024' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1024' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2426,7 +4416,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput 1024", + "title": "pvvp_tput 1024(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2481,6 +4471,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 44, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvvp_tput 1024(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 16, "leftYAxisLabel": "latency", "legend": { @@ -2511,7 +4611,7 @@ "groupBy": [], "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"phy2phy_tput_mod_vlan_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1518' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2552,7 +4652,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput 1518", + "title": "pvvp_tput 1518(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2589,6 +4689,116 @@ "show": false } ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 46, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvvp_tput_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvvp_tput_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1518" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvvp_tput 1518(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] } ], "repeat": null, @@ -2648,9 +4858,9 @@ { "dsType": "influxdb", "groupBy": [], - "measurement": "pvvp_tput_SRIOV", + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2691,7 +4901,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput_SRIOV 64", + "title": "pvpv_cont 64(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2746,6 +4956,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 48, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "64" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvpv_cont 64(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 24, "leftYAxisLabel": "latency", "legend": { @@ -2774,9 +5094,9 @@ { "dsType": "influxdb", "groupBy": [], - "measurement": "pvvp_tput_SRIOV", + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '128' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2817,7 +5137,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput_SRIOV 128", + "title": "pvpv_cont 128(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2872,6 +5192,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 49, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "128" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvpv_cont 128(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 25, "leftYAxisLabel": "latency", "legend": { @@ -2900,9 +5330,9 @@ { "dsType": "influxdb", "groupBy": [], - "measurement": "pvvp_tput_SRIOV", + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '512' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -2943,7 +5373,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput_SRIOV 512", + "title": "pvpv_cont 512(latency)", "tooltip": { "shared": true, "sort": 0, @@ -2998,6 +5428,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 50, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "512" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvpv_cont 512(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 26, "leftYAxisLabel": "latency", "legend": { @@ -3026,9 +5566,9 @@ { "dsType": "influxdb", "groupBy": [], - "measurement": "pvvp_tput_SRIOV", + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1024' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -3069,7 +5609,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput_SRIOV 1024", + "title": "pvpv_cont 1024(latency)", "tooltip": { "shared": true, "sort": 0, @@ -3124,6 +5664,116 @@ "threshold2": null, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, + "id": 52, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1024" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvpv_cont 1024(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, "id": 27, "leftYAxisLabel": "latency", "legend": { @@ -3152,9 +5802,9 @@ { "dsType": "influxdb", "groupBy": [], - "measurement": "pvvp_tput_SRIOV", + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", "policy": "default", - "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvp_tput_SRIOV\" WHERE \"packet_size\" = '1518' AND $timeFilter", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '1518' AND $timeFilter", "refId": "A", "resultFormat": "time_series", "select": [ @@ -3195,7 +5845,7 @@ "thresholds": [], "timeFrom": null, "timeShift": null, - "title": "pvvp_tput_SRIOV 1518", + "title": "pvpv_cont 1518(latency)", "tooltip": { "shared": true, "sort": 0, @@ -3232,10 +5882,120 @@ "show": false } ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "yardstick-vtc", + "fill": 0, + "grid": { + "leftLogBase": 1, + "leftMax": null, + "leftMin": null, + "rightLogBase": 1, + "rightMax": null, + "rightMin": null, + "threshold1": null, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": null, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 51, + "leftYAxisLabel": "latency", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 3, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "pvpv_cont_OVS_with_DPDK_and_vHost_User", + "policy": "default", + "query": "SELECT \"min_value\", \"avg_value\", \"max_value\" FROM \"pvpv_cont_OVS_with_DPDK_and_vHost_User\" WHERE \"packet_size\" = '64' AND $timeFilter", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "type": "field", + "params": [ + "throughput" + ] + } + ] + ], + "tags": [ + { + "key": "packet_size", + "operator": "=", + "value": "1518" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "pvpv_cont 1518(throughput)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "x-axis": true, + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "y-axis": true, + "y_formats": [ + "short", + "short" + ], + "yaxes": [ + { + "format": "MBs", + "label": "throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ] } ], "showTitle": true, - "title": "KVM4NFV-pvvp-tput-SRIOV" + "title": "KVM4NFV-pvpv-cont-OVS_WITH_DPDK_AND_VHOST_USER" } ], "time": { diff --git a/dashboard/Prox_BM_ACL_Test-2Port-1499777741771.json b/dashboard/Prox_BM_ACL_Test-2Port-1499777741771.json new file mode 100644 index 000000000..2279df189 --- /dev/null +++ b/dashboard/Prox_BM_ACL_Test-2Port-1499777741771.json @@ -0,0 +1,931 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_ACL_Test-2Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "ACL", + "BM", + "2Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_ACL_2Port_Test</center> </a></h5>\n<center>\n<p>This test allows to measure how well the SUT can exploit structures in the list of ACL rules. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ACL VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "now/w", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 26, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_ACL_Test-4Port-1499777725160.json b/dashboard/Prox_BM_ACL_Test-4Port-1499777725160.json new file mode 100644 index 000000000..8bdcb70fe --- /dev/null +++ b/dashboard/Prox_BM_ACL_Test-4Port-1499777725160.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_ACL_Test-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "ACL", + "BM", + "4Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_ACL_4Port_Test</center> </a></h5>\n<center>\n<p>This test allows to measure how well the SUT can exploit structures in the list of ACL rules. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ACL VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-06-27T09:43:32.713Z", + "to": "2017-06-27T09:46:04.003Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 18, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_L2FWD_Multiflow-2Port-1501760631065.json b/dashboard/Prox_BM_L2FWD_Multiflow-2Port-1501760631065.json new file mode 100644 index 000000000..0bfec765d --- /dev/null +++ b/dashboard/Prox_BM_L2FWD_Multiflow-2Port-1501760631065.json @@ -0,0 +1,900 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_L2FWD_Multiflow-2Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "BM", + "2Port", + "L2FWD_Multiflow" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_L2FWD_Multiflow_2Port_BM_Test</center> </a></h5>\n<center>\n<p>This test allows to measures L2FWD with multiple flows (randomly generated src/dst ip addresses). The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2Fwd Multiflow VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L2Fwd Multiflow VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2Fwd Multiflow Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-08-03T10:00:17.289Z", + "to": "2017-08-03T10:02:23.481Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 5, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_L2FWD_Multiflow-4Port-1501760650413.json b/dashboard/Prox_BM_L2FWD_Multiflow-4Port-1501760650413.json new file mode 100644 index 000000000..2a0c33bcd --- /dev/null +++ b/dashboard/Prox_BM_L2FWD_Multiflow-4Port-1501760650413.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_L2FWD_Multiflow-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "4Port", + "L2FWD_Multiflow", + "BM" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_L2FWD_Multiflow-4Port</center> </a></h5>\n<center>\n<p>This test measures L2FWD with multiple flows. (src/dst ip address are randomly generated) The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2FWD Multiflow VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L2FWD Multiflow VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2FWD MultiflowTraffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-08-03T10:26:14.359Z", + "to": "2017-08-03T10:28:43.436Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 8, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_L3FWD-2Port-1500900469978.json b/dashboard/Prox_BM_L3FWD-2Port-1500900469978.json new file mode 100644 index 000000000..506ef8bb3 --- /dev/null +++ b/dashboard/Prox_BM_L3FWD-2Port-1500900469978.json @@ -0,0 +1,899 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_L3FWD-2Port", + "tags": [ + "NSB", + "Prox", + "BM", + "L3Fwd", + "2Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_L3Fwd_2Port_Test</center> </a></h5>\n<center>\n<p>The application performs routing of packets with LPM based look-up method.\nThe KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "VNF stats: Packet In, Forward and Dropped", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port Stats: Out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port Stats: In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Throughput Stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-07-24T12:42:38.308Z", + "to": "2017-07-24T12:45:12.874Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 3, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_L3FWD-4Port-1500900168552.json b/dashboard/Prox_BM_L3FWD-4Port-1500900168552.json new file mode 100644 index 000000000..4a90753ea --- /dev/null +++ b/dashboard/Prox_BM_L3FWD-4Port-1500900168552.json @@ -0,0 +1,1047 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_L3FWD-4Port", + "tags": [ + "NSB", + "Prox", + "BM", + "4Port", + "L3Fwd" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_L3Fwd_4Port_Test</center> </a></h5>\n<center>\n<p>The application performs routing of packets with LPM based look-up method.\nThe KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "VNF stats: Packet In, Forward and Dropped", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port Stats: Out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port Stats: In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Throughput Stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-07-24T11:06:05.950Z", + "to": "2017-07-24T11:09:07.902Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 4, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_LB_1to4-4Port-1501782362979.json b/dashboard/Prox_BM_LB_1to4-4Port-1501782362979.json new file mode 100644 index 000000000..cbcca8bed --- /dev/null +++ b/dashboard/Prox_BM_LB_1to4-4Port-1501782362979.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_LB_1to4-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "4Port", + "BM", + "LB" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_LB_1to4Port</center> </a></h5>\n<center>\n<p>This transmits random packets on 1 port, and received them on 4 ports. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Load Balancer VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Load Balancer Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 10, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Load Balancer VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-08-03T17:29:12.741Z", + "to": "2017-08-03T17:30:59.111Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 4, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_BM_Packet_Buffering_Test-1Port-1501146963774.json b/dashboard/Prox_BM_Packet_Buffering_Test-1Port-1501146963774.json new file mode 100644 index 000000000..204676eb5 --- /dev/null +++ b/dashboard/Prox_BM_Packet_Buffering_Test-1Port-1501146963774.json @@ -0,0 +1,937 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_BM_Packet_Buffering_Test-1Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "BM", + "Buffering", + "1Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_Buffering_1Port_Test</center> </a></h5>\n<center>\n<p>The KPI in this test is the maximum number of packets that can be forwarded\n given the requirement that the latency of each packet is at least\n 125 millisecond</p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Packet Buffering VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet Buffering VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Packet Buffering Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-0 In packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port stats: Out vs In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Min Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyMin.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Avg Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyAvg.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Max Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyMax.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Latency stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Latency", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.Throughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Throughput Stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-07-14T15:56:09.546Z", + "to": "2017-07-14T15:59:17.008Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 8, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_ACL_Test-2Port-1499778177265.json b/dashboard/Prox_Heat_ACL_Test-2Port-1499778177265.json new file mode 100644 index 000000000..f841e490b --- /dev/null +++ b/dashboard/Prox_Heat_ACL_Test-2Port-1499778177265.json @@ -0,0 +1,931 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_ACL_Test-2Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "ACL", + "Heat", + "2Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_ACL_Heat_Test-2Port</center> </a></h5>\n<center>\n<p>This test allows to measure how well the SUT can exploit structures in the list of ACL rules. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ACL VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "policy": "default", + "dsType": "influxdb", + "resultFormat": "time_series", + "tags": [], + "groupBy": [ + { + "type": "time", + "params": [ + "$interval" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "tg__1.DropPackets" + ] + }, + { + "type": "mean", + "params": [] + } + ] + ], + "refId": "B", + "measurement": "tc_prox_heat_context_acl-2", + "alias": "TG Dropped Packets" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-07-07T15:33:56.340Z", + "to": "2017-07-07T15:36:11.941Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 7, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_ACL_Test-4Port-1499778040281.json b/dashboard/Prox_Heat_ACL_Test-4Port-1499778040281.json new file mode 100644 index 000000000..e89dd2743 --- /dev/null +++ b/dashboard/Prox_Heat_ACL_Test-4Port-1499778040281.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_ACL_Test-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "ACL", + "Heat", + "4Port" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_Heat_ACL_Test-4Port</center> </a></h5>\n<center>\n<p>This test allows to measure how well the SUT can exploit structures in the list of ACL rules. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ACL VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox ACL Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_acl-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-07-07T15:00:35.628Z", + "to": "2017-07-07T17:54:24.315Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 12, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_L2FWD_Multiflow-2Port-1501760607998.json b/dashboard/Prox_Heat_L2FWD_Multiflow-2Port-1501760607998.json new file mode 100644 index 000000000..62c5a395a --- /dev/null +++ b/dashboard/Prox_Heat_L2FWD_Multiflow-2Port-1501760607998.json @@ -0,0 +1,900 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_L2FWD_Multiflow-2Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "2Port", + "Heat", + "L2FWD_Multiflow" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_L2FWD_Multiflow_2Port_Heat_Test</center> </a></h5>\n<center>\n<p>This test allows to measures L2FWD with multiple flows (randomly generated src/dst ip addresses). The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2Fwd Multiflow VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L2Fwd Multiflow VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2Fwd Multiflow Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-08-03T11:34:41.442Z", + "to": "2017-08-03T11:36:40.434Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 3, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_L2FWD_Multiflow-4Port-1501761305237.json b/dashboard/Prox_Heat_L2FWD_Multiflow-4Port-1501761305237.json new file mode 100644 index 000000000..49c8538ff --- /dev/null +++ b/dashboard/Prox_Heat_L2FWD_Multiflow-4Port-1501761305237.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_L2FWD_Multiflow-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "4Port", + "L2FWD_Multiflow", + "Heat" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_BM_L2FWD_Multiflow-4Port</center> </a></h5>\n<center>\n<p>This test measures L2FWD with multiple flows. (src/dst ip address are randomly generated) The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2FWD Multiflow VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L2FWD Multiflow VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L2FWD MultiflowTraffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_l3fwd_multiflow-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l2fwd_multiflow-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-08-03T11:46:53.873Z", + "to": "2017-08-03T11:48:46.478Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 2, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_L3FWD-2Port-1501683503340.json b/dashboard/Prox_Heat_L3FWD-2Port-1501683503340.json new file mode 100644 index 000000000..762f35e0b --- /dev/null +++ b/dashboard/Prox_Heat_L3FWD-2Port-1501683503340.json @@ -0,0 +1,900 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_L3FWD-2Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "L3Fwd", + "2Port", + "Heat" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_Heat_L3FWD_2Port_Test</center> </a></h5>\n<center>\n<p>The application will take packets in from one port, update src and dst MACs and forward them to another port.\nThe KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L3Fwd VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-2", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-07-28T17:04:13.512Z", + "to": "2017-07-28T17:13:15.023Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 4, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_L3FWD-4Port-1501683487964.json b/dashboard/Prox_Heat_L3FWD-4Port-1501683487964.json new file mode 100644 index 000000000..6870248a3 --- /dev/null +++ b/dashboard/Prox_Heat_L3FWD-4Port-1501683487964.json @@ -0,0 +1,1048 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_L3FWD-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "L3Fwd", + "4Port", + "Heat" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_Heat_L3FWD_4Port_Test</center> </a></h5>\n<center>\n<p>The application will take packets in from one port, update src and dst MACs and forward them to another port.\nThe KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "L3Fwd VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox L3Fwd Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Tgen Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_l3fwd-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-08-02T13:52:27.313Z", + "to": "2017-08-02T13:54:35.713Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 3, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_LB_1to4-4Port-1505826034525.json b/dashboard/Prox_Heat_LB_1to4-4Port-1505826034525.json new file mode 100644 index 000000000..a3b9b001a --- /dev/null +++ b/dashboard/Prox_Heat_LB_1to4-4Port-1505826034525.json @@ -0,0 +1,1079 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_LB_1to4-4Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "4Port", + "LB", + "Heat" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "25px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_Heat_LB_1to4Port</center> </a></h5>\n<center>\n<p>This transmits random packets on 1 port, and received them on 4 ports. The KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss </p>\n</center>", + "editable": true, + "error": false, + "height": "25", + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Load Balancer VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Load Balancer Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 10, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Load Balancer VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG out packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG xe-0 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-1 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe1.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-2 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe2.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG xe-3 in packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe3.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.TxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Tx vs Rx Throughput", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2.5, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2.5, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_baremetal_lb-4", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG Dropped Packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_lb-4", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.DropPackets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size and Drop Packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + } + ], + "time": { + "from": "2017-09-19T12:39:56.933Z", + "to": "2017-09-19T12:46:07.167Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 4, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/Prox_Heat_Packet_Buffering_Test-1Port-1501092616937.json b/dashboard/Prox_Heat_Packet_Buffering_Test-1Port-1501092616937.json new file mode 100644 index 000000000..7b92ddebd --- /dev/null +++ b/dashboard/Prox_Heat_Packet_Buffering_Test-1Port-1501092616937.json @@ -0,0 +1,937 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "3.1.1" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + } + ], + "id": null, + "title": "Prox_Heat_Packet_Buffering_Test-1Port", + "tags": [ + "yardstick", + "NSB", + "Prox", + "Buffering", + "1Port", + "Heat" + ], + "style": "dark", + "timezone": "browser", + "editable": true, + "hideControls": false, + "sharedCrosshair": false, + "rows": [ + { + "collapse": false, + "editable": true, + "height": "100px", + "panels": [ + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 32px '#31A7D3'\"><center>OPNFV_Yardstick_NSB_PROX_Heat_Buffering_1Port_Test</center> </a></h5>\n<center>\n<p>The KPI in this test is the maximum number of packets that can be forwarded\n given the requirement that the latency of each packet is at least\n 125 millisecond</p>\n</center>", + "editable": true, + "error": false, + "id": 3, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Packet Buffering VNF stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 7, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "Row" + }, + { + "collapse": false, + "editable": true, + "height": "300px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "height": "300", + "id": 4, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 12, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "VNF packets Forward", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_fwd" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets in", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_in" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "VNF packets dropped", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "vnf__1.packets_dropped" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Packet Buffering VNF stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "content": "<h5 style=\"font-family:Verdana\"> <a style=\"color:#31A7D3\"><a style=\"font: 22px '#31A7D3'\"><center>Prox Packet Buffering Traffic Gen stats</center> </a></h5>\n", + "editable": true, + "error": false, + "height": "40", + "id": 8, + "isNew": true, + "links": [], + "mode": "html", + "span": 12, + "title": "", + "type": "text" + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 6, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Tgen xe-0 Out packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.out_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Tgen xe-0 In packets", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.xe0.in_packets" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Port stats: Out vs In packets", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packets", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 9, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Min Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyMin.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Avg Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyAvg.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "Max Latency", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.LatencyMax.2" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Latency stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Latency", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)", + "thresholdLine": false + }, + "id": 2, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG TX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.Throughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "TG RX Throughput", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.RxThroughput" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Throughput Stats", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "pps", + "label": "Throughput", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_YARDSTICK}", + "editable": true, + "error": false, + "fill": 1, + "grid": { + "threshold1": 2, + "threshold1Color": "rgba(216, 200, 27, 0.27)", + "threshold2": 2, + "threshold2Color": "rgba(234, 112, 112, 0.22)" + }, + "id": 5, + "isNew": true, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "connected", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "TG Packet Size", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "tc_prox_heat_context_buffering-1", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "tg__1.PktSize" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "TG Packet size", + "tooltip": { + "msResolution": true, + "shared": true, + "sort": 0, + "value_type": "cumulative" + }, + "type": "graph", + "xaxis": { + "show": true + }, + "yaxes": [ + { + "format": "short", + "label": "Packet Size", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "title": "New row" + }, + { + "collapse": false, + "editable": true, + "height": "250px", + "panels": [], + "title": "New row" + } + ], + "time": { + "from": "2017-07-26T18:07:01.703Z", + "to": "2017-07-26T18:09:21.972Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "templating": { + "list": [] + }, + "annotations": { + "list": [] + }, + "refresh": false, + "schemaVersion": 12, + "version": 4, + "links": [], + "gnetId": null +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc019.json b/dashboard/opnfv_yardstick_tc019.json new file mode 100644 index 000000000..dfd454e9b --- /dev/null +++ b/dashboard/opnfv_yardstick_tc019.json @@ -0,0 +1,406 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc019", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"packets_received\" * 100, \"packets_sent\", \"packetsize\" FROM \"opnfv_yardstick_tc001\" WHERE $timeFilter GROUP BY fill(null)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "openstack-server-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc019", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"packets_received\" * 100, \"packets_sent\", \"packetsize\" FROM \"opnfv_yardstick_tc001\" WHERE $timeFilter GROUP BY fill(null)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "process_nova-api_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 20 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "process monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc019", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc019", + "version": 3 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc045.json b/dashboard/opnfv_yardstick_tc045.json index 1a0a946a1..8f00851d7 100644 --- a/dashboard/opnfv_yardstick_tc045.json +++ b/dashboard/opnfv_yardstick_tc045.json @@ -44,7 +44,7 @@ "hideControls": false, "id": null, "links": [], - "refresh": false, + "refresh": "1m", "rows": [ { "collapse": false, @@ -55,7 +55,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "yardstick", + "datasource": "${DS_YARDSTICK}", "description": "", "fill": 1, "id": 1, @@ -78,12 +78,12 @@ "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "span": 6, + "span": 5, "stack": false, "steppedLine": false, "targets": [ { - "alias": "Pass/Fail", + "alias": "", "dsType": "influxdb", "groupBy": [], "measurement": "opnfv_yardstick_tc045", @@ -97,7 +97,7 @@ [ { "params": [ - "sla_pass" + "openstack-router-list_outage_time" ], "type": "field" } @@ -112,12 +112,19 @@ "fill": true, "line": true, "op": "gt", - "value": 1000 + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 } ], "timeFrom": null, "timeShift": null, - "title": "Openstack Control Node Service High Availability - nova-api", + "title": "command monitor (outage time)", "tooltip": { "shared": true, "sort": 0, @@ -133,7 +140,114 @@ }, "yaxes": [ { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc045", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"packets_received\" * 100, \"packets_sent\", \"packetsize\" FROM \"opnfv_yardstick_tc001\" WHERE $timeFilter GROUP BY fill(null)", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "process_neutron-server_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 20 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "process monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", "label": "", "logBase": 1, "max": null, @@ -152,14 +266,14 @@ }, { "cacheTimeout": null, - "colorBackground": false, + "colorBackground": true, "colorValue": false, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "yardstick", + "datasource": "${DS_YARDSTICK}", "format": "none", "gauge": { "maxValue": 100, @@ -168,7 +282,7 @@ "thresholdLabels": false, "thresholdMarkers": true }, - "id": 2, + "id": 4, "interval": null, "links": [], "mappingType": 1, @@ -196,7 +310,7 @@ "to": "null" } ], - "span": 6, + "span": 2, "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, @@ -206,21 +320,9 @@ "tableColumn": "", "targets": [ { + "alias": "", "dsType": "influxdb", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], + "groupBy": [], "measurement": "opnfv_yardstick_tc045", "orderByTime": "ASC", "policy": "default", @@ -233,18 +335,14 @@ "sla_pass" ], "type": "field" - }, - { - "params": [], - "type": "mean" } ] ], "tags": [] } ], - "thresholds": "", - "title": "Panel Title", + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ diff --git a/dashboard/opnfv_yardstick_tc046.json b/dashboard/opnfv_yardstick_tc046.json new file mode 100644 index 000000000..a869c2f21 --- /dev/null +++ b/dashboard/opnfv_yardstick_tc046.json @@ -0,0 +1,408 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc045", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "openstack-router-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc045", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"process_keystone_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "process_neutron-server_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 20 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "process monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc045", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc046", + "version": 3 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc047.json b/dashboard/opnfv_yardstick_tc047.json new file mode 100644 index 000000000..401df8634 --- /dev/null +++ b/dashboard/opnfv_yardstick_tc047.json @@ -0,0 +1,408 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc047", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "openstack-image-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc047", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"process_keystone_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "process_glance-api_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 20 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "process monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc045", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc047\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc047", + "version": 2 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc048.json b/dashboard/opnfv_yardstick_tc048.json new file mode 100644 index 000000000..5972c889f --- /dev/null +++ b/dashboard/opnfv_yardstick_tc048.json @@ -0,0 +1,408 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc048", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "openstack-volume-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 3, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 5, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc048", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"process_keystone_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "process_cinder-api_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 20 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 20 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "process monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc048", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc047\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc048", + "version": 2 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc051.json b/dashboard/opnfv_yardstick_tc051.json new file mode 100644 index 000000000..012602ba1 --- /dev/null +++ b/dashboard/opnfv_yardstick_tc051.json @@ -0,0 +1,370 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc051", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "cinder-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc051", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "heat-stack-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc051", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "nova-image-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + }, + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc051", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "D", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "neutron-router-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc051", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc047\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc051", + "version": 3 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc052.json b/dashboard/opnfv_yardstick_tc052.json new file mode 100644 index 000000000..b91c53bce --- /dev/null +++ b/dashboard/opnfv_yardstick_tc052.json @@ -0,0 +1,301 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "1m", + "rows": [ + { + "collapse": false, + "height": 340, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_YARDSTICK}", + "description": "", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc052", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc046\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "nova-flavor-list_outage_time" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 5 + }, + { + "colorMode": "ok", + "fill": true, + "line": true, + "op": "lt", + "value": 5 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "command monitor (outage time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "s", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + }, + { + "cacheTimeout": null, + "colorBackground": true, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_YARDSTICK}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 4, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 2, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false + }, + "tableColumn": "", + "targets": [ + { + "alias": "", + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc052", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc047\" WHERE $timeFilter", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "sla_pass" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": "0.5,1", + "title": "SLA PASS/FAIL", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "HA" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc052", + "version": 2 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc073.json b/dashboard/opnfv_yardstick_tc073.json new file mode 100644 index 000000000..ce803514f --- /dev/null +++ b/dashboard/opnfv_yardstick_tc073.json @@ -0,0 +1,320 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": "5m", + "rows": [ + { + "collapse": false, + "height": 354, + "panels": [ + { + "columns": [], + "fontSize": "100%", + "id": 5, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "span": 4, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc073", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput_units" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "title": "Network Throughput between Nodes", + "transform": "timeseries_to_columns", + "type": "table" + }, + { + "columns": [], + "fontSize": "100%", + "id": 4, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "span": 4, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc073", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput_units" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "title": "Throughput Units", + "transform": "timeseries_to_columns", + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "yardstick", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc073", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "mean_latency" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 100 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Mean latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "Network" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now/d", + "to": "now/d" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc073", + "version": 4 +}
\ No newline at end of file diff --git a/dashboard/opnfv_yardstick_tc083.json b/dashboard/opnfv_yardstick_tc083.json new file mode 100644 index 000000000..b6f076910 --- /dev/null +++ b/dashboard/opnfv_yardstick_tc083.json @@ -0,0 +1,312 @@ +{ + "__inputs": [ + { + "name": "DS_YARDSTICK", + "label": "yardstick", + "description": "", + "type": "datasource", + "pluginId": "influxdb", + "pluginName": "InfluxDB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.4.3" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "influxdb", + "name": "InfluxDB", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "hideControls": false, + "id": null, + "links": [], + "refresh": false, + "rows": [ + { + "collapse": false, + "height": 368, + "panels": [ + { + "columns": [], + "fontSize": "100%", + "id": 5, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "span": 4, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc083", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "title": "Network throughput between VMs (1st is udp, 2nd tcp)", + "transform": "timeseries_to_columns", + "type": "table" + }, + { + "columns": [], + "fontSize": "100%", + "id": 4, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "span": 4, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc083", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "throughput_units" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "title": "Throughput Units (1st is ump, 2nd is tcp)", + "transform": "timeseries_to_columns", + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "yardstick", + "fill": 1, + "id": 1, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "span": 4, + "stack": false, + "steppedLine": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "measurement": "opnfv_yardstick_tc083", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "mean_latency" + ], + "type": "field" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Mean latency", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [ + "Network" + ], + "templating": { + "list": [] + }, + "time": { + "from": "2017-09-15T02:59:32.495Z", + "to": "2017-09-15T03:02:39.964Z" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "opnfv_yardstick_tc083", + "version": 7 +}
\ No newline at end of file diff --git a/docs/testing/user/userguide/04-installation.rst b/docs/testing/user/userguide/04-installation.rst index 37e4ba599..cb4f31434 100644 --- a/docs/testing/user/userguide/04-installation.rst +++ b/docs/testing/user/userguide/04-installation.rst @@ -443,6 +443,141 @@ Deploy InfluxDB and Grafana directly in Ubuntu (**Todo**) ----------------------------------------------------------- +Yardstick common CLI +-------------------- + +list test cases +>>>>>>>>>>>>>>> +**yardstick testcase list** + +This command line would list all test cases in yardstick. +It would show like below:: + + +--------------------------------------------------------------------------------------- + | Testcase Name | Description + +--------------------------------------------------------------------------------------- + | opnfv_yardstick_tc001 | Measure network throughput using pktgen + | opnfv_yardstick_tc002 | measure network latency using ping + | opnfv_yardstick_tc005 | Measure Storage IOPS, throughput and latency using fio. + | opnfv_yardstick_tc006 | Measure volume storage IOPS, throughput and latency using fio. + | opnfv_yardstick_tc008 | Measure network throughput and packet loss using Pktgen + | opnfv_yardstick_tc009 | Measure network throughput and packet loss using pktgen + | opnfv_yardstick_tc010 | measure memory read latency using lmbench. + | opnfv_yardstick_tc011 | Measure packet delay variation (jitter) using iperf3. + | opnfv_yardstick_tc012 | Measure memory read and write bandwidth using lmbench. + | opnfv_yardstick_tc014 | Measure Processing speed using unixbench. + | opnfv_yardstick_tc019 | Sample test case for the HA of controller node service. + ... + +--------------------------------------------------------------------------------------- +show a test case config file +>>>>>>>>>>>>>>>>>>>>>>>>>>>> +Take opnfv_yardstick_tc002 for an example. This test case measure network latency. +You just need to type in **yardstick testcase show opnfv_yardstick_tc002**, and the console +would show the config yaml of this test case:: + ############################################################################## + # Copyright (c) 2017 kristian.hunt@gmail.com and others. + # + # All rights reserved. This program and the accompanying materials + # are made available under the terms of the Apache License, Version 2.0 + # which accompanies this distribution, and is available at + # http://www.apache.org/licenses/LICENSE-2.0 + ############################################################################## + --- + + schema: "yardstick:task:0.1" + description: > + Yardstick TC002 config file; + measure network latency using ping; + + {% set image = image or "cirros-0.3.5" %} + + {% set provider = provider or none %} + {% set physical_network = physical_network or 'physnet1' %} + {% set segmentation_id = segmentation_id or none %} + {% set packetsize = packetsize or 100 %} + + scenarios: + {% for i in range(2) %} + - + type: Ping + options: + packetsize: {{packetsize}} + host: athena.demo + target: ares.demo + + runner: + type: Duration + duration: 60 + interval: 10 + + sla: + max_rtt: 10 + action: monitor + {% endfor %} + + context: + name: demo + image: {{image}} + flavor: yardstick-flavor + user: cirros + + placement_groups: + pgrp1: + policy: "availability" + + servers: + athena: + floating_ip: true + placement: "pgrp1" + ares: + placement: "pgrp1" + + networks: + test: + cidr: '10.0.1.0/24' + {% if provider == "vlan" %} + provider: {{provider}} + physical_network: {{physical_network}}Ã¥ + {% if segmentation_id %} + segmentation_id: {{segmentation_id}} + {% endif %} + {% endif %} + +start a task to run yardstick test case +>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +If you want run a test case, then you need to use **yardstick task start <test_case_path>** +this command support some parameters as below: + ++---------------------+--------------------------------------------------+ +| Parameters | Detail | ++=====================+==================================================+ +| -d | show debug log of yardstick running | +| | | ++---------------------+--------------------------------------------------+ +| --task-args | If you want to customize test case parameters, | +| | use "--task-args" to pass the value. The format | +| | is a json string with parameter key-value pair. | +| | | ++---------------------+--------------------------------------------------+ +| --task-args-file | If you want to use yardstick | +| | env prepare command(or | +| | related API) to load the | ++---------------------+--------------------------------------------------+ +| --parse-only | | +| | | +| | | ++---------------------+--------------------------------------------------+ +| --output-file \ | Specify where to output the log. if not pass, | +| OUTPUT_FILE_PATH | the default value is | +| | "/tmp/yardstick/yardstick.log" | +| | | ++---------------------+--------------------------------------------------+ +| --suite \ | run a test suite, TEST_SUITE_PATH speciy where | +| TEST_SUITE_PATH | the test suite locates | +| | | ++---------------------+--------------------------------------------------+ + + Run Yardstick in a local environment ------------------------------------ @@ -512,5 +647,4 @@ yaml file and add test cases, constraint or task arguments if necessary. Proxy Support (**Todo**) ---------------------------- - +---------------------------
\ No newline at end of file diff --git a/docs/testing/user/userguide/13-nsb-overview.rst b/docs/testing/user/userguide/13-nsb-overview.rst index faac61f08..63442bff0 100644 --- a/docs/testing/user/userguide/13-nsb-overview.rst +++ b/docs/testing/user/userguide/13-nsb-overview.rst @@ -192,3 +192,14 @@ VNFs provided. Figure 1: Network Service - 2 server configuration +VNFs supported for chracterization: +---------------------------------- + +1. CGNAPT - Carrier Grade Network Address and port Translation +2. vFW - Virtual Firewall +3. vACL - Access Control List +4. vPE - Provider Edge Router +5. Prox - Packet pROcessing eXecution engine: + VNF can act as Drop, Basic Forwarding (no touch), L2 Forwarding (change MAC), GRE encap/decap, Load balance based on packet fields, Symmetric load balancing, + QinQ encap/decap IPv4/IPv6, ARP, QoS, Routing, Unmpls, Policing, ACL +6. UDP_Replay diff --git a/docs/testing/user/userguide/14-nsb_installation.rst b/docs/testing/user/userguide/14-nsb_installation.rst index 7c5327964..39477f476 100644 --- a/docs/testing/user/userguide/14-nsb_installation.rst +++ b/docs/testing/user/userguide/14-nsb_installation.rst @@ -56,12 +56,47 @@ Several prerequisites are needed for Yardstick(VNF testing): Install Yardstick (NSB Testing) ------------------------------- -Refer chapter :doc:`04-installation` for more information on installing *Yardstick* +Using Docker +------------ +Refer chapter :doc:`04-installation` for more on docker **Install Yardstick using Docker (**recommended**)** -After *Yardstick* is installed, executing the "nsb_setup.sh" script to setup -NSB testing. +Install directly in Ubuntu +-------------------------- +.. _install-framework: -:: +Alternatively you can install Yardstick framework directly in Ubuntu or in an Ubuntu Docker image. No matter which way you choose to install Yardstick, the following installation steps are identical. + +If you choose to use the Ubuntu Docker image, you can pull the Ubuntu +Docker image from Docker hub:: + + docker pull ubuntu:16.04 + +Install Yardstick +^^^^^^^^^^^^^^^^^^^^^ + +Prerequisite preparation:: + + apt-get update && apt-get install -y git python-setuptools python-pip + easy_install -U setuptools==30.0.0 + pip install appdirs==1.4.0 + pip install virtualenv + +Create a virtual environment:: + + virtualenv ~/yardstick_venv + export YARDSTICK_VENV=~/yardstick_venv + source ~/yardstick_venv/bin/activate + +Download the source code and install Yardstick from it:: + + git clone https://gerrit.opnfv.org/gerrit/yardstick + export YARDSTICK_REPO_DIR=~/yardstick + cd yardstick + ./install.sh + + +After *Yardstick* is installed, executing the "nsb_setup.sh" script to setup +NSB testing:: ./nsb_setup.sh @@ -74,30 +109,27 @@ System Topology: +----------+ +----------+ | | | | - | | (0)----->(0) | Ping/ | - | TG1 | | vPE/ | - | | | 2Trex | + | | (0)----->(0) | | + | TG1 | | DUT | + | | | | | | (1)<-----(1) | | +----------+ +----------+ trafficgen_1 vnf -OpenStack parameters and credentials ------------------------------------- +Environment parameters and credentials +-------------------------------------- Environment variables ^^^^^^^^^^^^^^^^^^^^^ Before running Yardstick (NSB Testing) it is necessary to export traffic -generator libraries. - -:: +generator libraries.:: source ~/.bash_profile Config yardstick conf ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - :: cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf @@ -109,7 +141,7 @@ Add trex_path, trex_client_lib and bin_path in 'nsb' section. [DEFAULT] debug = True - dispatcher = influxdb + dispatcher = file, influxdb [dispatcher_influxdb] timeout = 5 @@ -123,14 +155,39 @@ Add trex_path, trex_client_lib and bin_path in 'nsb' section. bin_path=/opt/nsb_bin trex_client_lib=/opt/nsb_bin/trex_client/stl +Network Service Benchmarking - Bare-Metal +----------------------------------------- Config pod.yaml describing Topology ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Before executing Yardstick test cases, make sure that pod.yaml reflects the -topology and update all the required fields. +2-Node setup: +^^^^^^^^^^^^^ +.. code-block:: console + +----------+ +----------+ + | | | | + | | (0)----->(0) | | + | TG1 | | DUT | + | | | | + | | (n)<-----(n) | | + +----------+ +----------+ + trafficgen_1 vnf -:: +3-Node setup - Correlated Traffic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: console + +----------+ +----------+ +------------+ + | | | | | | + | | | | | | + | | (0)----->(0) | | | UDP | + | TG1 | | DUT | | Replay | + | | | | | | + | | | |(1)<---->(0)| | + +----------+ +----------+ +------------+ + trafficgen_1 vnf trafficgen_2 + +Before executing Yardstick test cases, make sure that pod.yaml reflects the +topology and update all the required fields.:: cp /etc/yardstick/nodes/pod.yaml.nsb.sample /etc/yardstick/nodes/pod.yaml @@ -205,12 +262,228 @@ Enable yardstick virtual environment ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Before executing yardstick test cases, make sure to activate yardstick -python virtual environment +python virtual environment if runnin on ubuntu without docker:: + + source /opt/nsb_bin/yardstick_venv/bin/activate + +On docker, virtual env is in main path. + +Run Yardstick - Network Service Testcases +----------------------------------------- + +NS testing - using NSBperf CLI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:: + + PYTHONPATH: ". ~/.bash_profile" + cd <yardstick_repo>/yardstick/cmd + + Execute command: ./NSPerf.py -h + ./NSBperf.py --vnf <selected vnf> --test <rfc test> + eg: ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml + +NS testing - using yardstick CLI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:: + PYTHONPATH: ". ~/.bash_profile" + +Go to test case forlder type we want to execute. + e.g. <yardstick repo>/samples/vnf_samples/nsut/<vnf>/ + run: yardstick --debug task start <test_case.yaml> + +Network Service Benchmarking - Standalone Virtualization +-------------------------------------------------------- + +SRIOV: +----- + +Pre-requisites +^^^^^^^^^^^^^^ + +On Host: + a) Create a bridge for VM to connect to external network + brctl addbr br-int + brctl addif br-int <interface_name> #This interface is connected to internet + + b) Build guest image for VNF to run. + Most of the sample test cases in Yardstick are using a guest image called + ``yardstick-image`` which deviates from an Ubuntu Cloud Server image + Yardstick has a tool for building this custom image with samplevnf. + It is necessary to have ``sudo`` rights to use this tool. + + Also you may need to install several additional packages to use this tool, by + follwing the commands below:: + sudo apt-get update && sudo apt-get install -y qemu-utils kpartx + + This image can be built using the following command in the directory where Yardstick is installed:: + + export YARD_IMG_ARCH='amd64' + sudo echo "Defaults env_keep += \'YARD_IMG_ARCH\'" >> /etc/sudoers + sudo tools/yardstick-img-dpdk-modify tools/ubuntu-server-cloudimg-samplevnf-modify.sh + + for more details refer chapter :doc:`04-installation`` + +Note: VM should be build with static IP and should be accessiable from yardstick host. + +Config pod.yaml describing Topology +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2-Node setup: +^^^^^^^^^^^^^ +.. code-block:: console + +--------------------+ + | | + | | + | DUT | + | (VNF) | + | | + +--------------------+ + | VF NIC | | VF NIC | + +--------+ +--------+ + ^ ^ + | | + | | + +--------+ +--------+ + - PF NIC - - PF NIC - + +----------+ +-------------------------+ + | | | ^ ^ | + | | | | | | + | | (0)<----->(0) | ------ | | + | TG1 | | SUT | | + | | | | | + | | (n)<----->(n) |------------------ | + +----------+ +-------------------------+ + trafficgen_1 host + + +3-Node setup - Correlated Traffic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: console + + +--------------------+ + | | + | | + | DUT | + | (VNF) | + | | + +--------------------+ + | VF NIC | | VF NIC | + +--------+ +--------+ + ^ ^ + | | + | | + +--------+ +--------+ + | PF NIC - - PF NIC - + +----------+ +-------------------------+ +------------+ + | | | ^ ^ | | | + | | | | | | | | + | | (0)<----->(0) | ------ | | | TG2 | + | TG1 | | SUT | | |(UDP Replay)| + | | | | | | | + | | (n)<----->(n) | ------ |(n)<-->(n)| | + +----------+ +-------------------------+ +------------+ + trafficgen_1 host trafficgen_2 + +Before executing Yardstick test cases, make sure that pod.yaml reflects the +topology and update all the required fields. + +:: + + cp /etc/yardstick/nodes/pod.yaml.nsb.sriov.sample /etc/yardstick/nodes/pod.yaml + +Config pod.yaml :: + nodes: + - + name: trafficgen_1 + role: TrafficGen + ip: 1.1.1.1 + user: root + password: r00t + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.0" + driver: i40e # default kernel driver + dpdk_port_num: 0 + local_ip: "152.16.100.20" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:01" + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.1" + driver: i40e # default kernel driver + dpdk_port_num: 1 + local_ip: "152.16.40.20" + netmask: "255.255.255.0" + local_mac: "00:00.00:00:00:02" + +- + name: sriov + role: Sriov + ip: 2.2.2.2 + user: root + auth_type: password + password: password + vf_macs: + - "00:00:00:00:00:03" + - "00:00:00:00:00:04" + phy_ports: # Physical ports to configure sriov + - "0000:06:00.0" + - "0000:06:00.1" + phy_driver: i40e # kernel driver + images: "/var/lib/libvirt/images/ubuntu1.img" + + - + name: vnf + role: vnf + ip: 1.1.1.2 + user: root + password: r00t + host: 2.2.2.2 #BM - host == ip, virtualized env - Host - compute node + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:00:07.0" + driver: i40evf # default kernel driver + dpdk_port_num: 0 + local_ip: "152.16.100.10" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:03" + + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:00:08.0" + driver: i40evf # default kernel driver + dpdk_port_num: 1 + local_ip: "152.16.40.10" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:04" + routing_table: + - network: "152.16.100.10" + netmask: "255.255.255.0" + gateway: "152.16.100.20" + if: "xe0" + - network: "152.16.40.10" + netmask: "255.255.255.0" + gateway: "152.16.40.20" + if: "xe1" + nd_route_tbl: + - network: "0064:ff9b:0:0:0:0:9810:6414" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9810:6414" + if: "xe0" + - network: "0064:ff9b:0:0:0:0:9810:2814" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9810:2814" + if: "xe1" + +Enable yardstick virtual environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Before executing yardstick test cases, make sure to activate yardstick +python virtual environment if runnin on ubuntu without docker:: source /opt/nsb_bin/yardstick_venv/bin/activate +On docker, virtual env is in main path. Run Yardstick - Network Service Testcases ----------------------------------------- @@ -219,19 +492,244 @@ NS testing - using NSBperf CLI ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: - source /opt/nsb_setup/yardstick_venv/bin/activate PYTHONPATH: ". ~/.bash_profile" cd <yardstick_repo>/yardstick/cmd Execute command: ./NSPerf.py -h ./NSBperf.py --vnf <selected vnf> --test <rfc test> - eg: ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml + eg: ./NSBperf.py --vnf vfw --test tc_sriov_rfc2544_ipv4_1flow_64B.yaml NS testing - using yardstick CLI ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: + PYTHONPATH: ". ~/.bash_profile" + +Go to test case forlder type we want to execute. + e.g. <yardstick repo>/samples/vnf_samples/nsut/<vnf>/ + run: yardstick --debug task start <test_case.yaml> + +OVS-DPDK: +----- + +Pre-requisites +^^^^^^^^^^^^^^ + +On Host: + a) Create a bridge for VM to connect to external network + brctl addbr br-int + brctl addif br-int <interface_name> #This interface is connected to internet + + b) Build guest image for VNF to run. + Most of the sample test cases in Yardstick are using a guest image called + ``yardstick-image`` which deviates from an Ubuntu Cloud Server image + Yardstick has a tool for building this custom image with samplevnf. + It is necessary to have ``sudo`` rights to use this tool. + + Also you may need to install several additional packages to use this tool, by + follwing the commands below:: + + sudo apt-get update && sudo apt-get install -y qemu-utils kpartx + + This image can be built using the following command in the directory where Yardstick is installed:: + + export YARD_IMG_ARCH='amd64' + sudo echo "Defaults env_keep += \'YARD_IMG_ARCH\'" >> /etc/sudoers + sudo tools/yardstick-img-dpdk-modify tools/ubuntu-server-cloudimg-samplevnf-modify.sh + + for more details refer chapter :doc:`04-installation`` + +Note: VM should be build with static IP and should be accessiable from yardstick host. + + c) OVS & DPDK version. + - OVS 2.7 and DPDK 16.11.1 above version is supported + + d) Setup OVS/DPDK on host. + Please refer below link on how to setup .. _ovs-dpdk: http://docs.openvswitch.org/en/latest/intro/install/dpdk/ + +Config pod.yaml describing Topology +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +2-Node setup: +^^^^^^^^^^^^^ +.. code-block:: console + +--------------------+ + | | + | | + | DUT | + | (VNF) | + | | + +--------------------+ + | virtio | | virtio | + +--------+ +--------+ + ^ ^ + | | + | | + +--------+ +--------+ + | vHOST0 | | vHOST1 | + +----------+ +-------------------------+ + | | | ^ ^ | + | | | | | | + | | (0)<----->(0) | ------ | | + | TG1 | | SUT | | + | | | (ovs-dpdk) | | + | | (n)<----->(n) |------------------ | + +----------+ +-------------------------+ + trafficgen_1 host + + +3-Node setup - Correlated Traffic +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: console + + +--------------------+ + | | + | | + | DUT | + | (VNF) | + | | + +--------------------+ + | virtio | | virtio | + +--------+ +--------+ + ^ ^ + | | + | | + +--------+ +--------+ + | vHOST0 | | vHOST1 | + +----------+ +-------------------------+ +------------+ + | | | ^ ^ | | | + | | | | | | | | + | | (0)<----->(0) | ------ | | | TG2 | + | TG1 | | SUT | | |(UDP Replay)| + | | | (ovs-dpdk) | | | | + | | (n)<----->(n) | ------ |(n)<-->(n)| | + +----------+ +-------------------------+ +------------+ + trafficgen_1 host trafficgen_2 + + +Before executing Yardstick test cases, make sure that pod.yaml reflects the +topology and update all the required fields.:: + + cp /etc/yardstick/nodes/pod.yaml.nsb.ovs.sample /etc/yardstick/nodes/pod.yaml + +Config pod.yaml +:: + nodes: + - + name: trafficgen_1 + role: TrafficGen + ip: 1.1.1.1 + user: root + password: r00t + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.0" + driver: i40e # default kernel driver + dpdk_port_num: 0 + local_ip: "152.16.100.20" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:01" + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:07:00.1" + driver: i40e # default kernel driver + dpdk_port_num: 1 + local_ip: "152.16.40.20" + netmask: "255.255.255.0" + local_mac: "00:00.00:00:00:02" + +- + name: ovs + role: Ovsdpdk + ip: 2.2.2.2 + user: root + auth_type: password + password: <password> + vpath: "/usr/local/" + vports: + - dpdkvhostuser0 + - dpdkvhostuser1 + vports_mac: + - "00:00:00:00:00:03" + - "00:00:00:00:00:04" + phy_ports: # Physical ports to configure ovs + - "0000:06:00.0" + - "0000:06:00.1" + flow: + - ovs-ofctl add-flow br0 in_port=1,action=output:3 + - ovs-ofctl add-flow br0 in_port=3,action=output:1 + - ovs-ofctl add-flow br0 in_port=4,action=output:2 + - ovs-ofctl add-flow br0 in_port=2,action=output:4 + phy_driver: i40e # kernel driver + images: "/var/lib/libvirt/images/ubuntu1.img" + + - + name: vnf + role: vnf + ip: 1.1.1.2 + user: root + password: r00t + host: 2.2.2.2 #BM - host == ip, virtualized env - Host - compute node + interfaces: + xe0: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:00:04.0" + driver: virtio-pci # default kernel driver + dpdk_port_num: 0 + local_ip: "152.16.100.10" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:03" + + xe1: # logical name from topology.yaml and vnfd.yaml + vpci: "0000:00:05.0" + driver: virtio-pci # default kernel driver + dpdk_port_num: 1 + local_ip: "152.16.40.10" + netmask: "255.255.255.0" + local_mac: "00:00:00:00:00:04" + routing_table: + - network: "152.16.100.10" + netmask: "255.255.255.0" + gateway: "152.16.100.20" + if: "xe0" + - network: "152.16.40.10" + netmask: "255.255.255.0" + gateway: "152.16.40.20" + if: "xe1" + nd_route_tbl: + - network: "0064:ff9b:0:0:0:0:9810:6414" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9810:6414" + if: "xe0" + - network: "0064:ff9b:0:0:0:0:9810:2814" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9810:2814" + if: "xe1" + +Enable yardstick virtual environment +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Before executing yardstick test cases, make sure to activate yardstick +python virtual environment if runnin on ubuntu without docker:: + + source /opt/nsb_bin/yardstick_venv/bin/activate + +On docker, virtual env is in main path. + +Run Yardstick - Network Service Testcases +----------------------------------------- + +NS testing - using NSBperf CLI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:: + + PYTHONPATH: ". ~/.bash_profile" + cd <yardstick_repo>/yardstick/cmd + + Execute command: ./NSPerf.py -h + ./NSBperf.py --vnf <selected vnf> --test <rfc test> + eg: ./NSBperf.py --vnf vfw --test tc_ovs_rfc2544_ipv4_1flow_64B.yaml - source /opt/nsb_setup/yardstick_venv/bin/activate +NS testing - using yardstick CLI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +:: PYTHONPATH: ". ~/.bash_profile" Go to test case forlder type we want to execute. diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc083.rst b/docs/testing/user/userguide/opnfv_yardstick_tc083.rst new file mode 100644 index 000000000..dc00ac67a --- /dev/null +++ b/docs/testing/user/userguide/opnfv_yardstick_tc083.rst @@ -0,0 +1,81 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International +.. License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) OPNFV, Huawei Technologies Co.,Ltd and others. + +************************************* +Yardstick Test Case Description TC083 +************************************* + +.. _netperf: http://www.netperf.org/netperf/training/Netperf.html + ++-----------------------------------------------------------------------------+ +|Throughput per VM test | +| | ++--------------+--------------------------------------------------------------+ +|test case id | OPNFV_YARDSTICK_TC083_Network latency and throughput between | +| | VMs | +| | | ++--------------+--------------------------------------------------------------+ +|metric | Network latency and throughput | +| | | ++--------------+--------------------------------------------------------------+ +|test purpose | To evaluate the IaaS network performance with regards to | +| | flows and throughput, such as if and how different amounts | +| | of packet sizes and flows matter for the throughput between | +| | 2 VMs in one pod. | +| | | ++--------------+--------------------------------------------------------------+ +|configuration | file: opnfv_yardstick_tc083.yaml | +| | | +| | Packet size: default 1024 bytes. | +| | | +| | Test length: default 20 seconds. | +| | | +| | The client and server are distributed on different nodes. | +| | | +| | For SLA max_mean_latency is set to 100. | +| | | ++--------------+--------------------------------------------------------------+ +|test tool | netperf_ | +| | Netperf is a software application that provides network | +| | bandwidth testing between two hosts on a network. It | +| | supports Unix domain sockets, TCP, SCTP, DLPI and UDP via | +| | BSD Sockets. Netperf provides a number of predefined tests | +| | e.g. to measure bulk (unidirectional) data transfer or | +| | request response performance. | +| | (netperf is not always part of a Linux distribution, hence | +| | it needs to be installed.) | +| | | ++--------------+--------------------------------------------------------------+ +|references | netperf Man pages | +| | ETSI-NFV-TST001 | +| | | ++--------------+--------------------------------------------------------------+ +|applicability | Test can be configured with different packet sizes and | +| | test duration. Default values exist. | +| | | +| | SLA (optional): max_mean_latency | +| | | ++--------------+--------------------------------------------------------------+ +|pre-test | The POD can be reached by external ip and logged on via ssh | +|conditions | | ++--------------+--------------------------------------------------------------+ +|test sequence | description and expected result | +| | | ++--------------+--------------------------------------------------------------+ +|step 1 | Install netperf tool on each specified node, one is as the | +| | server, and the other as the client. | +| | | ++--------------+--------------------------------------------------------------+ +|step 2 | Log on to the client node and use the netperf command to | +| | execute the network performance test | +| | | ++--------------+--------------------------------------------------------------+ +|step 3 | The throughput results stored. | +| | | ++--------------+--------------------------------------------------------------+ +|test verdict | Fails only if SLA is not passed, or if there is a test case | +| | execution problem. | +| | | ++--------------+--------------------------------------------------------------+ diff --git a/nsb_setup.sh b/nsb_setup.sh index 025b8f728..1c27af7db 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -22,7 +22,7 @@ for i in "${pkg[@]}"; do fi done -pip install ansible shade docker +pip install ansible==2.3.2 shade==1.17.0 docker-py==1.10.6 if [ $# -eq 1 ]; then extra_args="-e openrc_file=$1" diff --git a/samples/vnf_samples/nsut/2trex/tc_trex_baremetal_context.yaml b/samples/vnf_samples/nsut/2trex/tc_trex_baremetal_context.yaml index e0ba6d96f..d96236e17 100644 --- a/samples/vnf_samples/nsut/2trex/tc_trex_baremetal_context.yaml +++ b/samples/vnf_samples/nsut/2trex/tc_trex_baremetal_context.yaml @@ -23,12 +23,12 @@ scenarios: nodes: # This section is copied from pod.xml or resolved via Heat trexgen__1: trafficgen_1.yardstick - trexvnf__1: vnf.yardstick + trexvnf__0: vnf.yardstick vnf_options: trexgen__1: - target_ip: trexvnf__1.xe0.local_ip # TODO: resolve to config vars - trexvnf__1: + target_ip: trexvnf__0.xe0.local_ip # TODO: resolve to config vars + trexvnf__0: target_ip: trexgen__1.xe1.local_ip # TODO: resolve to config vars runner: type: Duration diff --git a/samples/vnf_samples/nsut/2trex/trex_tg_topology.yaml b/samples/vnf_samples/nsut/2trex/trex_tg_topology.yaml index 1a9b50c84..822cf5eba 100644 --- a/samples/vnf_samples/nsut/2trex/trex_tg_topology.yaml +++ b/samples/vnf_samples/nsut/2trex/trex_tg_topology.yaml @@ -20,15 +20,15 @@ nsd:nsd-catalog: description: trex-tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: trexgen__1 + vnfd-id-ref: trexgen__0 VNF model: ../../vnf_descriptors/tg_trex_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: trexvnf__1 + vnfd-id-ref: trexvnf__0 VNF model: ../../vnf_descriptors/tg_trex_tpl.yaml #VNF type vld: - - id: private - name: trexgen__1 to trexvnf__1 link 1 + - id: uplink + name: trexgen__0 to trexvnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' @@ -38,8 +38,8 @@ nsd:nsd-catalog: vnfd-connection-point-ref: xe0 vnfd-id-ref: trexgen - - id: public - name: trexvnf__1 to trexgen__1 link 2 + - id: downlink + name: trexvnf__0 to trexgen__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' diff --git a/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml b/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml index f8c01daff..b51f3eb04 100644 --- a/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml +++ b/samples/vnf_samples/nsut/acl/acl-tg-topology-3node.yaml @@ -20,34 +20,43 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/acl_vnf.yaml #VNF type - member-vnf-index: '3' - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 - - - id: public_1 - name: vnf__1 to tg__2 link 2 + vnfd-id-ref: vnf__0 + - id: uplink_1 + name: tg__0 to vnf__0 link 2 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - id: downlink_0 + name: vnf__0 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '3' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml b/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml index 9bc3e8559..00666092f 100644 --- a/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml +++ b/samples/vnf_samples/nsut/acl/acl-tg-topology.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/acl_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml index 606d557e9..e6932acbd 100644 --- a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml +++ b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixia.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with VACL,L3fwd and VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/acl_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 #TREX + vnfd-id-ref: tg__0 #TREX - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 #VNF + vnfd-id-ref: vnf__0 #VNF - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 #L3fwd + vnfd-id-ref: vnf__0 #L3fwd - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 #VACL VNF + vnfd-id-ref: tg__0 #VACL VNF diff --git a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml index 2fc173aed..97a316625 100644 --- a/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml +++ b/samples/vnf_samples/nsut/acl/acl_vnf_topology_ixload.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with HTTP and vACL VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_ixload.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/acl_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 # HTTP Client + vnfd-id-ref: tg__0 # HTTP Client - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 # VNF + vnfd-id-ref: vnf__0 # VNF - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 # HTTP Server + vnfd-id-ref: vnf__0 # HTTP Server - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 # VACL VNF + vnfd-id-ref: tg__0 # VACL VNF diff --git a/samples/vnf_samples/nsut/acl/ixia_traffic.cfg b/samples/vnf_samples/nsut/acl/ixia_traffic.cfg index f749865c5..3f7e33471 100644 --- a/samples/vnf_samples/nsut/acl/ixia_traffic.cfg +++ b/samples/vnf_samples/nsut/acl/ixia_traffic.cfg @@ -1,5 +1,5 @@ { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -23,7 +23,7 @@ }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml index 85ed2450f..31ee32b7b 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml @@ -19,20 +19,21 @@ scenarios: traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml" topology: acl_vnf_topology_ixload.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Duration duration: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml index 1b3377388..2da7d6675 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" topology: acl_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml index 9a16466bf..088ef5474 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml index 95fad73dc..3e1345a17 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml index 397f352f1..9753812ac 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml @@ -19,24 +19,25 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology-3node.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] + src_ip: [{'tg__0': 'xe0'}] dst_ip: [{'tg__1': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - corelated_traffic: true - vnf__1: + correlated_traffic: true + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml index 1fa0b5b3d..5bd0f175b 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml @@ -20,22 +20,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml index 95fad73dc..3e1345a17 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_ipv4_worstcaserules_1flow_64B_trex.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml index 3ba22ff1c..1cf37ca26 100644 --- a/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/acl/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 28 diff --git a/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml index 3c92e877f..7643e6251 100644 --- a/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: @@ -46,7 +46,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -67,7 +67,6 @@ context: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: @@ -75,7 +74,6 @@ context: '0.0.0.0/0' xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: diff --git a/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml index 998a126dc..f4dca8a79 100644 --- a/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/acl/tc_heat_trex_external_rfc2544_ipv4_1rule_1flow_64B_packetsize.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.baremetal - vnf__1: vnf.yardstick + tg__0: trafficgen_1.baremetal + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 @@ -49,7 +50,7 @@ contexts: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -67,14 +68,12 @@ contexts: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' provider: true physical_network: phystenant1 port_security_enabled: False xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' provider: true physical_network: phystenant2 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml index 24407dc88..e4c0fc9ee 100644 --- a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node.yaml @@ -20,34 +20,43 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml #VNF type - member-vnf-index: '3' - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 - - - id: public_1 - name: vnf__1 to tg__2 link 2 + vnfd-id-ref: vnf__0 + - id: uplink_1 + name: tg__0 to vnf__0 link 2 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - id: downlink_0 + name: vnf__0 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '3' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml index e668c2eb9..d67f38a4f 100644 --- a/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml index a13a64fd5..fbc9ab95c 100644 --- a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixia.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with vCGNAPT VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml index b4feaf03d..71535dfb7 100644 --- a/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml +++ b/samples/vnf_samples/nsut/cgnapt/cgnapt_vnf_topology_ixload.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with HTTP and vCGNAPT VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_ixload.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/cgnapt_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 # HTTP Client + vnfd-id-ref: tg__0 # HTTP Client - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 # VNF + vnfd-id-ref: vnf__0 # VNF - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 # HTTP Server + vnfd-id-ref: vnf__0 # HTTP Server - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 # VCGNAPT VNF + vnfd-id-ref: tg__0 # VCGNAPT VNF diff --git a/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg b/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg index f749865c5..3f7e33471 100644 --- a/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg +++ b/samples/vnf_samples/nsut/cgnapt/ixia_traffic.cfg @@ -1,5 +1,5 @@ { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -23,7 +23,7 @@ }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml index fc1c3e9b8..d5fda5804 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml @@ -19,8 +19,8 @@ scenarios: traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml" topology: cgnapt_vnf_topology_ixload.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} @@ -28,8 +28,9 @@ scenarios: traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Duration duration: 5 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml index 6160ca090..7d6203c0c 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml @@ -19,21 +19,21 @@ scenarios: traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" topology: cgnapt_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] publicip: ["152.16.40.10"] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: type: Iteration diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia_scale_up.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia_scale_up.yaml index d1b0fab2a..cd74655d5 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia_scale_up.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia_scale_up.yaml @@ -17,25 +17,26 @@ schema: yardstick:task:0.1 scenarios: {% for worker_thread in [1, 2 ,3] %} - type: NSPerf - traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" + traffic_profile: "../../traffic_profiles/ixia_ipv4_latency_cgnapt.yaml" topology: cgnapt_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] publicip: ["152.16.40.10"] count: 1000 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml index 15365b01a..3390cf022 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] publicip: ["152.16.40.10"] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml index c1f5f2162..424422dd2 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml @@ -19,27 +19,28 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology-3node.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__2': 'xe0'} + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__1': 'xe0'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - corelated_traffic: true - vnf__1: + correlated_traffic: true + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} napt: 'dynamic' + nfvi_enable: True runner: type: Iteration - iterations: 10 + iterations: 14 interval: 35 context: type: Node diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml index 1bf7df875..3736715ac 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_scale_up.yaml @@ -20,22 +20,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] publicip: ["152.16.40.10"] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml index e8cac4af9..0fbd402ac 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_64B_trex.yaml @@ -19,23 +19,24 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] publicip: ["152.16.40.10"] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 latency: true - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 28 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_dynamic_cgnapt_ixia.yaml b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_dynamic_cgnapt_ixia.yaml new file mode 100644 index 000000000..e400b1750 --- /dev/null +++ b/samples/vnf_samples/nsut/cgnapt/tc_baremetal_rfc2544_with_latency_ipv4_1flow_dynamic_cgnapt_ixia.yaml @@ -0,0 +1,52 @@ +# Copyright (c) 2016 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/ixia_ipv4_latency.yaml" + topology: cgnapt-vnf-topology-ixia-3node.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + flow: + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__1': 'xe0'}] + count: 1 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + correlated_traffic: true + latency: true + fec_port_mode: '10G' + vnf__0: + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + napt: 'dynamic' + nfvi_enable: True + runner: + type: Iteration + iterations: 28 + interval: 35 + ixia_profile: ../../traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows_3node_latency.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia_3node.yaml diff --git a/samples/vnf_samples/nsut/cgnapt/tc_heat_external_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_heat_external_rfc2544_ipv4_1flow_64B_trex.yaml index 0ad7898a1..c64bb1bcd 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_heat_external_rfc2544_ipv4_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_heat_external_rfc2544_ipv4_1flow_64B_trex.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology.yaml nodes: - tg__1: trafficgen_1.baremetal - vnf__1: vnf.yardstick + tg__0: trafficgen_1.baremetal + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: type: Iteration @@ -48,7 +48,7 @@ contexts: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -66,14 +66,12 @@ contexts: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' provider: true physical_network: phystenant1 port_security_enabled: False xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' provider: true physical_network: phystenant2 diff --git a/samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml index 516c727de..4f1d8579c 100644 --- a/samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: cgnapt-vnf-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: type: Iteration @@ -45,7 +45,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -66,7 +66,6 @@ context: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: @@ -74,7 +73,6 @@ context: '0.0.0.0/0' xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: diff --git a/samples/vnf_samples/nsut/ping/ping_tg_topology.yaml b/samples/vnf_samples/nsut/ping/ping_tg_topology.yaml index b2b852a79..244d0b6d6 100644 --- a/samples/vnf_samples/nsut/ping/ping_tg_topology.yaml +++ b/samples/vnf_samples/nsut/ping/ping_tg_topology.yaml @@ -20,15 +20,15 @@ nsd:nsd-catalog: description: ping-tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_ping_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/tg_ping_tpl.yaml #VNF type vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' @@ -38,8 +38,8 @@ nsd:nsd-catalog: vnfd-connection-point-ref: xe0 vnfd-id-ref: trexgen - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' diff --git a/samples/vnf_samples/nsut/ping/tc_external_ping_heat_context.yaml b/samples/vnf_samples/nsut/ping/tc_external_ping_heat_context.yaml index 8826f539e..6e3dd3280 100644 --- a/samples/vnf_samples/nsut/ping/tc_external_ping_heat_context.yaml +++ b/samples/vnf_samples/nsut/ping/tc_external_ping_heat_context.yaml @@ -22,8 +22,8 @@ scenarios: topology: ping_tg_topology.yaml nodes: - tg__1: trafficgen_1.baremetal - vnf__1: vnf.yardstick + tg__0: trafficgen_1.baremetal + vnf__0: vnf.yardstick runner: type: Duration @@ -50,11 +50,8 @@ contexts: external_network: "yardstick-public" xe0: cidr: '10.0.2.0/24' - vld_id: public - xe1: cidr: '10.0.3.0/24' - vld_id: private - name: baremetal type: Node diff --git a/samples/vnf_samples/nsut/ping/tc_ping_baremetal_context.yaml b/samples/vnf_samples/nsut/ping/tc_ping_baremetal_context.yaml index 5f2c55b81..63f252484 100644 --- a/samples/vnf_samples/nsut/ping/tc_ping_baremetal_context.yaml +++ b/samples/vnf_samples/nsut/ping/tc_ping_baremetal_context.yaml @@ -22,13 +22,13 @@ scenarios: topology: ping_tg_topology.yaml # TODO: look in relative path where the tc.yaml is found nodes: # This section is copied from pod.xml or resolved via Heat - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick vnf_options: - tg__1: - target_ip: pingvnf__1.xe0.local_ip # TODO: resolve to config vars - vnf__1: + tg__0: + target_ip: pingvnf__0.xe0.local_ip # TODO: resolve to config vars + vnf__0: target_ip: pinggen__1.xe1.local_ip # TODO: resolve to config vars runner: type: Duration diff --git a/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml b/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml index 394523ffa..a3a11f670 100644 --- a/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml +++ b/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml @@ -22,8 +22,8 @@ scenarios: topology: ping_tg_topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick runner: type: Duration @@ -31,7 +31,7 @@ scenarios: context: name: yardstick - image: yardstick-image + image: yardstick-samplevnfs flavor: yardstick-flavor user: ubuntu @@ -53,9 +53,7 @@ context: external_network: "yardstick-public" xe0: cidr: '10.0.2.0/24' - vld_id: public xe1: cidr: '10.0.3.0/24' - vld_id: private diff --git a/samples/vnf_samples/nsut/ping/tc_ping_ovs_dpdk_context.yaml b/samples/vnf_samples/nsut/ping/tc_ping_ovs_dpdk_context.yaml index 7654b0f96..5733f0df8 100644 --- a/samples/vnf_samples/nsut/ping/tc_ping_ovs_dpdk_context.yaml +++ b/samples/vnf_samples/nsut/ping/tc_ping_ovs_dpdk_context.yaml @@ -22,13 +22,13 @@ scenarios: topology: ping_tg_topology.yaml # TODO: look in relative path where the tc.yaml is found nodes: # This section is copied from pod.xml or resolved via Heat - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick vnf_options: - tg__1: - target_ip: pingvnf__1.xe0.local_ip # TODO: resolve to config vars - vnf__1: + tg__0: + target_ip: pingvnf__0.xe0.local_ip # TODO: resolve to config vars + vnf__0: target_ip: pinggen__1.xe1.local_ip # TODO: resolve to config vars runner: type: Duration diff --git a/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml index e8ad24443..1fe2ed943 100644 --- a/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml @@ -19,8 +19,8 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: "../../prox-tg-topology.yaml" nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/configs/gen_acl-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_acl-2.cfg index d612e4f56..816bb3297 100644 --- a/samples/vnf_samples/nsut/prox/configs/gen_acl-2.cfg +++ b/samples/vnf_samples/nsut/prox/configs/gen_acl-2.cfg @@ -1,35 +1,45 @@ -; 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. +# 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 +-n=4 no-output=no ; disable DPDK debug output [port 0] name=p0 -mac=00:00:00:00:00:01 +mac=hardware +promiscuous=yes + [port 1] name=p1 -mac=00:00:00:00:00:02 - +mac=hardware +promiscuous=yes [defaults] mempool size=4K +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 +$qinq_tag_inline="88 a8" + [global] start time=5 -name=ACL gen +name=Basic Gen + [core 0] mode=master @@ -40,7 +50,7 @@ mode=gen tx port=p0 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline= 00 00 00 00 00 01 70 00 00 00 00 01 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac0} 70 00 00 00 00 01 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -62,6 +72,7 @@ random=000000000000XXX00000000XXXXXXXXX rand_offset=42 lat pos=50 + [core 2] name=p1 task=0 @@ -69,7 +80,7 @@ mode=gen tx port=p1 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline=00 00 00 00 00 02 70 00 00 00 00 02 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac1} 70 00 00 00 00 02 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -90,3 +101,16 @@ rand_offset=23 random=000000000000XXX00000000XXXXXXXXX rand_offset=42 lat pos=50 + +[core 3] +name=rec 0 +task=0 +mode=lat +rx port=p0 + +[core 4] +name=rec 1 +task=0 +mode=lat +rx port=p1 + diff --git a/samples/vnf_samples/nsut/prox/configs/gen_acl-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_acl-4.cfg index 4d7fd1c24..49cf29ca5 100644 --- a/samples/vnf_samples/nsut/prox/configs/gen_acl-4.cfg +++ b/samples/vnf_samples/nsut/prox/configs/gen_acl-4.cfg @@ -1,40 +1,57 @@ -; 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. +# 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 +-n=4 no-output=no ; disable DPDK debug output [port 0] name=p0 -mac=00:00:00:00:00:01 +mac=hardware +promiscuous=yes + [port 1] name=p1 -mac=00:00:00:00:00:02 +mac=hardware +promiscuous=yes + [port 2] name=p2 -mac=00:00:00:00:00:03 +mac=hardware +promiscuous=yes + [port 3] name=p3 -mac=00:00:00:00:00:04 +mac=hardware +promiscuous=yes [defaults] mempool size=4K +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 +$sut_mac2=@@dst_mac2 +$sut_mac3=@@dst_mac3 +$qinq_tag_inline="88 a8" + [global] start time=5 -name=ACL gen +name=Basic ACL Gen x4 + [core 0] mode=master @@ -45,7 +62,7 @@ mode=gen tx port=p0 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline= 00 00 00 00 00 01 70 00 00 00 00 01 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac0} 70 00 00 00 00 01 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -65,7 +82,6 @@ rand_offset=23 ; dport: [0..511] random=000000000000XXX00000000XXXXXXXXX rand_offset=42 -lat pos=50 [core 2] name=p1 @@ -74,7 +90,7 @@ mode=gen tx port=p1 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline=00 00 00 00 00 02 70 00 00 00 00 02 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac1} 70 00 00 00 00 02 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -94,16 +110,15 @@ rand_offset=23 ; dport: [0..511] random=000000000000XXX00000000XXXXXXXXX rand_offset=42 -lat pos=50 [core 3] name=p2 task=0 mode=gen -tx port=p2 +tx port=p1 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline=00 00 00 00 00 03 70 00 00 00 00 03 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac2} 70 00 00 00 00 02 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -123,7 +138,6 @@ rand_offset=23 ; dport: [0..511] random=000000000000XXX00000000XXXXXXXXX rand_offset=42 -lat pos=50 [core 4] name=p3 @@ -132,7 +146,7 @@ mode=gen tx port=p3 bps=625000000 ; Ethernet + QinQ + IP + UDP -pkt inline=00 00 00 00 00 04 70 00 00 00 00 04 88 a8 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF +pkt inline=${sut_mac3} 70 00 00 00 00 04 ${qinq_tag_inline} 00 01 81 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 00 35 00 35 00 08 7c 21 FFFFFFFF ; svlan: [0,1] random=000000000000000X rand_offset=14 @@ -152,4 +166,27 @@ rand_offset=23 ; dport: [0..511] random=000000000000XXX00000000XXXXXXXXX rand_offset=42 -lat pos=50 + +[core 5] +name=rec 0 +task=0 +mode=lat +rx port=p0 + +[core 6] +name=rec 1 +task=0 +mode=lat +rx port=p1 + +[core 7] +name=rec 2 +task=0 +mode=lat +rx port=p2 + +[core 8] +name=rec 3 +task=0 +mode=lat +rx port=p3 diff --git a/samples/vnf_samples/nsut/prox/configs/gen_buffering-1.cfg b/samples/vnf_samples/nsut/prox/configs/gen_buffering-1.cfg new file mode 100644 index 000000000..6deefa82f --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_buffering-1.cfg @@ -0,0 +1,53 @@ +# 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 ; number of memory channels +no-output=no ; disable DPDK debug output + +[port 0] +name=p0 +mac=hardware + +[defaults] +mempool size=4K + +[variables] +$sut_mac0=@@dst_mac0 + +[global] +start time=5 +name=Buffering gen + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +; 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 c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b + +[core 2] +name=P1 +task=0 +mode=lat +rx port=p0 +lat pos=42 + diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-2.cfg new file mode 100644 index 000000000..c1939c06c --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-2.cfg @@ -0,0 +1,96 @@ +# 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 +no-output=no ; disable DPDK debug output + +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 + +[port 0] +name=p0 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[port 1] +name=p1 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[defaults] +mempool size=4K + +[global] +start time=5 +name=Basic Gen + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +; 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 98 10 64 01 98 10 64 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.100.0/8 +random=0000XXX1 +rand_offset=29 +; dst_ip: 152.16.100.0/8 +random=0000XXX0 +rand_offset=33 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + +[core 2] +name=p1 +task=0 +mode=gen +tx port=p1 +bps=1250000000 +; Ethernet + IP + UDP +pkt inline=${sut_mac1} 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 98 10 28 01 98 10 28 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.40.0/8 +random=1001100000010000001010000000XXXX +rand_offset=26 +; dst_ip: 152.16.40.0/8 +random=1001100000010000001010000000XXXX +rand_offset=30 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + + +[core 3] +name=rec 0 +task=0 +mode=lat +rx port=p0 +lat pos=42 + +[core 4] +name=rec 1 +task=0 +mode=lat +rx port=p1 +lat pos=42 diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-4.cfg new file mode 100644 index 000000000..f1e158414 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd_multiflow-4.cfg @@ -0,0 +1,147 @@ +# 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 +no-output=no ; disable DPDK debug output + +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 +$sut_mac2=@@dst_mac2 +$sut_mac3=@@dst_mac3 + +[port 0] +name=p0 +mac=hardware +promiscuous=yes + +[port 1] +name=p1 +mac=hardware +promiscuous=yes + +[port 2] +name=p2 +mac=hardware +promiscuous=yes + +[port 3] +name=p3 +mac=hardware +promiscuous=yes + +[defaults] +mempool size=4K + +[global] +start time=5 +name=Basic Gen + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +; 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 98 10 64 01 98 10 64 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.100.0/8 +random=0000XXX1 +rand_offset=29 +; dst_ip: 152.16.100.0/8 +random=0000XXX0 +rand_offset=33 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + +[core 2] +name=p1 +task=0 +mode=gen +tx port=p1 +bps=1250000000 +; Ethernet + IP + UDP +pkt inline=${sut_mac1} 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 98 10 64 01 98 10 64 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.100.0/8 +random=0000XXX1 +rand_offset=29 +; dst_ip: 152.16.100.0/8 +random=0000XXX0 +rand_offset=33 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + +[core 3] +name=p2 +task=0 +mode=gen +tx port=p2 +bps=1250000000 +; Ethernet + IP + UDP +pkt inline=${sut_mac2} 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 98 10 64 01 98 10 64 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.100.0/8 +random=0000XXX1 +rand_offset=29 +; dst_ip: 152.16.100.0/8 +random=0000XXX0 +rand_offset=33 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + +[core 4] +name=p3 +task=0 +mode=gen +tx port=p3 +bps=1250000000 +; Ethernet + IP + UDP +pkt inline=${sut_mac3} 70 00 00 00 00 01 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d 98 10 64 01 98 10 64 02 13 88 13 88 00 08 55 7b +; src_ip: 152.16.100.0/8 +random=0000XXX1 +rand_offset=29 +; dst_ip: 152.16.100.0/8 +random=0000XXX0 +rand_offset=33 +random=0001001110001XXX0001001110001XXX +rand_offset=34 + +[core 5] +name=rec 0 +task=0 +mode=lat +rx port=p0 + +[core 6] +name=rec 1 +task=0 +mode=lat +rx port=p1 + +[core 7] +name=rec 2 +task=0 +mode=lat +rx port=p2 + +[core 8] +name=rec 3 +task=0 +mode=lat +rx port=p3 diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg new file mode 100644 index 000000000..efdc3ef17 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg @@ -0,0 +1,73 @@ +# 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 +no-output=no ; disable DPDK debug output + +[port 0] +name=p0 +mac=hardware +[port 1] +name=p1 +mac=hardware + +[defaults] +mempool size=4K + +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 + +[global] +start time=5 +name=Routing Gen + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + +[core 2] +name=p1 +task=0 +mode=gen +tx port=p1 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + +[core 3] +task=0 +mode=lat +rx port=p0 +lat pos=42 + +[core 4] +task=0 +mode=lat +rx port=p1 +lat pos=42 + diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg new file mode 100644 index 000000000..bf226f822 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg @@ -0,0 +1,114 @@ +# 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 +no-output=no ; disable DPDK debug output + +[port 0] +name=p0 +mac=hardware +[port 1] +name=p1 +mac=hardware +[port 2] +name=p2 +mac=hardware +[port 3] +name=p3 +mac=hardware + +[defaults] +mempool size=4K + +[variables] +$sut_mac0=@@dst_mac0 +$sut_mac1=@@dst_mac1 +$sut_mac2=@@dst_mac2 +$sut_mac3=@@dst_mac3 + +[global] +start time=5 +name=Routing Gen + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + +[core 2] +name=p1 +task=0 +mode=gen +tx port=p1 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + +[core 3] +name=p2 +task=0 +mode=gen +tx port=p2 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + +[core 4] +name=p3 +task=0 +mode=gen +tx port=p3 +bps=1250000000 +pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b +random=0000101XXXXXXXXXXXXX0000XXXXXXXX +rand_offset=30 + + +[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
\ No newline at end of file diff --git a/samples/vnf_samples/nsut/prox/configs/gen_lb-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_lb-4.cfg new file mode 100644 index 000000000..4ac4f94d7 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/gen_lb-4.cfg @@ -0,0 +1,105 @@ +# 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 +no-output=no ; disable DPDK debug output + +[variables] +$sut_mac0=@@dst_mac0 + +[port 0] +name=p0 +mac=hardware +rx desc=4096 +tx desc=4096 +promiscuous=yes + +[port 1] +name=p1 +mac=hardware +rx desc=4096 +tx desc=1024 +promiscuous=yes + +[port 2] +name=p2 +mac=hardware +rx desc=4096 +tx desc=1024 +promiscuous=yes + +[port 3] +name=p3 +mac=hardware +rx desc=4096 +tx desc=1024 +promiscuous=yes + +[defaults] +mempool size=16K + +[global] +start time=5 +name=Gen Load Balancing + +[core 0] +mode=master + +[core 1] +name=p0 +task=0 +mode=gen +tx port=p0 +bps=1250000000 +; Ethernet + IP + pseudo-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 +; src_ip: 10.x.x.x +random=101000000000XXXX0000XXXX000XXXXX +rand_offset=26 +; dst_ip: 10.x.x.x +random=101000000000XXXX0000XXXX000XXXXX +rand_offset=30 +; sport: [0..31] +; dport: [0..31] +random=00000000000XXXXX00000000000XXXXX +rand_offset=34 + +[core 2] +name=p0 +task=0 +mode=nop +rx port=p0 + +[core 3] +name=p1 +task=0 +mode=nop +rx port=p1 + +[core 4] +name=p2 +task=0 +mode=nop +rx port=p2 + +[core 5] +name=p3 +task=0 +mode=nop +rx port=p3 + + diff --git a/samples/vnf_samples/nsut/prox/configs/handle_acl-2.cfg b/samples/vnf_samples/nsut/prox/configs/handle_acl-2.cfg index 7213a6073..3b58bcf2c 100644 --- a/samples/vnf_samples/nsut/prox/configs/handle_acl-2.cfg +++ b/samples/vnf_samples/nsut/prox/configs/handle_acl-2.cfg @@ -1,17 +1,18 @@ -; 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. - +# 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. +# +#; [lua] acl_table = dofile("acl_rules-2.lua") @@ -25,20 +26,24 @@ name=if0 mac=hardware rx desc=2048 tx desc=2048 +promiscuous=yes + [port 1] name=if1 mac=hardware rx desc=2048 tx desc=2048 +promiscuous=yes + [defaults] mempool size=65K memcache size=512 -qinq tag=0xa888 +qinq tag="0xa888" [global] start time=5 -name=ACL handle +name=ACL handle x2 [core 0] task=0 @@ -54,10 +59,11 @@ rx port=if0 tx cores=1t1 drop=no +name=l2fwd_if0 task=1 mode=l2fwd -dst mac=00:00:00:00:00:01 rx ring=yes +dst mac=@@tester_p0 tx port=if0 drop=no @@ -71,10 +77,11 @@ rx port=if1 tx cores=2t1 drop=no +name=l2fwd_if1 task=1 mode=l2fwd -dst mac=00:00:00:00:00:02 rx ring=yes +dst mac=@@tester_p1 tx port=if1 drop=no diff --git a/samples/vnf_samples/nsut/prox/configs/handle_acl-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_acl-4.cfg index 51a1f8f2e..88551b29f 100644 --- a/samples/vnf_samples/nsut/prox/configs/handle_acl-4.cfg +++ b/samples/vnf_samples/nsut/prox/configs/handle_acl-4.cfg @@ -43,11 +43,11 @@ tx desc=2048 [defaults] mempool size=65K memcache size=512 -qinq tag=0xa888 +qinq tag="0xa888" [global] start time=5 -name=ACL handle +name=ACL handle x4 [core 0] task=0 @@ -63,10 +63,11 @@ rx port=if0 tx cores=1t1 drop=no +name=l2fwd_if0 task=1 mode=l2fwd -dst mac=00:00:00:00:00:01 rx ring=yes +dst mac=@@tester_p0 tx port=if0 drop=no @@ -80,10 +81,11 @@ rx port=if1 tx cores=2t1 drop=no +name=l2fwd_if1 task=1 mode=l2fwd -dst mac=00:00:00:00:00:02 rx ring=yes +dst mac=@@tester_p1 tx port=if1 drop=no @@ -97,10 +99,11 @@ rx port=if2 tx cores=3t1 drop=no +name=l2fwd_if2 task=1 mode=l2fwd -dst mac=00:00:00:00:00:03 rx ring=yes +dst mac=@@tester_p2 tx port=if2 drop=no @@ -114,9 +117,10 @@ rx port=if3 tx cores=4t1 drop=no +name=l2fwd_if3 task=1 mode=l2fwd -dst mac=00:00:00:00:00:04 rx ring=yes +dst mac=@@tester_p3 tx port=if3 drop=no diff --git a/samples/vnf_samples/nsut/prox/configs/handle_buffering-1.cfg b/samples/vnf_samples/nsut/prox/configs/handle_buffering-1.cfg new file mode 100644 index 000000000..80d7d0734 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_buffering-1.cfg @@ -0,0 +1,52 @@ +# 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 ; number of memory channels +no-output=no ; disable DPDK debug output + +[port 0] +name=if0 +mac=hardware +rx desc=2048 +tx desc=2048 + +[defaults] +mempool size=1879K +memcache size=512 + +[global] +start time=5 +name=Handle Buffering (1x) + +[core 0] +mode=master + +[core 1] +name=none +task=0 +mode=impair +delay ms=125 +rx port=if0 +tx cores=1t1 +drop=no + +task=1 +mode=l2fwd +dst mac=@@tester_p0 +rx ring=yes +tx port=if0 +drop=no diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-2.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-2.cfg new file mode 100644 index 000000000..d4a4c89e4 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-2.cfg @@ -0,0 +1,62 @@ +# 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 +no-output=no ; disable DPDK debug output + +[port 0] +name=if0 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[port 1] +name=if1 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[defaults] +mempool size=8K +memcache size=512 + +[global] +start time=5 +name=Handle L2FWD Multiflow (2x) + +[core 0] +mode=master + +[core 1] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac1 +rx port=if0 +tx port=if1 +drop=no + +[core 2] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac0 +rx port=if1 +tx port=if0 +drop=no diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-4.cfg new file mode 100644 index 000000000..39dbda4cf --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_l2fwd_multiflow-4.cfg @@ -0,0 +1,88 @@ +# 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 +no-output=no ; disable DPDK debug output + +[port 0] +name=if0 +mac=hardware +rx desc=2048 +tx desc=2048 +[port 1] +name=if1 +mac=hardware +rx desc=2048 +tx desc=2048 +[port 2] +name=if2 +mac=hardware +rx desc=2048 +tx desc=2048 +[port 3] +name=if3 +mac=hardware +rx desc=2048 +tx desc=2048 + +[defaults] +mempool size=8K +memcache size=512 + +[global] +start time=5 +name=Handle L2FWD Multiflow (4x) + +[core 0] +mode=master + +[core 1] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac0 +rx port=if0 +tx port=if1 +drop=no + +[core 2] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac1 +rx port=if1 +tx port=if0 +drop=no + +[core 3] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac2 +rx port=if2 +tx port=if3 +drop=no + +[core 4] +name=none +task=0 +mode=l2fwd +dst mac=@@tester_mac3 +rx port=if3 +tx port=if2 +drop=no + diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg new file mode 100644 index 000000000..f7d4376f4 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg @@ -0,0 +1,62 @@ +# 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. +# +#; + +[lua] +lpm4 = dofile("ipv4.lua") + +[eal options] +-n=4 ; force number of memory channels +no-output=no ; disable DPDK debug output + +[port 0] +name=if0 +mac=hardware +rx desc=2048 +tx desc=2048 + +[port 1] +name=if1 +mac=hardware +rx desc=2048 +tx desc=2048 + +[defaults] +mempool size=4K + +[global] +start time=5 +name=Routing (2x) + +[core 0] +mode=master + +[core 1] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if0 +tx port=if0,if1 +drop=no + +[core 2] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if1 +tx port=if0,if1 +drop=no
\ No newline at end of file diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg new file mode 100644 index 000000000..d5822225f --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg @@ -0,0 +1,81 @@ +# 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. +# +#; + +[lua] +lpm4 = dofile("ipv4.lua") + +[eal options] +-n=4 ; force number of memory channels +no-output=no ; disable DPDK debug output + +[port 0] +name=if0 +mac=hardware +[port 1] +name=if1 +mac=hardware +[port 2] +name=if2 +mac=hardware +[port 3] +name=if3 +mac=hardware + +[defaults] +mempool size=4K + +[global] +start time=5 +name=Routing (4x) + +[core 0] +mode=master + +[core 1] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if0 +tx port=if0,if1 +drop=no + +[core 2] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if1 +tx port=if0,if1 +drop=no + +[core 3] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if2 +tx port=if2,if3 +drop=no + +[core 4] +name=Routing +task=0 +mode=routing +route table=lpm4 +rx port=if3 +tx port=if2,if3 +drop=no diff --git a/samples/vnf_samples/nsut/prox/configs/handle_lb-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_lb-4.cfg new file mode 100644 index 000000000..b85e00b5c --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/handle_lb-4.cfg @@ -0,0 +1,107 @@ +# 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 +no-output=no ; disable DPDK debug output + +[lua] +dofile("tuples.lua") + +[port 0] +name=if0 +mac=hardware +rx desc=4096 +tx desc=2048 +promiscuous=yes + +[port 1] +name=if1 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[port 2] +name=if2 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[port 3] +name=if3 +mac=hardware +rx desc=2048 +tx desc=2048 +promiscuous=yes + +[defaults] +mempool size=13K +memcache size=512 +mempool size=16K + +[global] +start time=5 +name=Handle 5 Tuple Load Balance 1-to-4 + +[core 0] +mode=master + +[core 1] +name=Handle_LB +task=0 +mode=lb5tuple +rx port=if0 +tx cores=2,3,4,5 +drop=no + +[core 2] +name=TX_p0 +task=0 +mode=l2fwd +dst mac=@@p0 +rx ring=yes +tx port=if0 +drop=no + +[core 3] +name=TX_p1 +task=0 +mode=l2fwd +dst mac=@@p1 +rx ring=yes +tx port=if1 +drop=no + +[core 4] +name=TX_p2 +task=0 +mode=l2fwd +dst mac=@@p2 +rx ring=yes +tx port=if2 +drop=no + +[core 5] +name=TX_p3 +task=0 +mode=l2fwd +dst mac=@@p3 +rx ring=yes +tx port=if3 +drop=no + diff --git a/samples/vnf_samples/nsut/prox/configs/ipv4.lua b/samples/vnf_samples/nsut/prox/configs/ipv4.lua new file mode 100644 index 000000000..6a8fbe183 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/ipv4.lua @@ -0,0 +1,97 @@ +-- 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. +-- + +local lpm4 = {} +lpm4.next_hops = { + {id = 0, port_id = 0, ip = ip("1.1.1.1"), mac = mac("00:00:00:00:00:01"), mpls = 0x112}, + {id = 1, port_id = 1, ip = ip("2.1.1.1"), mac = mac("00:00:00:00:00:02"), mpls = 0x212}, + {id = 2, port_id = 0, ip = ip("3.1.1.1"), mac = mac("00:00:00:00:00:03"), mpls = 0x312}, + {id = 3, port_id = 1, ip = ip("4.1.1.1"), mac = mac("00:00:00:00:00:04"), mpls = 0x412}, + {id = 4, port_id = 0, ip = ip("5.1.1.1"), mac = mac("00:00:00:00:00:05"), mpls = 0x512}, + {id = 5, port_id = 1, ip = ip("6.1.1.1"), mac = mac("00:00:00:00:00:06"), mpls = 0x612}, + {id = 6, port_id = 0, ip = ip("7.1.1.1"), mac = mac("00:00:00:00:00:07"), mpls = 0x712}, + {id = 7, port_id = 1, ip = ip("8.1.1.1"), mac = mac("00:00:00:00:00:08"), mpls = 0x812}, + {id = 8, port_id = 0, ip = ip("9.1.1.1"), mac = mac("00:00:00:00:00:09"), mpls = 0x912}, + {id = 9, port_id = 1, ip = ip("10.1.1.1"), mac = mac("00:00:00:00:00:10"), mpls = 0x1012}, + {id = 10, port_id = 0, ip = ip("11.1.1.1"), mac = mac("00:00:00:00:00:11"), mpls = 0x1112}, + {id = 11, port_id = 1, ip = ip("12.1.1.1"), mac = mac("00:00:00:00:00:12"), mpls = 0x1212}, + {id = 12, port_id = 0, ip = ip("13.1.1.1"), mac = mac("00:00:00:00:00:13"), mpls = 0x1312}, + {id = 13, port_id = 1, ip = ip("14.1.1.1"), mac = mac("00:00:00:00:00:14"), mpls = 0x1412}, + {id = 14, port_id = 0, ip = ip("15.1.1.1"), mac = mac("00:00:00:00:00:15"), mpls = 0x1512}, + {id = 15, port_id = 1, ip = ip("16.1.1.1"), mac = mac("00:00:00:00:00:16"), mpls = 0x1612}, + {id = 16, port_id = 0, ip = ip("17.1.1.1"), mac = mac("00:00:00:00:00:17"), mpls = 0x1712}, + {id = 17, port_id = 1, ip = ip("18.1.1.1"), mac = mac("00:00:00:00:00:18"), mpls = 0x1812}, + {id = 18, port_id = 0, ip = ip("19.1.1.1"), mac = mac("00:00:00:00:00:19"), mpls = 0x1912}, + {id = 19, port_id = 1, ip = ip("20.1.1.1"), mac = mac("00:00:00:00:00:20"), mpls = 0x2012}, + {id = 20, port_id = 0, ip = ip("21.1.1.1"), mac = mac("00:00:00:00:00:21"), mpls = 0x2112}, + {id = 21, port_id = 1, ip = ip("22.1.1.1"), mac = mac("00:00:00:00:00:22"), mpls = 0x2212}, + {id = 22, port_id = 0, ip = ip("23.1.1.1"), mac = mac("00:00:00:00:00:23"), mpls = 0x2312}, + {id = 23, port_id = 1, ip = ip("24.1.1.1"), mac = mac("00:00:00:00:00:24"), mpls = 0x2412}, + {id = 24, port_id = 0, ip = ip("25.1.1.1"), mac = mac("00:00:00:00:00:25"), mpls = 0x2512}, + {id = 25, port_id = 1, ip = ip("26.1.1.1"), mac = mac("00:00:00:00:00:26"), mpls = 0x2612}, + {id = 26, port_id = 0, ip = ip("27.1.1.1"), mac = mac("00:00:00:00:00:27"), mpls = 0x2712}, + {id = 27, port_id = 1, ip = ip("28.1.1.1"), mac = mac("00:00:00:00:00:28"), mpls = 0x2812}, + {id = 28, port_id = 0, ip = ip("29.1.1.1"), mac = mac("00:00:00:00:00:29"), mpls = 0x2912}, + {id = 29, port_id = 1, ip = ip("30.1.1.1"), mac = mac("00:00:00:00:00:30"), mpls = 0x3012}, + {id = 30, port_id = 0, ip = ip("31.1.1.1"), mac = mac("00:00:00:00:00:31"), mpls = 0x3112}, + {id = 31, port_id = 1, ip = ip("32.1.1.1"), mac = mac("00:00:00:00:00:32"), mpls = 0x3212}, + {id = 32, port_id = 0, ip = ip("33.1.1.1"), mac = mac("00:00:00:00:00:33"), mpls = 0x3312}, + {id = 33, port_id = 1, ip = ip("34.1.1.1"), mac = mac("00:00:00:00:00:34"), mpls = 0x3412}, + {id = 34, port_id = 0, ip = ip("35.1.1.1"), mac = mac("00:00:00:00:00:35"), mpls = 0x3512}, + {id = 35, port_id = 1, ip = ip("36.1.1.1"), mac = mac("00:00:00:00:00:36"), mpls = 0x3612}, + {id = 36, port_id = 0, ip = ip("37.1.1.1"), mac = mac("00:00:00:00:00:37"), mpls = 0x3712}, + {id = 37, port_id = 1, ip = ip("38.1.1.1"), mac = mac("00:00:00:00:00:38"), mpls = 0x3812}, + {id = 38, port_id = 0, ip = ip("39.1.1.1"), mac = mac("00:00:00:00:00:39"), mpls = 0x3912}, + {id = 39, port_id = 1, ip = ip("40.1.1.1"), mac = mac("00:00:00:00:00:40"), mpls = 0x4012}, + {id = 40, port_id = 0, ip = ip("41.1.1.1"), mac = mac("00:00:00:00:00:41"), mpls = 0x4112}, + {id = 41, port_id = 1, ip = ip("42.1.1.1"), mac = mac("00:00:00:00:00:42"), mpls = 0x4212}, + {id = 42, port_id = 0, ip = ip("43.1.1.1"), mac = mac("00:00:00:00:00:43"), mpls = 0x4312}, + {id = 43, port_id = 1, ip = ip("44.1.1.1"), mac = mac("00:00:00:00:00:44"), mpls = 0x4412}, + {id = 44, port_id = 0, ip = ip("45.1.1.1"), mac = mac("00:00:00:00:00:45"), mpls = 0x4512}, + {id = 45, port_id = 1, ip = ip("46.1.1.1"), mac = mac("00:00:00:00:00:46"), mpls = 0x4612}, + {id = 46, port_id = 0, ip = ip("47.1.1.1"), mac = mac("00:00:00:00:00:47"), mpls = 0x4712}, + {id = 47, port_id = 1, ip = ip("48.1.1.1"), mac = mac("00:00:00:00:00:48"), mpls = 0x4812}, + {id = 48, port_id = 0, ip = ip("49.1.1.1"), mac = mac("00:00:00:00:00:49"), mpls = 0x4912}, + {id = 49, port_id = 1, ip = ip("50.1.1.1"), mac = mac("00:00:00:00:00:50"), mpls = 0x5012}, + {id = 50, port_id = 0, ip = ip("51.1.1.1"), mac = mac("00:00:00:00:00:51"), mpls = 0x5112}, + {id = 51, port_id = 1, ip = ip("52.1.1.1"), mac = mac("00:00:00:00:00:52"), mpls = 0x5212}, + {id = 52, port_id = 0, ip = ip("53.1.1.1"), mac = mac("00:00:00:00:00:53"), mpls = 0x5312}, + {id = 53, port_id = 1, ip = ip("54.1.1.1"), mac = mac("00:00:00:00:00:54"), mpls = 0x5412}, + {id = 54, port_id = 0, ip = ip("55.1.1.1"), mac = mac("00:00:00:00:00:55"), mpls = 0x5512}, + {id = 55, port_id = 1, ip = ip("56.1.1.1"), mac = mac("00:00:00:00:00:56"), mpls = 0x5612}, + {id = 56, port_id = 0, ip = ip("57.1.1.1"), mac = mac("00:00:00:00:00:57"), mpls = 0x5712}, + {id = 57, port_id = 1, ip = ip("58.1.1.1"), mac = mac("00:00:00:00:00:58"), mpls = 0x5812}, + {id = 58, port_id = 0, ip = ip("59.1.1.1"), mac = mac("00:00:00:00:00:59"), mpls = 0x5912}, + {id = 59, port_id = 1, ip = ip("60.1.1.1"), mac = mac("00:00:00:00:00:60"), mpls = 0x6012}, + {id = 60, port_id = 0, ip = ip("61.1.1.1"), mac = mac("00:00:00:00:00:61"), mpls = 0x6112}, + {id = 61, port_id = 1, ip = ip("62.1.1.1"), mac = mac("00:00:00:00:00:62"), mpls = 0x6212}, + {id = 62, port_id = 0, ip = ip("63.1.1.1"), mac = mac("00:00:00:00:00:63"), mpls = 0x6312}, + {id = 63, port_id = 1, ip = ip("64.1.1.1"), mac = mac("00:00:00:00:00:64"), mpls = 0x6412}, +} + +lpm4.routes = {}; + +base_ip = 10 * 2^24; + +for i = 1,2^13 do + res = ip(base_ip + (1 * 2^12) * (i - 1)); + + lpm4.routes[i] = { + cidr = {ip = res, depth = 24}, + next_hop_id = (i - 1) % 64, + } +end + +return lpm4 diff --git a/samples/vnf_samples/nsut/prox/configs/tuples.lua b/samples/vnf_samples/nsut/prox/configs/tuples.lua new file mode 100644 index 000000000..431125082 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/configs/tuples.lua @@ -0,0 +1,45 @@ +-- +-- Dataplane Automated Testing System +-- +-- Copyright (c) 2015-2017, Intel Corporation. +-- All rights reserved. +-- +-- Redistribution and use in source and binary forms, with or without +-- modification, are permitted provided that the following conditions +-- are met: +-- +-- * 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. +-- + +tuples = {}; + +for i = 0,2^23-1 do + tuples[i] = {if_out = i%4, + ip_src = i%2^5, + ip_dst = ((i-i%2^5)/2^5)%2^5, + port_src = ((i-i%2^10)/2^10)%2^5, + port_dst = ((i-i%2^15)/2^15)%2^5, + proto = ((i-i%2^20)/2^20)%2^3 * 2^5, + } +end + diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml index 4695f0bfe..73fea8122 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml @@ -22,9 +22,9 @@ scenarios: topology: ../../acl-tg-topology-http.yaml nodes: - vnf__1: vnf.yardstick - tg__1: trafficgen_1.yardstick - tg__2: trafficgen_2.yardstick + vnf__0: vnf.yardstick + tg__0: trafficgen_1.yardstick + tg__1: trafficgen_2.yardstick options: acl: diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml index f08289de9..0ca0005b2 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml index 92f367855..d51b42f84 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml index bc6ea4d2b..37da8e6c7 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml index 05bf56fb7..cbe3e97ae 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml index d560f56cf..707b46e7f 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml index 68fdf96e4..b1003df3d 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml @@ -19,9 +19,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml b/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml new file mode 100644 index 000000000..a6c286242 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/prox-baremetal-1.yaml @@ -0,0 +1,57 @@ +# 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. +# +#; + +nodes: +- + name: "trafficgen_1" + role: TrafficGen + ip: 1.1.1.1 + user: "root" + ssh_port: "22" + password: "r00t" + interfaces: + xe0: + vpci: "0000:05:00.0" + local_mac: "00:00:00:00:00:01" + driver: "i40e" + local_ip: "152.16.100.19" + netmask: "255.255.255.0" + dpdk_port_num: 0 +- + name: "vnf" + role: VNF + ip: 1.1.1.2 + user: "root" + ssh_port: "22" + password: "r00t" + interfaces: + xe0: + vpci: "0000:05:00.0" + local_mac: "00:00:00:00:00:02" + driver: "i40e" + local_ip: "152.16.100.21" + netmask: "255.255.255.0" + dpdk_port_num: 0 + routing_table: + - network: "152.16.100.20" + netmask: "255.255.255.0" + gateway: "152.16.100.20" + if: "xe0" + nd_route_tbl: + - network: "0064:ff9b:0:0:0:0:9810:6414" + netmask: "112" + gateway: "0064:ff9b:0:0:0:0:9810:6414" + if: "xe0" diff --git a/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml b/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml new file mode 100644 index 000000000..10902a7b8 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml @@ -0,0 +1,49 @@ +# 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. + +nsd:nsd-catalog: + nsd: + - id: prox-tg-topology + name: prox-tg-topology + short-name: prox-tg-topology + description: prox-tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/tg_prox_tpl-1.yaml + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/prox_vnf-1.yaml + vld: + - id: uplink_0 + name: tg__0 to vnf__0 link 1 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__0 + + - id: downlink_0 + name: vnf__0 to tg__0 link 2 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__0 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml b/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml index dc19136cd..11eed52fc 100644 --- a/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml @@ -20,30 +20,30 @@ nsd:nsd-catalog: description: prox-tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_prox_tpl-2.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/prox_vnf-2.yaml vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml b/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml index 17fe403b2..eda239e3b 100644 --- a/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml @@ -20,50 +20,50 @@ nsd:nsd-catalog: description: prox-tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_prox_tpl-4.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/prox_vnf-4.yaml vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 - - id: public2 - name: vnf__1 to tg__1 link 3 + vnfd-id-ref: tg__0 + - id: downlink_1 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe2 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe2 - vnfd-id-ref: tg__1 - - id: public3 - name: vnf__1 to tg__1 link 4 + vnfd-id-ref: tg__0 + - id: downlink_2 + name: vnf__0 to tg__0 link 3 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe3 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe3 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/prox/sriov/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml b/samples/vnf_samples/nsut/prox/sriov/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml index b98ffc51c..15892b886 100644 --- a/samples/vnf_samples/nsut/prox/sriov/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml @@ -17,9 +17,9 @@ scenarios: topology: ../../acl-tg-topology-http.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick options: acl: diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml index bc7891e80..1238ed41c 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml index e3a105b0f..059a6502f 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml index 6d89feea0..b6aa48a0e 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml index 571f4f47b..baa4b5997 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml index c70846566..590150602 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 diff --git a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml index 026719799..517dd9024 100644 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml +++ b/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml @@ -14,9 +14,9 @@ scenarios: traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" topology: ../../acl-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick tc_options: rfc2544: allowed_drop_rate: 0.8 - 1 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 7ced79c7b..fe91f3d8e 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 @@ -18,22 +18,31 @@ schema: "yardstick:task:0.1" scenarios: - type: NSPerf - traffic_profile: ../../traffic_profiles/prox_binsearch.yaml + # + # In case where we know that all the packets generated by the generator + # will bw received. Then use prox_binsearch. + # + # In the case where some or all the packets generated by the generator may + # not be received. Please use prox_acl .. (This generates packets at + # a specific rate and does not change rate. + # + traffic_profile: ../../traffic_profiles/prox_acl.yaml topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_acl-2.cfg" prox_args: "-t": "" - prox_files: "configs/acl_rules-2.lua" + prox_files: + "configs/acl_rules-2.lua": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_acl-2.cfg" prox_args: @@ -43,10 +52,10 @@ scenarios: runner: type: Duration # we kill after duration, independent of test duration, so set this high - duration: 100 + duration: 500 context: type: Node name: yardstick nfvi_type: baremetal - file: prox-baremetal-2.yml + file: /etc/prox-baremetal-2.yml 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 e9def4cc7..e908dd93f 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 @@ -18,22 +18,31 @@ schema: "yardstick:task:0.1" scenarios: - type: NSPerf - traffic_profile: ../../traffic_profiles/prox_binsearch.yaml + # + # In case where we know that all the packets generated by the generator + # will bw received. Then use prox_binsearch. + # + # In the case where some or all the packets generated by the generator may + # not be received. Please use prox_acl .. (This generates packets at + # a specific rate and does not change rate. + # + traffic_profile: ../../traffic_profiles/prox_acl.yaml topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_acl-4.cfg" prox_args: "-t": "" - prox_files: "configs/acl_rules-2.lua" + prox_files: + "configs/acl_rules-2.lua": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_acl-4.cfg" prox_args: @@ -43,10 +52,10 @@ scenarios: runner: type: Duration # we kill after duration, independent of test duration, so set this high - duration: 100 + duration: 300 context: type: Node name: yardstick nfvi_type: baremetal - file: prox-baremetal-4.yml + file: /etc/prox-baremetal-4.yml diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml index 0173fdc3e..4cc383636 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_binsearch.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/handle_none-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/gen_all-2.cfg" prox_args: 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 new file mode 100644 index 000000000..7b28a923b --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_buffering-1.yaml @@ -0,0 +1,51 @@ +# 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-1.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_buffering-1.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_buffering-1.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/prox-baremetal-1.yml 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 d4672e839..49a079ab8 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd-2.cfg" prox_args: 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 e6bcac40b..a0aec0160 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd-4.cfg" prox_args: 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 new file mode 100644 index 000000000..0626c070f --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-2.yaml @@ -0,0 +1,51 @@ +# 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: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_l2fwd_multiflow-2.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l2fwd_multiflow-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/prox-baremetal-2.yml 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 new file mode 100644 index 000000000..c429a4432 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd_multiflow-4.yaml @@ -0,0 +1,51 @@ +# 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-4.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_l2fwd_multiflow-4.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l2fwd_multiflow-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/prox-baremetal-4.yml 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 9ebfceb73..101fb9dd3 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd_pktTouch-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd_pktTouch-2.cfg" prox_args: 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 e8ba5ef9a..5bc22874c 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd_pktTouch-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd_pktTouch-4.cfg" prox_args: 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 new file mode 100644 index 000000000..b3ed8bb58 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml @@ -0,0 +1,53 @@ +# 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: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_l3fwd-2.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l3fwd-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 100 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/prox-baremetal-2.yml 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 new file mode 100644 index 000000000..9d50566e7 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml @@ -0,0 +1,53 @@ +# 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-4.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_l3fwd-4.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l3fwd-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 100 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/prox-baremetal-4.yml 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 new file mode 100644 index 000000000..9852fd8e0 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_lb-4.yaml @@ -0,0 +1,58 @@ +# 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 + + # This is a special traffic profile for Load Balancer + # Because what is transmitted for 1 port is distributed to the other ports evenly + # Only 1/4 of the transmiited packets is expected back. So this tolerates a much + # packet loss. + traffic_profile: ../../traffic_profiles/prox_lb.yaml + topology: prox-tg-topology-4.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_lb-4.cfg" + prox_args: + "-t": "" + prox_files: + "configs/tuples.lua": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_lb-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 100 + +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/prox-baremetal-4.yml 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 59f279529..2994ee378 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_mpls_tag_untag-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_mpls_tag_untag-2.cfg" prox_args: 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 11db293b7..6ed8aed3a 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,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_mpls_tag_untag-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_mpls_tag_untag-4.cfg" prox_args: diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml index c21266cef..fc28b929a 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_ramp.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/handle_none-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/gen_all-2.cfg" prox_args: diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml index 67552ec88..9e0654edf 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/l3-swap-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v035/build/prox prox_config: "configs/l3-gen-2.cfg" prox_args: @@ -46,13 +46,13 @@ scenarios: context: name: yardstick - image: yardstick-image-prox-dpdk1702 + image: yardstick-samplevnfs user: ubuntu flavor: # name: yardstick-dpdk-flavor vcpus: 5 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 5 @@ -63,20 +63,17 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - external_network: "yardstick-public" - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-2.yaml index 5310a5c8a..52ebe8cf9 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-2.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-2.yaml @@ -18,23 +18,32 @@ schema: "yardstick:task:0.1" scenarios: - type: NSPerf - traffic_profile: ../../traffic_profiles/prox_binsearch.yaml + # + # In case where we know that all the packets generated by the generator + # will bw received. Then use prox_binsearch. + # + # In the case where some or all the packets generated by the generator may + # not be received. Please use prox_heat_acl .. (This generates packets at + # a specific rate and does not change rate. + # + traffic_profile: ../../traffic_profiles/prox_heat_acl.yaml topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: - prox_path: /root/dppd-PROX-v037/build/prox + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox prox_config: "configs/handle_acl-2.cfg" prox_args: "-t": "" - prox_files: "configs/acl_rules-2.lua" + prox_files: + "configs/acl_rules-2.lua" : "" - tg__1: - prox_path: /root/dppd-PROX-v037/build/prox + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox prox_config: "configs/gen_acl-2.cfg" prox_args: "-e": "" @@ -43,20 +52,19 @@ scenarios: runner: type: Duration # we kill after duration, independent of test duration, so set this high - duration: 100 + duration: 300 context: name: yardstick - image: yardstick-image-prox-dpdk1702 + image: yardstick-samplevnfs user: ubuntu flavor: - name: yardstick-dpdk-flavor - vcpus: 3 + vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 - hw:cpu_cores: 3 + hw:cpu_cores: 10 hw:cpu_threads: 1 # hw:mem_page_size: large placement_groups: @@ -64,27 +72,24 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - external_network: "yardstick-public" - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public - allowed_address_pairs: - - ip_address: - '0.0.0.0/0' - xe1: + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' + downlink_0: cidr: '10.0.3.0/24' - vld_id: private - allowed_address_pairs: - - ip_address: - '0.0.0.0/0' + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-4.yaml index 5ed96736c..5884b7975 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-4.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_acl-4.yaml @@ -18,22 +18,30 @@ schema: "yardstick:task:0.1" scenarios: - type: NSPerf - traffic_profile: ../../traffic_profiles/prox_binsearch.yaml + # + # In case where we know that all the packets generated by the generator + # will bw received. Then use prox_binsearch. + # + # In the case where some or all the packets generated by the generator may + # not be received. Please use prox_heat_acl .. (This generates packets at + # a specific rate and does not change rate. + # + traffic_profile: ../../traffic_profiles/prox_heat_acl.yaml topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_acl-4.cfg" prox_args: "-t": "" prox_files: "configs/acl_rules-2.lua" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_acl-4.cfg" prox_args: @@ -43,20 +51,19 @@ scenarios: runner: type: Duration # we kill after duration, independent of test duration, so set this high - duration: 100 + duration: 300 context: name: yardstick - image: yardstick-image-prox-dpdk1702 + image: yardstick-samplevnfs user: ubuntu flavor: - name: yardstick-dpdk-flavor - vcpus: 5 + vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 - hw:cpu_cores: 5 + hw:cpu_cores: 10 hw:cpu_threads: 1 # hw:mem_page_size: large placement_groups: @@ -64,38 +71,33 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - external_network: "yardstick-public" - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe2: + uplink_1: cidr: '10.0.4.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe3: + downlink_1: cidr: '10.0.5.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_buffering-1.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_buffering-1.yaml new file mode 100644 index 000000000..9056987e0 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_buffering-1.yaml @@ -0,0 +1,78 @@ +# 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-1.yaml + + nodes: + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_buffering-1.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_buffering-1.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 200 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 5 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 5 + hw:cpu_threads: 1 + 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' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2-l3fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2-l3fwd-2.yaml new file mode 100644 index 000000000..af98984b6 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2-l3fwd-2.yaml @@ -0,0 +1,115 @@ +# 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-v037/build/prox + prox_config: "configs/handle_l2fwd-2.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l2fwd-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Search + # we kill after duration, independent of test duration, so set this high + interval: 5 + timeout: 300 +- + 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-v037.1/build/prox + prox_config: "configs/handle_l3fwd-2.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4-2.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l3fwd-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Search + # we kill after duration, independent of test duration, so set this high + interval: 5 + timeout: 300 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: yardstick-dpdk-flavor +# flavor: +# vcpus: 10 +# ram: 12288 +# disk: 6 +# extra_specs: +# hw:cpu_sockets: 1 +# hw:cpu_cores: 10 +# hw:cpu_threads: 1 + 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.1.1.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_0: + cidr: '10.1.1.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2.yaml index 270ff0411..2080935de 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-2.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd-2.cfg" prox_args: @@ -61,21 +61,24 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - xe0: + uplink_0: cidr: '10.1.1.0/24' gateway_ip: 'null' port_security_enabled: False - xe1: + enable_dhcp: 'false' + downlink_0: cidr: '10.1.1.0/24' gateway_ip: 'null' port_security_enabled: False + enable_dhcp: 'false' + diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4-l3fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4-l3fwd-4.yaml new file mode 100644 index 000000000..98e0efb46 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4-l3fwd-4.yaml @@ -0,0 +1,123 @@ +# 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-4.yaml + + nodes: + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/handle_l3fwd-4.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l3fwd-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Search + interval: 5 + timeout: 300 + +- + type: NSPerf + traffic_profile: ../../traffic_profiles/prox_binsearch.yaml + topology: prox-tg-topology-4.yaml + + nodes: + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/handle_l2fwd-4.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037/build/prox + prox_config: "configs/gen_l2fwd-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Search + interval: 5 + timeout: 300 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + 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' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_0: + cidr: '10.0.3.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + uplink_1: + cidr: '10.0.4.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_1: + cidr: '10.0.5.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4.yaml index 0650a0966..8eec754ff 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd-4.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd-4.cfg" prox_args: @@ -51,7 +51,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -61,37 +61,33 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe2: + uplink_1: cidr: '10.0.4.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe3: + downlink_1: cidr: '10.0.5.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-2.yaml new file mode 100644 index 000000000..f7f962fd4 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-2.yaml @@ -0,0 +1,86 @@ +# 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: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/handle_l2fwd_multiflow-2.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l2fwd_multiflow-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 8 + ram: 20480 + disk: 10 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 8 + hw:cpu_threads: 1 + placement_groups: + pgrp1: + policy: "availability" + + servers: + vnf: + floating_ip: true + placement: "pgrp1" + trafficgen_1: + floating_ip: true + placement: "pgrp1" + + networks: + mgmt: + cidr: '10.0.1.0/24' + external_network: "yardstick-public" + xe0: + cidr: '152.16.100.0/24' + vld_id: downlink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe1: + cidr: '152.16.40.0/24' + vld_id: uplink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-4.yaml new file mode 100644 index 000000000..798b10317 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_multiflow-4.yaml @@ -0,0 +1,98 @@ +# 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-4.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/handle_l2fwd_multiflow-4.cfg" + prox_args: + "-t": "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l2fwd_multiflow-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 12 + ram: 20480 + disk: 10 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 12 + hw:cpu_threads: 1 + placement_groups: + pgrp1: + policy: "availability" + + servers: + vnf: + floating_ip: true + placement: "pgrp1" + trafficgen_1: + floating_ip: true + placement: "pgrp1" + + networks: + mgmt: + cidr: '10.0.1.0/24' + external_network: "yardstick-public" + xe0: + cidr: '152.16.100.0/24' + vld_id: downlink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe1: + cidr: '152.16.40.0/24' + vld_id: uplink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe2: + cidr: '152.16.101.0/24' + vld_id: downlink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe3: + cidr: '152.16.41.0/24' + vld_id: uplink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-2.yaml index 20cf43d70..7585c83f4 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-2.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-2.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd_pktTouch-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd_pktTouch-2.cfg" prox_args: @@ -51,7 +51,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -61,25 +61,23 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-4.yaml index 570bdd0fb..ddc83eb32 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-4.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l2fwd_pktTouch-4.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_l2fwd_pktTouch-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_l2fwd_pktTouch-4.cfg" prox_args: @@ -51,7 +51,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -61,37 +61,33 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe2: + uplink_1: cidr: '10.0.4.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe3: + downlink_1: cidr: '10.0.5.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml new file mode 100644 index 000000000..b7c9f9c6b --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml @@ -0,0 +1,86 @@ +# 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-v037.1/build/prox + prox_config: "configs/handle_l3fwd-2.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l3fwd-2.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 200 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + + 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' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_0: + cidr: '10.0.3.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0'
\ No newline at end of file diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml new file mode 100644 index 000000000..038338f73 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml @@ -0,0 +1,96 @@ +# 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-4.yaml + + nodes: + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/handle_l3fwd-4.cfg" + prox_args: + "-t": "" + prox_files: + "configs/ipv4.lua" : "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_l3fwd-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 200 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + + 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' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_0: + cidr: '10.0.3.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + uplink_1: + cidr: '10.0.4.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + downlink_1: + cidr: '10.0.5.0/24' + allowed_address_pairs: + - ip_address: + '0.0.0.0/0'
\ No newline at end of file diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_lb-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_lb-4.yaml new file mode 100644 index 000000000..856982f86 --- /dev/null +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_lb-4.yaml @@ -0,0 +1,101 @@ +# 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_lb.yaml + topology: prox-tg-topology-4.yaml + + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + + options: + vnf__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/handle_lb-4.cfg" + prox_args: + "-t": "" + prox_files: + "configs/tuples.lua": "" + + tg__0: + prox_path: /root/dppd-PROX-v037.1/build/prox + prox_config: "configs/gen_lb-4.cfg" + prox_args: + "-e": "" + "-t": "" + + runner: + type: Duration + # we kill after duration, independent of test duration, so set this high + duration: 300 + +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + flavor: + vcpus: 12 + ram: 40960 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 12 + hw:cpu_threads: 1 + + placement_groups: + pgrp1: + policy: "availability" + + servers: + vnf: + floating_ip: true + placement: "pgrp1" + trafficgen_1: + floating_ip: true + placement: "pgrp1" + + networks: + mgmt: + cidr: '10.1.1.0/24' + xe0: + cidr: '10.2.1.0/24' + vld_id: downlink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe1: + cidr: '10.2.1.0/24' + vld_id: uplink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe2: + cidr: '10.2.1.0/24' + vld_id: downlink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + xe3: + cidr: '10.2.1.0/24' + vld_id: uplink + allowed_address_pairs: + - ip_address: + '0.0.0.0/0' + diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-2.yaml index 0f7119514..b77cd48dd 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-2.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-2.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-2.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_mpls_tag_untag-2.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_mpls_tag_untag-2.cfg" prox_args: @@ -51,7 +51,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -62,26 +62,23 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - external_network: "yardstick-public" - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-4.yaml index 4b3bd789a..0f50e1e03 100644 --- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-4.yaml +++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_mpls_tagging-4.yaml @@ -22,17 +22,17 @@ scenarios: topology: prox-tg-topology-4.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick options: - vnf__1: + vnf__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/handle_mpls_tag_untag-4.cfg" prox_args: "-t": "" - tg__1: + tg__0: prox_path: /root/dppd-PROX-v037/build/prox prox_config: "configs/gen_mpls_tag_untag-4.cfg" prox_args: @@ -51,7 +51,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -62,38 +62,33 @@ context: policy: "availability" servers: - vnf: + vnf_0: floating_ip: true placement: "pgrp1" - trafficgen_1: + tg_0: floating_ip: true placement: "pgrp1" networks: mgmt: cidr: '10.0.1.0/24' - external_network: "yardstick-public" - xe0: + uplink_0: cidr: '10.0.2.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe1: + downlink_0: cidr: '10.0.3.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe2: + uplink_1: cidr: '10.0.4.0/24' - vld_id: public allowed_address_pairs: - ip_address: '0.0.0.0/0' - xe3: + downlink_1: cidr: '10.0.5.0/24' - vld_id: private allowed_address_pairs: - ip_address: '0.0.0.0/0' diff --git a/samples/vnf_samples/nsut/udp_replay/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/udp_replay/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml index e80e1fb2d..78e92ce74 100644 --- a/samples/vnf_samples/nsut/udp_replay/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/udp_replay/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml @@ -19,19 +19,21 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput_cgnapt.yaml topology: udp_replay-vnf-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 + vnf__0: + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/udp_replay/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/udp_replay/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml new file mode 100644 index 000000000..90e04f973 --- /dev/null +++ b/samples/vnf_samples/nsut/udp_replay/tc_heat_rfc2544_ipv4_1flow_64B_trex.yaml @@ -0,0 +1,79 @@ +# Copyright (c) 2016 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/ipv4_throughput.yaml + topology: udp_replay-vnf-topology.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + packetsize: 64 + traffic_type: 4 + vnf__0: + hw_csum: false + tg__0: + hw_csum: false + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + runner: + type: Iteration + iterations: 10 + interval: 35 + traffic_options: + flow: ../../traffic_profiles/ipv4_1flow_Packets.yaml + imix: ../../traffic_profiles/imix_voice.yaml +context: + name: yardstick + image: yardstick-samplevnfs + user: ubuntu + nfvi_type: heat + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + placement_groups: + pgrp1: + policy: "availability" + + servers: + vnf: + floating_ip: true + placement: "pgrp1" + trafficgen_1: + floating_ip: true + placement: "pgrp1" + + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + vld_id: downlink + enable_dhcp: False + gateway_ip: null + port_security_enabled: False + xe1: + cidr: '10.0.3.0/24' + vld_id: uplink + enable_dhcp: False + gateway_ip: null + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/udp_replay/udp_replay-vnf-topology.yaml b/samples/vnf_samples/nsut/udp_replay/udp_replay-vnf-topology.yaml index b13de7e90..b76f90b49 100644 --- a/samples/vnf_samples/nsut/udp_replay/udp_replay-vnf-topology.yaml +++ b/samples/vnf_samples/nsut/udp_replay/udp_replay-vnf-topology.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg b/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg index f749865c5..3f7e33471 100644 --- a/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg +++ b/samples/vnf_samples/nsut/vfw/ixia_traffic.cfg @@ -1,5 +1,5 @@ { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -23,7 +23,7 @@ }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml index e0bd82a30..5b2dae20f 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml @@ -19,8 +19,8 @@ scenarios: traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml" topology: vfw_vnf_topology_ixload.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} @@ -28,9 +28,10 @@ scenarios: traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Duration duration: 2 diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml index 9808398f2..b6eb5c191 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" topology: vfw_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} nfvi_enable: True diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_scale_up.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_scale_up.yaml index b5c7df996..161a27678 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_scale_up.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_scale_up.yaml @@ -20,21 +20,22 @@ scenarios: traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" topology: vfw_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1000 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml + nfvi_enable: True vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} runner: type: Iteration diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml index 53d4d3d85..249511418 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml new file mode 100644 index 000000000..0904ace2c --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml @@ -0,0 +1,45 @@ +# 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/ipv4_throughput-4.yaml + topology: vfw-tg-topology-4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + flow: + src_ip: [{'tg__0': 'xe0'}, {'tg__0': 'xe2'}] + dst_ip: [{'tg__0': 'xe1'}, {'tg__0': 'xe3'}] + count: 1 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 2, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 +context: + type: Node + name: yardstick + nfvi_type: baremetal diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml index 562575b3c..e58130ab6 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_corelated_traffic.yaml @@ -19,24 +19,25 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology-3node.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__2': 'xe0'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__1': 'xe0'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - corelated_traffic: true - vnf__1: + correlated_traffic: true + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml index db8622122..8b21c27f0 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml @@ -20,22 +20,23 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'HW', lb_count: 1, worker_config: '1C/1T', worker_threads: {{worker_thread}}} + nfvi_enable: True runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_ixia.yaml new file mode 100644 index 000000000..1e2c8e53f --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_ixia.yaml @@ -0,0 +1,49 @@ +# 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/ixia_ipv4_latency.yaml" + topology: vfw_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + flow: + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] + count: 1 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + latency: true + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True + runner: + type: Iteration + iterations: 28 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml index a1381454e..38ed9282a 100644 --- a/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_with_latency_ipv4_1rule_1flow_64B_trex.yaml @@ -19,23 +19,24 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 latency: true - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + nfvi_enable: True runner: type: Iteration iterations: 28 diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml index 06b19ebad..729027c0f 100644 --- a/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml topology: vfw_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick1 - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: @@ -50,7 +50,7 @@ contexts: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -68,14 +68,14 @@ contexts: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 + vld_id: downlink_0 gateway_ip: 'null' provider: true physical_network: phystenant1 port_security_enabled: False xe1: cidr: '10.0.3.0/24' - vld_id: private_1 + vld_id: uplink_0 gateway_ip: 'null' provider: true physical_network: phystenant2 diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml index 3e323d9c9..6fde741ec 100644 --- a/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology.yaml nodes: - tg__1: trafficgen_1.baremetal - vnf__1: vnf.yardstick + tg__0: trafficgen_1.baremetal + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: @@ -49,7 +49,7 @@ contexts: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -67,14 +67,12 @@ contexts: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' provider: true physical_network: phystenant1 port_security_enabled: False xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' provider: true physical_network: phystenant2 diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml index 82e89a2a4..ad3b8b524 100644 --- a/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml +++ b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -19,20 +19,20 @@ scenarios: traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml topology: vfw-tg-topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: + vnf__0: rules: acl_1rule.yaml vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} runner: @@ -46,7 +46,7 @@ context: flavor: vcpus: 10 ram: 20480 - disk: 4 + disk: 6 extra_specs: hw:cpu_sockets: 1 hw:cpu_cores: 10 @@ -67,7 +67,6 @@ context: cidr: '10.0.1.0/24' xe0: cidr: '10.0.2.0/24' - vld_id: public_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: @@ -75,7 +74,6 @@ context: '0.0.0.0/0' xe1: cidr: '10.0.3.0/24' - vld_id: private_1 gateway_ip: 'null' # port_security_enabled: False allowed_address_pairs: diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml new file mode 100644 index 000000000..972a6ab37 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_4port.yaml @@ -0,0 +1,89 @@ +# 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/ipv4_throughput-4.yaml + topology: vfw-tg-topology-4port.yaml + nodes: + tg__0: tg_0.yardstick + vnf__0: vnf_0.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + flow: + src_ip: [{'tg__0': 'xe0'}, {'tg__0': 'xe2'}] + dst_ip: [{'tg__0': 'xe1'}, {'tg__0': 'xe3'}] + count: 1 + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 2, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 +context: + # put node context first, so we don't HEAT deploy if node has errors + name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + # (2 cores / port * 4 ports) + 1 master == 10 cores + hw:cpu_cores: 12 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + tg_0: + floating_ip: true + placement: "pgrp1" + vnf_0: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + private_0: + cidr: '10.1.0.0/24' + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' + public_0: + cidr: '10.1.1.0/24' + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' + private_1: + cidr: '10.2.0.0/24' + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' + public_1: + cidr: '10.2.1.0/24' + gateway_ip: 'null' + port_security_enabled: False + enable_dhcp: 'false' + diff --git a/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml index e1496efad..c1b439a03 100644 --- a/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml +++ b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node.yaml @@ -20,34 +20,43 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vfw_vnf.yaml #VNF type - member-vnf-index: '3' - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 - - - id: public_1 - name: vnf__1 to tg__2 link 2 + vnfd-id-ref: vnf__0 + - id: uplink_1 + name: tg__0 to vnf__0 link 2 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + - id: downlink_0 + name: vnf__0 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '3' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 diff --git a/samples/vnf_samples/nsut/vfw/vfw-tg-topology-4port.yaml b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-4port.yaml new file mode 100644 index 000000000..93e5bf7a1 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/vfw-tg-topology-4port.yaml @@ -0,0 +1,70 @@ +# 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. + +nsd:nsd-catalog: + nsd: + - id: 3tg-topology + name: 3tg-topology + short-name: 3tg-topology + description: 3tg-topology + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/vfw_vnf.yaml #VNF type + + vld: + - id: uplink_0 + name: tg__0 to vnf__0 link 1 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__0 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: vnf__0 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 + + - id: uplink_1 + name: tg__0 to vnf__0 link 3 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe2 + vnfd-id-ref: tg__0 + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe2 + vnfd-id-ref: vnf__0 + - id: downlink_1 + name: vnf__0 to tg__0 link 4 + type: ELAN + vnfd-connection-point-ref: + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe3 + vnfd-id-ref: vnf__0 + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe3 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml b/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml index b224ec14d..2a76df5c5 100644 --- a/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml +++ b/samples/vnf_samples/nsut/vfw/vfw-tg-topology.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: 3tg-topology constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #VNF type - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vfw_vnf.yaml #VNF type vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml index 3585ba6d9..6c722d63b 100644 --- a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml +++ b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixia.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with vFW VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vfw_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 diff --git a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml index 9e7062321..f14de0a74 100644 --- a/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml +++ b/samples/vnf_samples/nsut/vfw/vfw_vnf_topology_ixload.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with HTTP and vFW VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_ixload.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vfw_vnf.yaml vld: - - id: private_1 - name: tg__1 to vnf__1 link 1 + - id: uplink_0 + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 # HTTP Client + vnfd-id-ref: tg__0 # HTTP Client - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 # VNF + vnfd-id-ref: vnf__0 # VNF - - id: public_1 - name: vnf__1 to tg__1 link 2 + - id: downlink_0 + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 # HTTP Server + vnfd-id-ref: vnf__0 # HTTP Server - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 # VFW VNF + vnfd-id-ref: tg__0 # VFW VNF diff --git a/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg b/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg index cdeee6e35..a0cf372cf 100644 --- a/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg +++ b/samples/vnf_samples/nsut/vpe/ixia_traffic.cfg @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -36,7 +36,7 @@ }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml index 16996cb5c..1914f1a09 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_http_ipv4_ixload.yaml @@ -19,19 +19,20 @@ scenarios: traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml" topology: vpe_vnf_topology_ixload.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 - vnf__1: - cfg: vpe_config + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Duration duration: 4 diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml index 02346d238..42c0de85a 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_1518B.yaml @@ -19,21 +19,22 @@ scenarios: traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml" topology: vpe_vnf_topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {1518B: 100} public: {1518B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: - cfg: vpe_config + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml index a50ba380f..ffb2b41ac 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B.yaml @@ -19,21 +19,22 @@ scenarios: traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml" topology: vpe_vnf_topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: - cfg: vpe_config + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml index e0a749301..0d732a8de 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_ixia.yaml @@ -19,21 +19,22 @@ scenarios: traffic_profile: "../../traffic_profiles/ixia_ipv4_latency_vpe.yaml" topology: vpe_vnf_topology_ixia.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: - cfg: vpe_config + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml index 57c512888..b04f6aa97 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_64B_trex_corelated_traffic.yaml @@ -19,23 +19,24 @@ scenarios: traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml" topology: vpe_vnf_topology-3node.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick - tg__2: trafficgen_2.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + tg__1: trafficgen_2.yardstick options: framesize: private: {64B: 100} public: {64B: 100} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__2': 'xe0'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__1': 'xe0'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - corelated_traffic: true - vnf__1: - cfg: vpe_config + correlated_traffic: true + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml index 6b78574eb..8bdf39e38 100644 --- a/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml +++ b/samples/vnf_samples/nsut/vpe/tc_baremetal_rfc2544_ipv4_1flow_IMIX.yaml @@ -19,22 +19,23 @@ scenarios: traffic_profile: "../../traffic_profiles/ipv4_throughput_vpe.yaml" topology: vpe_vnf_topology.yaml nodes: - tg__1: trafficgen_1.yardstick - vnf__1: vnf.yardstick + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick options: framesize: private: {64B: 5, 128B: 11, 256B: 16, 373B: 10, 570B: 35, 1400B: 10, 1500B: 13} public: {64B: 5, 128B: 3, 256B: 4, 373B: 6, 570B: 8, 1400B: 36, 1500B: 38} flow: - src_ip: [{'tg__1': 'xe0'}] - dst_ip: [{'tg__1': 'xe1'}] + src_ip: [{'tg__0': 'xe0'}] + dst_ip: [{'tg__0': 'xe1'}] count: 1 traffic_type: 4 rfc2544: allowed_drop_rate: 0.0001 - 0.0001 - vnf__1: - cfg: vpe_config + vnf__0: + nfvi_enable: True + vnf_config: vpe_config runner: type: Iteration iterations: 10 diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml index c56a7e173..8a1d335de 100644 --- a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml +++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology-3node.yaml @@ -20,34 +20,34 @@ nsd:nsd-catalog: description: scenario with VPE,L3fwd and VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #tg_vpe_upstream.yaml #VPE VNF - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vpe_vnf.yaml #tg_l3fwd.yaml #tg_trex_tpl.yaml #TREX - member-vnf-index: '3' - vnfd-id-ref: tg__2 + vnfd-id-ref: tg__1 VNF model: ../../vnf_descriptors/udp_replay_vnf.yaml #tg_vpe_upstream.yaml #VPE VNF vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 #TREX + vnfd-id-ref: tg__0 #TREX - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 #VNF + vnfd-id-ref: vnf__0 #VNF - - id: public - name: vnf__1 to tg__2 link 2 + - id: downlink + name: vnf__0 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 #L3fwd + vnfd-id-ref: vnf__0 #L3fwd - member-vnf-index-ref: '3' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__2 #VPE VNF + vnfd-id-ref: tg__1 #VPE VNF diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology.yaml index 0de4b6e79..5ad45028a 100644 --- a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology.yaml +++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with VPE,L3fwd and VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_rfc2544_tpl.yaml #tg_vpe_upstream.yaml #VPE VNF - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vpe_vnf.yaml #tg_l3fwd.yaml #tg_trex_tpl.yaml #TREX vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 #TREX + vnfd-id-ref: tg__0 #TREX - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 #VNF + vnfd-id-ref: vnf__0 #VNF - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 #L3fwd + vnfd-id-ref: vnf__0 #L3fwd - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 #VPE VNF + vnfd-id-ref: tg__0 #VPE VNF diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml index 610805d3b..315a30845 100644 --- a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml +++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixia.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with VPE,L3fwd and VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vpe_vnf.yaml vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 #TREX + vnfd-id-ref: tg__0 #TREX - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 #VNF + vnfd-id-ref: vnf__0 #VNF - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 #L3fwd + vnfd-id-ref: vnf__0 #L3fwd - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 #VPE VNF + vnfd-id-ref: tg__0 #VPE VNF diff --git a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml index 5505a832b..aa1dc0d4f 100644 --- a/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml +++ b/samples/vnf_samples/nsut/vpe/vpe_vnf_topology_ixload.yaml @@ -20,31 +20,31 @@ nsd:nsd-catalog: description: scenario with VPE,L3fwd and VNF constituent-vnfd: - member-vnf-index: '1' - vnfd-id-ref: tg__1 + vnfd-id-ref: tg__0 VNF model: ../../vnf_descriptors/tg_ixload.yaml - member-vnf-index: '2' - vnfd-id-ref: vnf__1 + vnfd-id-ref: vnf__0 VNF model: ../../vnf_descriptors/vpe_vnf.yaml vld: - - id: private - name: tg__1 to vnf__1 link 1 + - id: uplink + name: tg__0 to vnf__0 link 1 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe0 - vnfd-id-ref: tg__1 #TREX + vnfd-id-ref: tg__0 #TREX - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe0 - vnfd-id-ref: vnf__1 #VNF + vnfd-id-ref: vnf__0 #VNF - - id: public - name: vnf__1 to tg__1 link 2 + - id: downlink + name: vnf__0 to tg__0 link 2 type: ELAN vnfd-connection-point-ref: - member-vnf-index-ref: '2' vnfd-connection-point-ref: xe1 - vnfd-id-ref: vnf__1 #L3fwd + vnfd-id-ref: vnf__0 #L3fwd - member-vnf-index-ref: '1' vnfd-connection-point-ref: xe1 - vnfd-id-ref: tg__1 #VPE VNF + vnfd-id-ref: tg__0 #VPE VNF diff --git a/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows_3node_latency.ixncfg b/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows_3node_latency.ixncfg Binary files differnew file mode 100644 index 000000000..fdf47dad8 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/cgnapt/cgnat_ipv4_profile_1flows_3node_latency.ixncfg diff --git a/samples/vnf_samples/traffic_profiles/example.yaml b/samples/vnf_samples/traffic_profiles/example.yaml index fc2501526..443fb88cf 100644 --- a/samples/vnf_samples/traffic_profiles/example.yaml +++ b/samples/vnf_samples/traffic_profiles/example.yaml @@ -150,8 +150,8 @@ public: 570B: {{get(imix_570B, 12) }} 1400B: {{get(imix_1400B, 12) }} 1518b: {{get(imix_1500B, 12) }} - srcmac: {{get(private.ipv4_1.dst_mac}} # xe0.local_mac - dstmac: {{get)private.ipv4_1.src_mac}} # xe0.dst_mac + srcmac: {{get(uplink.ipv4_1.dst_mac}} # xe0.local_mac + dstmac: {{get)uplink.ipv4_1.src_mac}} # xe0.dst_mac QinQ: S-VLAN: id: {{ get(flow.s_vlan_range, "0") }} @@ -166,33 +166,33 @@ public: outer_l3v4: proto: {{ get(flow.outer_proto, "udp") }}, - srcip4: {{ get(private.ipv4_1.outer_l3v4.dstip4) }} - dstip4: {{ get(private.ipv4_1.outer_l3v4.srcip4) }} + srcip4: {{ get(uplink.ipv4_1.outer_l3v4.dstip4) }} + dstip4: {{ get(uplink.ipv4_1.outer_l3v4.srcip4) }} ttl: 32 dscp: {{ get(flow.tos, 0) }} outer_l4: - srcport: {{ get(private.ipv4_1.outer_l4.dstport) }} - dstport: {{ get(private.ipv4_1.outer_l4.srcport) }} + srcport: {{ get(uplink.ipv4_1.outer_l4.dstport) }} + dstport: {{ get(uplink.ipv4_1.outer_l4.srcport) }} vni: {{ get(flow.vxlan_vni, "2345") }} #optional inner_l2: #optional - srcmac: {{ get(private.ipv4_1.outer_l4.inner_l2.dstmac) }} - dstmac: {{ get(private.ipv4_1.outer_l4.inner_l2.srcmac) }} + srcmac: {{ get(uplink.ipv4_1.outer_l4.inner_l2.dstmac) }} + dstmac: {{ get(uplink.ipv4_1.outer_l4.inner_l2.srcmac) }} inner_l3v4: #optional proto: {{ get(flow.inner_proto, "udp") }}, - srcip4: {{ get(private.ipv4_1.inner_l3v4.dstip4) }} - dstip4: {{ get(private.ipv4_1.inner_l3v4.srcip4) }} + srcip4: {{ get(uplink.ipv4_1.inner_l3v4.dstip4) }} + dstip4: {{ get(uplink.ipv4_1.inner_l3v4.srcip4) }} ttl: 32 dscp: {{ get(flow.inner_tos, 0) }} inner_l3v6: proto: {{ get(flow.inner_proto, "udp") }}, - srcip6: {{ get(private.ipv4_1.inner_l3v6.dstip6) }} - dstip6: {{ get(private.ipv4_1.inner_l3v6.srcip6) }} + srcip6: {{ get(uplink.ipv4_1.inner_l3v6.dstip6) }} + dstip6: {{ get(uplink.ipv4_1.inner_l3v6.srcip6) }} ttl: 32 tc: {{ get(flow.inner_tos, 0) }} inner_l4: - srcport: {{ get(private.ipv4_1.inner_l4.dstport) }} - dstport: {{ get(private.ipv4_1.inner_l4.srcport) }} + srcport: {{ get(uplink.ipv4_1.inner_l4.dstport) }} + dstport: {{ get(uplink.ipv4_1.inner_l4.srcport) }} diff --git a/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml b/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml index a7394abf1..5da20ffcc 100644 --- a/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml +++ b/samples/vnf_samples/traffic_profiles/http_tests/HTTP_1b-requests_65000_concurrency.yaml @@ -6,7 +6,7 @@ traffic_profile: traffic_type: TrafficProfileGenericHTTP #http client specific values -private_1: +uplink_0: http_no_requests: "1000" # number of http iterations http_concurency: "65000" # number of threads to be run http_locator: "/1B.bin" # http locator to be read @@ -17,7 +17,7 @@ private_1: attacker_tests: "False" # True : If attacker Test, False : Otherwise #http server side -public_1: +downlink_0: http_locator_image_size: "1B" # image size requested by http client http_bind_address: "152.40.40.20" # where address is bound http_bind_port: "9004" # when port is bound diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml index 98624b108..7d51122f4 100644 --- a/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml +++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput.yaml @@ -45,53 +45,53 @@ traffic_profile: # that specifies a range (e.g. ipv4 address, port) -private_1: +uplink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.64B', '0') }}" - 128B: "{{ get(imix, 'imix.private.128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.373B', '0') }}" - 512B: "{{ get(imix, 'imix.private.512B', '0') }}" - 570B: "{{get(imix, 'imix.private.570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.private.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.private.1518B', '0') }}" + 64B: "{{get(imix, 'imix.uplink.64B', '0') }}" + 128B: "{{get(imix, 'imix.uplink.128B', '0') }}" + 256B: "{{get(imix, 'imix.uplink.256B', '0') }}" + 373B: "{{get(imix, 'imix.uplink.373B', '0') }}" + 512B: "{{get(imix, 'imix.uplink.512B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.uplink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.1.255.255') }}" - dstip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.90.255.255') }}" + srcip4: "{{get(flow, 'flow.src_ip_0', '10.0.2.1-10.0.2.255') }}" + dstip4: "{{get(flow, 'flow.dst_ip_0', '10.0.3.1-10.0.3.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '1234-4321') }}" - dstport: "{{get(flow, 'flow.dst_port0', '2001-4001') }}" + srcport: "{{get(flow, 'flow.src_port_0', '1234-4321') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '2001-4001') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_1: +downlink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.public.64B', '0') }}" - 128B: "{{ get(imix, 'imix.public.128B', '0') }}" - 256B: "{{ get(imix, 'imix.public.256B', '0') }}" - 373b: "{{ get(imix, 'imix.public.373B', '0') }}" - 512B: "{{ get(imix, 'imix.public.512B', '0') }}" - 570B: "{{get(imix, 'imix.public.570B', '0') }}" - 1400B: "{{get(imix, 'imix.public.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.public.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.public.1518B', '0') }}" + 64B: "{{ get(imix, 'imix.downlink.64B', '0') }}" + 128B: "{{ get(imix, 'imix.downlink.128B', '0') }}" + 256B: "{{ get(imix, 'imix.downlink.256B', '0') }}" + 373b: "{{ get(imix, 'imix.downlink.373B', '0') }}" + 512B: "{{ get(imix, 'imix.downlink.512B', '0') }}" + 570B: "{{get(imix, 'imix.downlink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.downlink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.downlink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.downlink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.90.255.255') }}" - dstip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.1.255.255') }}" + srcip4: "{{get(flow, 'flow.dst_ip_0', '10.0.3.1-10.0.3.255') }}" + dstip4: "{{get(flow, 'flow.src_ip_0', '10.0.2.1-10.0.2.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.dst_port0', '1234-4321') }}" - dstport: "{{get(flow, 'flow.src_port0', '2001-4001') }}" + srcport: "{{get(flow, 'flow.dst_port_0', '1234-4321') }}" + dstport: "{{get(flow, 'flow.src_port_0', '2001-4001') }}" count: "{{get(flow, 'flow.count', '1') }}" diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml index 0758cf3a8..60a78a0c6 100644 --- a/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml +++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt.yaml @@ -45,53 +45,53 @@ traffic_profile: # that specifies a range (e.g. ipv4 address, port) -private_1: +uplink_0: ipv4: outer_l2: framesize: - 64B: "{{get(imix, 'imix.private.64B', '0') }}" - 128B: "{{get(imix, 'imix.private.128B', '0') }}" - 256B: "{{get(imix, 'imix.private.256B', '0') }}" - 373B: "{{get(imix, 'imix.private.373B', '0') }}" - 512B: "{{get(imix, 'imix.private.512B', '0') }}" - 570B: "{{get(imix, 'imix.private.570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.private.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.private.1518B', '0') }}" + 64B: "{{get(imix, 'imix.uplink.64B', '0') }}" + 128B: "{{get(imix, 'imix.uplink.128B', '0') }}" + 256B: "{{get(imix, 'imix.uplink.256B', '0') }}" + 373B: "{{get(imix, 'imix.uplink.373B', '0') }}" + 512B: "{{get(imix, 'imix.uplink.512B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.uplink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.src_ip0', '10.0.2.1-10.0.2.255') }}" - dstip4: "{{get(flow, 'flow.dst_ip0', '10.0.3.1-10.0.3.255') }}" + srcip4: "{{get(flow, 'flow.src_ip_0', '10.0.2.1-10.0.2.255') }}" + dstip4: "{{get(flow, 'flow.dst_ip_0', '10.0.3.1-10.0.3.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '1234-4321') }}" - dstport: "{{get(flow, 'flow.dst_port0', '2001-4001') }}" + srcport: "{{get(flow, 'flow.src_port_0', '1234-4321') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '2001-4001') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_1: +downlink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.public.64B', '0') }}" - 128B: "{{ get(imix, 'imix.public.128B', '0') }}" - 256B: "{{ get(imix, 'imix.public.256B', '0') }}" - 373b: "{{ get(imix, 'imix.public.373B', '0') }}" - 512B: "{{ get(imix, 'imix.public.512B', '0') }}" - 570B: "{{get(imix, 'imix.public.570B', '0') }}" - 1400B: "{{get(imix, 'imix.public.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.public.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.public.1518B', '0') }}" + 64B: "{{ get(imix, 'imix.downlink.64B', '0') }}" + 128B: "{{ get(imix, 'imix.downlink.128B', '0') }}" + 256B: "{{ get(imix, 'imix.downlink.256B', '0') }}" + 373b: "{{ get(imix, 'imix.downlink.373B', '0') }}" + 512B: "{{ get(imix, 'imix.downlink.512B', '0') }}" + 570B: "{{get(imix, 'imix.downlink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.downlink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.downlink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.downlink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.dst_ip0', '10.0.3.1-10.0.3.255') }}" - dstip4: "{{get(flow, 'flow.public_ip0', '10.0.2.1-10.0.2.255') }}" + srcip4: "{{get(flow, 'flow.dst_ip_0', '10.0.3.1-10.0.3.255') }}" + dstip4: "{{get(flow, 'flow.public_ip_0', '10.0.2.1-10.0.2.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.dst_port0', '1234-4321') }}" - dstport: "{{get(flow, 'flow.src_port0', '2001-4001') }}" + srcport: "{{get(flow, 'flow.dst_port_0', '1234-4321') }}" + dstport: "{{get(flow, 'flow.src_port_0', '2001-4001') }}" count: "{{get(flow, 'flow.count', '1') }}" diff --git a/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml b/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml index 233457eba..f42db932c 100644 --- a/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml +++ b/samples/vnf_samples/traffic_profiles/ipv4_throughput_vpe.yaml @@ -45,19 +45,19 @@ traffic_profile: # that specifies a range (e.g. ipv4 address, port) -private_1: +uplink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.64B', '0') }}" - 128B: "{{ get(imix, 'imix.private.128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.373B', '0') }}" - 512B: "{{ get(imix, 'imix.private.512B', '0') }}" - 570B: "{{get(imix, 'imix.private.570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.private.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.private.1518B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.64B', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.373B', '0') }}" + 512B: "{{ get(imix, 'imix.uplink.512B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.uplink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.1518B', '0') }}" QinQ: S-VLAN: @@ -71,49 +71,53 @@ private_1: outer_l3v4: proto: "tcp" - srcip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}" - dstip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}" + srcip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" + dstip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" + count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '0') }}" - dstport: "{{get(flow, 'flow.dst_port0', '0') }}" -public_1: + srcport: "{{get(flow, 'flow.src_port_0', '0') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '0') }}" + count: "{{get(flow, 'flow.count', '1') }}" +downlink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" - srcip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}" - dstip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}" + srcip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" + dstip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: - srcport: "{{get(flow, 'flow.dst_port0', '0') }}" - dstport: "{{get(flow, 'flow.src_port0', '0') }}" -private_2: + srcport: "{{get(flow, 'flow.dst_port_0', '0') }}" + dstport: "{{get(flow, 'flow.src_port_0', '0') }}" + count: "{{get(flow, 'flow.count', '1') }}" +uplink_1: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.public.64B', '0') }}" - 128B: "{{ get(imix, 'imix.public.128B', '0') }}" - 256B: "{{ get(imix, 'imix.public.256B', '0') }}" - 373b: "{{ get(imix, 'imix.public.373B', '0') }}" - 512B: "{{ get(imix, 'imix.public.512B', '0') }}" - 570B: "{{get(imix, 'imix.public.570B', '0') }}" - 1400B: "{{get(imix, 'imix.public.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.public.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.public.1518B', '0') }}" + 64B: "{{ get(imix, 'imix.downlink.64B', '0') }}" + 128B: "{{ get(imix, 'imix.downlink.128B', '0') }}" + 256B: "{{ get(imix, 'imix.downlink.256B', '0') }}" + 373b: "{{ get(imix, 'imix.downlink.373B', '0') }}" + 512B: "{{ get(imix, 'imix.downlink.512B', '0') }}" + 570B: "{{get(imix, 'imix.downlink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.downlink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.downlink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.downlink.1518B', '0') }}" QinQ: S-VLAN: @@ -129,31 +133,35 @@ private_2: proto: "tcp" srcip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}" dstip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}" + count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.src_port1', '0') }}" dstport: "{{get(flow, 'flow.dst_port1', '0') }}" -public_2: + count: "{{get(flow, 'flow.count', '1') }}" +downlink_1: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" srcip4: "{{get(flow, 'flow.dst_ip1', '192.16.0.0-192.16.0.31') }}" dstip4: "{{get(flow, 'flow.src_ip1', '192.168.0.0-192.168.255.255') }}" + count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: srcport: "{{get(flow, 'flow.dst_port1', '0') }}" dstport: "{{get(flow, 'flow.src_port1', '0') }}" + count: "{{get(flow, 'flow.count', '1') }}" diff --git a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml index c53b4fad4..af74df2c9 100644 --- a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml +++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency.yaml @@ -31,69 +31,69 @@ traffic_profile: # that specifies a range (e.g. ipv4 address, port) -private_1: +uplink_0: ipv4: outer_l2: framesize: - 64B: "{{get(imix, 'imix.private.64B', '0') }}" - 128B: "{{get(imix, 'imix.private.128B', '0') }}" - 256B: "{{get(imix, 'imix.private.256B', '0') }}" - 373b: "{{get(imix, 'imix.private.373B', '0') }}" - 512B: "{{get(imix, 'imix.private.512B', '0') }}" - 570B: "{{get(imix, 'imix.private.570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.private.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.private.1518B', '0') }}" + 64B: "{{get(imix, 'imix.uplink.64B', '0') }}" + 128B: "{{get(imix, 'imix.uplink.128B', '0') }}" + 256B: "{{get(imix, 'imix.uplink.256B', '0') }}" + 373b: "{{get(imix, 'imix.uplink.373B', '0') }}" + 512B: "{{get(imix, 'imix.uplink.512B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.uplink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.src_ip0', '1.1.1.1-1.15.255.255') }}" - dstip4: "{{get(flow, 'flow.dst_ip0', '90.90.1.1-90.105.255.255') }}" + srcip4: "{{get(flow, 'flow.src_ip_0', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.dst_ip_0', '90.90.1.1-90.105.255.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '1234') }}" - dstport: "{{get(flow, 'flow.dst_port0', '2001') }}" + srcport: "{{get(flow, 'flow.src_port_0', '1234') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '2001') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_1: +downlink_0: ipv4: outer_l2: framesize: - 64B: "{{get(imix, 'imix.public.64B', '0') }}" - 128B: "{{get(imix, 'imix.public.128B', '0') }}" - 256B: "{{get(imix, 'imix.public.256B', '0') }}" - 373b: "{{get(imix, 'imix.public.373B', '0') }}" - 512B: "{{get(imix, 'imix.public.512B', '0') }}" - 570B: "{{get(imix, 'imix.public.570B', '0') }}" - 1400B: "{{get(imix, 'imix.public.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.public.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.public.1518B', '0') }}" + 64B: "{{get(imix, 'imix.downlink.64B', '0') }}" + 128B: "{{get(imix, 'imix.downlink.128B', '0') }}" + 256B: "{{get(imix, 'imix.downlink.256B', '0') }}" + 373b: "{{get(imix, 'imix.downlink.373B', '0') }}" + 512B: "{{get(imix, 'imix.downlink.512B', '0') }}" + 570B: "{{get(imix, 'imix.downlink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.downlink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.downlink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.downlink.1518B', '0') }}" outer_l3v4: proto: "udp" - srcip4: "{{get(flow, 'flow.dst_ip0', '1.1.1.1-1.15.255.255') }}" - dstip4: "{{get(flow, 'flow.src_ip0', '90.90.1.1-90.105.255.255') }}" + srcip4: "{{get(flow, 'flow.dst_ip_0', '1.1.1.1-1.15.255.255') }}" + dstip4: "{{get(flow, 'flow.src_ip_0', '90.90.1.1-90.105.255.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 0 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '1234') }}" - dstport: "{{get(flow, 'flow.dst_port0', '2001') }}" + srcport: "{{get(flow, 'flow.src_port_0', '1234') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '2001') }}" count: "{{get(flow, 'flow.count', '1') }}" -private_2: +uplink_1: ipv4: outer_l2: framesize: - 64B: "{{get(imix, 'imix.private.64B', '0') }}" - 128B: "{{get(imix, 'imix.private.128B', '0') }}" - 256B: "{{get(imix, 'imix.private.256B', '0') }}" - 373b: "{{get(imix, 'imix.private.373B', '0') }}" - 512B: "{{get(imix, 'imix.private.512B', '0') }}" - 570B: "{{get(imix, 'imix.private.570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.private.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.private.1518B', '0') }}" + 64B: "{{get(imix, 'imix.uplink.64B', '0') }}" + 128B: "{{get(imix, 'imix.uplink.128B', '0') }}" + 256B: "{{get(imix, 'imix.uplink.256B', '0') }}" + 373b: "{{get(imix, 'imix.uplink.373B', '0') }}" + 512B: "{{get(imix, 'imix.uplink.512B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.uplink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.1518B', '0') }}" outer_l3v4: proto: "udp" @@ -106,19 +106,19 @@ private_2: srcport: "{{get(flow, 'flow.src_port1', '1234') }}" dstport: "{{get(flow, 'flow.dst_port1', '2001') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_2: +downlink_1: ipv4: outer_l2: framesize: - 64B: "{{get(imix, 'imix.public.64B', '0') }}" - 128B: "{{get(imix, 'imix.public.128B', '0') }}" - 256B: "{{get(imix, 'imix.public.256B', '0') }}" - 373b: "{{get(imix, 'imix.public.373B', '0') }}" - 512B: "{{get(imix, 'imix.public.512B', '0') }}" - 570B: "{{get(imix, 'imix.public.570B', '0') }}" - 1400B: "{{get(imix, 'imix.public.1400B', '0') }}" - 1500B: "{{get(imix, 'imix.public.1500B', '0') }}" - 1518B: "{{get(imix, 'imix.public.1518B', '0') }}" + 64B: "{{get(imix, 'imix.downlink.64B', '0') }}" + 128B: "{{get(imix, 'imix.downlink.128B', '0') }}" + 256B: "{{get(imix, 'imix.downlink.256B', '0') }}" + 373b: "{{get(imix, 'imix.downlink.373B', '0') }}" + 512B: "{{get(imix, 'imix.downlink.512B', '0') }}" + 570B: "{{get(imix, 'imix.downlink.570B', '0') }}" + 1400B: "{{get(imix, 'imix.downlink.1400B', '0') }}" + 1500B: "{{get(imix, 'imix.downlink.1500B', '0') }}" + 1518B: "{{get(imix, 'imix.downlink.1518B', '0') }}" outer_l3v4: proto: "udp" diff --git a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml index 7468dbdb1..5cce5941e 100644 --- a/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml +++ b/samples/vnf_samples/traffic_profiles/ixia_ipv4_latency_vpe.yaml @@ -44,17 +44,17 @@ traffic_profile: frame_rate : 100 # pc of linerate # that specifies a range (e.g. ipv4 address, port) -private_1: +uplink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" QinQ: S-VLAN: @@ -68,51 +68,51 @@ private_1: outer_l3v4: proto: "tcp" - srcip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}" - dstip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}" + srcip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" + dstip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: - srcport: "{{get(flow, 'flow.src_port0', '0') }}" - dstport: "{{get(flow, 'flow.dst_port0', '0') }}" + srcport: "{{get(flow, 'flow.src_port_0', '0') }}" + dstport: "{{get(flow, 'flow.dst_port_0', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_1: +downlink_0: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" - srcip4: "{{get(flow, 'flow.dst_ip0', '192.16.0.0-192.16.0.31') }}" - dstip4: "{{get(flow, 'flow.src_ip0', '192.168.0.0-192.168.255.255') }}" + srcip4: "{{get(flow, 'flow.dst_ip_0', '192.16.0.0-192.16.0.31') }}" + dstip4: "{{get(flow, 'flow.src_ip_0', '192.168.0.0-192.168.255.255') }}" count: "{{get(flow, 'flow.count', '1') }}" ttl: 32 dscp: 32 outer_l4: - srcport: "{{get(flow, 'flow.dst_port0', '0') }}" - dstport: "{{get(flow, 'flow.src_port0', '0') }}" + srcport: "{{get(flow, 'flow.dst_port_0', '0') }}" + dstport: "{{get(flow, 'flow.src_port_0', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" -private_2: +uplink_1: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" QinQ: S-VLAN: @@ -135,17 +135,17 @@ private_2: srcport: "{{get(flow, 'flow.src_port1', '0') }}" dstport: "{{get(flow, 'flow.dst_port1', '0') }}" count: "{{get(flow, 'flow.count', '1') }}" -public_2: +downlink_1: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" diff --git a/samples/vnf_samples/traffic_profiles/prox_acl.yaml b/samples/vnf_samples/traffic_profiles/prox_acl.yaml index b306739bc..1d1752b80 100644 --- a/samples/vnf_samples/traffic_profiles/prox_acl.yaml +++ b/samples/vnf_samples/traffic_profiles/prox_acl.yaml @@ -15,14 +15,14 @@ schema: "nsb:traffic_profile:0.1" name: prox_acl -description: ACL max no-drop throughput over given packet sizes +description: ACL throughput over given packet sizes traffic_profile: traffic_type: ProxACLProfile tolerated_loss: 100.0 - test_precision: 1.0 + test_precision: 0.001 packet_sizes: [64] duration: 5 lower_bound: 0.0 upper_bound: 100.0 - + attempts: 20 diff --git a/samples/vnf_samples/traffic_profiles/prox_heat_acl.yaml b/samples/vnf_samples/traffic_profiles/prox_heat_acl.yaml new file mode 100644 index 000000000..0dc19ee49 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/prox_heat_acl.yaml @@ -0,0 +1,28 @@ +# 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: "nsb:traffic_profile:0.1" + +name: prox_heat_acl +description: ACL throughput over given packet sizes + +traffic_profile: + traffic_type: ProxACLProfile + tolerated_loss: 100.0 + test_precision: 0.001 + packet_sizes: [64] + duration: 5 + lower_bound: 0.0 + upper_bound: 0.5 + attempts: 20
\ No newline at end of file diff --git a/samples/vnf_samples/traffic_profiles/prox_lb.yaml b/samples/vnf_samples/traffic_profiles/prox_lb.yaml new file mode 100644 index 000000000..1461bc399 --- /dev/null +++ b/samples/vnf_samples/traffic_profiles/prox_lb.yaml @@ -0,0 +1,27 @@ +# 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: "nsb:traffic_profile:0.1" + +name: prox_lb +description: Load Balancer 1-to-4 port + +traffic_profile: + traffic_type: ProxBinSearchProfile + tolerated_loss: 80.0 + test_precision: 0.01 + packet_sizes: [64] + duration: 5 + lower_bound: 0.0 + upper_bound: 100.0 diff --git a/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml b/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml index b38e6b8ae..62188b84a 100644 --- a/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml +++ b/samples/vnf_samples/vnf_descriptors/acl_vnf.yaml @@ -32,11 +32,6 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: aclvnf-baremetal name: aclvnf-baremetal @@ -44,37 +39,6 @@ vnfd:vnfd-catalog: vm-flavor: vcpu-count: '4' memory-mb: '4096' - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 routing_table: {{ routing_table }} nd_route_tbl: {{ nd_route_tbl }} benchmark: diff --git a/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml b/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml index b42fb4d4e..da774cce5 100644 --- a/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml +++ b/samples/vnf_samples/vnf_descriptors/cgnapt_vnf.yaml @@ -34,42 +34,10 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: cgnaptvnf-baremetal name: cgnaptvnf-baremetal description: CGNAPT approximation using DPDK - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 routing_table: {{ routing_table }} nd_route_tbl: {{ nd_route_tbl }} benchmark: diff --git a/samples/vnf_samples/vnf_descriptors/prox_vnf-1.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf-1.yaml new file mode 100644 index 000000000..13c4e9db7 --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/prox_vnf-1.yaml @@ -0,0 +1,48 @@ +# 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. + +vnfd:vnfd-catalog: + vnfd: + - id: ProxApproxVnf + name: ProxVnf + short-name: ProxVnf + description: PROX approximation using DPDK + mgmt-interface: + vdu-id: prox-baremetal + {% if user is defined %} + user: '{{user}}' # Value filled by vnfdgen + {% endif %} + {% if password is defined %} + password: '{{password}}' # Value filled by vnfdgen + {% endif %} + {% if ip is defined %} + ip: '{{ip}}' # Value filled by vnfdgen + {% endif %} + {% if key_filename is defined %} + key_filename: '{{key_filename}}' # Value filled by vnfdgen + {% endif %} + vdu: + - id: proxvnf-baremetal + name: proxvnf-baremetal + description: PROX approximation using DPDK + vm-flavor: + vcpu-count: '4' + memory-mb: '4096' + routing_table: {{ routing_table }} + nd_route_tbl: {{ nd_route_tbl }} + benchmark: + kpi: + - packets_in + - packets_fwd + - packets_dropped diff --git a/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml index b02690e74..13c4e9db7 100644 --- a/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml +++ b/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml @@ -32,11 +32,6 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: proxvnf-baremetal name: proxvnf-baremetal @@ -44,37 +39,6 @@ vnfd:vnfd-catalog: vm-flavor: vcpu-count: '4' memory-mb: '4096' - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 routing_table: {{ routing_table }} nd_route_tbl: {{ nd_route_tbl }} benchmark: diff --git a/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml index 0f8aa55c2..13c4e9db7 100644 --- a/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml +++ b/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml @@ -32,11 +32,6 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: proxvnf-baremetal name: proxvnf-baremetal @@ -44,67 +39,6 @@ vnfd:vnfd-catalog: vm-flavor: vcpu-count: '4' memory-mb: '4096' - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 - - name: xe2 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe2.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe2.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe2.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe2.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe2.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe2.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe2.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe2.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe2.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe2 - - name: xe3 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe3.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe3.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe3.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe3.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe3.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe3.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe3.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe3.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe3.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe3 routing_table: {{ routing_table }} nd_route_tbl: {{ nd_route_tbl }} benchmark: diff --git a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml new file mode 100644 index 000000000..730143972 --- /dev/null +++ b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml @@ -0,0 +1,46 @@ +# 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. + +vnfd:vnfd-catalog: + vnfd: + - id: ProxTrafficGen # nsb class mapping + name: proxverifier + short-name: proxverifier + description: prox stateless traffic verifier + mgmt-interface: + vdu-id: proxgen-baremetal + {% if user is defined %} + user: '{{user}}' # Value filled by vnfdgen + {% endif %} + {% if password is defined %} + password: '{{password}}' # Value filled by vnfdgen + {% endif %} + {% if ip is defined %} + ip: '{{ip}}' # Value filled by vnfdgen + {% endif %} + {% if key_filename is defined %} + key_filename: '{{key_filename}}' # Value filled by vnfdgen + {% endif %} + vdu: + - id: proxgen-baremetal + name: proxgen-baremetal + description: prox stateless traffic verifier + benchmark: + kpi: + - rx_throughput_fps + - tx_throughput_fps + - tx_throughput_mbps + - rx_throughput_mbps + - in_packets + - out_packets diff --git a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-2.yaml b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-2.yaml index e90a8d684..20bd12ca2 100644 --- a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-2.yaml +++ b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-2.yaml @@ -32,41 +32,10 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: proxgen-baremetal name: proxgen-baremetal description: prox stateless traffic verifier - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 benchmark: kpi: diff --git a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml index afea337af..20bd12ca2 100644 --- a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml +++ b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml @@ -32,65 +32,10 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: proxgen-baremetal name: proxgen-baremetal description: prox stateless traffic verifier - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 - - name: xe2 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe2.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe2.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe2.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe2.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe2.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe2.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe2.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe2 - - name: xe3 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe3.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe3.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe3.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe3.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe3.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe3.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe3.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe3 benchmark: kpi: diff --git a/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml b/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml index dee3dd760..533ce2fdb 100644 --- a/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml +++ b/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl.yaml @@ -32,42 +32,10 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: trexgen-baremetal name: trexgen-baremetal description: TRex stateless traffic verifier - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 - benchmark: kpi: - rx_throughput_fps diff --git a/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl_4port.yaml b/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl_4port.yaml deleted file mode 100644 index 47da39099..000000000 --- a/samples/vnf_samples/vnf_descriptors/tg_rfc2544_tpl_4port.yaml +++ /dev/null @@ -1,103 +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. - -vnfd:vnfd-catalog: - vnfd: - - id: TrexTrafficGenRFC # nsb class mapping - name: trexverifier - short-name: trexverifier - description: TRex stateless traffic verifier - mgmt-interface: - vdu-id: trexgen-baremetal - {% if user is defined %} - user: '{{user}}' # Value filled by vnfdgen - {% endif %} - {% if password is defined %} - password: '{{password}}' # Value filled by vnfdgen - {% endif %} - {% if ip is defined %} - ip: '{{ip}}' # Value filled by vnfdgen - {% endif %} - {% if key_filename is defined %} - key_filename: '{{key_filename}}' # Value filled by vnfdgen - {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT - vdu: - - id: trexgen-baremetal - name: trexgen-baremetal - description: TRex stateless traffic verifier - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe0.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe1.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 - - name: xe2 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe2.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe2.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe2.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe2.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe2.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe2.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe2.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe2 - - name: xe3 - virtual-interface: - type: PCI-PASSTHROUGH - vpci: '{{ interfaces.xe3.vpci }}' # Value filled by vnfdgen - local_iface_name: '{{ interfaces.xe3.local_iface_name }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe3.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe3.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe3.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe3.local_mac }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe3.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe3 - - benchmark: - kpi: - - rx_throughput_fps - - tx_throughput_fps - - tx_throughput_mbps - - rx_throughput_mbps - - in_packets - - out_packets diff --git a/samples/vnf_samples/vnf_descriptors/udp_replay_vnf.yaml b/samples/vnf_samples/vnf_descriptors/udp_replay_vnf.yaml index 33c07a6f4..659807d88 100644 --- a/samples/vnf_samples/vnf_descriptors/udp_replay_vnf.yaml +++ b/samples/vnf_samples/vnf_descriptors/udp_replay_vnf.yaml @@ -35,42 +35,10 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: udp_replayvnf-baremetal name: udp_replayvnf-baremetal description: UdpReplayVnf approximation using DPDK - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 benchmark: kpi: - packets_in diff --git a/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml b/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml index 1c272e66d..035c7336e 100644 --- a/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml +++ b/samples/vnf_samples/vnf_descriptors/vfw_vnf.yaml @@ -32,11 +32,6 @@ vnfd:vnfd-catalog: {% if key_filename is defined %} key_filename: '{{key_filename}}' # Value filled by vnfdgen {% endif %} - connection-point: - - name: xe0 - type: VPORT - - name: xe1 - type: VPORT vdu: - id: aclvnf-baremetal name: aclvnf-baremetal @@ -44,37 +39,6 @@ vnfd:vnfd-catalog: vm-flavor: vcpu-count: '4' memory-mb: '4096' - external-interface: - - name: xe0 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe0.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe0.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe0.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe0.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe0.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe0.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe0.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe0.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe0.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe0 - - name: xe1 - virtual-interface: - type: PCI-PASSTHROUGH - # Substitution variables MUST be quoted. Otherwise Python can misinterpet them. - vpci: '{{ interfaces.xe1.vpci }}' # Value filled by vnfdgen - dpdk_port_num: '{{ interfaces.xe1.dpdk_port_num }}' # Value filled by vnfdgen - local_ip: '{{ interfaces.xe1.local_ip }}' # Value filled by vnfdgen - driver: '{{ interfaces.xe1.driver}}' # Value filled by vnfdgen - dst_ip: '{{ interfaces.xe1.dst_ip }}' # Value filled by vnfdgen - local_mac: '{{ interfaces.xe1.local_mac }}' # Value filled by vnfdgen - netmask: '{{ interfaces.xe1.netmask }}' # Value filled by vnfdgen - dst_mac: '{{ interfaces.xe1.dst_mac }}' # Value filled by vnfdgen - vld_id: '{{ interfaces.xe1.vld_id }}' # Value filled by vnfdgen - bandwidth: 10 Gbps - vnfd-connection-point-ref: xe1 routing_table: {{ routing_table }} nd_route_tbl: {{ nd_route_tbl }} benchmark: diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify index ca8a0b27a..f3e7a49e3 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -87,7 +87,9 @@ error_exit() exitcode=$rc fi - cleanup + if [[ "${DEPLOY_SCENARIO:0:2}" == 'os' ]];then + source "${YARDSTICK_REPO_DIR}/tests/ci/clean_images.sh" + fi echo "Exiting with RC=$exitcode" diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml index a35629f81..81b42dc4d 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc006.yaml @@ -14,6 +14,7 @@ description: > Measure volume storage IOPS, throughput and latency using fio with job file. {% set directory = directory or "/FIO_Test" %} +{% set volume_size = volume_size or 200 %} {% set provider = provider or none %} {% set physical_network = physical_network or 'physnet1' %} {% set segmentation_id = segmentation_id or none %} @@ -53,7 +54,7 @@ context: floating_ip: true volume: name: test-volume - size: 200 + size: {{volume_size}} volume_mountpoint: /dev/vdb networks: diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc011.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc011.yaml index eef1a7a62..b2077d59e 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc011.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc011.yaml @@ -13,6 +13,10 @@ description: > Yardstick TC011 config file; Measure packet delay variation (jitter) using iperf3. +{% set udp = udp or "udp" %} +{% set bandwidth = bandwidth or "20m" %} +{% set length = length or "8K" %} +{% set window = window or 29200 %} {% set provider = provider or none %} {% set physical_network = physical_network or 'physnet1' %} {% set segmentation_id = segmentation_id or none %} @@ -21,10 +25,10 @@ scenarios: - type: Iperf3 options: - udp: udp - bandwidth: 20m - length: 8K - window: 29200 + udp: {{udp}} + bandwidth: {{bandwidth}} + length: {{length}} + window: {{window}} host: zeus.demo target: hera.demo diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml index 15bbddaa6..046d51731 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc019.yaml @@ -34,10 +34,10 @@ scenarios: - monitor_type: "process" process_name: "nova-api" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml index fdaaa838a..dfe44ed12 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc045.yaml @@ -33,10 +33,10 @@ scenarios: - monitor_type: "process" process_name: "neutron-server" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml index fe16f388c..1d553268c 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc046.yaml @@ -33,10 +33,10 @@ scenarios: - monitor_type: "process" process_name: "keystone" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml index c888967da..33bc5cd5f 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc047.yaml @@ -33,10 +33,10 @@ scenarios: - monitor_type: "process" process_name: "glance-api" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml index 4ad19f3bd..a13afe3bf 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc048.yaml @@ -33,10 +33,10 @@ scenarios: - monitor_type: "process" process_name: "cinder-api" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc049.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc049.yaml index da17a59c1..394b98721 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc049.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc049.yaml @@ -33,10 +33,10 @@ scenarios: - monitor_type: "process" process_name: "swift-proxy" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: node1: node1.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml index 3ecbc308c..f987e2b45 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc053.yaml @@ -32,10 +32,10 @@ scenarios: key: "service-status" process_name: "haproxy" host: node1 - monitor_time: 20 + monitor_time: 30 monitor_number: 3 sla: - max_recover_time: 20 + max_recover_time: 30 - monitor_type: "openstack-cmd" diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc056.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc056.yaml index 7f1dc1010..40e8f9c13 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc056.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc056.yaml @@ -59,9 +59,9 @@ scenarios: - monitor_type: "process" process_name: "rabbitmq-server" host: {{attack_host}} - monitor_time: 20 + monitor_time: 30 sla: - max_recover_time: 20 + max_recover_time: 30 nodes: {{attack_host}}: {{attack_host}}.LF diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc058.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc058.yaml index e9feb97f5..dc0675bec 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc058.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc058.yaml @@ -36,9 +36,9 @@ scenarios: process_name: "neutron-l3-agent" host: {{attack_host}} key: "monitor-recovery" - monitor_time: 20 + monitor_time: 30 sla: - max_recover_time: 20 + max_recover_time: 30 - monitor_type: "general-monitor" diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc063.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc063.yaml index 48288ef62..254c214d2 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc063.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc063.yaml @@ -13,8 +13,8 @@ description: > Yardstick TC063 config file; Measure disk size, block size and disk utilization using fdisk and iostat. -{% set host = host or "node5.yardstick-TC063" %} {% set file = file or '/etc/yardstick/pod.yaml' %} +{% set node = node or "node5" %} scenarios: - @@ -22,7 +22,7 @@ scenarios: options: test_type: "disk_size" - host: {{host}} + host: {{node}}.yardstick-TC063 runner: type: Iteration diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml index b89f7674b..94256125f 100644 --- a/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc078.yaml @@ -20,7 +20,11 @@ scenarios: type: SpecCPU2006 options: - benchmark_subset: int + SPECint_benchmark: int^429 + runspec_iterations: 1 + runspec_tune: base + runspec_size: ref + runspec_rate: 1 host: node1.yardstick-TC078 diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc082.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc082.yaml new file mode 100644 index 000000000..4b67f0f20 --- /dev/null +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc082.yaml @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2017 kristian.hunt@gmail.com and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# Sample benchmark task config file +# use perf to perform Linux performance measurements +# this sample demonstrates measurements of various software perf events + +schema: "yardstick:task:0.1" +description: > + Yardstick TC082 config file; + Measure various software perf events by perf. + +{% set provider = provider or none %} +{% set physical_network = physical_network or 'physnet1' %} +{% set segmentation_id = segmentation_id or none %} + +scenarios: +- + type: Perf + options: + load: true + events: + - task-clock + - cpu-clock + - context-switches + - page-faults + - cpu-migrations + host: hades.demo + + runner: + type: Duration + duration: 30 + + sla: + metric: context-switches + smaller_than_expected: true + expected_value: 300 + action: monitor + +context: + name: demo + image: yardstick-image + flavor: yardstick-flavor + user: ubuntu + + servers: + hades: + floating_ip: true + networks: + test: + cidr: "10.0.1.0/24" + {% if provider == "vlan" %} + provider: {{provider}} + physical_network: {{physical_network}} + {% if segmentation_id %} + segmentation_id: {{segmentation_id}} + {% endif %} + {% endif %}
\ No newline at end of file diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc083.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc083.yaml new file mode 100755 index 000000000..6315fdc07 --- /dev/null +++ b/tests/opnfv/test_cases/opnfv_yardstick_tc083.yaml @@ -0,0 +1,90 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# Sample benchmark task config file +# measure network latency and throughput using netperf +# There are two sample scenarios: bulk test and request/response test +# In bulk test, UDP_STREAM and TCP_STREAM can be used +# send_msg_size and recv_msg_size are options of bulk test +# In req/rsp test, TCP_RR TCP_CRR UDP_RR can be used +# req_rsp_size is option of req/rsp test + +schema: "yardstick:task:0.1" + +description: > + Yardstick TC083 config file; + Measure network latency and throughput using netperf. + +{% set provider = provider or none %} +{% set physical_network = physical_network or 'physnet1' %} +{% set segmentation_id = segmentation_id or none %} + +scenarios: +- + type: Netperf + options: + testname: 'UDP_STREAM' + send_msg_size: 1024 + duration: 20 + + host: Chang'e.demo + target: Houyi.demo + + runner: + type: Iteration + iterations: 1 + interval: 1 + sla: + mean_latency: 100 + action: monitor +- + type: Netperf + options: + testname: 'TCP_RR' + req_rsp_size: '32,1024' + + host: Chang'e.demo + target: Houyi.demo + + runner: + type: Duration + duration: 20 + interval: 1 + sla: + mean_latency: 300 + action: monitor + +context: + name: demo + image: yardstick-image + flavor: yardstick-flavor + user: ubuntu + + placement_groups: + pgrp1: + policy: "availability" + + servers: + Chang'e: + floating_ip: true + placement: "pgrp1" + Houyi: + floating_ip: true + placement: "pgrp1" + + networks: + test: + cidr: '10.0.1.0/24' + {% if provider == "vlan" %} + provider: {{provider}} + physical_network: {{physical_network}} + {% if segmentation_id %} + segmentation_id: {{segmentation_id}} + {% endif %} + {% endif %} diff --git a/tests/opnfv/test_suites/opnfv_k8-ovn-lb-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-ovn-lb-noha_daily.yaml new file mode 100644 index 000000000..207030073 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_k8-ovn-lb-noha_daily.yaml @@ -0,0 +1,18 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# k8 ovn lb noha daily task suite + +schema: "yardstick:suite:0.1" + +name: "k8-ovn-lb-noha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc080.yaml diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml new file mode 100644 index 000000000..35bc0ebd8 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml @@ -0,0 +1,161 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-nosdn-bar-ha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-nosdn-bar-ha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc043.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node4.LF","target": "node5.LF"}' +- + file_name: opnfv_yardstick_tc019.yaml + constraint: + installer: compass,fuel + pod: huawei-pod2,ericsson-pod1 + task_args: + huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc045.yaml + constraint: + installer: compass,fuel + pod: huawei-pod2,ericsson-pod1 + task_args: + huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc046.yaml + constraint: + installer: fuel + task_args: + default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc047.yaml + constraint: + installer: compass,fuel + pod: huawei-pod2,ericsson-pod1 + task_args: + huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc048.yaml + constraint: + installer: compass,fuel + pod: huawei-pod2,ericsson-pod1 + task_args: + huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc049.yaml + constraint: + installer: fuel + task_args: + default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc050.yaml + constraint: + installer: fuel + task_args: + default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc051.yaml + constraint: + installer: compass,fuel + pod: huawei-pod2,ericsson-pod1 + task_args: + huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc052.yaml + constraint: + installer: fuel + task_args: + default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc053.yaml + constraint: + installer: fuel + task_args: + default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}' +- + file_name: opnfv_yardstick_tc055.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC055"}' +- + file_name: opnfv_yardstick_tc063.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC063"}' +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml +- + file_name: opnfv_yardstick_tc074.yaml + constraint: + installer: compass + pod: huawei-pod1, huawei-pod2 + task_args: + huawei-pod1: '{"public_network": "ext-net", + "StorPerf_ip": "192.168.10.6"}' + huawei-pod2: '{"public_network": "ext-net", + "StorPerf_ip": "192.168.11.2"}' +- + file_name: opnfv_yardstick_tc075.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node1.LF"}' +- + file_name: opnfv_yardstick_tc027.yaml + constraint: + installer: compass,fuel + pod: huawei-pod1,lf-pod2,ericsson-pod3,ericsson-pod4 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}' + lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}' + ericsson-pod3: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}' + ericsson-pod4: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}' + diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml new file mode 100644 index 000000000..26e92e704 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml @@ -0,0 +1,62 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-nosdn-bar-noha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-nosdn-bar-noha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc055.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC055"}' +- + file_name: opnfv_yardstick_tc063.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC063"}' +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml +- + file_name: opnfv_yardstick_tc075.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node1.LF"}' diff --git a/tests/opnfv/test_suites/opnfv_os-odl-fdio-dvr-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-fdio-dvr-ha_daily.yaml new file mode 100644 index 000000000..825fea7c1 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-odl-fdio-dvr-ha_daily.yaml @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-odl-fdio-dvr-ha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-odl-fdio-dvr-ha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml diff --git a/tests/opnfv/test_suites/opnfv_os-odl-fdio-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-fdio-noha_daily.yaml new file mode 100644 index 000000000..cc8df99b6 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-odl-fdio-noha_daily.yaml @@ -0,0 +1,38 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-odl-fdio-noha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-odl-fdio-noha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml diff --git a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml new file mode 100644 index 000000000..1ab16e5d1 --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-odl-nofeature-ha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-odl-nofeature-ha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml + constraint: + installer: compass +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc055.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC055"}' +- + file_name: opnfv_yardstick_tc063.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC063"}' +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml +- + file_name: opnfv_yardstick_tc075.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node1.LF"}' diff --git a/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml new file mode 100644 index 000000000..b5e53b94c --- /dev/null +++ b/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml @@ -0,0 +1,64 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +--- +# os-odl-ovs-ha daily task suite + +schema: "yardstick:suite:0.1" + +name: "os-odl-ovs-ha" +test_cases_dir: "tests/opnfv/test_cases/" +test_cases: +- + file_name: opnfv_yardstick_tc002.yaml +- + file_name: opnfv_yardstick_tc005.yaml +- + file_name: opnfv_yardstick_tc010.yaml +- + file_name: opnfv_yardstick_tc011.yaml + constraint: + installer: compass +- + file_name: opnfv_yardstick_tc012.yaml +- + file_name: opnfv_yardstick_tc014.yaml +- + file_name: opnfv_yardstick_tc037.yaml +- + file_name: opnfv_yardstick_tc055.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC055"}' +- + file_name: opnfv_yardstick_tc063.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node5.yardstick-TC063"}' +- + file_name: opnfv_yardstick_tc069.yaml +- + file_name: opnfv_yardstick_tc070.yaml +- + file_name: opnfv_yardstick_tc071.yaml +- + file_name: opnfv_yardstick_tc072.yaml +- + file_name: opnfv_yardstick_tc075.yaml + constraint: + installer: compass + pod: huawei-pod1 + task_args: + huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml", + "host": "node1.LF"}' diff --git a/tests/unit/apiserver/__init__.py b/tests/unit/apiserver/__init__.py index 1c9d5a672..5e1ed2ea1 100644 --- a/tests/unit/apiserver/__init__.py +++ b/tests/unit/apiserver/__init__.py @@ -1,5 +1,6 @@ from __future__ import absolute_import +import mock import os import socket import unittest @@ -16,6 +17,10 @@ class APITestCase(unittest.TestCase): self.db_fd, self.db_path = tempfile.mkstemp() consts.SQLITE = 'sqlite:///{}'.format(self.db_path) + # server calls gethostbyname which takes 4 seconds, and we should mock it anyway + self.socket_mock = mock.patch.dict("sys.modules", {"socket": mock.MagicMock( + **{"gethostbyname.return_value": "127.0.0.1", "gethostname.return_value": "localhost"})}) + self.socket_mock.start() try: from api import server except socket.gaierror: @@ -30,6 +35,7 @@ class APITestCase(unittest.TestCase): def tearDown(self): os.close(self.db_fd) os.unlink(self.db_path) + self.socket_mock.stop() def _post(self, url, data): headers = {'Content-Type': 'application/json'} diff --git a/tests/unit/benchmark/contexts/test_heat.py b/tests/unit/benchmark/contexts/test_heat.py index cc0c7bc8e..2e546805d 100644 --- a/tests/unit/benchmark/contexts/test_heat.py +++ b/tests/unit/benchmark/contexts/test_heat.py @@ -13,7 +13,6 @@ from __future__ import absolute_import -import ipaddress import logging import os import unittest @@ -147,30 +146,6 @@ class HeatContextTestCase(unittest.TestCase): self.test_context.user = 'foo' @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate') - @mock.patch('yardstick.benchmark.contexts.heat.get_neutron_client') - def test_attrs_get(self, mock_neutron, mock_template): - image, flavor, user = expected_tuple = 'foo1', 'foo2', 'foo3' - self.assertNotEqual(self.test_context.image, image) - self.assertNotEqual(self.test_context.flavor, flavor) - self.assertNotEqual(self.test_context.user, user) - self.test_context._image = image - self.test_context._flavor = flavor - self.test_context._user = user - attr_tuple = self.test_context.image, self.test_context.flavor, self.test_context.user - self.assertEqual(attr_tuple, expected_tuple) - - @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate') - def test_attrs_set_negative(self, mock_template): - with self.assertRaises(AttributeError): - self.test_context.image = 'foo' - - with self.assertRaises(AttributeError): - self.test_context.flavor = 'foo' - - with self.assertRaises(AttributeError): - self.test_context.user = 'foo' - - @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate') def test_deploy(self, mock_template): self.test_context.name = 'foo' self.test_context.template_file = '/bar/baz/some-heat-file' @@ -207,11 +182,17 @@ class HeatContextTestCase(unittest.TestCase): u'd-mac_address': u'00:10', u'd-device_id': u'dev43', u'd-network_id': u'net987', + u'e': u'40.30.20.15', + u'e-subnet_id': 2, + u'e-mac_address': u'00:10', + u'e-device_id': u'dev43', + u'e-network_id': u'net987', } server = mock.MagicMock() server.ports = OrderedDict([ - ('a', {'stack_name': 'b'}), - ('c', {'stack_name': 'd'}), + ('a', [{'stack_name': 'b', 'port': 'port_a'}]), + ('c', [{'stack_name': 'd', 'port': 'port_c'}, + {'stack_name': 'e', 'port': 'port_f'}]), ]) expected = { @@ -230,8 +211,8 @@ class HeatContextTestCase(unittest.TestCase): } self.test_context.add_server_port(server) self.assertEqual(server.private_ip, '10.20.30.45') - self.assertEqual(len(server.interfaces), 2) - self.assertDictEqual(server.interfaces['a'], expected) + self.assertEqual(len(server.interfaces), 3) + self.assertDictEqual(server.interfaces['port_a'], expected) @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate') def test_undeploy(self, mock_template): @@ -246,19 +227,20 @@ class HeatContextTestCase(unittest.TestCase): mock_os.path.exists.return_value = True self.assertIsNone(self.test_context.undeploy()) - def test__get_server_found_dict(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_found_dict(self, mock_pkg_resources): """ Use HeatContext._get_server to get a server that matches based on a dictionary input. """ foo2_server = mock.Mock() - foo2_server.key_filename = 'key_file' + foo2_server.key_filename = None foo2_server.private_ip = '10.0.0.2' foo2_server.public_ip = '127.0.0.2' foo2_server.context.user = 'oof' baz3_server = mock.Mock() - baz3_server.key_filename = 'key_filename' + baz3_server.key_filename = None baz3_server.private_ip = '10.0.0.3' baz3_server.public_ip = '127.0.0.3' baz3_server.context.user = 'zab' @@ -283,11 +265,11 @@ class HeatContextTestCase(unittest.TestCase): } result = self.test_context._get_server(attr_name) self.assertEqual(result['user'], 'bot') - self.assertIsNotNone(result['key_filename']) self.assertEqual(result['ip'], '127.0.0.1') self.assertEqual(result['private_ip'], '10.0.0.1') - def test__get_server_found_dict_no_attrs(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_found_dict_no_attrs(self, mock_pkg_resources): """ Use HeatContext._get_server to get a server that matches based on a dictionary input. @@ -320,13 +302,13 @@ class HeatContextTestCase(unittest.TestCase): } result = self.test_context._get_server(attr_name) self.assertEqual(result['user'], 'bot') - self.assertIsNotNone(result['key_filename']) # no private ip attr mapping in the map results in None value in the result self.assertIsNone(result['private_ip']) # no public ip attr mapping in the map results in no value in the result self.assertNotIn('ip', result) - def test__get_server_found_not_dict(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_found_not_dict(self, mock_pkg_resources): """ Use HeatContext._get_server to get a server that matches based on a non-dictionary input @@ -358,12 +340,12 @@ class HeatContextTestCase(unittest.TestCase): attr_name = 'baz3' result = self.test_context._get_server(attr_name) self.assertEqual(result['user'], 'zab') - self.assertIsNotNone(result['key_filename']) self.assertEqual(result['private_ip'], '10.0.0.3') # no public_ip on the server results in no value in the result self.assertNotIn('public_ip', result) - def test__get_server_none_found_not_dict(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_none_found_not_dict(self, mock_pkg_resources): """ Use HeatContext._get_server to not get a server due to None value associated with the match to a non-dictionary @@ -396,7 +378,8 @@ class HeatContextTestCase(unittest.TestCase): result = self.test_context._get_server(attr_name) self.assertIsNone(result) - def test__get_server_not_found_dict(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_not_found_dict(self, mock_pkg_resources): """ Use HeatContext._get_server to not get a server for lack of a match to a dictionary input @@ -431,7 +414,8 @@ class HeatContextTestCase(unittest.TestCase): result = self.test_context._get_server(attr_name) self.assertIsNone(result) - def test__get_server_not_found_not_dict(self): + @mock.patch("yardstick.benchmark.contexts.heat.pkg_resources") + def test__get_server_not_found_not_dict(self, mock_pkg_resources): """ Use HeatContext._get_server to not get a server for lack of a match to a non-dictionary input @@ -472,7 +456,6 @@ class HeatContextTestCase(unittest.TestCase): network2 = mock.MagicMock() network2.name = 'net_2' - network2.vld_id = 'vld999' network2.segmentation_id = 'seg45' network2.network_type = 'type_b' network2.physical_network = 'virt' @@ -488,16 +471,15 @@ class HeatContextTestCase(unittest.TestCase): attr_name = {} self.assertIsNone(self.test_context._get_network(attr_name)) - attr_name = {'vld_id': 'vld777'} + attr_name = {'network_type': 'nosuch'} self.assertIsNone(self.test_context._get_network(attr_name)) attr_name = 'vld777' self.assertIsNone(self.test_context._get_network(attr_name)) - attr_name = {'vld_id': 'vld999'} + attr_name = {'segmentation_id': 'seg45'} expected = { "name": 'net_2', - "vld_id": 'vld999', "segmentation_id": 'seg45', "network_type": 'type_b', "physical_network": 'virt', @@ -508,7 +490,6 @@ class HeatContextTestCase(unittest.TestCase): attr_name = 'a' expected = { "name": 'net_1', - "vld_id": 'vld111', "segmentation_id": 'seg54', "network_type": 'type_a', "physical_network": 'phys', diff --git a/tests/unit/benchmark/contexts/test_kubernetes.py b/tests/unit/benchmark/contexts/test_kubernetes.py index b0ee792db..4976a9fe0 100644 --- a/tests/unit/benchmark/contexts/test_kubernetes.py +++ b/tests/unit/benchmark/contexts/test_kubernetes.py @@ -81,9 +81,14 @@ class KubernetesTestCase(unittest.TestCase): self.assertTrue(mock_get_rc_pods.called) self.assertTrue(mock_wait_until_running.called) + @mock.patch('{}.paramiko'.format(prefix), **{"resource_filename.return_value": ""}) + @mock.patch('{}.pkg_resources'.format(prefix), **{"resource_filename.return_value": ""}) + @mock.patch('{}.utils'.format(prefix)) + @mock.patch('{}.open'.format(prefix), create=True) @mock.patch('{}.k8s_utils.delete_config_map'.format(prefix)) @mock.patch('{}.k8s_utils.create_config_map'.format(prefix)) - def test_ssh_key(self, mock_create, mock_delete): + def test_ssh_key(self, mock_create, mock_delete, mock_open, mock_utils, mock_resources, + mock_paramiko): k8s_context = KubernetesContext() k8s_context.init(context_cfg) diff --git a/tests/unit/benchmark/core/test_task.py b/tests/unit/benchmark/core/test_task.py index 14027e43c..737e7058b 100644 --- a/tests/unit/benchmark/core/test_task.py +++ b/tests/unit/benchmark/core/test_task.py @@ -66,31 +66,27 @@ class TaskTestCase(unittest.TestCase): nodes = { 'node1': { 'interfaces': { - 'eth0': { - 'name': 'mgmt', + 'mgmt': { + 'network_name': 'mgmt', }, - 'eth1': { - 'name': 'external', - 'vld_id': '23', + 'xe0': { + 'network_name': 'uplink_0', }, - 'eth10': { - 'name': 'internal', - 'vld_id': '55', + 'xe1': { + 'network_name': 'downlink_0', }, }, }, 'node2': { 'interfaces': { - 'eth4': { - 'name': 'mgmt', + 'mgmt': { + 'network_name': 'mgmt', }, - 'eth2': { - 'name': 'external', - 'vld_id': '32', + 'uplink_0': { + 'network_name': 'uplink_0', }, - 'eth11': { - 'name': 'internal', - 'vld_id': '55', + 'downlink_0': { + 'network_name': 'downlink_0', }, }, }, @@ -99,30 +95,30 @@ class TaskTestCase(unittest.TestCase): mock_context.get_network.side_effect = iter([ None, { - 'name': 'a', - 'network_type': 'private', + 'name': 'mgmt', + 'network_type': 'flat', }, {}, { - 'name': 'b', - 'vld_id': 'y', + 'name': 'uplink_0', 'subnet_cidr': '10.20.0.0/16', }, { - 'name': 'c', - 'vld_id': 'x', + 'name': 'downlink_0', + 'segmentation_id': '1001', }, { - 'name': 'd', - 'vld_id': 'w', + 'name': 'uplink_1', }, ]) - # once for each vld_id in the nodes dict - expected_get_network_calls = 4 + # one for each interface + expected_get_network_calls = 6 expected = { - 'a': {'name': 'a', 'network_type': 'private'}, - 'b': {'name': 'b', 'vld_id': 'y', 'subnet_cidr': '10.20.0.0/16'}, + 'mgmt': {'name': 'mgmt', 'network_type': 'flat'}, + 'uplink_0': {'name': 'uplink_0', 'subnet_cidr': '10.20.0.0/16'}, + 'uplink_1': {'name': 'uplink_1'}, + 'downlink_0': {'name': 'downlink_0', 'segmentation_id': '1001'}, } networks = task.get_networks_from_nodes(nodes) diff --git a/tests/unit/benchmark/scenarios/availability/test_basemonitor.py b/tests/unit/benchmark/scenarios/availability/test_basemonitor.py index 3b7e07376..92ae8aa88 100644 --- a/tests/unit/benchmark/scenarios/availability/test_basemonitor.py +++ b/tests/unit/benchmark/scenarios/availability/test_basemonitor.py @@ -25,13 +25,32 @@ from yardstick.benchmark.scenarios.availability.monitor import basemonitor class MonitorMgrTestCase(unittest.TestCase): def setUp(self): - config = { - 'monitor_type': 'openstack-api', - 'key': 'service-status' - } - - self.monitor_configs = [] - self.monitor_configs.append(config) + self.monitor_configs = [ + { + "monitor_type": "openstack-cmd", + "command_name": "openstack router list", + "monitor_time": 10, + "monitor_number": 3, + "sla": { + "max_outage_time": 5 + } + }, + { + "monitor_type": "process", + "process_name": "neutron-server", + "host": "node1", + "monitor_time": 20, + "monitor_number": 3, + "sla": { + "max_recover_time": 20 + } + } + ] + self.MonitorMgr = basemonitor.MonitorMgr([]) + self.MonitorMgr.init_monitors(self.monitor_configs, None) + self.monitor_list = self.MonitorMgr._monitor_list + for mo in self.monitor_list: + mo._result = {"outage_time": 10} def test__MonitorMgr_setup_successful(self, mock_monitor): instance = basemonitor.MonitorMgr({"nova-api": 10}) @@ -44,7 +63,13 @@ class MonitorMgrTestCase(unittest.TestCase): def test_MonitorMgr_getitem(self, mock_monitor): monitorMgr = basemonitor.MonitorMgr({"nova-api": 10}) monitorMgr.init_monitors(self.monitor_configs, None) - monitorIns = monitorMgr['service-status'] + + def test_store_result(self, mock_monitor): + expect = {'process_neutron-server_outage_time': 10, + 'openstack-router-list_outage_time': 10} + result = {} + self.MonitorMgr.store_result(result) + self.assertDictEqual(result, expect) class BaseMonitorTestCase(unittest.TestCase): @@ -94,3 +119,7 @@ class BaseMonitorTestCase(unittest.TestCase): except Exception: pass self.assertIsNone(cls) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/unit/benchmark/scenarios/networking/ipv4_throughput_vpe.yaml b/tests/unit/benchmark/scenarios/networking/ipv4_throughput_vpe.yaml index cfa166a74..2123e4705 100644 --- a/tests/unit/benchmark/scenarios/networking/ipv4_throughput_vpe.yaml +++ b/tests/unit/benchmark/scenarios/networking/ipv4_throughput_vpe.yaml @@ -49,13 +49,13 @@ private: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" QinQ: S-VLAN: @@ -81,13 +81,13 @@ public: ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'imix.private.imix_small', '0') }}" - 128B: "{{ get(imix, 'imix.private.imix_128B', '0') }}" - 256B: "{{ get(imix, 'imix.private.imix_256B', '0') }}" - 373b: "{{ get(imix, 'imix.private.imix_373B', '0') }}" - 570B: "{{get(imix, 'imix.private.imix_570B', '0') }}" - 1400B: "{{get(imix, 'imix.private.imix_1400B', '0') }}" - 1518B: "{{get(imix, 'imix.private.imix_1500B', '0') }}" + 64B: "{{ get(imix, 'imix.uplink.imix_small', '0') }}" + 128B: "{{ get(imix, 'imix.uplink.imix_128B', '0') }}" + 256B: "{{ get(imix, 'imix.uplink.imix_256B', '0') }}" + 373b: "{{ get(imix, 'imix.uplink.imix_373B', '0') }}" + 570B: "{{get(imix, 'imix.uplink.imix_570B', '0') }}" + 1400B: "{{get(imix, 'imix.uplink.imix_1400B', '0') }}" + 1518B: "{{get(imix, 'imix.uplink.imix_1500B', '0') }}" outer_l3v4: proto: "tcp" diff --git a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py index 58244b8f5..fa9b8549d 100644 --- a/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py +++ b/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py @@ -24,6 +24,8 @@ import errno import unittest import mock +from copy import deepcopy + from tests.unit import STL_MOCKS from yardstick.benchmark.scenarios.networking.vnf_generic import \ SshManager, NetworkServiceTestCase, IncorrectConfig, \ @@ -240,11 +242,11 @@ class TestNetworkServiceTestCase(unittest.TestCase): 'vnf__1': self.vnf__1, }, 'networks': { - 'private': { - 'vld_id': 'private', + GenericVNF.UPLINK: { + 'vld_id': GenericVNF.UPLINK, }, - 'public': { - 'vld_id': 'public', + GenericVNF.DOWNLINK: { + 'vld_id': GenericVNF.DOWNLINK, }, }, } @@ -263,7 +265,7 @@ class TestNetworkServiceTestCase(unittest.TestCase): } ], 'type': 'ELAN', - 'id': 'private', + 'id': GenericVNF.UPLINK, 'name': 'tg__1 to vnf__1 link 1' } @@ -281,7 +283,7 @@ class TestNetworkServiceTestCase(unittest.TestCase): } ], 'type': 'ELAN', - 'id': 'public', + 'id': GenericVNF.DOWNLINK, 'name': 'vnf__1 to tg__1 link 2' } @@ -365,6 +367,24 @@ class TestNetworkServiceTestCase(unittest.TestCase): result = '152.16.100.2-152.16.100.254' self.assertEqual(result, self.s._get_ip_flow_range({"tg__1": 'xe0'})) + @mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.ipaddress') + def test__get_ip_flow_range_no_node_data(self, mock_ipaddress): + scenario_cfg = deepcopy(self.scenario_cfg) + scenario_cfg["traffic_options"]["flow"] = \ + self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml") + + mock_ipaddress.ip_network.return_value = ipaddr = mock.Mock() + ipaddr.hosts.return_value = [] + + expected = '0.0.0.0' + result = self.s._get_ip_flow_range({"tg__2": 'xe0'}) + self.assertEqual(result, expected) + + def test__get_ip_flow_range_no_nodes(self): + expected = '0.0.0.0' + result = self.s._get_ip_flow_range({}) + self.assertEqual(result, expected) + def test___get_traffic_flow(self): self.scenario_cfg["traffic_options"]["flow"] = \ self._get_file_abspath("ipv4_1flow_Packets_vpe.yaml") @@ -653,12 +673,6 @@ class TestNetworkServiceTestCase(unittest.TestCase): res = NetworkServiceTestCase.parse_netdev_info(output) assert res == self.SAMPLE_VM_NETDEVS - def test_sort_dpdk_port_num(self): - netdevs = self.SAMPLE_NETDEVS.copy() - NetworkServiceTestCase._sort_dpdk_port_num(netdevs) - assert netdevs['lan']['dpdk_port_num'] == 0 - assert netdevs['enp11s0']['dpdk_port_num'] == 1 - def test_probe_missing_values(self): netdevs = self.SAMPLE_NETDEVS.copy() network = {'local_mac': '0a:de:ad:be:ef:f5'} diff --git a/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py b/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py index de5bae2f3..5759f0a90 100644 --- a/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py +++ b/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py @@ -118,7 +118,8 @@ class VsperfDPDKTestCase(unittest.TestCase): result = p._is_dpdk_setup() self.assertEqual(result, True) - def test_vsperf_dpdk_dpdk_setup_first(self, mock_ssh, mock_subprocess): + @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') + def test_vsperf_dpdk_dpdk_setup_first(self, mock_time, mock_ssh, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -135,42 +136,43 @@ class VsperfDPDKTestCase(unittest.TestCase): self.assertEqual(p._is_dpdk_setup(), False) self.assertEqual(p.dpdk_setup_done, True) - def test_vsperf_dpdk_dpdk_setup_next(self, mock_ssh, mock_subprocess): + @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') + def test_vsperf_dpdk_dpdk_setup_next(self, mock_time, mock_ssh, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks + mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() self.assertIsNotNone(p.client) self.assertEqual(p.setup_done, True) - # dpdk_setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') - p.dpdk_setup() self.assertEqual(p._is_dpdk_setup(), True) self.assertEqual(p.dpdk_setup_done, True) - def test_vsperf_dpdk_dpdk_setup_fail(self, mock_ssh, mock_subprocess): + @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') + def test_vsperf_dpdk_dpdk_setup_fail(self, mock_time, mock_ssh, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks + mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) - - # dpdk_setup() specific mocks mock_ssh.SSH.from_node().execute.return_value = (1, '', '') + self.assertEqual(p.setup_done, True) self.assertRaises(RuntimeError, p.dpdk_setup) - def test_vsperf_dpdk_run_ok(self, mock_ssh, mock_subprocess): + @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') + def test_vsperf_dpdk_run_ok(self, mock_time, mock_ssh, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks + mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() @@ -179,7 +181,6 @@ class VsperfDPDKTestCase(unittest.TestCase): # run() specific mocks mock_subprocess.call().execute.return_value = None - mock_subprocess.call().execute.return_value = None mock_ssh.SSH.from_node().execute.return_value = ( 0, 'throughput_rx_fps\r\n14797660.000\r\n', '') @@ -193,6 +194,7 @@ class VsperfDPDKTestCase(unittest.TestCase): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks + mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() @@ -211,6 +213,7 @@ class VsperfDPDKTestCase(unittest.TestCase): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks + mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() diff --git a/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml b/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml index 0de4b6e79..1ac6c1f89 100644 --- a/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml +++ b/tests/unit/benchmark/scenarios/networking/vpe_vnf_topology.yaml @@ -27,7 +27,7 @@ nsd:nsd-catalog: VNF model: ../../vnf_descriptors/vpe_vnf.yaml #tg_l3fwd.yaml #tg_trex_tpl.yaml #TREX vld: - - id: private + - id: uplink name: tg__1 to vnf__1 link 1 type: ELAN vnfd-connection-point-ref: @@ -38,7 +38,7 @@ nsd:nsd-catalog: vnfd-connection-point-ref: xe0 vnfd-id-ref: vnf__1 #VNF - - id: public + - id: downlink name: vnf__1 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: diff --git a/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml b/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml index 606d557e9..f60834fbd 100644 --- a/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml +++ b/tests/unit/network_services/helpers/acl_vnf_topology_ixia.yaml @@ -27,7 +27,7 @@ nsd:nsd-catalog: VNF model: ../../vnf_descriptors/acl_vnf.yaml vld: - - id: private_1 + - id: uplink_1 name: tg__1 to vnf__1 link 1 type: ELAN vnfd-connection-point-ref: @@ -38,7 +38,7 @@ nsd:nsd-catalog: vnfd-connection-point-ref: xe0 vnfd-id-ref: vnf__1 #VNF - - id: public_1 + - id: downlink_1 name: vnf__1 to tg__1 link 2 type: ELAN vnfd-connection-point-ref: diff --git a/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py new file mode 100644 index 000000000..dbd8396c8 --- /dev/null +++ b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py @@ -0,0 +1,247 @@ +#!/usr/bin/env python + +# 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. + +import mock +import unittest +from yardstick.network_services.helpers.dpdknicbind_helper import DpdkBindHelper +from yardstick.network_services.helpers.dpdknicbind_helper import DpdkBindHelperException +from yardstick.network_services.helpers.dpdknicbind_helper import NETWORK_KERNEL +from yardstick.network_services.helpers.dpdknicbind_helper import NETWORK_DPDK +from yardstick.network_services.helpers.dpdknicbind_helper import CRYPTO_KERNEL +from yardstick.network_services.helpers.dpdknicbind_helper import CRYPTO_DPDK +from yardstick.network_services.helpers.dpdknicbind_helper import NETWORK_OTHER +from yardstick.network_services.helpers.dpdknicbind_helper import CRYPTO_OTHER + +pass + + +class MyTestDpdkBindHelper(unittest.TestCase): + EXAMPLE_OUTPUT = """ + +Network devices using DPDK-compatible driver +============================================ +0000:00:04.0 'Virtio network device' drv=igb_uio unused= +0000:00:05.0 'Virtio network device' drv=igb_uio unused= + +Network devices using kernel driver +=================================== +0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused=igb_uio *Active* + +Other network devices +===================== +<none> + +Crypto devices using DPDK-compatible driver +=========================================== +<none> + +Crypto devices using kernel driver +================================== +<none> + +Other crypto devices +==================== +<none> +""" + + PARSED_EXAMPLE = { + NETWORK_DPDK: [ + {'active': False, + 'dev_type': 'Virtio network device', + 'driver': 'igb_uio', + 'iface': None, + 'unused': '', + 'vpci': '0000:00:04.0', + }, + {'active': False, + 'dev_type': 'Virtio network device', + 'driver': 'igb_uio', + 'iface': None, + 'unused': '', + 'vpci': '0000:00:05.0', + } + ], + NETWORK_KERNEL: [ + {'active': True, + 'dev_type': 'Virtio network device', + 'driver': 'virtio-pci', + 'iface': 'ens3', + 'unused': 'igb_uio', + 'vpci': '0000:00:03.0', + } + ], + CRYPTO_KERNEL: [], + CRYPTO_DPDK: [], + NETWORK_OTHER: [], + CRYPTO_OTHER: [], + } + + CLEAN_STATUS = { + NETWORK_KERNEL: [], + NETWORK_DPDK: [], + CRYPTO_KERNEL: [], + CRYPTO_DPDK: [], + NETWORK_OTHER: [], + CRYPTO_OTHER: [], + } + + ONE_INPUT_LINE = ("0000:00:03.0 'Virtio network device' if=ens3 " + "drv=virtio-pci unused=igb_uio *Active*") + + ONE_INPUT_LINE_PARSED = [{ + 'vpci': '0000:00:03.0', + 'dev_type': 'Virtio network device', + 'iface': 'ens3', + 'driver': 'virtio-pci', + 'unused': 'igb_uio', + 'active': True, + }] + + def test___init__(self): + conn = mock.Mock() + conn.provision_tool = mock.Mock(return_value='path_to_tool') + + dpdk_bind_helper = DpdkBindHelper(conn) + + self.assertEquals(conn, dpdk_bind_helper.ssh_helper) + self.assertEquals(self.CLEAN_STATUS, dpdk_bind_helper.dpdk_status) + self.assertIsNone(dpdk_bind_helper.status_nic_row_re) + self.assertIsNone(dpdk_bind_helper._dpdk_nic_bind_attr) + self.assertIsNone(dpdk_bind_helper._status_cmd_attr) + + def test__dpdk_execute(self): + conn = mock.Mock() + conn.execute = mock.Mock(return_value=(0, 'output', 'error')) + conn.provision_tool = mock.Mock(return_value='tool_path') + dpdk_bind_helper = DpdkBindHelper(conn) + self.assertEquals((0, 'output', 'error'), dpdk_bind_helper._dpdk_execute('command')) + + def test__dpdk_execute_failure(self): + conn = mock.Mock() + conn.execute = mock.Mock(return_value=(1, 'output', 'error')) + conn.provision_tool = mock.Mock(return_value='tool_path') + dpdk_bind_helper = DpdkBindHelper(conn) + with self.assertRaises(DpdkBindHelperException): + dpdk_bind_helper._dpdk_execute('command') + + def test__addline(self): + conn = mock.Mock() + + dpdk_bind_helper = DpdkBindHelper(conn) + + dpdk_bind_helper._addline(NETWORK_KERNEL, self.ONE_INPUT_LINE) + + self.assertIsNotNone(dpdk_bind_helper.dpdk_status) + self.assertEquals(self.ONE_INPUT_LINE_PARSED, dpdk_bind_helper.dpdk_status[NETWORK_KERNEL]) + + def test__switch_active_dict_by_header(self): + line = "Crypto devices using DPDK-compatible driver" + olddict = 'olddict' + self.assertEqual(CRYPTO_DPDK, DpdkBindHelper._switch_active_dict(line, olddict)) + + def test__switch_active_dict_by_header_empty(self): + line = "<none>" + olddict = 'olddict' + self.assertEqual(olddict, DpdkBindHelper._switch_active_dict(line, olddict)) + + def test_parse_dpdk_status_output(self): + conn = mock.Mock() + + dpdk_bind_helper = DpdkBindHelper(conn) + + dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) + + self.maxDiff = None + self.assertEquals(self.PARSED_EXAMPLE, dpdk_bind_helper.dpdk_status) + + def test_read_status(self): + conn = mock.Mock() + conn.execute = mock.Mock(return_value=(0, self.EXAMPLE_OUTPUT, '')) + conn.provision_tool = mock.Mock(return_value='path_to_tool') + + dpdk_bind_helper = DpdkBindHelper(conn) + + self.assertEquals(self.PARSED_EXAMPLE, dpdk_bind_helper.read_status()) + + def test__get_bound_pci_addresses(self): + conn = mock.Mock() + + dpdk_bind_helper = DpdkBindHelper(conn) + + dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) + + self.assertEquals(['0000:00:04.0', '0000:00:05.0'], + dpdk_bind_helper._get_bound_pci_addresses(NETWORK_DPDK)) + self.assertEquals(['0000:00:03.0'], + dpdk_bind_helper._get_bound_pci_addresses(NETWORK_KERNEL)) + + def test_interface_driver_map(self): + conn = mock.Mock() + + dpdk_bind_helper = DpdkBindHelper(conn) + + dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) + + self.assertEquals({'0000:00:04.0': 'igb_uio', + '0000:00:03.0': 'virtio-pci', + '0000:00:05.0': 'igb_uio', + }, + dpdk_bind_helper.interface_driver_map) + + def test_bind(self): + conn = mock.Mock() + conn.execute = mock.Mock(return_value=(0, '', '')) + conn.provision_tool = mock.Mock(return_value='/opt/nsb_bin/dpdk_nic_bind.py') + + dpdk_bind_helper = DpdkBindHelper(conn) + dpdk_bind_helper.read_status = mock.Mock() + + dpdk_bind_helper.bind(['0000:00:03.0', '0000:00:04.0'], 'my_driver') + + conn.execute.assert_called_with('sudo /opt/nsb_bin/dpdk_nic_bind.py --force ' + '-b my_driver 0000:00:03.0 0000:00:04.0') + dpdk_bind_helper.read_status.assert_called_once() + + def test_rebind_drivers(self): + conn = mock.Mock() + + dpdk_bind_helper = DpdkBindHelper(conn) + + dpdk_bind_helper.bind = mock.Mock() + dpdk_bind_helper.used_drivers = { + '0000:05:00.0': 'd1', + '0000:05:01.0': 'd3', + } + + dpdk_bind_helper.rebind_drivers() + + dpdk_bind_helper.bind.assert_any_call('0000:05:00.0', 'd1', True) + dpdk_bind_helper.bind.assert_any_call('0000:05:01.0', 'd3', True) + + def test_save_used_drivers(self): + conn = mock.Mock() + dpdk_bind_helper = DpdkBindHelper(conn) + dpdk_bind_helper.dpdk_status = self.PARSED_EXAMPLE + + dpdk_bind_helper.save_used_drivers() + + expected = { + '0000:00:04.0': 'igb_uio', + '0000:00:05.0': 'igb_uio', + '0000:00:03.0': 'virtio-pci', + } + + self.assertEqual(expected, dpdk_bind_helper.used_drivers) diff --git a/tests/unit/network_services/helpers/test_samplevnf_helper.py b/tests/unit/network_services/helpers/test_samplevnf_helper.py index 608f31747..0ac363f28 100644 --- a/tests/unit/network_services/helpers/test_samplevnf_helper.py +++ b/tests/unit/network_services/helpers/test_samplevnf_helper.py @@ -18,91 +18,152 @@ from __future__ import absolute_import from __future__ import division -import os import unittest import mock -from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig +from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig, PortPairs +from yardstick.network_services.vnf_generic.vnf.base import VnfdHelper + + +class TestPortPairs(unittest.TestCase): + def test_port_pairs_list(self): + vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + interfaces = vnfd['vdu'][0]['external-interface'] + port_pairs = PortPairs(interfaces) + self.assertEqual(port_pairs.port_pair_list, [("xe0", "xe1")]) + + def test_valid_networks(self): + vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + interfaces = vnfd['vdu'][0]['external-interface'] + port_pairs = PortPairs(interfaces) + self.assertEqual(port_pairs.valid_networks, [("uplink_0", "downlink_0")]) + + def test_all_ports(self): + vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + interfaces = vnfd['vdu'][0]['external-interface'] + port_pairs = PortPairs(interfaces) + self.assertEqual(set(port_pairs.all_ports), {"xe0", "xe1"}) + + def test_uplink_ports(self): + vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + interfaces = vnfd['vdu'][0]['external-interface'] + port_pairs = PortPairs(interfaces) + self.assertEqual(port_pairs.uplink_ports, ["xe0"]) + + def test_downlink_ports(self): + vnfd = TestMultiPortConfig.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + interfaces = vnfd['vdu'][0]['external-interface'] + port_pairs = PortPairs(interfaces) + self.assertEqual(port_pairs.downlink_ports, ["xe1"]) class TestMultiPortConfig(unittest.TestCase): - VNFD = {'vnfd:vnfd-catalog': - {'vnfd': - [{'short-name': 'VpeVnf', - 'vdu': - [{'routing_table': - [{'network': '152.16.100.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.100.20', - 'if': 'xe0'}, - {'network': '152.16.40.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.40.20', - 'if': 'xe1'}], - 'description': 'VPE approximation using DPDK', - 'name': 'vpevnf-baremetal', - 'nd_route_tbl': - [{'network': '0064:ff9b:0:0:0:0:9810:6414', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:6414', - 'if': 'xe0'}, - {'network': '0064:ff9b:0:0:0:0:9810:2814', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:2814', - 'if': 'xe1'}], - 'id': 'vpevnf-baremetal', - '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': '0', - 'bandwidth': '10 Gbps', - 'driver': "i40e", - 'dst_ip': '152.16.100.20', - 'ifname': 'xe0', - 'local_iface_name': 'eth0', - 'local_mac': '00:00:00:00:00:02', - 'vld_id': 'private_1', - }, - 'vnfd-connection-point-ref': 'xe0', - 'name': 'xe0'}, - {'virtual-interface': - { - 'dst_mac': '00:00:00:00:00:03', - 'vpci': '0000:05:00.1', - 'local_ip': '152.16.40.19', - 'type': 'PCI-PASSTHROUGH', - 'driver': "i40e", - 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', - 'bandwidth': '10 Gbps', - 'dst_ip': '152.16.40.20', - 'ifname': 'xe1', - 'local_iface_name': 'eth1', - 'local_mac': '00:00:00:00:00:01', - 'vld_id': 'public_1', - }, - 'vnfd-connection-point-ref': 'xe1', - 'name': 'xe1'} - ]}], - 'description': 'Vpe approximation using DPDK', - 'mgmt-interface': - {'vdu-id': 'vpevnf-baremetal', - 'host': '1.2.1.1', - 'password': 'r00t', - 'user': 'root', - 'ip': '1.2.1.1'}, - 'benchmark': - {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, - 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, - {'type': 'VPORT', 'name': 'xe1'}], - 'id': 'AclApproxVnf', 'name': 'VPEVnfSsh'}]}} + + VNFD_0 = {'short-name': 'VpeVnf', + 'vdu': + [{'routing_table': + [{'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0'}, + {'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1'}], + 'description': 'VPE approximation using DPDK', + 'name': 'vpevnf-baremetal', + 'nd_route_tbl': + [{'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0'}, + {'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1'}], + 'id': 'vpevnf-baremetal', + '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': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.20', + 'ifname': 'xe0', + 'local_iface_name': 'eth0', + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'uplink_0', + }, + 'vnfd-connection-point-ref': 'xe0', + 'name': 'xe0'}, + {'virtual-interface': + { + 'dst_mac': '00:00:00:00:00:03', + 'vpci': '0000:05:00.1', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'driver': "i40e", + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'ifname': 'xe1', + 'local_iface_name': 'eth1', + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'downlink_0', + }, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1'} + ]}], + 'description': 'Vpe approximation using DPDK', + 'mgmt-interface': + {'vdu-id': 'vpevnf-baremetal', + 'host': '1.2.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.2.1.1'}, + 'benchmark': + {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, + 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, + {'type': 'VPORT', 'name': 'xe1'}], + 'id': 'AclApproxVnf', 'name': 'VPEVnfSsh'} + + VNFD = { + 'vnfd:vnfd-catalog': { + 'vnfd': [ + VNFD_0, + ] + } + } + + def test_validate_ip_and_prefixlen(self): + ip_addr, prefix_len = MultiPortConfig.validate_ip_and_prefixlen('10.20.30.40', '16') + self.assertEqual(ip_addr, '10.20.30.40') + self.assertEqual(prefix_len, 16) + + ip_addr, prefix_len = MultiPortConfig.validate_ip_and_prefixlen('::1', '40') + self.assertEqual(ip_addr, '0000:0000:0000:0000:0000:0000:0000:0001') + self.assertEqual(prefix_len, 40) + + def test_validate_ip_and_prefixlen_negative(self): + with self.assertRaises(AttributeError): + MultiPortConfig.validate_ip_and_prefixlen('', '') + + with self.assertRaises(AttributeError): + MultiPortConfig.validate_ip_and_prefixlen('10.20.30.400', '16') + + with self.assertRaises(AttributeError): + MultiPortConfig.validate_ip_and_prefixlen('10.20.30.40', '33') + + with self.assertRaises(AttributeError): + MultiPortConfig.validate_ip_and_prefixlen('::1', '129') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') @@ -111,11 +172,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) self.assertEqual(0, opnfv_vnf.swq) mock_os.path = mock.MagicMock() mock_os.path.isfile = mock.Mock(return_value=False) - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) self.assertEqual(0, opnfv_vnf.swq) @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') @@ -125,7 +187,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -139,7 +202,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = VnfdHelper(self.VNFD_0) + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -148,7 +212,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] self.assertIsNotNone(opnfv_vnf.generate_script(self.VNFD)) opnfv_vnf.lb_config = 'HW' self.assertIsNotNone(opnfv_vnf.generate_script(self.VNFD)) @@ -160,12 +224,13 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 opnfv_vnf.update_write_parser = mock.MagicMock() - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.vnf_type = 'ACL' opnfv_vnf.generate_link_config = mock.Mock() opnfv_vnf.generate_arp_config = mock.Mock() @@ -181,7 +246,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -190,7 +256,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'ACL' opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1') @@ -212,7 +278,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -221,7 +288,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1') @@ -239,7 +306,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -248,7 +316,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1') @@ -268,7 +336,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -277,7 +346,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.get_ports_gateway = mock.Mock(return_value=u'1.1.1.1') @@ -297,7 +366,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -306,7 +376,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.txrx_pipeline = '' @@ -323,7 +393,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -332,7 +403,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.txrx_pipeline = '' @@ -349,7 +420,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -358,7 +430,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.txrx_pipeline = '' @@ -375,7 +447,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -384,7 +457,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.txrx_pipeline = '' @@ -401,7 +474,9 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -410,7 +485,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.get_port_pairs = mock.Mock() opnfv_vnf.vnf_type = 'VFW' opnfv_vnf.txrx_pipeline = '' @@ -418,7 +493,11 @@ class TestMultiPortConfig(unittest.TestCase): opnfv_vnf.get_ports_gateway6 = mock.Mock() opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface'] - self.assertIsNotNone(opnfv_vnf.generate_link_config()) + opnfv_vnf.all_ports = ['32', '1', '987'] + opnfv_vnf.validate_ip_and_prefixlen = mock.Mock(return_value=('10.20.30.40', 16)) + + result = opnfv_vnf.generate_link_config() + self.assertEqual(len(result.splitlines()), 9) @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') @@ -427,7 +506,8 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.get_config_tpl_data = mock.MagicMock() opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 @@ -436,7 +516,7 @@ class TestMultiPortConfig(unittest.TestCase): mock.Mock(return_value={'link_config': 0, 'arp_config': '', 'arp_config6': '', 'actions': '', 'rules': ''}) - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.get_ports_gateway6 = mock.Mock() @@ -459,10 +539,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -482,10 +563,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -505,10 +587,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -533,10 +616,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -556,10 +640,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -581,10 +666,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -614,10 +700,11 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -649,10 +736,10 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = VnfdHelper(self.VNFD_0) + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -666,10 +753,12 @@ class TestMultiPortConfig(unittest.TestCase): opnfv_vnf.worker_config = '1t' opnfv_vnf.start_core = 0 opnfv_vnf.lb_count = 1 + opnfv_vnf._port_pairs = PortPairs(vnfd_mock.interfaces) + opnfv_vnf.port_pair_list = opnfv_vnf._port_pairs.port_pair_list result = opnfv_vnf.generate_lb_to_port_pair_mapping() self.assertEqual(None, result) result = opnfv_vnf.set_priv_to_pub_mapping() - self.assertEqual('(0, 1)', result) + self.assertEqual('(0,1)', result) @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') @@ -680,11 +769,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = VnfdHelper(self.VNFD_0) + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -702,6 +792,43 @@ class TestMultiPortConfig(unittest.TestCase): self.assertEqual(None, result) @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') + @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser') + def test_generate_arp_route_tbl(self, *_): + topology_file = mock.Mock() + config_tpl = mock.Mock() + tmp_file = mock.Mock() + vnfd_mock = mock.MagicMock() + vnfd_mock.port_num.side_effect = ['32', '1', '987'] + vnfd_mock.find_interface.side_effect = [ + { + 'virtual-interface': { + 'dst_ip': '10.20.30.40', + 'netmask': '20', + }, + }, + { + 'virtual-interface': { + 'dst_ip': '10.200.30.40', + 'netmask': '24', + }, + }, + { + 'virtual-interface': { + 'dst_ip': '10.20.3.40', + 'netmask': '8', + }, + }, + ] + + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) + opnfv_vnf.all_ports = [3, 2, 5] + + expected = '(0a141000,fffff000,32,0a141e28) (0ac81e00,ffffff00,1,0ac81e28) ' \ + '(0a000000,ff000000,987,0a140328)' + result = opnfv_vnf.generate_arp_route_tbl() + self.assertEqual(result, expected) + + @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict') @@ -710,11 +837,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -754,11 +882,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -795,11 +924,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -848,11 +978,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -884,11 +1015,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -932,11 +1064,12 @@ class TestMultiPortConfig(unittest.TestCase): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = VnfdHelper(self.VNFD_0) + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() @@ -982,7 +1115,7 @@ class TestMultiPortConfig(unittest.TestCase): opnfv_vnf.loadb_tpl = mock.MagicMock() opnfv_vnf.vnf_type = 'CGNAPT' opnfv_vnf.update_timer = mock.Mock() - opnfv_vnf.port_pair_list = [[[0], [1], [2]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1"), ("xe0", "xe2")] opnfv_vnf.lb_to_port_pair_mapping = [0, 1] opnfv_vnf.generate_arpicmp_data = mock.Mock() result = opnfv_vnf.generate_config_data() @@ -992,66 +1125,17 @@ class TestMultiPortConfig(unittest.TestCase): @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser') @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict') - def test_get_port_pairs(self, mock_open, mock_os, ConfigParser, - OrderedDict): - topology_file = mock.Mock() - config_tpl = mock.Mock() - tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) - opnfv_vnf.socket = 0 - opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] - opnfv_vnf.txrx_pipeline = '' - opnfv_vnf.rules = '' - opnfv_vnf.write_parser = mock.MagicMock() - opnfv_vnf.read_parser = mock.MagicMock() - opnfv_vnf.read_parser.sections = mock.Mock(return_value=['MASTER']) - opnfv_vnf.read_parser.has_option = mock.Mock(return_value=[]) - opnfv_vnf.write_parser.set = mock.Mock() - opnfv_vnf.write_parser.add_section = mock.Mock() - opnfv_vnf.read_parser.items = mock.MagicMock() - opnfv_vnf.pipeline_counter = 0 - opnfv_vnf.worker_config = '1t' - opnfv_vnf.start_core = 0 - opnfv_vnf.lb_count = 1 - opnfv_vnf.vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - opnfv_vnf.interfaces = opnfv_vnf.vnfd['vdu'][0]['external-interface'] - opnfv_vnf.lb_to_port_pair_mapping = [0, 1] - opnfv_vnf.lb_index = 1 - opnfv_vnf.ports_len = 1 - opnfv_vnf.pktq_out = ['1', '2'] - opnfv_vnf.prv_que_handler = 0 - opnfv_vnf.init_write_parser_template = mock.Mock() - opnfv_vnf.arpicmp_tpl = mock.MagicMock() - opnfv_vnf.txrx_tpl = mock.MagicMock() - opnfv_vnf.loadb_tpl = mock.MagicMock() - opnfv_vnf.vnf_tpl = {'public_ip_port_range': '98164810 (1,65535)', - 'vnf_set': '(2,4,5)'} - opnfv_vnf.generate_vnf_data = mock.Mock(return_value={}) - opnfv_vnf.update_write_parser = mock.Mock() - - curr_path = os.path.dirname(os.path.abspath(__file__)) - opnfv_vnf.topology_file = \ - os.path.join(curr_path, 'acl_vnf_topology_ixia.yaml') - opnfv_vnf.lb_count = 10 - result = opnfv_vnf.get_port_pairs(opnfv_vnf.interfaces) - self.assertEqual(result[0], [('xe0', 'xe1')]) - - @mock.patch('yardstick.network_services.helpers.samplevnf_helper.open') - @mock.patch('yardstick.network_services.helpers.samplevnf_helper.os') - @mock.patch('yardstick.network_services.helpers.samplevnf_helper.ConfigParser') - @mock.patch('yardstick.network_services.helpers.samplevnf_helper.OrderedDict') def test_init_eal(self, mock_open, mock_os, ConfigParser, OrderedDict): topology_file = mock.Mock() config_tpl = mock.Mock() tmp_file = mock.Mock() - opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file) + vnfd_mock = mock.MagicMock() + opnfv_vnf = MultiPortConfig(topology_file, config_tpl, tmp_file, vnfd_mock) opnfv_vnf.socket = 0 opnfv_vnf.start_core = 0 - opnfv_vnf.port_pair_list = [[[0], [1]]] - opnfv_vnf.port_pairs = [[[0], [1]]] + opnfv_vnf.port_pair_list = [("xe0", "xe1")] + opnfv_vnf.port_pairs = [("xe0", "xe1")] opnfv_vnf.txrx_pipeline = '' opnfv_vnf.rules = '' opnfv_vnf.write_parser = mock.MagicMock() diff --git a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py index 7fe83406a..0c82d74a8 100644 --- a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py +++ b/tests/unit/network_services/libs/ixia_libs/test_IxNet.py @@ -26,6 +26,9 @@ from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_4 from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_6 +UPLINK = "uplink" +DOWNLINK = "downlink" + class TestIxNextgen(unittest.TestCase): def test___init__(self): @@ -97,7 +100,7 @@ class TestIxNextgen(unittest.TestCase): def test_ix_update_frame(self): static_traffic_params = { - "private": { + UPLINK: { "id": 1, "bidir": "False", "duration": 60, @@ -139,7 +142,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public": { + DOWNLINK: { "id": 2, "bidir": "False", "duration": 60, @@ -268,7 +271,7 @@ class TestIxNextgen(unittest.TestCase): def test_add_ip_header_v4(self): static_traffic_params = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -308,7 +311,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, @@ -366,7 +369,7 @@ class TestIxNextgen(unittest.TestCase): def test_add_ip_header_v4_nothing_to_do(self): static_traffic_params = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -406,7 +409,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, @@ -464,7 +467,7 @@ class TestIxNextgen(unittest.TestCase): def test_add_ip_header_v6(self): static_traffic_profile = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -497,7 +500,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, @@ -547,7 +550,7 @@ class TestIxNextgen(unittest.TestCase): def test_add_ip_header_v6_nothing_to_do(self): static_traffic_params = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -579,7 +582,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, @@ -684,7 +687,7 @@ class TestIxNextgen(unittest.TestCase): def test_ix_update_ether(self): static_traffic_params = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -723,7 +726,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, @@ -787,7 +790,7 @@ class TestIxNextgen(unittest.TestCase): def test_ix_update_ether_nothing_to_do(self): static_traffic_params = { - "private_1": { + "uplink_0": { "id": 1, "bidir": "False", "duration": 60, @@ -820,7 +823,7 @@ class TestIxNextgen(unittest.TestCase): }, "traffic_type": "continuous" }, - "public_1": { + "downlink_0": { "id": 2, "bidir": "False", "duration": 60, diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py index 21beba882..1c2c1f3e2 100644 --- a/tests/unit/network_services/nfvi/test_resource.py +++ b/tests/unit/network_services/nfvi/test_resource.py @@ -54,7 +54,7 @@ class TestResourceProfile(unittest.TestCase): 'local_ip': '172.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '172.16.100.20', 'local_mac': '3c:fd:fe:a1:2b:80'}, @@ -66,7 +66,7 @@ class TestResourceProfile(unittest.TestCase): 'local_ip': '172.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '172.16.40.20', 'local_mac': '3c:fd:fe:a1:2b:81'}, diff --git a/tests/unit/network_services/traffic_profile/test_base.py b/tests/unit/network_services/traffic_profile/test_base.py index 72b097b52..290610361 100644 --- a/tests/unit/network_services/traffic_profile/test_base.py +++ b/tests/unit/network_services/traffic_profile/test_base.py @@ -48,7 +48,7 @@ class TestTrafficProfile(unittest.TestCase): def test_execute(self): traffic_profile = TrafficProfile(self.TRAFFIC_PROFILE) - self.assertRaises(NotImplementedError, traffic_profile.execute, {}) + self.assertRaises(NotImplementedError, traffic_profile.execute_traffic, {}) def test_get(self): traffic_profile = TrafficProfile(self.TRAFFIC_PROFILE) diff --git a/tests/unit/network_services/traffic_profile/test_fixed.py b/tests/unit/network_services/traffic_profile/test_fixed.py index 84843178e..eb182a2fb 100644 --- a/tests/unit/network_services/traffic_profile/test_fixed.py +++ b/tests/unit/network_services/traffic_profile/test_fixed.py @@ -74,7 +74,7 @@ class TestFixedProfile(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01'}, @@ -86,7 +86,7 @@ class TestFixedProfile(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02'}, diff --git a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py index cd0aacba6..6fffb9ede 100644 --- a/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py +++ b/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py @@ -20,6 +20,8 @@ from __future__ import division import unittest import mock +from copy import deepcopy + from tests.unit import STL_MOCKS STLClient = mock.MagicMock() @@ -35,6 +37,7 @@ if stl_patch: class TestIXIARFC2544Profile(unittest.TestCase): + TRAFFIC_PROFILE = { "schema": "isb:traffic_profile:0.1", "name": "fixed", @@ -43,13 +46,15 @@ class TestIXIARFC2544Profile(unittest.TestCase): "traffic_type": "FixedTraffic", "frame_rate": 100, # pps "flow_number": 10, - "frame_size": 64}} + "frame_size": 64, + }, + } PROFILE = {'description': 'Traffic profile to run RFC2544 latency', 'name': 'rfc2544', 'traffic_profile': {'traffic_type': 'IXIARFC2544Profile', 'frame_rate': 100}, - 'public': {'ipv4': + IXIARFC2544Profile.DOWNLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -61,7 +66,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): 'dscp': 0, 'ttl': 32}, 'outer_l4': {'srcport': '2001', 'dsrport': '1234'}}}, - 'private': {'ipv4': + IXIARFC2544Profile.UPLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -78,12 +83,12 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_get_ixia_traffic_profile_error(self): traffic_generator = mock.Mock(autospec=TrexProfile) traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.uplink_ports = [-1] + traffic_generator.downlink_ports = [1] traffic_generator.client = \ mock.Mock(return_value=True) STATIC_TRAFFIC = { - "private": { + IXIARFC2544Profile.UPLINK: { "id": 1, "bidir": "False", "duration": 60, @@ -122,7 +127,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): }, "traffic_type": "continuous" }, - "public": { + IXIARFC2544Profile.DOWNLINK: { "id": 2, "bidir": "False", "duration": 60, @@ -178,17 +183,16 @@ class TestIXIARFC2544Profile(unittest.TestCase): self.PROFILE, mac, xfile="tmp", static_traffic=STATIC_TRAFFIC) - @mock.patch("yardstick.network_services.traffic_profile.ixia_rfc2544.open") def test_get_ixia_traffic_profile(self, mock_open): traffic_generator = mock.Mock(autospec=TrexProfile) traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.uplink_ports = [-1] + traffic_generator.downlink_ports = [1] traffic_generator.client = \ mock.Mock(return_value=True) STATIC_TRAFFIC = { - "private": { + IXIARFC2544Profile.UPLINK: { "id": 1, "bidir": "False", "duration": 60, @@ -230,7 +234,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): }, "traffic_type": "continuous" }, - "public": { + IXIARFC2544Profile.DOWNLINK: { "id": 2, "bidir": "False", "duration": 60, @@ -293,12 +297,12 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_get_ixia_traffic_profile_v6(self, mock_open): traffic_generator = mock.Mock(autospec=TrexProfile) traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.uplink_ports = [-1] + traffic_generator.downlink_ports = [1] traffic_generator.client = \ mock.Mock(return_value=True) STATIC_TRAFFIC = { - "private": { + IXIARFC2544Profile.UPLINK: { "id": 1, "bidir": "False", "duration": 60, @@ -337,7 +341,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): }, "traffic_type": "continuous" }, - "public": { + IXIARFC2544Profile.DOWNLINK: { "id": 2, "bidir": "False", "duration": 60, @@ -394,7 +398,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): 'traffic_profile': {'traffic_type': 'IXIARFC2544Profile', 'frame_rate': 100}, - 'public': + IXIARFC2544Profile.DOWNLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', @@ -411,7 +415,7 @@ class TestIXIARFC2544Profile(unittest.TestCase): 'dscp': 0, 'ttl': 32}, 'outer_l4': {'srcport': '2001', 'dsrport': '1234'}}}, - 'private': {'ipv4': + IXIARFC2544Profile.UPLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -435,15 +439,23 @@ class TestIXIARFC2544Profile(unittest.TestCase): profile_data, mac, static_traffic=STATIC_TRAFFIC) self.assertIsNotNone(result) + def test__get_ixia_traffic_profile_default_args(self): + r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) + + expected = {} + result = r_f_c2544_profile._get_ixia_traffic_profile({}) + self.assertDictEqual(result, expected) + def test__ixia_traffic_generate(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) - traffic = {"public": {'iload': 10}, - "private": {'iload': 10}} + traffic = {IXIARFC2544Profile.DOWNLINK: {'iload': 10}, + IXIARFC2544Profile.UPLINK: {'iload': 10}} ixia_obj = mock.MagicMock() r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.rate = 100 @@ -453,15 +465,16 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_execute(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.first_run = True - r_f_c2544_profile.params = {"public": {'iload': 10}, - "private": {'iload': 10}} + r_f_c2544_profile.params = {IXIARFC2544Profile.DOWNLINK: {'iload': 10}, + IXIARFC2544Profile.UPLINK: {'iload': 10}} r_f_c2544_profile.get_streams = mock.Mock() r_f_c2544_profile.full_profile = {} @@ -469,14 +482,40 @@ class TestIXIARFC2544Profile(unittest.TestCase): r_f_c2544_profile.get_multiplier = mock.Mock() r_f_c2544_profile._ixia_traffic_generate = mock.Mock() ixia_obj = mock.MagicMock() - self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator, - ixia_obj)) + self.assertEqual(None, r_f_c2544_profile.execute_traffic(traffic_generator, ixia_obj)) + + def test_update_traffic_profile(self): + traffic_generator = mock.Mock(autospec=TrexProfile) + traffic_generator.networks = { + "uplink_0": ["xe0"], # private, one value for intfs + "downlink_0": ["xe1", "xe2"], # public, two values for intfs + "downlink_1": ["xe3"], # not in TRAFFIC PROFILE + "tenant_0": ["xe4"], # not public or private + } + + ports_expected = [8, 3, 5] + traffic_generator.vnfd_helper.port_num.side_effect = ports_expected + traffic_generator.client.return_value = True + + traffic_profile = deepcopy(self.TRAFFIC_PROFILE) + traffic_profile.update({ + "uplink_0": ["xe0"], + "downlink_0": ["xe1", "xe2"], + }) + + r_f_c2544_profile = IXIARFC2544Profile(traffic_profile) + r_f_c2544_profile.full_profile = {} + r_f_c2544_profile.get_streams = mock.Mock() + + self.assertIsNone(r_f_c2544_profile.update_traffic_profile(traffic_generator)) + self.assertEqual(r_f_c2544_profile.ports, ports_expected) def test_get_drop_percentage(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) @@ -509,8 +548,8 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_get_drop_percentage_update(self): traffic_generator = mock.Mock(autospec=TrexProfile) traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.uplink_ports = [0] + traffic_generator.downlink_ports = [1] traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) @@ -543,8 +582,8 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_get_drop_percentage_div_zero(self): traffic_generator = mock.Mock(autospec=TrexProfile) traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.uplink_ports = [0] + traffic_generator.downlink_ports = [1] traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) @@ -583,9 +622,10 @@ class TestIXIARFC2544Profile(unittest.TestCase): def test_start_ixia_latency(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = IXIARFC2544Profile(self.TRAFFIC_PROFILE) diff --git a/tests/unit/network_services/traffic_profile/test_prox_acl.py b/tests/unit/network_services/traffic_profile/test_prox_acl.py index be172f26b..a0c60186c 100644 --- a/tests/unit/network_services/traffic_profile/test_prox_acl.py +++ b/tests/unit/network_services/traffic_profile/test_prox_acl.py @@ -29,19 +29,38 @@ if stl_patch: from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxTestDataTuple -class TestProxRampProfile(unittest.TestCase): +class TestProxACLProfile(unittest.TestCase): def test_run_test_with_pkt_size(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, {} + + def get_mock_samples(*args, **kwargs): + if args[2] < 0: + raise RuntimeError(' '.join([str(args), str(runs)])) + return success_tuple + tp_config = { - 'traffic_profile': { + 'traffic_profile': { 'upper_bound': 100.0, + 'lower_bound': 0.0, + 'tolerated_loss': 50.0, + 'attempts': 20 }, } + 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_gen = mock.MagicMock() + traffic_gen.run_test = target + traffic_gen.resource_helper.run_test.side_effect = [ success_tuple, success_tuple, @@ -53,14 +72,15 @@ class TestProxRampProfile(unittest.TestCase): fail_tuple, ] - fill_values = [1, 2, 3, 4, RuntimeError] - profile = ProxACLProfile(tp_config) - profile.fill_samples = fill_samples = mock.MagicMock(side_effect=fill_values) - profile.queue = mock.MagicMock() + profile.init(mock.MagicMock()) - with self.assertRaises(RuntimeError): - profile.run_test_with_pkt_size(traffic_gen, 128, 30) + profile.prox_config["attempts"] = 20 + profile.queue = mock.MagicMock() + profile.tolerated_loss = 50.0 + profile.pkt_size = 128 + profile.duration = 30 + profile.test_value = 100.0 + profile.tolerated_loss = 100.0 - self.assertEqual(traffic_gen.resource_helper.run_test.call_count, 5) - self.assertEqual(fill_samples.call_count, 5) + profile.run_test_with_pkt_size(traffic_gen, profile.pkt_size, profile.duration) diff --git a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py index 0edce7a14..f56a7fba9 100644 --- a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py +++ b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py @@ -56,7 +56,7 @@ class TestProxBinSearchProfile(unittest.TestCase): profile = ProxBinSearchProfile(tp_config) profile.init(mock.MagicMock()) - profile.execute(traffic_generator) + 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) @@ -87,7 +87,7 @@ class TestProxBinSearchProfile(unittest.TestCase): profile = ProxBinSearchProfile(tp_config) profile.init(mock.MagicMock()) - profile.execute(traffic_generator) + 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/traffic_profile/test_prox_mpls.py b/tests/unit/network_services/traffic_profile/test_prox_mpls.py index 77bca9cc0..642fecc35 100644 --- a/tests/unit/network_services/traffic_profile/test_prox_mpls.py +++ b/tests/unit/network_services/traffic_profile/test_prox_mpls.py @@ -56,7 +56,7 @@ class TestProxMplsTagUntagProfile(unittest.TestCase): profile = ProxMplsTagUntagProfile(tp_config) profile.init(mock.MagicMock()) - profile.execute(traffic_generator) + 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) @@ -87,7 +87,7 @@ class TestProxMplsTagUntagProfile(unittest.TestCase): profile = ProxMplsTagUntagProfile(tp_config) profile.init(mock.MagicMock()) - profile.execute(traffic_generator) + 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/traffic_profile/test_prox_profile.py b/tests/unit/network_services/traffic_profile/test_prox_profile.py index 14223da0f..9899d9909 100644 --- a/tests/unit/network_services/traffic_profile/test_prox_profile.py +++ b/tests/unit/network_services/traffic_profile/test_prox_profile.py @@ -65,7 +65,7 @@ class TestProxProfile(unittest.TestCase): profile.init(234) self.assertEqual(profile.queue, 234) - def test_execute(self): + def test_execute_traffic(self): packet_sizes = [ 10, 100, @@ -83,9 +83,9 @@ class TestProxProfile(unittest.TestCase): self.assertFalse(profile.done) for _ in packet_sizes: with self.assertRaises(NotImplementedError): - profile.execute(traffic_generator) + profile.execute_traffic(traffic_generator) - self.assertIsNone(profile.execute(traffic_generator)) + self.assertIsNone(profile.execute_traffic(traffic_generator)) def test_bounds_iterator(self): tp_config = { diff --git a/tests/unit/network_services/traffic_profile/test_rfc2544.py b/tests/unit/network_services/traffic_profile/test_rfc2544.py index aef0b93de..221233710 100644 --- a/tests/unit/network_services/traffic_profile/test_rfc2544.py +++ b/tests/unit/network_services/traffic_profile/test_rfc2544.py @@ -50,7 +50,7 @@ class TestRFC2544Profile(unittest.TestCase): 'name': 'rfc2544', 'traffic_profile': {'traffic_type': 'RFC2544Profile', 'frame_rate': 100}, - 'public_1': {'ipv4': + 'downlink_0': {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -62,7 +62,7 @@ class TestRFC2544Profile(unittest.TestCase): 'dscp': 0, 'ttl': 32, 'count': 1}, 'outer_l4': {'srcport': '2001', 'dsrport': '1234', 'count': 1}}}, - 'private_1': {'ipv4': + 'uplink_0': {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -82,27 +82,29 @@ class TestRFC2544Profile(unittest.TestCase): def test_execute(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.params = self.PROFILE r_f_c2544_profile.first_run = True - self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator)) + self.assertEqual(None, r_f_c2544_profile.execute_traffic(traffic_generator)) def test_get_drop_percentage(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = mock.Mock(return_value=True) r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.params = self.PROFILE r_f_c2544_profile.register_generator(traffic_generator) - self.assertIsNone(r_f_c2544_profile.execute(traffic_generator)) + self.assertIsNone(r_f_c2544_profile.execute_traffic(traffic_generator)) samples = {} for ifname in range(1): @@ -140,15 +142,16 @@ class TestRFC2544Profile(unittest.TestCase): def test_get_drop_percentage_update(self): traffic_generator = mock.Mock(autospec=RFC2544Profile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = mock.Mock(return_value=True) r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.params = self.PROFILE r_f_c2544_profile.register_generator(traffic_generator) - self.assertIsNone(r_f_c2544_profile.execute()) + self.assertIsNone(r_f_c2544_profile.execute_traffic()) samples = {} for ifname in range(1): @@ -187,14 +190,15 @@ class TestRFC2544Profile(unittest.TestCase): def test_get_drop_percentage_div_zero(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [0] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "uplink_0": ["xe0"], + "downlink_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE) r_f_c2544_profile.params = self.PROFILE - self.assertEqual(None, r_f_c2544_profile.execute(traffic_generator)) + self.assertEqual(None, r_f_c2544_profile.execute_traffic(traffic_generator)) samples = {} for ifname in range(1): name = "xe{}".format(ifname) @@ -254,9 +258,10 @@ class TestRFC2544Profile(unittest.TestCase): def test_execute_latency(self): traffic_generator = mock.Mock(autospec=TrexProfile) - traffic_generator.my_ports = [0, 1] - traffic_generator.priv_ports = [-1] - traffic_generator.pub_ports = [1] + traffic_generator.networks = { + "private_0": ["xe0"], + "public_0": ["xe1"], + } traffic_generator.client = \ mock.Mock(return_value=True) r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE) diff --git a/tests/unit/network_services/traffic_profile/test_traffic_profile.py b/tests/unit/network_services/traffic_profile/test_traffic_profile.py index 9a78c36a3..8355c85b6 100644 --- a/tests/unit/network_services/traffic_profile/test_traffic_profile.py +++ b/tests/unit/network_services/traffic_profile/test_traffic_profile.py @@ -29,8 +29,16 @@ stl_patch.start() if stl_patch: from yardstick.network_services.traffic_profile.base import TrafficProfile - from yardstick.network_services.traffic_profile.traffic_profile import \ - TrexProfile + from yardstick.network_services.traffic_profile.traffic_profile import TrexProfile + from yardstick.network_services.traffic_profile.traffic_profile import SRC + from yardstick.network_services.traffic_profile.traffic_profile import DST + from yardstick.network_services.traffic_profile.traffic_profile import ETHERNET + from yardstick.network_services.traffic_profile.traffic_profile import IP + from yardstick.network_services.traffic_profile.traffic_profile import IPv6 + from yardstick.network_services.traffic_profile.traffic_profile import UDP + from yardstick.network_services.traffic_profile.traffic_profile import SRC_PORT + from yardstick.network_services.traffic_profile.traffic_profile import DST_PORT + from yardstick.network_services.traffic_profile.traffic_profile import TYPE_OF_SERVICE class TestTrexProfile(unittest.TestCase): @@ -44,28 +52,32 @@ class TestTrexProfile(unittest.TestCase): "flow_number": 10, "frame_size": 64}} + EXAMPLE_ETHERNET_ADDR = "00:00:00:00:00:01" + EXAMPLE_IP_ADDR = "10.0.0.1" + EXAMPLE_IPv6_ADDR = "0064:ff9b:0:0:0:0:9810:6414" + PROFILE = {'description': 'Traffic profile to run RFC2544 latency', 'name': 'rfc2544', 'traffic_profile': {'traffic_type': 'RFC2544Profile', 'frame_rate': 100}, - 'public': {'ipv4': {'outer_l2': {'framesize': {'64B': '100', + TrafficProfile.DOWNLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', '256B': '0', '373b': '0', '570B': '0'}, - "srcmac": "00:00:00:00:00:02", - "dstmac": "00:00:00:00:00:01"}, - 'outer_l3v4': {'dstip4': '1.1.1.1-1.1.2.2', + "srcmac": "00:00:00:00:00:02", + "dstmac": "00:00:00:00:00:01"}, + 'outer_l3v4': {'dstip4': '1.1.1.1-1.1.2.2', 'proto': 'udp', 'srcip4': '9.9.1.1-90.1.2.2', 'dscp': 0, 'ttl': 32, 'count': 1}, - 'outer_l4': {'srcport': '2001', + 'outer_l4': {'srcport': '2001', 'dsrport': '1234', 'count': 1}}}, - 'private': {'ipv4': + TrafficProfile.UPLINK: {'ipv4': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -85,22 +97,22 @@ class TestTrexProfile(unittest.TestCase): 'name': 'rfc2544', 'traffic_profile': {'traffic_type': 'RFC2544Profile', 'frame_rate': 100}, - 'public': {'ipv6': {'outer_l2': {'framesize': + TrafficProfile.DOWNLINK: {'ipv6': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', '256B': '0', '373b': '0', '570B': '0'}, "srcmac": "00:00:00:00:00:02", "dstmac": "00:00:00:00:00:01"}, - 'outer_l3v4': {'dstip6': '0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420', + 'outer_l3v4': {'dstip6': '0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420', 'proto': 'udp', 'srcip6': '0064:ff9b:0:0:0:0:9810:2814-0064:ff9b:0:0:0:0:9810:2820', 'dscp': 0, 'ttl': 32, 'count': 1}, - 'outer_l4': {'srcport': '2001', + 'outer_l4': {'srcport': '2001', 'dsrport': '1234', 'count': 1}}}, - 'private': + TrafficProfile.UPLINK: {'ipv6': {'outer_l2': {'framesize': {'64B': '100', '1518B': '0', '128B': '0', '1400B': '0', @@ -124,92 +136,6 @@ class TestTrexProfile(unittest.TestCase): TrexProfile(TrafficProfile) self.assertEqual(trex_profile.pps, 100) - def test_execute(self): - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.execute({})) - - def test_set_src_mac(self): - src_mac = "00:00:00:00:00:01" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_src_mac(src_mac)) - - src_mac = "00:00:00:00:00:01-00:00:00:00:00:02" - self.assertEqual(None, trex_profile.set_src_mac(src_mac)) - - def test_set_dst_mac(self): - dst_mac = "00:00:00:00:00:03" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_dst_mac(dst_mac)) - - dst_mac = "00:00:00:00:00:03-00:00:00:00:00:04" - self.assertEqual(None, trex_profile.set_dst_mac(dst_mac)) - - def test_set_src_ip4(self): - src_ipv4 = "152.16.100.20" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_src_ip4(src_ipv4)) - - src_ipv4 = "152.16.100.20-152.16.100.30" - self.assertEqual(None, trex_profile.set_src_ip4(src_ipv4)) - - def test_set_dst_ip4(self): - dst_ipv4 = "152.16.100.20" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_dst_ip4(dst_ipv4)) - - dst_ipv4 = "152.16.100.20-152.16.100.30" - self.assertEqual(None, trex_profile.set_dst_ip4(dst_ipv4)) - - def test_set_src_ip6(self): - src_ipv6 = "0064:ff9b:0:0:0:0:9810:6414" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_src_ip6(src_ipv6)) - - src_ipv6 = "0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420" - self.assertEqual(None, trex_profile.set_src_ip6(src_ipv6)) - - def test_set_dst_ip6(self): - dst_ipv6 = "0064:ff9b:0:0:0:0:9810:6414" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_dst_ip6(dst_ipv6)) - - dst_ipv6 = "0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420" - self.assertEqual(None, trex_profile.set_dst_ip6(dst_ipv6)) - - def test_dscp(self): - dscp = "0" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_dscp(dscp)) - - dscp = "0-1" - self.assertEqual(None, trex_profile.set_dscp(dscp)) - - def test_src_port(self): - port = "1234" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_src_port(port)) - - port = "1234-5678" - self.assertEqual(None, trex_profile.set_src_port(port)) - - def test_dst_port(self): - port = "1234" - trex_profile = \ - TrexProfile(TrafficProfile) - self.assertEqual(None, trex_profile.set_dst_port(port)) - - port = "1234-5678" - self.assertEqual(None, trex_profile.set_dst_port(port)) - def test_qinq(self): qinq = {"S-VLAN": {"id": 128, "priority": 0, "cfi": 0}, "C-VLAN": {"id": 512, "priority": 0, "cfi": 0}} @@ -222,47 +148,47 @@ class TestTrexProfile(unittest.TestCase): "C-VLAN": {"id": "512-515", "priority": 0, "cfi": 0}} self.assertEqual(None, trex_profile.set_qinq(qinq)) - def test_set_outer_l2_fields(self): + def test__set_outer_l2_fields(self): trex_profile = \ TrexProfile(TrafficProfile) qinq = {"S-VLAN": {"id": 128, "priority": 0, "cfi": 0}, "C-VLAN": {"id": 512, "priority": 0, "cfi": 0}} - outer_l2 = self.PROFILE['private']['ipv4']['outer_l2'] + outer_l2 = self.PROFILE[TrafficProfile.UPLINK]['ipv4']['outer_l2'] outer_l2['QinQ'] = qinq - self.assertEqual(None, trex_profile.set_outer_l2_fields(outer_l2)) + self.assertEqual(None, trex_profile._set_outer_l2_fields(outer_l2)) - def test_set_outer_l3v4_fields(self): + def test__set_outer_l3v4_fields(self): trex_profile = \ TrexProfile(TrafficProfile) - outer_l3v4 = self.PROFILE['private']['ipv4']['outer_l3v4'] + outer_l3v4 = self.PROFILE[TrafficProfile.UPLINK]['ipv4']['outer_l3v4'] outer_l3v4['proto'] = 'tcp' - self.assertEqual(None, trex_profile.set_outer_l3v4_fields(outer_l3v4)) + self.assertEqual(None, trex_profile._set_outer_l3v4_fields(outer_l3v4)) - def test_set_outer_l3v6_fields(self): + def test__set_outer_l3v6_fields(self): trex_profile = \ TrexProfile(TrafficProfile) - outer_l3v6 = self.PROFILE_v6['private']['ipv6']['outer_l3v4'] + outer_l3v6 = self.PROFILE_v6[TrafficProfile.UPLINK]['ipv6']['outer_l3v4'] outer_l3v6['proto'] = 'tcp' outer_l3v6['tc'] = 1 outer_l3v6['hlim'] = 10 - self.assertEqual(None, trex_profile.set_outer_l3v6_fields(outer_l3v6)) + self.assertEqual(None, trex_profile._set_outer_l3v6_fields(outer_l3v6)) - def test_set_outer_l4_fields(self): + def test__set_outer_l4_fields(self): trex_profile = \ TrexProfile(TrafficProfile) - outer_l4 = self.PROFILE['private']['ipv4']['outer_l4'] - self.assertEqual(None, trex_profile.set_outer_l4_fields(outer_l4)) + outer_l4 = self.PROFILE[TrafficProfile.UPLINK]['ipv4']['outer_l4'] + self.assertEqual(None, trex_profile._set_outer_l4_fields(outer_l4)) def test_get_streams(self): trex_profile = \ TrexProfile(TrafficProfile) trex_profile.params = self.PROFILE - profile_data = self.PROFILE["private"] + profile_data = self.PROFILE[TrafficProfile.UPLINK] self.assertIsNotNone(trex_profile.get_streams(profile_data)) trex_profile.pg_id = 1 self.assertIsNotNone(trex_profile.get_streams(profile_data)) trex_profile.params = self.PROFILE_v6 - trex_profile.profile_data = self.PROFILE_v6["private"] + trex_profile.profile_data = self.PROFILE_v6[TrafficProfile.UPLINK] self.assertIsNotNone(trex_profile.get_streams(profile_data)) trex_profile.pg_id = 1 self.assertIsNotNone(trex_profile.get_streams(profile_data)) @@ -284,3 +210,37 @@ class TestTrexProfile(unittest.TestCase): TrexProfile(TrafficProfile) self.assertRaises(SystemExit, trex_profile._get_start_end_ipv6, "1.1.1.3", "1.1.1.1") + + def test__general_single_action_partial(self): + trex_profile = TrexProfile(TrafficProfile) + + trex_profile._general_single_action_partial(ETHERNET)(SRC)(self.EXAMPLE_ETHERNET_ADDR) + self.assertEqual(self.EXAMPLE_ETHERNET_ADDR, trex_profile.ether_packet.src) + + trex_profile._general_single_action_partial(IP)(DST)(self.EXAMPLE_IP_ADDR) + self.assertEqual(self.EXAMPLE_IP_ADDR, trex_profile.ip_packet.dst) + + trex_profile._general_single_action_partial(IPv6)(DST)(self.EXAMPLE_IPv6_ADDR) + self.assertEqual(self.EXAMPLE_IPv6_ADDR, trex_profile.ip6_packet.dst) + + trex_profile._general_single_action_partial(UDP)(SRC_PORT)(5060) + self.assertEqual(5060, trex_profile.udp_packet.sport) + + trex_profile._general_single_action_partial(IP)(TYPE_OF_SERVICE)(0) + self.assertEqual(0, trex_profile.ip_packet.tos) + + def test__set_proto_addr(self): + trex_profile = TrexProfile(TrafficProfile) + + ether_range = "00:00:00:00:00:01-00:00:00:00:00:02" + ip_range = "1.1.1.2-1.1.1.10" + ipv6_range = '0064:ff9b:0:0:0:0:9810:6414-0064:ff9b:0:0:0:0:9810:6420' + + trex_profile._set_proto_addr(ETHERNET, SRC, ether_range) + trex_profile._set_proto_addr(ETHERNET, DST, ether_range) + trex_profile._set_proto_addr(IP, SRC, ip_range) + trex_profile._set_proto_addr(IP, DST, ip_range) + trex_profile._set_proto_addr(IPv6, SRC, ipv6_range) + trex_profile._set_proto_addr(IPv6, DST, ipv6_range) + trex_profile._set_proto_addr(UDP, SRC_PORT, "5060-5090") + trex_profile._set_proto_addr(UDP, DST_PORT, "5060") diff --git a/tests/unit/network_services/vnf_generic/test_vnfdgen.py b/tests/unit/network_services/vnf_generic/test_vnfdgen.py index c2b923568..ee881c963 100644 --- a/tests/unit/network_services/vnf_generic/test_vnfdgen.py +++ b/tests/unit/network_services/vnf_generic/test_vnfdgen.py @@ -24,6 +24,10 @@ from six.moves import range from yardstick.common.yaml_loader import yaml_load from yardstick.network_services.vnf_generic import vnfdgen + +UPLINK = "uplink" +DOWNLINK = "downlink" + TREX_VNFD_TEMPLATE = """ vnfd:vnfd-catalog: vnfd: @@ -183,22 +187,23 @@ NODE_CFG = {'ip': '1.1.1.1', } +# need to template, but can't use {} so use %s TRAFFIC_PROFILE_TPL = """ -private: +%(0)s: - ipv4: outer_l2: framesize: - 64B: "{{ get(imix, 'private.imix_small', 10) }}" - 128B: "{{ get(imix, 'private.imix_128B', 10) }}" - 256B: "{{ get(imix, 'private.imix_256B', 10) }}" - 373B: "{{ get(imix, 'private.imix_373B', 10) }}" - 570B: "{{get(imix, 'private.imix_570B', 10) }}" - 1400B: "{{get(imix, 'private.imix_1400B', 10) }}" - 1518B: "{{get(imix, 'private.imix_1500B', 40) }}" -""" + 64B: "{{ get(imix, '%(0)s.imix_small', 10) }}" + 128B: "{{ get(imix, '%(0)s.imix_128B', 10) }}" + 256B: "{{ get(imix, '%(0)s.imix_256B', 10) }}" + 373B: "{{ get(imix, '%(0)s.imix_373B', 10) }}" + 570B: "{{get(imix, '%(0)s.imix_570B', 10) }}" + 1400B: "{{get(imix, '%(0)s.imix_1400B', 10) }}" + 1518B: "{{get(imix, '%(0)s.imix_1500B', 40) }}" +""" % {"0": UPLINK} TRAFFIC_PROFILE = { - "private": [{"ipv4": {"outer_l2": + UPLINK: [{"ipv4": {"outer_l2": {"framesize": {"64B": '10', "128B": '10', "256B": '10', "373B": '10', "570B": '10', "1400B": '10', @@ -269,8 +274,8 @@ class TestVnfdGen(unittest.TestCase): generated_tp = \ vnfdgen.generate_vnfd(TRAFFIC_PROFILE_TPL, - {"imix": {"private": {"imix_small": '20'}}}) + {"imix": {UPLINK: {"imix_small": '20'}}}) self.maxDiff = None tp2 = dict(TRAFFIC_PROFILE) - tp2["private"][0]["ipv4"]["outer_l2"]["framesize"]["64B"] = '20' + tp2[UPLINK][0]["ipv4"]["outer_l2"]["framesize"]["64B"] = '20' self.assertDictEqual(tp2, generated_tp) diff --git a/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py index 2e83353cd..e9444b493 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py @@ -75,7 +75,7 @@ class TestAclApproxVnf(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -90,7 +90,7 @@ class TestAclApproxVnf(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -144,7 +144,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': AclApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -172,7 +172,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': AclApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -197,7 +197,7 @@ class TestAclApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': AclApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -207,7 +207,7 @@ class TestAclApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': AclApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_base.py b/tests/unit/network_services/vnf_generic/vnf/test_base.py index e1c69e7b3..478ce186b 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_base.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_base.py @@ -150,7 +150,7 @@ class TestGenericVNF(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01' @@ -165,7 +165,7 @@ class TestGenericVNF(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02' diff --git a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py index e5503697a..0a4c12446 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py @@ -21,6 +21,8 @@ import os import unittest import mock +from copy import deepcopy + from tests.unit import STL_MOCKS from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh @@ -66,15 +68,22 @@ link 1 up """ header = "This is a header" - out = CgnaptApproxSetupEnvHelper._update_cgnat_script_file(header, sample.splitlines(), "") + out = CgnaptApproxSetupEnvHelper._update_cgnat_script_file(header, sample.splitlines()) self.assertNotIn("This is a header", out) - def test__get_cgnapt_confgi(self): + def test__get_cgnapt_config(self): + vnfd_helper = mock.Mock() + vnfd_helper.port_pairs.uplink_ports = [{"name": 'a'}, {"name": "b"}, {"name": "c"}] + + helper = CgnaptApproxSetupEnvHelper(vnfd_helper, mock.Mock(), mock.Mock()) + helper._get_ports_gateway = mock.Mock(side_effect=[3, 5, 2]) + result = helper._get_cgnapt_config([{"name": 'a'}, {}, {"name": "b"}, {}, {"name": "c"}]) + self.assertEqual(result, [3, 5, 2]) - c = CgnaptApproxSetupEnvHelper(mock.MagicMock(), mock.MagicMock(), mock.MagicMock()) - c._get_ports_gateway = mock.Mock(return_value=3) - ret = c._get_cgnapt_config([{"name": 'a'}, {}, {"name": "b"}, {}, {"name": "c"}]) - self.assertEqual(ret, [3, 3, 3]) + def test_scale(self): + helper = CgnaptApproxSetupEnvHelper(mock.Mock(), mock.Mock(), mock.Mock()) + with self.assertRaises(NotImplementedError): + helper.scale() @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Process") @@ -111,7 +120,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -126,7 +135,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -146,31 +155,48 @@ class TestCgnaptApproxVnf(unittest.TestCase): {'type': 'VPORT', 'name': 'xe1'}], 'id': 'CgnaptApproxVnf', 'name': 'VPEVnfSsh'}]}} - scenario_cfg = {'options': {'packetsize': 64, 'traffic_type': 4, - 'rfc2544': {'allowed_drop_rate': '0.8 - 1'}, - 'vnf__1': {'rules': 'acl_1rule.yaml', - 'vnf_config': {'lb_config': 'SW', - 'lb_count': 1, - 'worker_config': - '1C/1T', - 'worker_threads': 1}} - }, - 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', - 'task_path': '/tmp', - 'tc': 'tc_ipv4_1Mflow_64B_packetsize', - 'runner': {'object': 'NetworkServiceTestCase', - 'interval': 35, - 'output_filename': '/tmp/yardstick.out', - 'runner_id': 74476, 'duration': 400, - 'type': 'Duration'}, - 'traffic_profile': 'ipv4_throughput_acl.yaml', - 'traffic_options': {'flow': 'ipv4_Packets_acl.yaml', - 'imix': 'imix_voice.yaml'}, - 'type': 'ISB', - 'nodes': {'tg__2': 'trafficgen_2.yardstick', - 'tg__1': 'trafficgen_1.yardstick', - 'vnf__1': 'vnf.yardstick'}, - 'topology': 'vpe-tg-topology-baremetal.yaml'} + SCENARIO_CFG = { + 'options': { + 'packetsize': 64, + 'traffic_type': 4, + 'rfc2544': { + 'allowed_drop_rate': '0.8 - 1', + }, + 'vnf__1': { + 'napt': 'dynamic', + 'vnf_config': { + 'lb_config': 'SW', + 'lb_count': 1, + 'worker_config': + '1C/1T', + 'worker_threads': 1, + }, + }, + }, + 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', + 'task_path': '/tmp', + 'tc': 'tc_ipv4_1Mflow_64B_packetsize', + 'runner': { + 'object': 'NetworkServiceTestCase', + 'interval': 35, + 'output_filename': '/tmp/yardstick.out', + 'runner_id': 74476, + 'duration': 400, + 'type': 'Duration', + }, + 'traffic_profile': 'ipv4_throughput_acl.yaml', + 'traffic_options': { + 'flow': 'ipv4_Packets_acl.yaml', + 'imix': 'imix_voice.yaml', + }, + 'type': 'ISB', + 'nodes': { + 'tg__2': 'trafficgen_2.yardstick', + 'tg__1': 'trafficgen_1.yardstick', + 'vnf__1': 'vnf.yardstick', + }, + 'topology': 'vpe-tg-topology-baremetal.yaml', + } context_cfg = {'nodes': {'tg__2': {'member-vnf-index': '3', @@ -180,7 +206,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': CgnaptApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -208,7 +234,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': CgnaptApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -233,7 +259,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': CgnaptApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -243,7 +269,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': CgnaptApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', @@ -277,12 +303,15 @@ class TestCgnaptApproxVnf(unittest.TestCase): 'password': 'r00t', 'VNF model': 'cgnapt_vnf.yaml'}}} + def setUp(self): + self.scenario_cfg = deepcopy(self.SCENARIO_CFG) + def test___init__(self, mock_process): vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) self.assertIsNone(cgnapt_approx_vnf._vnf_process) - @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch(SSH_HELPER) def test_collect_kpi(self, ssh, mock_time, mock_process): mock_ssh(ssh) @@ -296,7 +325,7 @@ class TestCgnaptApproxVnf(unittest.TestCase): result = {'packets_dropped': 0, 'packets_fwd': 0, 'packets_in': 0} self.assertEqual(result, cgnapt_approx_vnf.collect_kpi()) - @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') @mock.patch(SSH_HELPER) def test_vnf_execute_command(self, ssh, mock_time, mock_process): mock_ssh(ssh) @@ -386,9 +415,24 @@ class TestCgnaptApproxVnf(unittest.TestCase): self.assertEqual(None, cgnapt_approx_vnf.terminate()) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") - @mock.patch("yardstick.network_services.vnf_generic.vnf.cgnapt_vnf.time") @mock.patch(SSH_HELPER) - def test__vnf_up_post(self, ssh, mock_time, mock_cgnapt_time, mock_process): + def test__vnf_up_post(self, ssh, mock_time, mock_process): + mock_ssh(ssh) + + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + self.scenario_cfg['options'][name]['napt'] = 'static' + + cgnapt_approx_vnf = CgnaptApproxVnf(name, vnfd) + cgnapt_approx_vnf._vnf_process = mock.MagicMock() + cgnapt_approx_vnf._vnf_process.terminate = mock.Mock() + cgnapt_approx_vnf.vnf_execute = mock.MagicMock() + cgnapt_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg + cgnapt_approx_vnf._resource_collect_stop = mock.Mock() + cgnapt_approx_vnf._vnf_up_post() + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") + @mock.patch(SSH_HELPER) + def test__vnf_up_post_short(self, ssh, mock_time, mock_process): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -399,7 +443,6 @@ class TestCgnaptApproxVnf(unittest.TestCase): cgnapt_approx_vnf.scenario_helper.scenario_cfg = self.scenario_cfg cgnapt_approx_vnf._resource_collect_stop = mock.Mock() cgnapt_approx_vnf._vnf_up_post() - cgnapt_approx_vnf.vnf_execute.assert_called_once() if __name__ == '__main__': diff --git a/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py b/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py index 15d6adea1..1ad8df9c6 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_iniparser.py @@ -28,6 +28,7 @@ stl_patch.start() if stl_patch: from yardstick.network_services.vnf_generic.vnf.iniparser import ParseError + from yardstick.network_services.vnf_generic.vnf.iniparser import LineParser from yardstick.network_services.vnf_generic.vnf.iniparser import BaseParser from yardstick.network_services.vnf_generic.vnf.iniparser import ConfigParser @@ -38,16 +39,18 @@ key1=value1 list1: value2 value3 value4 -key2="double quote value" key3='single quote value' ; comment here key4= -[section2] +[section2] ; comment with #2 other symbol # here is a comment line list2: value5 -key with no value +key with no value # mixed comment ; symbols ; another comment line key5= + +[section1] ; reopen a section! +key2="double quote value" """ PARSE_TEXT_2 = """\ @@ -86,6 +89,17 @@ class TestParseError(unittest.TestCase): self.assertEqual(str(error), "at line 2, a: 'c'") +class TestLineParser(unittest.TestCase): + + def test___repr__(self): + line_parser = LineParser('', 101) + self.assertIsNotNone(repr(line_parser)) + + def test_error_invalid_assignment(self): + line_parser = LineParser('', 101) + self.assertIsNotNone(line_parser.error_invalid_assignment()) + + class TestBaseParser(unittest.TestCase): @staticmethod @@ -96,23 +110,26 @@ class TestBaseParser(unittest.TestCase): return internal_open - @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open') - def test_parse_none(self, mock_open): - mock_open.side_effect = self.make_open('') - + def test_parse(self): parser = BaseParser() + parser.parse() - parser.parse([]) + def test_parse_empty_string(self): + parser = BaseParser() + self.assertIsNone(parser.parse('')) def test_not_implemented_methods(self): parser = BaseParser() with self.assertRaises(NotImplementedError): - parser.assignment('key', 'value') + parser.assignment('key', 'value', LineParser('', 100)) with self.assertRaises(NotImplementedError): parser.new_section('section') + with self.assertRaises(NotImplementedError): + parser.comment('comment') + class TestConfigParser(unittest.TestCase): @@ -128,18 +145,25 @@ class TestConfigParser(unittest.TestCase): def test_parse(self, mock_open): mock_open.side_effect = self.make_open(PARSE_TEXT_1) - config_parser = ConfigParser('my_file', []) + existing_data = [['section0', [['key0', 'value0']]]] + config_parser = ConfigParser('my_file', existing_data) config_parser.parse() expected = [ [ + 'section0', + [ + ['key0', 'value0'], + ], + ], + [ 'section1', [ ['key1', 'value1'], ['list1', 'value2\nvalue3\nvalue4'], - ['key2', 'double quote value'], ['key3', 'single quote value'], ['key4', ''], + ['key2', 'double quote value'], ], ], [ @@ -153,12 +177,16 @@ class TestConfigParser(unittest.TestCase): ] self.assertEqual(config_parser.sections, expected) + self.assertIsNotNone(config_parser.find_section('section1')) + self.assertIsNone(config_parser.find_section('section3')) + self.assertEqual(config_parser.find_section_index('section1'), 1) + self.assertEqual(config_parser.find_section_index('section3'), -1) @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open') def test_parse_2(self, mock_open): mock_open.side_effect = self.make_open(PARSE_TEXT_2) - config_parser = ConfigParser('my_file', []) + config_parser = ConfigParser('my_file') config_parser.parse() expected = [ 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 cba3d449f..995b4a2cc 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 @@ -17,6 +17,7 @@ from __future__ import absolute_import +import copy import os import socket import unittest @@ -25,6 +26,7 @@ from contextlib import contextmanager import mock from tests.unit import STL_MOCKS +from yardstick.network_services.vnf_generic.vnf.base import VnfdHelper STLClient = mock.MagicMock() stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) @@ -634,6 +636,111 @@ class TestProxSocketHelper(unittest.TestCase): class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): + + VNFD0 = { + 'short-name': 'ProxVnf', + 'vdu': [ + { + 'routing_table': [ + { + 'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0', + }, + { + 'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1', + }, + ], + 'description': 'PROX approximation using DPDK', + 'name': 'proxvnf-baremetal', + 'nd_route_tbl': [ + { + 'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0', + }, + { + 'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1', + }, + ], + 'id': 'proxvnf-baremetal', + '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', + 'vld_id': 'uplink_0', + 'netmask': '255.255.255.0', + 'dpdk_port_num': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.19', + 'local_iface_name': 'xe0', + 'local_mac': '00:00:00:00:00:02', + 'ifname': 'xe0', + }, + 'vnfd-connection-point-ref': 'xe0', + 'name': 'xe0', + }, + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:03', + 'vpci': '0000:05:00.1', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'vld_id': 'downlink_0', + 'driver': "i40e", + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'local_iface_name': 'xe1', + 'local_mac': '00:00:00:00:00:01', + 'ifname': 'xe1', + }, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1', + }, + ], + }, + ], + 'description': 'PROX approximation using DPDK', + 'mgmt-interface': { + 'vdu-id': 'proxvnf-baremetal', + 'host': '1.2.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.2.1.1', + }, + 'benchmark': { + 'kpi': [ + 'packets_in', + 'packets_fwd', + 'packets_dropped', + ], + }, + 'id': 'ProxApproxVnf', + 'name': 'ProxVnf', + } + + VNFD = { + 'vnfd:vnfd-catalog': { + 'vnfd': [ + VNFD0, + ], + }, + } + def test__replace_quoted_with_value(self): # empty string input_str = '' @@ -751,33 +858,6 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): result = ProxDpdkVnfSetupEnvHelper.write_prox_config(input_data) self.assertEqual(result, expected) - def test_rebind_drivers(self): - def find_drivers(*args, **kwargs): - setup_helper.used_drivers = used_drivers - - used_drivers = { - 'a': (1, 'b'), - 'c': (2, 'd'), - } - - vnfd_helper = mock.MagicMock() - ssh_helper = mock.MagicMock() - scenario_helper = mock.MagicMock() - setup_helper = ProxDpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - setup_helper._find_used_drivers = mock_find = mock.MagicMock(side_effect=find_drivers) - - setup_helper.rebind_drivers() - self.assertEqual(mock_find.call_count, 1) - self.assertEqual(ssh_helper.execute.call_count, 2) - self.assertIn('--force', ssh_helper.execute.call_args[0][0]) - - mock_find.reset_mock() - ssh_helper.execute.reset_mock() - setup_helper.rebind_drivers(False) - self.assertEqual(mock_find.call_count, 0) - self.assertEqual(ssh_helper.execute.call_count, 2) - self.assertNotIn('--force', ssh_helper.execute.call_args[0][0]) - @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.find_relative_file') def test_build_config_file_no_additional_file(self, mock_find_path): vnf1 = { @@ -804,11 +884,11 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): helper.upload_prox_config = mock.MagicMock(return_value='5') self.assertEqual(helper.additional_files, {}) - self.assertNotEqual(helper.prox_config_dict, '4') + self.assertNotEqual(helper._prox_config_data, '4') self.assertNotEqual(helper.remote_path, '5') helper.build_config_file() self.assertEqual(helper.additional_files, {}) - self.assertEqual(helper.prox_config_dict, '4') + self.assertEqual(helper._prox_config_data, '4') self.assertEqual(helper.remote_path, '5') @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.find_relative_file') @@ -854,7 +934,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): ], } - mock_find_path.side_effect = ['1', '2'] + mock_find_path.side_effect = ['1', '2'] + [str(i) for i in range(len(vnf1['prox_files']))] vnfd_helper = mock.MagicMock() ssh_helper = mock.MagicMock() scenario_helper = ScenarioHelper('vnf1') @@ -871,12 +951,12 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): helper.upload_prox_config = mock.MagicMock(return_value='55') self.assertEqual(helper.additional_files, {}) - self.assertNotEqual(helper.prox_config_dict, '44') + self.assertNotEqual(helper._prox_config_data, '44') self.assertNotEqual(helper.remote_path, '55') expected = {'h.i': '33', 'l': '34', 'm_n': '35'} helper.build_config_file() self.assertDictEqual(helper.additional_files, expected) - self.assertEqual(helper.prox_config_dict, '44') + self.assertEqual(helper._prox_config_data, '44') self.assertEqual(helper.remote_path, '55') @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.find_relative_file') @@ -906,9 +986,10 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): helper = ProxDpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) helper.remote_path = "/tmp/prox.cfg" - prox_cmd = helper.build_config() expected = "sudo bash -c 'cd /opt/nsb_bin; /opt/nsb_bin/prox -o cli -f -f /tmp/prox.cfg '" - self.assertEqual(prox_cmd, expected) + with mock.patch.object(helper, "build_config_file") as mock_build_config: + prox_cmd = helper.build_config() + self.assertEqual(prox_cmd, expected) def test__insert_additional_file(self): vnfd_helper = mock.MagicMock() @@ -931,8 +1012,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): mock_parser_type.side_effect = init - vnfd_helper = mock.MagicMock() - vnfd_helper.interfaces = [] + vnfd_helper = VnfdHelper(self.VNFD0) ssh_helper = mock.MagicMock() scenario_helper = mock.MagicMock() @@ -946,23 +1026,6 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): helper.additional_files = {"ipv4.lua": "/tmp/ipv4.lua"} helper.remote_prox_file_name = 'remote' - vnfd_helper.interfaces = [ - { - 'virtual-interface': { - 'dst_mac': '00:00:00:de:ad:88', - }, - }, - { - 'virtual-interface': { - 'dst_mac': '00:00:00:de:ad:ee', - }, - }, - { - 'virtual-interface': { - 'dst_mac': '00:00:00:de:ad:ff', - }, - }, - ] sections_data = [ [ 'lua', @@ -975,7 +1038,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): [ ['ip', ''], ['mac', 'foo'], - ['dst mac', '@@2'], + ['dst mac', '@@1'], ['tx port', '1'], ], ], @@ -1004,7 +1067,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): [ ['ip', ''], ['mac', 'hardware'], - ['dst mac', '00:00:00:de:ad:ff'], + ['dst mac', '00:00:00:00:00:03'], ['tx port', '1'], ], ], @@ -1012,7 +1075,7 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): 'port 2', [ ['ip', ''], - ['$sut_mac0', '00 00 00 de ad 88'], + ['$sut_mac0', '00 00 00 00 00 04'], ['tx port', '0'], ['single', '@'], ['user_table', 'dofile("/tmp/ipv4.lua")'], @@ -1079,48 +1142,26 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): helper.generate_prox_config_file('a/b') def test_generate_prox_lua_file(self): - vnfd_helper = mock.MagicMock() - vnfd_helper.interfaces = [] + vnfd_helper = VnfdHelper(self.VNFD0) ssh_helper = mock.MagicMock() scenario_helper = mock.MagicMock() helper = ProxDpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) helper.LUA_PARAMETER_NAME = 'sut' - expected = '' - result = helper.generate_prox_lua_file() - self.assertEqual(result, expected) - - vnfd_helper.interfaces = [ - { - 'local_ip': '10.20.30.40', - 'dst_ip': '10.11.12.13', - 'virtual-interface': { - 'dpdk_port_num': 3, - }, - }, - { - 'local_ip': '10.20.30.45', - 'dst_ip': '10.11.12.19', - 'virtual-interface': { - 'dpdk_port_num': 7, - }, - }, + expected = [ + 'sut_hex_ip_port_0:"98 10 64 13"', + 'sut_ip_port_0:"152.16.100.19"', + 'gen_hex_ip_port_0:"98 10 64 13"', + 'gen_ip_port_0:"152.16.100.19"', + + 'sut_hex_ip_port_1:"98 10 28 13"', + 'sut_ip_port_1:"152.16.40.19"', + 'gen_hex_ip_port_1:"98 10 28 14"', + 'gen_ip_port_1:"152.16.40.20"', ] - - expected = os.linesep.join([ - 'sut_hex_ip_port_3:"0a 14 1e 28"', - 'sut_ip_port_3:"10.20.30.40"', - 'gen_hex_ip_port_3:"0a 0b 0c 0d"', - 'gen_ip_port_3:"10.11.12.13"', - - 'sut_hex_ip_port_7:"0a 14 1e 2d"', - 'sut_ip_port_7:"10.20.30.45"', - 'gen_hex_ip_port_7:"0a 0b 0c 13"', - 'gen_ip_port_7:"10.11.12.19"', - ]) result = helper.generate_prox_lua_file() - self.assertEqual(result, expected) + self.assertListEqual(result.splitlines(), expected) def test_upload_prox_lua(self): def identity(*args): @@ -1198,6 +1239,111 @@ class TestProxDpdkVnfSetupEnvHelper(unittest.TestCase): class TestProxResourceHelper(unittest.TestCase): + + VNFD0 = { + 'short-name': 'ProxVnf', + 'vdu': [ + { + 'routing_table': [ + { + 'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0', + }, + { + 'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1', + }, + ], + 'description': 'PROX approximation using DPDK', + 'name': 'proxvnf-baremetal', + 'nd_route_tbl': [ + { + 'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0', + }, + { + 'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1', + }, + ], + 'id': 'proxvnf-baremetal', + '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', + 'vld_id': 'uplink_0', + 'netmask': '255.255.255.0', + 'dpdk_port_num': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.19', + 'local_iface_name': 'xe0', + 'local_mac': '00:00:00:00:00:02', + 'ifname': 'xe0', + }, + 'vnfd-connection-point-ref': 'xe0', + 'name': 'xe0', + }, + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:03', + 'vpci': '0000:05:00.1', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'vld_id': 'downlink_0', + 'driver': "i40e", + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'local_iface_name': 'xe1', + 'local_mac': '00:00:00:00:00:01', + 'ifname': 'xe1', + }, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1', + }, + ], + }, + ], + 'description': 'PROX approximation using DPDK', + 'mgmt-interface': { + 'vdu-id': 'proxvnf-baremetal', + 'host': '1.2.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.2.1.1', + }, + 'benchmark': { + 'kpi': [ + 'packets_in', + 'packets_fwd', + 'packets_dropped', + ], + }, + 'id': 'ProxApproxVnf', + 'name': 'ProxVnf', + } + + VNFD = { + 'vnfd:vnfd-catalog': { + 'vnfd': [ + VNFD0, + ], + }, + } + def test_line_rate_to_pps(self): expected = 0.25 * 1e8 result = ProxResourceHelper.line_rate_to_pps(180, 4) @@ -1247,7 +1393,7 @@ class TestProxResourceHelper(unittest.TestCase): def test_test_cores(self): setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} + setup_helper.prox_config_data = [] helper = ProxResourceHelper(setup_helper) helper._cpu_topology = [] @@ -1256,7 +1402,7 @@ class TestProxResourceHelper(unittest.TestCase): result = helper.test_cores self.assertEqual(result, expected) - setup_helper.prox_config_dict = [ + setup_helper.prox_config_data = [ ('section1', []), ('section2', [ ('a', 'b'), @@ -1304,10 +1450,9 @@ class TestProxResourceHelper(unittest.TestCase): def test_get_test_type(self): setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} - helper = ProxResourceHelper(setup_helper) - setup_helper.prox_config_dict = [ + + setup_helper.prox_config_data = [ ('global', [ ('name', helper.PROX_CORE_MPLS_TEST) ]), @@ -1334,27 +1479,7 @@ class TestProxResourceHelper(unittest.TestCase): def test_get_cores(self): setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} - - helper = ProxResourceHelper(setup_helper) - helper._cpu_topology = { - 0: { - 1: { - 5: (5, 1, 0) - }, - 2: { - 6: (6, 2, 0) - }, - 3: { - 7: (7, 3, 0) - }, - 4: { - 8: (8, 3, 0) - }, - } - } - - setup_helper.prox_config_dict = [ + setup_helper.prox_config_data = [ ('section1', []), ('section2', [ ('a', 'b'), @@ -1375,14 +1500,6 @@ class TestProxResourceHelper(unittest.TestCase): ]), ] - expected = [7, 8] - result = helper.get_cores(helper.PROX_CORE_GEN_MODE) - self.assertEqual(result, expected) - - def test_get_cores_mpls(self): - setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} - helper = ProxResourceHelper(setup_helper) helper._cpu_topology = { 0: { @@ -1401,7 +1518,13 @@ class TestProxResourceHelper(unittest.TestCase): } } - setup_helper.prox_config_dict = [ + expected = [7, 8] + result = helper.get_cores(helper.PROX_CORE_GEN_MODE) + self.assertEqual(result, expected) + + def test_get_cores_mpls(self): + setup_helper = mock.MagicMock() + setup_helper.prox_config_data = [ ('section1', []), ('section2', [ ('a', 'b'), @@ -1424,6 +1547,24 @@ class TestProxResourceHelper(unittest.TestCase): ]), ] + helper = ProxResourceHelper(setup_helper) + helper._cpu_topology = { + 0: { + 1: { + 5: (5, 1, 0) + }, + 2: { + 6: (6, 2, 0) + }, + 3: { + 7: (7, 3, 0) + }, + 4: { + 8: (8, 3, 0) + }, + } + } + expected_tagged = [7] expected_plain = [8] result_tagged, result_plain = helper.get_cores_mpls(helper.PROX_CORE_GEN_MODE) @@ -1432,7 +1573,7 @@ class TestProxResourceHelper(unittest.TestCase): def test_latency_cores(self): setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} + setup_helper.prox_config_data= [] helper = ProxResourceHelper(setup_helper) helper._cpu_topology = [] @@ -1441,7 +1582,7 @@ class TestProxResourceHelper(unittest.TestCase): result = helper.latency_cores self.assertEqual(result, expected) - setup_helper.prox_config_dict = [ + setup_helper.prox_config_data = [ ('section1', []), ('section2', [ ('a', 'b'), @@ -1504,7 +1645,9 @@ class TestProxResourceHelper(unittest.TestCase): def test_start_collect(self): setup_helper = mock.MagicMock() helper = ProxResourceHelper(setup_helper) + helper.resource = resource = mock.MagicMock() self.assertIsNone(helper.start_collect()) + resource.start.assert_called_once() def test_terminate(self): setup_helper = mock.MagicMock() @@ -1536,7 +1679,7 @@ class TestProxResourceHelper(unittest.TestCase): @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.time') def test_traffic_context(self, mock_time): setup_helper = mock.MagicMock() - setup_helper.prox_config_dict = {} + setup_helper.vnfd_helper.interfaces = [] helper = ProxResourceHelper(setup_helper) helper._cpu_topology = { @@ -1556,7 +1699,7 @@ class TestProxResourceHelper(unittest.TestCase): } } - setup_helper.prox_config_dict = [ + setup_helper.prox_config_data = [ ('global', [ ('name', helper.PROX_CORE_MPLS_TEST) ]), @@ -1582,8 +1725,6 @@ class TestProxResourceHelper(unittest.TestCase): ]), ] - setup_helper = mock.MagicMock() - setup_helper.vnfd_helper.interfaces = [] client = mock.MagicMock() client.hz.return_value = 2 @@ -1603,8 +1744,30 @@ class TestProxResourceHelper(unittest.TestCase): def measure(*args, **kwargs): yield stats + bad_vnfd = copy.deepcopy(self.VNFD0) + bad_vnfd['vdu'][0]['external-interface'].append({ + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:05', + 'vpci': '0000:06:00.0', + 'local_ip': '152.16.100.20', + 'type': 'PCI-PASSTHROUGH', + 'vld_id': 'uplink_1', + 'netmask': '255.255.255.0', + 'dpdk_port_num': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.20', + 'local_iface_name': 'xe2', + 'local_mac': '00:00:00:00:00:07', + 'ifname': 'xe2', + }, + 'vnfd-connection-point-ref': 'xe2', + 'name': 'xe2', + }) + + bad_vnfd_helper = VnfdHelper(bad_vnfd) setup_helper = mock.MagicMock() - setup_helper.vnfd_helper.interfaces = [] + setup_helper.vnfd_helper = bad_vnfd_helper stats = { 'delta': TotStatsTuple(6, 7, 8, 9), @@ -1622,25 +1785,21 @@ class TestProxResourceHelper(unittest.TestCase): with self.assertRaises(AssertionError): helper.run_test(980, 15, 45) - setup_helper.vnfd_helper.interfaces = [ - {'name': 'a', 'virtual-interface': {'vpci': 'z'}}, - {'name': 'b', 'virtual-interface': {'vpci': 'y'}}, - {'name': 'c', 'virtual-interface': {'vpci': 'x'}}, - {'name': 'd', 'virtual-interface': {'vpci': 'w'}}, - ] + vnfd_helper = VnfdHelper(self.VNFD0) + setup_helper.vnfd_helper = vnfd_helper + helper = ProxResourceHelper(setup_helper) + helper.client = client + helper.get_latency = mock.MagicMock(return_value=[3.3, 3.6, 3.8]) helper._test_cores = [3, 4] - expected_test_data = ProxTestDataTuple(0.0, 2.0, 6, 7, 8, [3.3, 3.6, 3.8], 6, 7, 1.3e7) + expected_test_data = ProxTestDataTuple(0.0, 2.0, 6, 7, 8, [3.3, 3.6, 3.8], 6, 7, 6.5e6) expected_port_samples = { - 'a': {'in_packets': 6, 'out_packets': 7}, - 'b': {'in_packets': 6, 'out_packets': 7}, - 'c': {'in_packets': 6, 'out_packets': 7}, - 'd': {'in_packets': 6, 'out_packets': 7}, + 'xe0': {'in_packets': 6, 'out_packets': 7}, + 'xe1': {'in_packets': 6, 'out_packets': 7}, } test_data, port_samples = helper.run_test(230, 60, 65) - self.assertEqual(test_data, expected_test_data, '\n'.join(str(x) for x in test_data)) - self.assertEqual(port_samples, expected_port_samples, - '\n'.join(str(x) for x in port_samples)) + self.assertTupleEqual(test_data, expected_test_data) + self.assertDictEqual(port_samples, expected_port_samples) def test_get_latency(self): setup_helper = mock.MagicMock() @@ -1660,20 +1819,6 @@ class TestProxResourceHelper(unittest.TestCase): result = helper.get_latency() self.assertIs(result, expected) - def test__get_logical_if_name(self): - setup_helper = mock.MagicMock() - setup_helper.vnfd_helper.interfaces = [] - - helper = ProxResourceHelper(setup_helper) - helper._vpci_to_if_name_map = { - 'key1': 234, - 'key2': 432, - } - - expected = 234 - result = helper._get_logical_if_name('key1') - self.assertEqual(result, expected) - @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.time') @mock.patch('yardstick.network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper') def test__connect(self, mock_socket_helper_type, mock_time): diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py index 4b115f2d6..c88b1528c 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py @@ -86,8 +86,9 @@ class TestProxApproxVnf(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'vld_id': '', + 'ifname': 'xe1', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -104,9 +105,10 @@ class TestProxApproxVnf(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'vld_id': '', + 'ifname': 'xe3', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -187,7 +189,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': ProxApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -221,7 +223,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': ProxApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -252,7 +254,7 @@ class TestProxApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': ProxApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -264,7 +266,7 @@ class TestProxApproxVnf(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': ProxApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', @@ -340,7 +342,7 @@ class TestProxApproxVnf(unittest.TestCase): resource_helper = mock.MagicMock() resource_helper.execute.return_value = list(range(12)) - resource_helper.collect_kpi.return_value = {'core': {'result': 234}} + resource_helper.collect_collectd_kpi.return_value = {'core': {'result': 234}} prox_approx_vnf = ProxApproxVnf(NAME, self.VNFD0) prox_approx_vnf.resource_helper = resource_helper @@ -372,8 +374,10 @@ class TestProxApproxVnf(unittest.TestCase): file_path = os.path.join(curr_path, filename) return file_path + @mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open', create=True) + @mock.patch('yardstick.network_services.vnf_generic.vnf.iniparser.open', create=True) @mock.patch(SSH_HELPER) - def test_run_prox(self, ssh, mock_time): + def test_run_prox(self, ssh, *_): mock_ssh(ssh) prox_approx_vnf = ProxApproxVnf(NAME, self.VNFD0) @@ -382,7 +386,7 @@ class TestProxApproxVnf(unittest.TestCase): prox_approx_vnf.setup_helper.remote_path = 'configs/file56.cfg' expected = "sudo bash -c 'cd /tool_path12; " \ - "/tool_path12/tool_file34 -o cli -t -f configs/file56.cfg '" + "/tool_path12/tool_file34 -o cli -t -f /tmp/l3-swap-2.cfg '" prox_approx_vnf._run() result = prox_approx_vnf.ssh_helper.run.call_args[0][0] @@ -395,7 +399,7 @@ class TestProxApproxVnf(unittest.TestCase): prox_approx_vnf.setup_helper = mock.MagicMock() # we can't mock super prox_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG) - prox_approx_vnf.setup_helper.build_config.assert_called_once + prox_approx_vnf.setup_helper.build_config.assert_called_once() @mock.patch(SSH_HELPER) def test_wait_for_instantiate_panic(self, ssh, mock_time): diff --git a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py index 0264facf5..4b9f4172e 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py @@ -98,10 +98,12 @@ class TestVnfSshHelper(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', - 'local_mac': '00:00:00:00:00:01' + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0' @@ -113,10 +115,12 @@ class TestVnfSshHelper(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', - 'local_mac': '00:00:00:00:00:02' + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' @@ -186,6 +190,7 @@ class TestVnfSshHelper(unittest.TestCase): @mock.patch('yardstick.ssh.paramiko') def test_upload_config_file(self, mock_paramiko): ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path') + ssh_helper._run = mock.MagicMock() self.assertFalse(ssh_helper.is_connected) cfg_file = ssh_helper.upload_config_file('my/prefix', 'my content') @@ -227,6 +232,7 @@ class TestVnfSshHelper(unittest.TestCase): @mock.patch('yardstick.ssh.provision_tool') def test_provision_tool(self, mock_provision_tool, mock_paramiko): ssh_helper = VnfSshHelper(self.VNFD_0['mgmt-interface'], 'my/bin/path') + ssh_helper._run = mock.MagicMock() self.assertFalse(ssh_helper.is_connected) ssh_helper.provision_tool() @@ -290,10 +296,12 @@ class TestSetupEnvHelper(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', - 'local_mac': '00:00:00:00:00:01' + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0' @@ -305,10 +313,12 @@ class TestSetupEnvHelper(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', - 'local_mac': '00:00:00:00:00:02' + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' @@ -412,14 +422,16 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'virtual-interface': { 'dst_mac': '00:00:00:00:00:03', 'vpci': '0000:05:00.0', + 'dpdk_port_num': 0, 'driver': 'i40e', 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', - 'local_mac': '00:00:00:00:00:01' + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0' @@ -428,14 +440,16 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 'virtual-interface': { 'dst_mac': '00:00:00:00:00:04', 'vpci': '0000:05:00.1', + 'dpdk_port_num': 1, 'driver': 'ixgbe', 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', - 'local_mac': '00:00:00:00:00:02' + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' @@ -541,7 +555,8 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): call_args_iter = (args[0][0] for args in ssh_helper.execute.call_args_list) self.assertIsNone(result) self.assertEqual(ssh_helper.execute.call_count, 3) - for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, call_args_iter): + for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, + call_args_iter): self.assertTrue(arg0.startswith(expect_start)) self.assertIn(expect_in, arg0) @@ -558,19 +573,11 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): call_args_iter = (args[0][0] for args in ssh_helper.execute.call_args_list) self.assertIsNone(result) self.assertEqual(ssh_helper.execute.call_count, 3) - for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, call_args_iter): + for expect_start, expect_in, arg0 in zip(expect_start_list, expect_in_list, + call_args_iter): self.assertTrue(arg0.startswith(expect_start)) self.assertIn(expect_in, arg0) - def test__get_dpdk_port_num(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - expected = '0' - result = dpdk_setup_helper._get_dpdk_port_num('xe0') - self.assertEqual(result, expected) - @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.open') @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.find_relative_file') @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.MultiPortConfig') @@ -582,7 +589,6 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): scenario_helper.vnf_cfg = {} scenario_helper.all_options = {} dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper.all_ports = [] dpdk_setup_helper.PIPELINE_COMMAND = expected = 'pipeline command' result = dpdk_setup_helper.build_config() @@ -600,13 +606,13 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) dpdk_setup_helper.CFG_CONFIG = 'config' dpdk_setup_helper.CFG_SCRIPT = 'script' - dpdk_setup_helper.all_ports = [3, 4, 5] dpdk_setup_helper.pipeline_kwargs = {} + dpdk_setup_helper.all_ports = [0, 1, 2] expected = { 'cfg_file': 'config', 'script': 'script', - 'ports_len_hex': '0xf', + 'port_mask_hex': '0x3', 'tool_path': 'tool_path', } dpdk_setup_helper._build_pipeline_kwargs() @@ -717,73 +723,24 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): result = dpdk_setup_helper._validate_cpu_cfg() self.assertEqual(result, expected) - def test__find_used_drivers(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - stdout = ''' -00:01.2 foo drv=name1 -00:01.4 drv foo=name2 -00:02.2 drv=name3 -00:02.3 drv=name4 -''' - ssh_helper.execute.return_value = 0, stdout, '' - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper.used_drivers = None - dpdk_setup_helper._dpdk_nic_bind = '' - dpdk_setup_helper.bound_pci = [ - 'pci 00:01.2', - 'pci 00:02.3', - ] + @mock.patch('yardstick.ssh.SSH') + def test_setup_vnf_environment(self, _): + def execute(cmd, *args, **kwargs): + if cmd.startswith('which '): + return exec_failure + return exec_success - expected = { - '00:01.2': (0, 'name1'), - '00:02.3': (2, 'name4'), - } - dpdk_setup_helper._find_used_drivers() - self.assertEqual(dpdk_setup_helper.used_drivers, expected) + exec_success = (0, 'good output', '') + exec_failure = (1, 'bad output', 'error output') - def test_dpdk_nic_bind(self): vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() - ssh_helper.provision_tool.return_value = nic_bind = object() - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - - self.assertIsNone(dpdk_setup_helper._dpdk_nic_bind) - self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind) - self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind) - self.assertEqual(ssh_helper.provision_tool.call_count, 1) + ssh_helper.execute = execute - # ensure provision tool is not called a second time - self.assertIs(dpdk_setup_helper.dpdk_nic_bind, nic_bind) - self.assertEqual(ssh_helper.provision_tool.call_count, 1) + dpdk_vnf_setup_env_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, mock.Mock()) + dpdk_vnf_setup_env_helper._validate_cpu_cfg = mock.Mock(return_value=[]) - @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.time') - @mock.patch('yardstick.ssh.SSH') - def test_setup_vnf_environment(self, _, mock_time): - cores = ['3', '4'] - - vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0)) - ssh_helper = mock.Mock() - ssh_helper.execute.return_value = 1, 'bad output', 'error output' - ssh_helper.join_bin_path.return_value = 'joined_path' - ssh_helper.provision_tool.return_value = 'provision string' - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper._setup_hugepages = mock.Mock() - dpdk_setup_helper._validate_cpu_cfg = mock.Mock(return_value=cores) - dpdk_setup_helper._find_used_drivers = mock.Mock() - dpdk_setup_helper.used_drivers = { - '0000:05:00.0': (1, ''), - '0000:05:01.0': (3, ''), - } - - result = dpdk_setup_helper.setup_vnf_environment() - self.assertIsInstance(result, ResourceProfile) - self.assertEqual(result.cores, cores) - self.assertEqual(vnfd_helper.interfaces[0]['dpdk_port_num'], 1) - self.assertNotIn('dpdk_port_num', vnfd_helper.interfaces[1]) + self.assertIsInstance(dpdk_vnf_setup_env_helper.setup_vnf_environment(), ResourceProfile) def test__setup_dpdk_early_success(self): vnfd_helper = VnfdHelper(self.VNFD_0) @@ -843,83 +800,146 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): self.assertIsInstance(result, ResourceProfile) self.assertEqual(dpdk_setup_helper.socket, 1) - def test__bind_dpdk_unforced(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - - dpdk_setup_helper._bind_dpdk('x', 'y', force=False) - self.assertNotIn('--force', ssh_helper.execute.call_args_list[0][0][0]) - - def test__detect_and_bind_dpdk_short(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - ssh_helper.execute.return_value = 0, 'output', '' - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - - self.assertIsNone(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b')) - self.assertEqual(ssh_helper.execute.call_count, 1) - - def test__detect_and_bind_dpdk_fail_to_bind(self): - vnfd_helper = VnfdHelper(self.VNFD_0) + def test__detect_and_bind_drivers(self): + vnfd_helper = VnfdHelper(deepcopy(self.VNFD_0)) ssh_helper = mock.Mock() - ssh_helper.execute.return_value = 1, 'bad output', 'error output' + # ssh_helper.execute = mock.Mock(return_value = (0, 'text', '')) + # ssh_helper.execute.return_value = 0, 'output', '' scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper._bind_dpdk = mock.Mock() + rv = ['0000:05:00.1', '0000:05:00.0'] - self.assertIsNone(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b')) - self.assertEqual(ssh_helper.execute.call_count, 2) - - def test__detect_and_bind_dpdk(self): - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - ssh_helper.execute.side_effect = iter([ - (1, 'bad output', 'error output'), - (0, 'output', ''), - ]) - scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper._bind_dpdk = mock.Mock() + dpdk_setup_helper.dpdk_bind_helper._get_bound_pci_addresses = mock.Mock(return_value=rv) + dpdk_setup_helper.dpdk_bind_helper.bind = mock.Mock() + dpdk_setup_helper.dpdk_bind_helper.read_status = mock.Mock() - self.assertEqual(dpdk_setup_helper._detect_and_bind_dpdk('a', 'b'), 'output') - self.assertEqual(ssh_helper.execute.call_count, 2) + self.assertIsNone(dpdk_setup_helper._detect_and_bind_drivers()) - def test__bind_kernel_devices(self): - bind_iter = iter([ - None, - 'output', - ]) - - vnfd_helper = VnfdHelper(self.VNFD_0) - ssh_helper = mock.Mock() - scenario_helper = mock.Mock() - dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper._detect_and_bind_dpdk = mock.Mock(side_effect=bind_iter) - - self.assertIsNone(dpdk_setup_helper._bind_kernel_devices()) + intf_0 = vnfd_helper.vdu[0]['external-interface'][0]['virtual-interface'] + intf_1 = vnfd_helper.vdu[0]['external-interface'][1]['virtual-interface'] + self.assertEquals(0, intf_0['dpdk_port_num']) + self.assertEquals(1, intf_1['dpdk_port_num']) def test_tear_down(self): vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) - dpdk_setup_helper._dpdk_nic_bind = 'a' - dpdk_setup_helper.used_drivers = { - '0000:05:00.0': (1, 'd1'), - '0000:05:01.0': (3, 'd3'), + dpdk_setup_helper.dpdk_bind_helper.bind = mock.Mock() + dpdk_setup_helper.dpdk_bind_helper.used_drivers = { + '0000:05:00.0': 'd1', + '0000:05:01.0': 'd3', } self.assertIsNone(dpdk_setup_helper.tear_down()) + dpdk_setup_helper.dpdk_bind_helper.bind.assert_any_call('0000:05:00.0', 'd1', True) + dpdk_setup_helper.dpdk_bind_helper.bind.assert_any_call('0000:05:01.0', 'd3', True) class TestResourceHelper(unittest.TestCase): + VNFD_0 = { + 'short-name': 'VpeVnf', + 'vdu': [ + { + 'routing_table': [ + { + 'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0' + }, + { + 'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1' + }, + ], + 'description': 'VPE approximation using DPDK', + 'name': 'vpevnf-baremetal', + 'nd_route_tbl': [ + { + 'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0' + }, + { + 'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1' + }, + ], + 'id': 'vpevnf-baremetal', + 'external-interface': [ + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:03', + 'vpci': '0000:05:00.0', + 'driver': 'i40e', + 'local_ip': '152.16.100.19', + 'type': 'PCI-PASSTHROUGH', + 'netmask': '255.255.255.0', + 'dpdk_port_num': 0, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.100.20', + 'local_mac': '00:00:00:00:00:01' + }, + 'vnfd-connection-point-ref': 'xe0', + 'name': 'xe0' + }, + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:04', + 'vpci': '0000:05:00.1', + 'driver': 'ixgbe', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'local_mac': '00:00:00:00:00:02' + }, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1' + }, + ], + }, + ], + 'description': 'Vpe approximation using DPDK', + 'mgmt-interface': { + 'vdu-id': 'vpevnf-baremetal', + 'host': '1.1.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.1.1.1' + }, + 'benchmark': { + 'kpi': [ + 'packets_in', + 'packets_fwd', + 'packets_dropped', + ], + }, + 'connection-point': [ + { + 'type': 'VPORT', + 'name': 'xe0', + }, + { + 'type': 'VPORT', + 'name': 'xe1', + }, + ], + 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh' + } + def test_setup(self): resource = object() - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -930,7 +950,7 @@ class TestResourceHelper(unittest.TestCase): self.assertIs(resource_helper.resource, resource) def test_generate_cfg(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -939,7 +959,7 @@ class TestResourceHelper(unittest.TestCase): self.assertIsNone(resource_helper.generate_cfg()) def test_stop_collect(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -949,7 +969,7 @@ class TestResourceHelper(unittest.TestCase): self.assertIsNone(resource_helper.stop_collect()) def test_stop_collect_none(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -958,6 +978,7 @@ class TestResourceHelper(unittest.TestCase): self.assertIsNone(resource_helper.stop_collect()) + class TestClientResourceHelper(unittest.TestCase): VNFD_0 = { @@ -1004,10 +1025,12 @@ class TestClientResourceHelper(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', - 'local_mac': '00:00:00:00:00:01' + 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0' @@ -1020,10 +1043,12 @@ class TestClientResourceHelper(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', - 'local_mac': '00:00:00:00:00:02' + 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' @@ -1036,7 +1061,7 @@ class TestClientResourceHelper(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 2, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.30', 'local_mac': '00:00:00:00:00:11' @@ -1087,7 +1112,7 @@ class TestClientResourceHelper(unittest.TestCase): @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.STLError', new_callable=lambda: MockError) def test_get_stats_not_connected(self, mock_state_error, mock_logger): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1143,16 +1168,9 @@ class TestClientResourceHelper(unittest.TestCase): "in_packets": 0, "out_packets": 48791, }, - 'xe2': { - "rx_throughput_fps": 0.0, - "tx_throughput_fps": 0.0, - "rx_throughput_mbps": 0.0, - "tx_throughput_mbps": 0.0, - "in_packets": 0, - "out_packets": 0, - }, } - result = client_resource_helper.generate_samples() + ports = vnfd_helper.port_nums(vnfd_helper.port_pairs.all_ports) + result = client_resource_helper.generate_samples(ports) self.assertDictEqual(result, expected) def test_generate_samples_with_key(self): @@ -1203,7 +1221,8 @@ class TestClientResourceHelper(unittest.TestCase): "out_packets": 48791, }, } - result = client_resource_helper.generate_samples('key_name') + ports = vnfd_helper.port_nums(vnfd_helper.port_pairs.all_ports) + result = client_resource_helper.generate_samples(ports, 'key_name') self.assertDictEqual(result, expected) def test_generate_samples_with_key_and_default(self): @@ -1253,11 +1272,12 @@ class TestClientResourceHelper(unittest.TestCase): "out_packets": 48791, }, } - result = client_resource_helper.generate_samples('key_name', 'default') + ports = vnfd_helper.port_nums(vnfd_helper.port_pairs.all_ports) + result = client_resource_helper.generate_samples(ports, 'key_name', 'default') self.assertDictEqual(result, expected) def test_clear_stats(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1268,7 +1288,7 @@ class TestClientResourceHelper(unittest.TestCase): self.assertEqual(client_resource_helper.client.clear_stats.call_count, 1) def test_clear_stats_of_ports(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1279,7 +1299,7 @@ class TestClientResourceHelper(unittest.TestCase): self.assertEqual(client_resource_helper.client.clear_stats.call_count, 1) def test_start(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1290,7 +1310,7 @@ class TestClientResourceHelper(unittest.TestCase): self.assertEqual(client_resource_helper.client.start.call_count, 1) def test_start_ports(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1301,7 +1321,7 @@ class TestClientResourceHelper(unittest.TestCase): self.assertEqual(client_resource_helper.client.start.call_count, 1) def test_collect_kpi_with_queue(self): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1324,7 +1344,7 @@ class TestClientResourceHelper(unittest.TestCase): @mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.STLError', new_callable=lambda: MockError) def test__connect_with_failures(self, mock_error, mock_logger, mock_time): - vnfd_helper = VnfdHelper({}) + vnfd_helper = VnfdHelper(self.VNFD_0) ssh_helper = mock.Mock() scenario_helper = mock.Mock() dpdk_setup_helper = DpdkVnfSetupEnvHelper(vnfd_helper, ssh_helper, scenario_helper) @@ -1659,7 +1679,7 @@ class TestSampleVnf(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01' @@ -1674,7 +1694,7 @@ class TestSampleVnf(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02' @@ -1749,7 +1769,6 @@ class TestSampleVnf(unittest.TestCase): class MySetupEnvHelper(SetupEnvHelper): pass - class MyResourceHelper(ResourceHelper): pass @@ -1887,6 +1906,16 @@ class TestSampleVnf(unittest.TestCase): self.assertEqual(sample_vnf.wait_for_instantiate(), 0) + def test__build_ports(self): + vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] + sample_vnf = SampleVNF('vnf1', vnfd) + + self.assertIsNone(sample_vnf._build_ports()) + self.assertIsNotNone(sample_vnf.networks) + self.assertIsNotNone(sample_vnf.uplink_ports) + self.assertIsNotNone(sample_vnf.downlink_ports) + self.assertIsNotNone(sample_vnf.my_ports) + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") def test_vnf_execute_with_queue_data(self, mock_time): queue_size_list = [ @@ -2014,7 +2043,7 @@ class TestSampleVNFTrafficGen(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.100.20', 'local_mac': '00:00:00:00:00:01' @@ -2030,7 +2059,7 @@ class TestSampleVNFTrafficGen(unittest.TestCase): 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_mac': '00:00:00:00:00:02' @@ -2038,22 +2067,6 @@ class TestSampleVNFTrafficGen(unittest.TestCase): 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1' }, - { - 'virtual-interface': { - 'dst_mac': '00:00:00:00:00:13', - 'vpci': '0000:05:00.2', - 'driver': 'ixgbe', - 'local_ip': '152.16.40.19', - 'type': 'PCI-PASSTHROUGH', - 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', - 'bandwidth': '10 Gbps', - 'dst_ip': '152.16.40.30', - 'local_mac': '00:00:00:00:00:11' - }, - 'vnfd-connection-point-ref': 'xe2', - 'name': 'xe2' - }, ], }, ], @@ -2166,7 +2179,7 @@ class TestSampleVNFTrafficGen(unittest.TestCase): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" - mock_traffic_profile.execute.return_value = "64" + mock_traffic_profile.execute_traffic.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE sample_vnf_tg = SampleVNFTrafficGen('tg1', self.VNFD_0) diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py index c65c0ab0a..e6e4b882e 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_ixload.py @@ -70,7 +70,7 @@ class TestIxLoadTrafficGen(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -85,7 +85,7 @@ class TestIxLoadTrafficGen(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py index 45bbfaea3..c1b2d27eb 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py @@ -20,6 +20,7 @@ from __future__ import absolute_import import unittest import mock from multiprocessing import Queue +import multiprocessing from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh from tests.unit import STL_MOCKS @@ -31,11 +32,40 @@ stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) stl_patch.start() if stl_patch: - from yardstick.network_services.vnf_generic.vnf.tg_ping import PingParser, PingTrafficGen - from yardstick.network_services.traffic_profile.base import TrafficProfile + from yardstick.network_services.vnf_generic.vnf.tg_ping import PingParser + from yardstick.network_services.vnf_generic.vnf.tg_ping import PingTrafficGen + from yardstick.network_services.vnf_generic.vnf.tg_ping import PingResourceHelper + from yardstick.network_services.vnf_generic.vnf.tg_ping import PingSetupEnvHelper from yardstick.network_services.vnf_generic.vnf.sample_vnf import VnfSshHelper +class TestPingResourceHelper(unittest.TestCase): + def test___init__(self): + setup_helper = mock.Mock() + helper = PingResourceHelper(setup_helper) + + self.assertIsInstance(helper._queue, multiprocessing.queues.Queue) + self.assertIsInstance(helper._parser, PingParser) + + def test_run_traffic(self): + setup_helper = mock.Mock() + traffic_profile = mock.Mock() + traffic_profile.params = { + 'traffic_profile': { + 'frame_size': 64, + }, + } + + helper = PingResourceHelper(setup_helper) + helper.cmd_kwargs = {'target_ip': '10.0.0.2', + 'local_ip': '10.0.0.1', + 'local_if_name': 'eth0', + } + helper.ssh_helper = mock.Mock() + helper.run_traffic(traffic_profile) + helper.ssh_helper.run.called_with('ping-s 64 10.0.0.2') + + class TestPingParser(unittest.TestCase): def test___init__(self): q_out = Queue() @@ -69,7 +99,6 @@ class TestPingParser(unittest.TestCase): class TestPingTrafficGen(unittest.TestCase): - VNFD_0_EXT_IF_0 = { 'virtual-interface': { 'dst_mac': '00:00:00:00:00:04', @@ -77,7 +106,6 @@ class TestPingTrafficGen(unittest.TestCase): 'local_ip': u'152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': u'152.16.100.20', @@ -96,14 +124,13 @@ class TestPingTrafficGen(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', 'bandwidth': '10 Gbps', 'dst_ip': u'152.16.40.20', 'local_iface_name': 'xe1', 'local_mac': '00:00:00:00:00:01', }, - 'vnfd-connection-point-ref': 'xe1', - 'name': 'xe1', + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1', } VNFD_0_EXT_IF_LIST = [ @@ -151,7 +178,7 @@ class TestPingTrafficGen(unittest.TestCase): ], 'description': 'Vpe approximation using DPDK', 'mgmt-interface': { - 'vdu-id': 'vpevnf-baremetal', + 'vdu-id': 'vpevnf-baremetal', 'host': '1.1.1.1', 'password': 'r00t', 'user': 'root', @@ -198,11 +225,20 @@ class TestPingTrafficGen(unittest.TestCase): }, } + CMD_KWARGS = { + 'target_ip': u'152.16.100.20', + 'local_ip': u'152.16.100.19', + 'local_if_name': u'xe0', + } + @mock.patch("yardstick.ssh.SSH") def test___init__(self, ssh): ssh.from_node.return_value.execute.return_value = 0, "success", "" ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) - self.assertIsNotNone(ping_traffic_gen._queue) + + self.assertIsInstance(ping_traffic_gen.setup_helper, PingSetupEnvHelper) + self.assertIsInstance(ping_traffic_gen.resource_helper, PingResourceHelper) + self.assertEquals(ping_traffic_gen._result, {}) @mock.patch("yardstick.ssh.SSH") def test__bind_device_kernel_with_failure(self, ssh): @@ -234,35 +270,23 @@ class TestPingTrafficGen(unittest.TestCase): mock_ssh(ssh, spec=VnfSshHelper, exec_result=(0, "success", "")) ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) ping_traffic_gen.setup_helper.ssh_helper = mock.MagicMock( - **{"execute.return_value": (0, "", "")}) + **{"execute.return_value": (0, "success", "")}) self.assertIsInstance(ping_traffic_gen.ssh_helper, mock.Mock) self.assertEqual(ping_traffic_gen._result, {}) + self.assertIsNone(ping_traffic_gen.instantiate({}, {})) + + self.assertEqual( + ping_traffic_gen.vnfd_helper.interfaces[0]['virtual-interface']['local_iface_name'], + 'success') + self.assertEqual(self.CMD_KWARGS, ping_traffic_gen.resource_helper.cmd_kwargs) self.assertIsNotNone(ping_traffic_gen._result) @mock.patch("yardstick.ssh.SSH") def test_listen_traffic(self, ssh): - ssh.from_node.return_value.execute.return_value = 0, "success", "" ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) self.assertIsNone(ping_traffic_gen.listen_traffic({})) - @mock.patch(SSH_HELPER) - def test_run_traffic_process(self, ssh): - mock_ssh(ssh) - - mock_traffic_profile = mock.Mock(autospec=TrafficProfile) - mock_traffic_profile.get_traffic_definition.return_value = "64" - mock_traffic_profile.params = self.TRAFFIC_PROFILE - - ssh.from_node.return_value.execute.return_value = 0, "success", "" - ssh.from_node.return_value.run.return_value = 0, "success", "" - - sut = PingTrafficGen('vnf1', self.VNFD_0) - sut._traffic_runner(mock_traffic_profile) - sut.ssh_helper.run.assert_called_with( - "ping -s 64 152.16.100.20", - stdout=sut._parser, keep_stdin_open=True, pty=True) - @mock.patch("yardstick.ssh.SSH") def test_scale_negative(self, ssh): ssh.from_node.return_value.execute.return_value = 0, "success", "" @@ -277,4 +301,4 @@ class TestPingTrafficGen(unittest.TestCase): ssh.from_node.return_value.run.return_value = 0, "success", "" ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) - self.assertIsNone(ping_traffic_gen.terminate())
\ No newline at end of file + self.assertIsNone(ping_traffic_gen.terminate()) diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py index a12abb625..eb569cfe6 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_prox.py @@ -20,7 +20,6 @@ import mock from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh from tests.unit import STL_MOCKS -from yardstick.network_services.nfvi.resource import ResourceProfile SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' NAME = 'vnf__1' @@ -80,7 +79,7 @@ class TestProxTrafficGen(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'vld_id': '', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -99,7 +98,7 @@ class TestProxTrafficGen(unittest.TestCase): 'vld_id': '', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -180,7 +179,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -214,7 +213,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -245,7 +244,7 @@ class TestProxTrafficGen(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': ProxTrafficGen.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -257,7 +256,7 @@ class TestProxTrafficGen(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': ProxTrafficGen.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', @@ -331,7 +330,8 @@ class TestProxTrafficGen(unittest.TestCase): mock_ssh(ssh) prox_traffic_gen = ProxTrafficGen(NAME, self.VNFD0) - prox_traffic_gen._vnf_wrapper.resource = mock.Mock(autospec=ResourceProfile) + prox_traffic_gen._vnf_wrapper.resource_helper.resource = mock.MagicMock( + **{"check_if_sa_running.return_value": [False]}) prox_traffic_gen._vnf_wrapper.vnf_execute = mock.Mock(return_value="") self.assertEqual({}, prox_traffic_gen.collect_kpi()) @@ -349,8 +349,10 @@ class TestProxTrafficGen(unittest.TestCase): vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] prox_traffic_gen = ProxTrafficGen(NAME, vnfd) - prox_traffic_gen.ssh_helper = mock.MagicMock( + ssh_helper = mock.MagicMock( **{"execute.return_value": (0, "", ""), "bin_path": ""}) + prox_traffic_gen.ssh_helper = ssh_helper + prox_traffic_gen.setup_helper.dpdk_bind_helper.ssh_helper = ssh_helper prox_traffic_gen.setup_helper._setup_resources = mock.MagicMock() prox_traffic_gen.setup_hugepages = mock.MagicMock() prox_traffic_gen.generate_prox_config_file = mock.MagicMock() @@ -369,12 +371,12 @@ class TestProxTrafficGen(unittest.TestCase): 'task_path': '', 'options': {'tg__1': {'prox_args': {'-e': '', '-t': ''}, - 'prox_config': 'configs/l3-gen-2.cfg', - 'prox_path': '/root/dppd-PROX-v035/build/prox'}, - 'vnf__1': {'prox_args': {'-t': ''}, - 'prox_config': 'configs/l3-swap-2.cfg', - 'prox_path': '/root/dppd-PROX-v035/build/prox'} - } + 'prox_config': 'configs/l3-gen-2.cfg', + 'prox_path': '/root/dppd-PROX-v035/build/prox'}, + 'vnf__1': {'prox_args': {'-t': ''}, + 'prox_config': 'configs/l3-swap-2.cfg', + 'prox_path': '/root/dppd-PROX-v035/build/prox'} + } } prox_traffic_gen.instantiate(scenario_cfg, {}) @@ -384,15 +386,15 @@ class TestProxTrafficGen(unittest.TestCase): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" - mock_traffic_profile.execute.return_value = "64" + mock_traffic_profile.execute_traffic.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] sut = ProxTrafficGen(NAME, vnfd) - sut.prox_config_dict = {} sut._get_socket = mock.MagicMock() sut.ssh_helper = mock.Mock() sut.ssh_helper.run = mock.Mock() + sut.setup_helper.prox_config_dict = {} sut._vpci_ascending = ["0000:05:00.0", "0000:05:00.1"] sut._connect_client = mock.Mock(autospec=STLClient) sut._connect_client.get_stats = mock.Mock(return_value="0") diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py index 661e885ca..0e303dc3b 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py @@ -23,7 +23,6 @@ import mock from tests.unit import STL_MOCKS - STLClient = mock.MagicMock() stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) stl_patch.start() @@ -36,13 +35,11 @@ if stl_patch: TEST_FILE_YAML = 'nsb_test_case.yaml' - NAME = "tg__1" @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.IxNextgen") class TestIxiaResourceHelper(unittest.TestCase): - def test___init___with_custom_rfc_helper(self, mock_ix_nextgen): class MyRfcHelper(IxiaRfc2544Helper): pass @@ -63,71 +60,71 @@ class TestIxiaResourceHelper(unittest.TestCase): @mock.patch("yardstick.network_services.vnf_generic.vnf.tg_rfc2544_ixia.IxNextgen") class TestIXIATrafficGen(unittest.TestCase): VNFD = {'vnfd:vnfd-catalog': - {'vnfd': - [{'short-name': 'VpeVnf', - 'vdu': - [{'routing_table': - [{'network': '152.16.100.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.100.20', - 'if': 'xe0'}, - {'network': '152.16.40.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.40.20', - 'if': 'xe1'}], - 'description': 'VPE approximation using DPDK', - 'name': 'vpevnf-baremetal', - 'nd_route_tbl': - [{'network': '0064:ff9b:0:0:0:0:9810:6414', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:6414', - 'if': 'xe0'}, - {'network': '0064:ff9b:0:0:0:0:9810:2814', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:2814', - 'if': 'xe1'}], - 'id': 'vpevnf-baremetal', - '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': '0', - 'bandwidth': '10 Gbps', - 'driver': "i40e", - 'dst_ip': '152.16.100.20', - 'local_iface_name': '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:05:00.1', - 'local_ip': '152.16.40.19', - 'type': 'PCI-PASSTHROUGH', - 'driver': "i40e", - 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', - 'bandwidth': '10 Gbps', - 'dst_ip': '152.16.40.20', - 'local_iface_name': 'xe1', - 'local_mac': '00:00:00:00:00:01'}, - 'vnfd-connection-point-ref': 'xe1', - 'name': 'xe1'}]}], - 'description': 'Vpe approximation using DPDK', - 'mgmt-interface': - {'vdu-id': 'vpevnf-baremetal', - 'host': '1.1.1.1', - 'password': 'r00t', - 'user': 'root', - 'ip': '1.1.1.1'}, - 'benchmark': - {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, - 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, - {'type': 'VPORT', 'name': 'xe1'}], - 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}} + {'vnfd': + [{'short-name': 'VpeVnf', + 'vdu': + [{'routing_table': + [{'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0'}, + {'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1'}], + 'description': 'VPE approximation using DPDK', + 'name': 'vpevnf-baremetal', + 'nd_route_tbl': + [{'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0'}, + {'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1'}], + 'id': 'vpevnf-baremetal', + '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': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.20', + 'local_iface_name': '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:05:00.1', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'driver': "i40e", + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'local_iface_name': 'xe1', + 'local_mac': '00:00:00:00:00:01'}, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1'}]}], + 'description': 'Vpe approximation using DPDK', + 'mgmt-interface': + {'vdu-id': 'vpevnf-baremetal', + 'host': '1.1.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.1.1.1'}, + 'benchmark': + {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, + 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, + {'type': 'VPORT', 'name': 'xe1'}], + 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}} TRAFFIC_PROFILE = { "schema": "isb:traffic_profile:0.1", @@ -140,12 +137,12 @@ class TestIXIATrafficGen(unittest.TestCase): "frame_size": 64}} TC_YAML = {'scenarios': [{'tc_options': - {'rfc2544': {'allowed_drop_rate': '0.8 - 1'}}, + {'rfc2544': {'allowed_drop_rate': '0.8 - 1'}}, 'runner': {'duration': 400, 'interval': 35, 'type': 'Duration'}, 'traffic_options': - {'flow': 'ipv4_1flow_Packets_vpe.yaml', - 'imix': 'imix_voice.yaml'}, + {'flow': 'ipv4_1flow_Packets_vpe.yaml', + 'imix': 'imix_voice.yaml'}, 'vnf_options': {'vpe': {'cfg': 'vpe_config'}}, 'traffic_profile': 'ipv4_throughput_vpe.yaml', 'type': 'NSPerf', @@ -195,7 +192,7 @@ class TestIXIATrafficGen(unittest.TestCase): 'vnf_config': {'lb_config': 'SW', 'lb_count': 1, 'worker_config': - '1C/1T', + '1C/1T', 'worker_threads': 1}} }}) ixnet_traffic_gen.topology = "" @@ -255,6 +252,7 @@ class TestIXIATrafficGen(unittest.TestCase): mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE + mock_traffic_profile.ports = [0, 1] mock_ssh_instance = mock.Mock(autospec=mock_ssh.SSH) mock_ssh_instance.execute.return_value = 0, "", "" @@ -306,11 +304,10 @@ class TestIXIATrafficGen(unittest.TestCase): }, ] - mock_traffic_profile.execute.return_value = ['Completed', samples] + mock_traffic_profile.execute_traffic.return_value = ['Completed', samples] mock_traffic_profile.get_drop_percentage.return_value = ['Completed', samples] sut = IxiaTrafficGen(name, vnfd) - sut.tg_port_pairs = [[[0], [1]]] sut.vnf_port_pairs = [[[0], [1]]] sut.tc_file_name = self._get_file_abspath(TEST_FILE_YAML) sut.topology = "" @@ -325,13 +322,15 @@ class TestIXIATrafficGen(unittest.TestCase): sut.resource_helper.client = mock.MagicMock() sut.resource_helper.client_started = mock.MagicMock() sut.resource_helper.client_started.value = 1 + sut.resource_helper.rfc_helper.iteration.value = 11 sut.scenario_helper.scenario_cfg = { 'options': { 'packetsize': 64, 'traffic_type': 4, 'rfc2544': { - 'allowed_drop_rate': '0.8 - 1' + 'allowed_drop_rate': '0.8 - 1', + 'latency': True }, 'vnf__1': { 'rules': 'acl_1rule.yaml', @@ -347,7 +346,8 @@ class TestIXIATrafficGen(unittest.TestCase): 'task_path': '/path/to/task' } - with mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open', create=True) as mock_open: + with mock.patch('yardstick.benchmark.scenarios.networking.vnf_generic.open', + create=True) as mock_open: mock_open.return_value = mock.MagicMock() result = sut._traffic_runner(mock_traffic_profile) self.assertIsNone(result) diff --git a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py index ad8c6494e..637706fb4 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py @@ -21,10 +21,9 @@ import unittest import mock from tests.unit import STL_MOCKS +SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' -SSH_HELPER = "yardstick.ssh.SSH" - STLClient = mock.MagicMock() stl_patch = mock.patch.dict("sys.modules", STL_MOCKS) stl_patch.start() @@ -101,8 +100,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'vld_id': 'private_1', - 'dpdk_port_num': '0', + 'vld_id': 'uplink_0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -121,8 +120,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'vld_id': 'public_1', - 'dpdk_port_num': '1', + 'vld_id': 'downlink_0', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -252,6 +251,8 @@ class TestTrexTrafficGenRFC(unittest.TestCase): trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0) trex_traffic_gen._start_server = mock.Mock(return_value=0) trex_traffic_gen.resource_helper = mock.MagicMock() + trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock() + scenario_cfg = { "tc": "tc_baremetal_rfc2544_ipv4_1flow_64B", "topology": 'nsb_test_case.yaml', @@ -286,6 +287,7 @@ class TestTrexTrafficGenRFC(unittest.TestCase): trex_traffic_gen = TrexTrafficGenRFC('vnf1', self.VNFD_0) trex_traffic_gen.resource_helper = mock.MagicMock() + trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock() scenario_cfg = { "tc": "tc_baremetal_rfc2544_ipv4_1flow_64B", "nodes": [ 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 65370dfa5..eb9f0525b 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 @@ -20,10 +20,11 @@ from __future__ import absolute_import import unittest import mock +SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' + from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh from tests.unit import STL_MOCKS - NAME = 'vnf_1' STLClient = mock.MagicMock() @@ -32,77 +33,77 @@ stl_patch.start() if stl_patch: from yardstick.network_services.vnf_generic.vnf.tg_trex import \ - TrexTrafficGen, TrexResourceHelper + TrexTrafficGen, TrexResourceHelper from yardstick.network_services.traffic_profile.base import TrafficProfile class TestTrexTrafficGen(unittest.TestCase): VNFD = {'vnfd:vnfd-catalog': - {'vnfd': - [{'short-name': 'VpeVnf', - 'vdu': - [{'routing_table': - [{'network': '152.16.100.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.100.20', - 'if': 'xe0'}, - {'network': '152.16.40.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.40.20', - 'if': 'xe1'}], - 'description': 'VPE approximation using DPDK', - 'name': 'vpevnf-baremetal', - 'nd_route_tbl': - [{'network': '0064:ff9b:0:0:0:0:9810:6414', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:6414', - 'if': 'xe0'}, - {'network': '0064:ff9b:0:0:0:0:9810:2814', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:2814', - 'if': 'xe1'}], - 'id': 'vpevnf-baremetal', - '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': '0', - 'bandwidth': '10 Gbps', - 'driver': "i40e", - 'dst_ip': '152.16.100.20', - 'local_iface_name': '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:05:00.1', - 'local_ip': '152.16.40.19', - 'type': 'PCI-PASSTHROUGH', - 'driver': "i40e", - 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', - 'bandwidth': '10 Gbps', - 'dst_ip': '152.16.40.20', - 'local_iface_name': 'xe1', - 'local_mac': '00:00:00:00:00:01'}, - 'vnfd-connection-point-ref': 'xe1', - 'name': 'xe1'}]}], - 'description': 'Vpe approximation using DPDK', - 'mgmt-interface': - {'vdu-id': 'vpevnf-baremetal', - 'host': '1.1.1.1', - 'password': 'r00t', - 'user': 'root', - 'ip': '1.1.1.1'}, - 'benchmark': - {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, - 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, - {'type': 'VPORT', 'name': 'xe1'}], - 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}} + {'vnfd': + [{'short-name': 'VpeVnf', + 'vdu': + [{'routing_table': + [{'network': '152.16.100.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.100.20', + 'if': 'xe0'}, + {'network': '152.16.40.20', + 'netmask': '255.255.255.0', + 'gateway': '152.16.40.20', + 'if': 'xe1'}], + 'description': 'VPE approximation using DPDK', + 'name': 'vpevnf-baremetal', + 'nd_route_tbl': + [{'network': '0064:ff9b:0:0:0:0:9810:6414', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + 'if': 'xe0'}, + {'network': '0064:ff9b:0:0:0:0:9810:2814', + 'netmask': '112', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + 'if': 'xe1'}], + 'id': 'vpevnf-baremetal', + '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': 0, + 'bandwidth': '10 Gbps', + 'driver': "i40e", + 'dst_ip': '152.16.100.20', + 'local_iface_name': '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:05:00.1', + 'local_ip': '152.16.40.19', + 'type': 'PCI-PASSTHROUGH', + 'driver': "i40e", + 'netmask': '255.255.255.0', + 'dpdk_port_num': 1, + 'bandwidth': '10 Gbps', + 'dst_ip': '152.16.40.20', + 'local_iface_name': 'xe1', + 'local_mac': '00:00:00:00:00:01'}, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1'}]}], + 'description': 'Vpe approximation using DPDK', + 'mgmt-interface': + {'vdu-id': 'vpevnf-baremetal', + 'host': '1.1.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.1.1.1'}, + 'benchmark': + {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, + 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, + {'type': 'VPORT', 'name': 'xe1'}], + 'id': 'VpeApproxVnf', 'name': 'VPEVnfSsh'}]}} TRAFFIC_PROFILE = { "schema": "isb:traffic_profile:0.1", @@ -112,16 +113,195 @@ class TestTrexTrafficGen(unittest.TestCase): "traffic_type": "FixedTraffic", "frame_rate": 100, # pps "flow_number": 10, - "frame_size": 64}} + "frame_size": 64 + }, + } + + SCENARIO_CFG = { + "options": { + "packetsize": 64, + "traffic_type": 4, + "rfc2544": { + "allowed_drop_rate": "0.8 - 1", + }, + "vnf__1": { + "rules": "acl_1rule.yaml", + "vnf_config": { + "lb_config": "SW", + "lb_count": 1, + "worker_config": "1C/1T", + "worker_threads": 1, + } + } + }, + "task_id": "a70bdf4a-8e67-47a3-9dc1-273c14506eb7", + "tc": "tc_ipv4_1Mflow_64B_packetsize", + "runner": { + "object": "NetworkServiceTestCase", + "interval": 35, + "output_filename": "/tmp/yardstick.out", + "runner_id": 74476, "duration": 400, + "type": "Duration" + }, + "traffic_profile": "ipv4_throughput_acl.yaml", + "traffic_options": { + "flow": "ipv4_Packets_acl.yaml", + "imix": "imix_voice.yaml" + }, + "type": "ISB", + "nodes": { + "tg__2": "trafficgen_2.yardstick", + "tg__1": "trafficgen_1.yardstick", + "vnf__1": "vnf.yardstick" + }, + "topology": "udpreplay-tg-topology-baremetal.yaml" + } - @mock.patch("yardstick.ssh.SSH") + CONTEXT_CFG = { + "nodes": { + "vnf__1": { + "vnfd-id-ref": "vnf__1", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens786f0", + "vld_id": TrafficProfile.UPLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.0", + "local_ip": "152.16.100.19", + "driver": "i40e", + "dst_ip": "152.16.100.20", + "local_mac": "00:00:00:00:00:02", + "dst_mac": "00:00:00:00:00:04", + "dpdk_port_num": 0 + }, + "xe1": { + "local_iface_name": "ens786f1", + "vld_id": TrafficProfile.DOWNLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.1", + "local_ip": "152.16.40.19", + "driver": "i40e", + "dst_ip": "152.16.40.20", + "local_mac": "00:00:00:00:00:01", + "dst_mac": "00:00:00:00:00:03", + "dpdk_port_num": 1 + } + }, + "host": "1.2.1.1", + "user": "root", + "nd_route_tbl": [ + { + "netmask": "112", + "if": "xe0", + "gateway": "0064:ff9b:0:0:0:0:9810:6414", + "network": "0064:ff9b:0:0:0:0:9810:6414" + }, + { + "netmask": "112", + "if": "xe1", + "gateway": "0064:ff9b:0:0:0:0:9810:2814", + "network": "0064:ff9b:0:0:0:0:9810:2814" + } + ], + "password": "r00t", + "VNF model": "udp_replay.yaml", + "name": "vnf.yardstick", + "member-vnf-index": "2", + "routing_table": [ + { + "netmask": "255.255.255.0", + "if": "xe0", + "gateway": "152.16.100.20", + "network": "152.16.100.20" + }, + { + "netmask": "255.255.255.0", + "if": "xe1", + "gateway": "152.16.40.20", + "network": "152.16.40.20" + } + ], + "role": "vnf" + }, + "trafficgen_2.yardstick": { + "member-vnf-index": "3", + "role": "TrafficGen", + "name": "trafficgen_2.yardstick", + "vnfd-id-ref": "tg__2", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens513f0", + "vld_id": TrafficProfile.DOWNLINK, + "netmask": "255.255.255.0", + "vpci": "0000:02:00.0", + "local_ip": "152.16.40.20", + "driver": "ixgbe", + "dst_ip": "152.16.40.19", + "local_mac": "00:00:00:00:00:03", + "dst_mac": "00:00:00:00:00:01", + "dpdk_port_num": 0 + }, + "xe1": { + "local_iface_name": "ens513f1", + "netmask": "255.255.255.0", + "network": "202.16.100.0", + "local_ip": "202.16.100.20", + "driver": "ixgbe", + "local_mac": "00:1e:67:d0:60:5d", + "vpci": "0000:02:00.1", + "dpdk_port_num": 1 + } + }, + "password": "r00t", + "VNF model": "l3fwd_vnf.yaml", + "user": "root" + }, + "trafficgen_1.yardstick": { + "member-vnf-index": "1", + "role": "TrafficGen", + "name": "trafficgen_1.yardstick", + "vnfd-id-ref": "tg__1", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens785f0", + "vld_id": TrafficProfile.UPLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.0", + "local_ip": "152.16.100.20", + "driver": "i40e", + "dst_ip": "152.16.100.19", + "local_mac": "00:00:00:00:00:04", + "dst_mac": "00:00:00:00:00:02", + "dpdk_port_num": 0 + }, + "xe1": { + "local_ip": "152.16.100.21", + "driver": "i40e", + "vpci": "0000:05:00.1", + "dpdk_port_num": 1, + "local_iface_name": "ens785f1", + "netmask": "255.255.255.0", + "local_mac": "00:00:00:00:00:01" + } + }, + "password": "r00t", + "VNF model": "tg_rfc2544_tpl.yaml", + "user": "root" + } + } + } + + @mock.patch(SSH_HELPER) def test___init__(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] trex_traffic_gen = TrexTrafficGen(NAME, vnfd) self.assertIsInstance(trex_traffic_gen.resource_helper, TrexResourceHelper) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_collect_kpi(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -130,14 +310,14 @@ class TestTrexTrafficGen(unittest.TestCase): result = trex_traffic_gen.collect_kpi() self.assertEqual({}, result) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_listen_traffic(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] trex_traffic_gen = TrexTrafficGen(NAME, vnfd) self.assertIsNone(trex_traffic_gen.listen_traffic({})) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_instantiate(self, ssh): mock_ssh(ssh) @@ -150,9 +330,11 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen._tg_process._is_alive = mock.Mock(return_value=1) trex_traffic_gen.ssh_helper = mock.MagicMock() trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() - self.assertIsNone(trex_traffic_gen.instantiate({}, {})) + trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock() + + self.assertIsNone(trex_traffic_gen.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_instantiate_error(self, ssh): mock_ssh(ssh, exec_result=(1, "", "")) @@ -164,9 +346,10 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen._tg_process._is_alive = mock.Mock(return_value=0) trex_traffic_gen.ssh_helper = mock.MagicMock() trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() - self.assertIsNone(trex_traffic_gen.instantiate({}, {})) + trex_traffic_gen.setup_helper.setup_vnf_environment = mock.MagicMock() + self.assertIsNone(trex_traffic_gen.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test__start_server(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -175,13 +358,13 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() self.assertIsNone(trex_traffic_gen._start_server()) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test__traffic_runner(self, ssh): mock_ssh(ssh) mock_traffic_profile = mock.Mock(autospec=TrafficProfile) mock_traffic_profile.get_traffic_definition.return_value = "64" - mock_traffic_profile.execute.return_value = "64" + mock_traffic_profile.execute_traffic.return_value = "64" mock_traffic_profile.params = self.TRAFFIC_PROFILE vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -195,7 +378,7 @@ class TestTrexTrafficGen(unittest.TestCase): self.sut.resource_helper.QUEUE_WAIT_TIME = 0 self.sut._traffic_runner(mock_traffic_profile) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test__generate_trex_cfg(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -203,7 +386,7 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() self.assertIsNone(trex_traffic_gen.resource_helper.generate_cfg()) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_run_traffic(self, ssh): mock_ssh(ssh) @@ -221,21 +404,14 @@ class TestTrexTrafficGen(unittest.TestCase): self.sut._traffic_process.terminate() self.assertIsNotNone(result) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_scale(self, ssh): mock_ssh(ssh, exec_result=(1, "", "")) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] trex_traffic_gen = TrexTrafficGen(NAME, vnfd) trex_traffic_gen.scale('') - @mock.patch("yardstick.ssh.SSH") - def test_setup_vnf_environment(self, ssh): - mock_ssh(ssh, exec_result=(1, "", "")) - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - trex_traffic_gen = TrexTrafficGen(NAME, vnfd) - self.assertIsNone(trex_traffic_gen.setup_helper.setup_vnf_environment()) - - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test_terminate(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -244,7 +420,7 @@ class TestTrexTrafficGen(unittest.TestCase): trex_traffic_gen.resource_helper.ssh_helper = mock.MagicMock() self.assertIsNone(trex_traffic_gen.terminate()) - @mock.patch("yardstick.ssh.SSH") + @mock.patch(SSH_HELPER) def test__connect_client(self, ssh): mock_ssh(ssh) vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] @@ -253,5 +429,6 @@ class TestTrexTrafficGen(unittest.TestCase): client.connect = mock.Mock(return_value=0) self.assertIsNotNone(trex_traffic_gen.resource_helper._connect(client)) + if __name__ == '__main__': unittest.main() diff --git a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py index f0d75d57b..b75ed6764 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py @@ -22,6 +22,7 @@ import mock import os from tests.unit import STL_MOCKS +SSH_HELPER = 'yardstick.network_services.vnf_generic.vnf.sample_vnf.VnfSshHelper' STLClient = mock.MagicMock() @@ -30,381 +31,455 @@ stl_patch.start() if stl_patch: from yardstick.network_services.vnf_generic.vnf.udp_replay import UdpReplayApproxVnf - from yardstick.network_services.vnf_generic.vnf import udp_replay + from yardstick.network_services.nfvi.resource import ResourceProfile + from yardstick.network_services.vnf_generic.vnf.sample_vnf import ScenarioHelper + +from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh TEST_FILE_YAML = 'nsb_test_case.yaml' -NAME = "tg__1" +NAME = "vnf__1" @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Process") -class TestAclApproxVnf(unittest.TestCase): - VNFD = {'vnfd:vnfd-catalog': - {'vnfd': - [{'short-name': 'VpeVnf', - 'vdu': - [{'routing_table': - [{'network': '152.16.100.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.100.20', - 'if': 'xe0'}, - {'network': '152.16.40.20', - 'netmask': '255.255.255.0', - 'gateway': '152.16.40.20', - 'if': 'xe1'}], - 'description': 'VPE approximation using DPDK', - 'name': 'vpevnf-baremetal', - 'nd_route_tbl': - [{'network': '0064:ff9b:0:0:0:0:9810:6414', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:6414', - 'if': 'xe0'}, - {'network': '0064:ff9b:0:0:0:0:9810:2814', - 'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:2814', - 'if': 'xe1'}], - 'id': 'vpevnf-baremetal', - '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': '0', - 'bandwidth': '10 Gbps', - 'driver': "i40e", - 'dst_ip': '152.16.100.20', - 'local_iface_name': '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:05:00.1', - 'local_ip': '152.16.40.19', - 'type': 'PCI-PASSTHROUGH', - 'driver': "i40e", - 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', - 'bandwidth': '10 Gbps', - 'dst_ip': '152.16.40.20', - 'local_iface_name': 'xe1', - 'local_mac': '00:00:00:00:00:01'}, - 'vnfd-connection-point-ref': 'xe1', - 'name': 'xe1'}]}], - 'description': 'Vpe approximation using DPDK', - 'mgmt-interface': - {'vdu-id': 'vpevnf-baremetal', - 'host': '1.2.1.1', - 'password': 'r00t', - 'user': 'root', - 'ip': '1.2.1.1'}, - 'benchmark': - {'kpi': ['packets_in', 'packets_fwd', 'packets_dropped']}, - 'connection-point': [{'type': 'VPORT', 'name': 'xe0'}, - {'type': 'VPORT', 'name': 'xe1'}], - 'id': 'UdpReplayApproxVnf', 'name': 'VPEVnfSsh'}]}} - - scenario_cfg = {'options': {'packetsize': 64, 'traffic_type': 4, - 'rfc2544': {'allowed_drop_rate': '0.8 - 1'}, - 'vnf__1': {'rules': 'acl_1rule.yaml', - 'vnf_config': {'lb_config': 'SW', - 'lb_count': 1, - 'worker_config': - '1C/1T', - 'worker_threads': 1}} - }, - 'task_id': 'a70bdf4a-8e67-47a3-9dc1-273c14506eb7', - 'tc': 'tc_ipv4_1Mflow_64B_packetsize', - 'runner': {'object': 'NetworkServiceTestCase', - 'interval': 35, - 'output_filename': '/tmp/yardstick.out', - 'runner_id': 74476, 'duration': 400, - 'type': 'Duration'}, - 'traffic_profile': 'ipv4_throughput_acl.yaml', - 'traffic_options': {'flow': 'ipv4_Packets_acl.yaml', - 'imix': 'imix_voice.yaml'}, - 'type': 'ISB', - 'nodes': {'tg__2': 'trafficgen_2.yardstick', - 'tg__1': 'trafficgen_1.yardstick', - 'vnf__1': 'vnf.yardstick'}, - 'topology': 'vpe-tg-topology-baremetal.yaml'} - - context_cfg = {'nodes': {'trafficgen_2.yardstick': - {'member-vnf-index': '3', - 'role': 'TrafficGen', - 'name': 'trafficgen_2.yardstick', - 'vnfd-id-ref': 'tg__2', - 'ip': '1.2.1.1', - 'interfaces': - {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', - 'netmask': '255.255.255.0', - 'local_ip': '152.16.40.20', - 'dst_mac': '00:00:00:00:00:01', - 'local_mac': '00:00:00:00:00:03', - 'dst_ip': '152.16.40.19', - 'driver': 'ixgbe', - 'vpci': '0000:02:00.0', - 'dpdk_port_num': 0}, - 'xe1': {'local_iface_name': 'ens513f1', - 'netmask': '255.255.255.0', - 'network': '202.16.100.0', - 'local_ip': '202.16.100.20', - 'local_mac': '00:1e:67:d0:60:5d', - 'driver': 'ixgbe', - 'vpci': '0000:02:00.1', - 'dpdk_port_num': 1}}, - 'password': 'r00t', - 'VNF model': 'l3fwd_vnf.yaml', - 'user': 'root'}, - 'trafficgen_1.yardstick': - {'member-vnf-index': '1', - 'role': 'TrafficGen', - 'name': 'trafficgen_1.yardstick', - 'vnfd-id-ref': 'tg__1', - 'ip': '1.2.1.1', - 'interfaces': - {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', - 'netmask': '255.255.255.0', - 'local_ip': '152.16.100.20', - 'dst_mac': '00:00:00:00:00:02', - 'local_mac': '00:00:00:00:00:04', - 'dst_ip': '152.16.100.19', - 'driver': 'i40e', - 'vpci': '0000:05:00.0', - 'dpdk_port_num': 0}, - 'xe1': {'local_iface_name': 'ens785f1', - 'netmask': '255.255.255.0', - 'local_ip': '152.16.100.21', - 'local_mac': '00:00:00:00:00:01', - 'driver': 'i40e', - 'vpci': '0000:05:00.1', - 'dpdk_port_num': 1}}, - 'password': 'r00t', - 'VNF model': 'tg_rfc2544_tpl.yaml', - 'user': 'root'}, - 'vnf__1': - {'name': 'vnf.yardstick', - 'vnfd-id-ref': 'vnf__1', - 'ip': '1.2.1.1', - 'interfaces': - {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', - 'netmask': '255.255.255.0', - 'local_ip': '152.16.100.19', - 'dst_mac': '00:00:00:00:00:04', - 'local_mac': '00:00:00:00:00:02', - 'dst_ip': '152.16.100.20', - 'driver': 'i40e', - 'vpci': '0000:05:00.0', - 'dpdk_port_num': 0}, - 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', - 'netmask': '255.255.255.0', - 'local_ip': '152.16.40.19', - 'dst_mac': '00:00:00:00:00:03', - 'local_mac': '00:00:00:00:00:01', - 'dst_ip': '152.16.40.20', - 'driver': 'i40e', - 'vpci': '0000:05:00.1', - 'dpdk_port_num': 1}}, - 'routing_table': - [{'netmask': '255.255.255.0', - 'gateway': '152.16.100.20', - 'network': '152.16.100.20', - 'if': 'xe0'}, - {'netmask': '255.255.255.0', - 'gateway': '152.16.40.20', - 'network': '152.16.40.20', - 'if': 'xe1'}], - 'member-vnf-index': '2', - 'host': '1.2.1.1', - 'role': 'vnf', - 'user': 'root', - 'nd_route_tbl': - [{'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:6414', - 'network': '0064:ff9b:0:0:0:0:9810:6414', - 'if': 'xe0'}, - {'netmask': '112', - 'gateway': '0064:ff9b:0:0:0:0:9810:2814', - 'network': '0064:ff9b:0:0:0:0:9810:2814', - 'if': 'xe1'}], - 'password': 'r00t', - 'VNF model': 'udp_replay.yaml'}}} - - def test___init__(self, mock_process): - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - self.assertIsNone(udp_approx_vnf._vnf_process) +class TestUdpReplayApproxVnf(unittest.TestCase): - @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") - def test_collect_kpi(self, mock_time, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - result = "stats\r\r\n\r\nUDP_Replay stats:\r\n--------------\r\n" \ - "Port\t\tRx Packet\t\tTx Packet\t\tRx Pkt Drop\t\tTx Pkt Drop \r\n"\ - "0\t\t7374156\t\t7374136\t\t\t0\t\t\t0\r\n" \ - "1\t\t7374316\t\t7374315\t\t\t0\t\t\t0\r\n\r\nReplay>\r\r\nReplay>" - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - udp_approx_vnf.q_in = mock.MagicMock() - udp_approx_vnf.q_out = mock.MagicMock() - udp_approx_vnf.q_out.qsize = mock.Mock(return_value=0) - udp_approx_vnf.all_ports = [0, 1] - udp_approx_vnf.interfaces = vnfd["vdu"][0]['external-interface'] - udp_approx_vnf.get_stats = mock.Mock(return_value=result) - result = {'collect_stats': {}, 'packets_dropped': 0, - 'packets_fwd': 14748451, 'packets_in': 14748472} - self.assertEqual(result, udp_approx_vnf.collect_kpi()) + VNFD_0 = { + 'short-name': 'UdpReplayVnf', + 'vdu': [ + { + 'description': 'UDPReplay approximation using DPDK', + 'routing_table': [ + { + 'netmask': '255.255.255.0', + 'if': 'xe0', + 'network': '152.16.100.20', + 'gateway': '152.16.100.20', + }, + { + 'netmask': '255.255.255.0', + 'if': 'xe1', + 'network': '152.16.40.20', + 'gateway': '152.16.40.20', + } + ], + 'external-interface': [ + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:04', + 'driver': 'i40e', + 'local_iface_name': 'xe0', + 'bandwidth': '10 Gbps', + 'local_ip': '152.16.100.19', + 'local_mac': '00:00:00:00:00:02', + 'vpci': '0000:05:00.0', + 'dpdk_port_num': 0, + 'netmask': '255.255.255.0', + 'dst_ip': '152.16.100.20', + 'type': 'PCI-PASSTHROUGH', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', + }, + 'vnfd-connection-point-ref': 'xe0', + 'name': 'xe0', + }, + { + 'virtual-interface': { + 'dst_mac': '00:00:00:00:00:03', + 'driver': 'i40e', + 'local_iface_name': 'xe1', + 'bandwidth': '10 Gbps', + 'local_ip': '152.16.40.19', + 'local_mac': '00:00:00:00:00:01', + 'vpci': '0000:05:00.1', + 'dpdk_port_num': 1, + 'netmask': '255.255.255.0', + 'dst_ip': '152.16.40.20', + 'type': 'PCI-PASSTHROUGH', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', + }, + 'vnfd-connection-point-ref': 'xe1', + 'name': 'xe1', + } + ], + 'nd_route_tbl': [ + { + 'netmask': '112', + 'if': 'xe0', + 'network': '0064:ff9b:0:0:0:0:9810:6414', + 'gateway': '0064:ff9b:0:0:0:0:9810:6414', + }, + { + 'netmask': '112', + 'if': 'xe1', + 'network': '0064:ff9b:0:0:0:0:9810:2814', + 'gateway': '0064:ff9b:0:0:0:0:9810:2814', + } + ], + 'id': 'udpreplayvnf-baremetal', + 'name': 'udpreplayvnf-baremetal', + } + ], + 'description': 'UDPReplay approximation using DPDK', + 'name': 'VPEVnfSsh', + 'mgmt-interface': { + 'vdu-id': 'udpreplay-baremetal', + 'host': '1.2.1.1', + 'password': 'r00t', + 'user': 'root', + 'ip': '1.2.1.1', + }, + 'benchmark': { + 'kpi': [ + 'packets_in', + 'packets_fwd', + 'packets_dropped', + ] + }, + 'connection-point': [ + { + 'type': 'VPORT', + 'name': 'xe0', + }, + { + 'type': 'VPORT', + 'name': 'xe1', + } + ], + 'id': 'UdpReplayApproxVnf', + } + + SCENARIO_CFG = { + "options": { + "packetsize": 64, + "traffic_type": 4, + "rfc2544": { + "allowed_drop_rate": "0.8 - 1", + }, + "vnf__1": { + "rules": "acl_1rule.yaml", + "vnf_config": { + "lb_config": "SW", + "lb_count": 1, + "worker_config": "1C/1T", + "worker_threads": 1, + }, + "hw_csum": "false", + } + }, + "task_id": "a70bdf4a-8e67-47a3-9dc1-273c14506eb7", + "tc": "tc_ipv4_1Mflow_64B_packetsize", + "runner": { + "object": "NetworkServiceTestCase", + "interval": 35, + "output_filename": "/tmp/yardstick.out", + "runner_id": 74476, "duration": 400, + "type": "Duration" + }, + "traffic_profile": "ipv4_throughput_acl.yaml", + "traffic_options": { + "flow": "ipv4_Packets_acl.yaml", + "imix": "imix_voice.yaml" + }, + "type": "ISB", + "nodes": { + "tg__2": "trafficgen_2.yardstick", + "tg__1": "trafficgen_1.yardstick", + "vnf__1": "vnf.yardstick" + }, + "topology": "udpreplay-tg-topology-baremetal.yaml" + } + + CONTEXT_CFG = { + "nodes": { + "vnf__1": { + "vnfd-id-ref": "vnf__1", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens786f0", + "vld_id": UdpReplayApproxVnf.UPLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.0", + "local_ip": "152.16.100.19", + "driver": "i40e", + "dst_ip": "152.16.100.20", + "local_mac": "00:00:00:00:00:02", + "dst_mac": "00:00:00:00:00:04", + "dpdk_port_num": 0 + }, + "xe1": { + "local_iface_name": "ens786f1", + "vld_id": UdpReplayApproxVnf.DOWNLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.1", + "local_ip": "152.16.40.19", + "driver": "i40e", + "dst_ip": "152.16.40.20", + "local_mac": "00:00:00:00:00:01", + "dst_mac": "00:00:00:00:00:03", + "dpdk_port_num": 1 + } + }, + "host": "1.2.1.1", + "user": "root", + "nd_route_tbl": [ + { + "netmask": "112", + "if": "xe0", + "gateway": "0064:ff9b:0:0:0:0:9810:6414", + "network": "0064:ff9b:0:0:0:0:9810:6414" + }, + { + "netmask": "112", + "if": "xe1", + "gateway": "0064:ff9b:0:0:0:0:9810:2814", + "network": "0064:ff9b:0:0:0:0:9810:2814" + } + ], + "password": "r00t", + "VNF model": "udp_replay.yaml", + "name": "vnf.yardstick", + "member-vnf-index": "2", + "routing_table": [ + { + "netmask": "255.255.255.0", + "if": "xe0", + "gateway": "152.16.100.20", + "network": "152.16.100.20" + }, + { + "netmask": "255.255.255.0", + "if": "xe1", + "gateway": "152.16.40.20", + "network": "152.16.40.20" + } + ], + "role": "vnf" + }, + "trafficgen_2.yardstick": { + "member-vnf-index": "3", + "role": "TrafficGen", + "name": "trafficgen_2.yardstick", + "vnfd-id-ref": "tg__2", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens513f0", + "vld_id": UdpReplayApproxVnf.DOWNLINK, + "netmask": "255.255.255.0", + "vpci": "0000:02:00.0", + "local_ip": "152.16.40.20", + "driver": "ixgbe", + "dst_ip": "152.16.40.19", + "local_mac": "00:00:00:00:00:03", + "dst_mac": "00:00:00:00:00:01", + "dpdk_port_num": 0 + }, + "xe1": { + "local_iface_name": "ens513f1", + "netmask": "255.255.255.0", + "network": "202.16.100.0", + "local_ip": "202.16.100.20", + "driver": "ixgbe", + "local_mac": "00:1e:67:d0:60:5d", + "vpci": "0000:02:00.1", + "dpdk_port_num": 1 + } + }, + "password": "r00t", + "VNF model": "l3fwd_vnf.yaml", + "user": "root" + }, + "trafficgen_1.yardstick": { + "member-vnf-index": "1", + "role": "TrafficGen", + "name": "trafficgen_1.yardstick", + "vnfd-id-ref": "tg__1", + "ip": "1.2.1.1", + "interfaces": { + "xe0": { + "local_iface_name": "ens785f0", + "vld_id": UdpReplayApproxVnf.UPLINK, + "netmask": "255.255.255.0", + "vpci": "0000:05:00.0", + "local_ip": "152.16.100.20", + "driver": "i40e", + "dst_ip": "152.16.100.19", + "local_mac": "00:00:00:00:00:04", + "dst_mac": "00:00:00:00:00:02", + "dpdk_port_num": 0 + }, + "xe1": { + "local_ip": "152.16.100.21", + "driver": "i40e", + "vpci": "0000:05:00.1", + "dpdk_port_num": 1, + "local_iface_name": "ens785f1", + "netmask": "255.255.255.0", + "local_mac": "00:00:00:00:00:01" + } + }, + "password": "r00t", + "VNF model": "tg_rfc2544_tpl.yaml", + "user": "root" + } + } + } + + def test___init__(self, _): + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + self.assertIsNone(udp_replay_approx_vnf._vnf_process) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") - def test_vnf_execute_command(self, mock_time, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - cmd = "quit" - self.assertEqual("", udp_approx_vnf.vnf_execute(cmd)) - - def test_get_stats(self, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - udp_approx_vnf.q_in = mock.MagicMock() - udp_approx_vnf.q_out = mock.MagicMock() - udp_approx_vnf.q_out.qsize = mock.Mock(return_value=0) - mock_result = \ - "CG-NAPT(.*\n)*Received 100, Missed 0, Dropped 0,Translated 100,ingress" - udp_approx_vnf.vnf_execute = mock.Mock(return_value=mock_result) - self.assertEqual(mock_result, - udp_approx_vnf.get_stats()) + @mock.patch(SSH_HELPER) + def test_collect_kpi(self, ssh, mock_time, _): + mock_ssh(ssh) + + vnfd = self.VNFD_0 + result = "stats\r\r\n\r\nUDP_Replay stats:\r\n--------------\r\n" \ + "Port\t\tRx Packet\t\tTx Packet\t\tRx Pkt Drop\t\tTx Pkt Drop \r\n"\ + "0\t\t7374156\t\t7374136\t\t\t0\t\t\t0\r\n" \ + "1\t\t7374316\t\t7374315\t\t\t0\t\t\t0\r\n\r\nReplay>\r\r\nReplay>" + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) + udp_replay_approx_vnf.q_in = mock.MagicMock() + udp_replay_approx_vnf.q_out = mock.MagicMock() + udp_replay_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + udp_replay_approx_vnf.all_ports = ["xe0", "xe1"] + udp_replay_approx_vnf.get_stats = mock.Mock(return_value=result) + result = {'collect_stats': {}, 'packets_dropped': 0, + 'packets_fwd': 14748451, 'packets_in': 14748472} + self.assertEqual(result, udp_replay_approx_vnf.collect_kpi()) + + @mock.patch(SSH_HELPER) + def test_get_stats(self, ssh, _): + mock_ssh(ssh) + + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf.q_in = mock.MagicMock() + udp_replay_approx_vnf.q_out = mock.MagicMock() + udp_replay_approx_vnf.q_out.qsize = mock.Mock(return_value=0) + mock_result = \ + "CG-NAPT(.*\n)*Received 100, Missed 0, Dropped 0,Translated 100,ingress" + + udp_replay_approx_vnf.vnf_execute = mock.Mock(return_value=mock_result) + + self.assertEqual(mock_result, + udp_replay_approx_vnf.get_stats()) def _get_file_abspath(self, filename): curr_path = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.join(curr_path, filename) return file_path + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + @mock.patch(SSH_HELPER) + def test__build_config(self, ssh, mock_context, *_): + mock_ssh(ssh) + + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf.queue_wrapper = mock.MagicMock() + udp_replay_approx_vnf.nfvi_context = mock_context + udp_replay_approx_vnf.nfvi_context.attrs = {'nfvi_type': 'baremetal'} + udp_replay_approx_vnf.setup_helper.bound_pci = [] + udp_replay_approx_vnf.ssh_helper.provision_tool = mock.MagicMock(return_value="tool_path") + udp_replay_approx_vnf.scenario_helper = ScenarioHelper(name='vnf__1') + udp_replay_approx_vnf.scenario_helper.scenario_cfg = self.SCENARIO_CFG + + cmd_line = udp_replay_approx_vnf._build_config() + + expected = \ + "sudo tool_path --log-level=5 -c 0x7 -n 4 -w -- -p 0x3 --config='(0,0,1),(1,0,2)'" + self.assertEqual(cmd_line, expected) + @mock.patch('yardstick.network_services.vnf_generic.vnf.udp_replay.open') - def test__build_pipeline_kwargs(self, mock_open, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - udp_approx_vnf._build_config = mock.MagicMock() - udp_approx_vnf.queue_wrapper = mock.MagicMock() - udp_approx_vnf.nfvi_type = "baremetal" - udp_approx_vnf.bound_pci = [] - udp_approx_vnf.all_ports = [0, 1] - udp_approx_vnf.ssh_helper = mock.MagicMock( - **{"provision_tool.return_value": "tool_path"}) - udp_approx_vnf.vnf_cfg = {'lb_config': 'SW', - 'lb_count': 1, - 'worker_config': '1C/1T', - 'worker_threads': 1} - udp_approx_vnf.options = {'traffic_type': '4', - 'topology': 'nsb_test_case.yaml'} - - udp_approx_vnf._build_pipeline_kwargs() - self.assertEqual(udp_approx_vnf.pipeline_kwargs, { - 'config': '(0, 0, 1)(1, 0, 2)', - 'cpu_mask_hex': '0x6', - 'hw_csum': '', - 'ports_len_hex': '0x3', - 'tool_path': 'tool_path', - 'whitelist': '' - }) - - @mock.patch("yardstick.network_services.vnf_generic.vnf.udp_replay.hex") - @mock.patch("yardstick.network_services.vnf_generic.vnf.udp_replay.eval") - @mock.patch('yardstick.network_services.vnf_generic.vnf.udp_replay.open') - def test_run_udp_replay(self, mock_open, eval, hex, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh_mock.run = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - udp_approx_vnf._build_config = mock.MagicMock() - udp_approx_vnf.queue_wrapper = mock.MagicMock() - udp_approx_vnf.ssh_helper = mock.MagicMock() - udp_approx_vnf.ssh_helper.run = mock.MagicMock() - udp_approx_vnf.vnf_cfg = {'lb_config': 'SW', - 'lb_count': 1, - 'worker_config': '1C/1T', - 'worker_threads': 1} - udp_approx_vnf.options = {'traffic_type': '4', - 'topology': 'nsb_test_case.yaml'} - - udp_approx_vnf._run() - udp_approx_vnf.ssh_helper.run.assert_called_once() + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + @mock.patch(SSH_HELPER) + def test__build_pipeline_kwargs(self, ssh, mock_context, *_): + mock_ssh(ssh) + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf.nfvi_context = mock_context + udp_replay_approx_vnf.nfvi_context.attrs = {'nfvi_type': 'baremetal'} + udp_replay_approx_vnf.setup_helper.bound_pci = ['0000:00:0.1', '0000:00:0.3'] + udp_replay_approx_vnf.all_ports = ["xe0", "xe1"] + udp_replay_approx_vnf.ssh_helper.provision_tool = mock.MagicMock(return_value="tool_path") + udp_replay_approx_vnf.scenario_helper = ScenarioHelper(name='vnf__1') + udp_replay_approx_vnf.scenario_helper.scenario_cfg = self.SCENARIO_CFG + + udp_replay_approx_vnf._build_pipeline_kwargs() + + self.assertEqual(udp_replay_approx_vnf.pipeline_kwargs, { + 'config': '(0,0,1),(1,0,2)', + 'cpu_mask_hex': '0x7', + 'hw_csum': '', + 'port_mask_hex': '0x3', + 'tool_path': 'tool_path', + 'whitelist': '0000:00:0.1 -w 0000:00:0.3' + }) + + @mock.patch(SSH_HELPER) + def test_run_udp_replay(self, ssh, _): + mock_ssh(ssh) + + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf._build_config = mock.MagicMock() + udp_replay_approx_vnf.queue_wrapper = mock.MagicMock() + + udp_replay_approx_vnf._run() + + udp_replay_approx_vnf.ssh_helper.run.assert_called_once() @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") - def test_instantiate(self, Context, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - self.scenario_cfg['vnf_options'] = {'cgnapt': {'cfg': "", - 'rules': ""}} - udp_approx_vnf._run_udp_replay = mock.Mock(return_value=0) - udp_approx_vnf._parse_rule_file = mock.Mock(return_value={}) - udp_approx_vnf.deploy_udp_replay_vnf = mock.Mock(return_value=1) - udp_approx_vnf.q_out.put("Replay>") - udp_approx_vnf.get_my_ports = mock.Mock(return_value=[0, 1]) - udp_replay.WAIT_TIME = 3 - udp_approx_vnf.get_nfvi_type = mock.Mock(return_value="baremetal") - - udp_approx_vnf._vnf_process = mock.MagicMock() - udp_approx_vnf._vnf_process.is_alive = \ - mock.Mock(return_value=1) - self.assertIsNone(udp_approx_vnf.instantiate(self.scenario_cfg, - self.context_cfg)) - - def test_scale(self, mock_process): - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) + @mock.patch(SSH_HELPER) + def test_instantiate(self, ssh, *_): + mock_ssh(ssh) + + resource = mock.Mock(autospec=ResourceProfile) + + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf.q_out.put("Replay>") + udp_replay_approx_vnf.WAIT_TIME = 0 + udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() + + self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) + + udp_replay_approx_vnf._vnf_process.is_alive = mock.Mock(return_value=1) + udp_replay_approx_vnf._vnf_process.exitcode = 0 + + self.assertEquals(udp_replay_approx_vnf.wait_for_instantiate(), 0) + + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + @mock.patch('yardstick.ssh.SSH') + @mock.patch(SSH_HELPER) + def test_instantiate_panic(self, ssh, resource_ssh, *_): + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf.WAIT_TIME = 0 + udp_replay_approx_vnf.q_out.put("some text PANIC some text") + udp_replay_approx_vnf.setup_helper.setup_vnf_environment = mock.Mock() + + self.assertIsNone(udp_replay_approx_vnf.instantiate(self.SCENARIO_CFG, self.CONTEXT_CFG)) + with self.assertRaises(RuntimeError): + udp_replay_approx_vnf.wait_for_instantiate() + + def test_scale(self, _): + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) flavor = "" - self.assertRaises(NotImplementedError, udp_approx_vnf.scale, flavor) + + self.assertRaises(NotImplementedError, udp_replay_approx_vnf.scale, flavor) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time") - def test_terminate(self, mock_time, mock_process): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "", "")) - ssh.from_node.return_value = ssh_mock - vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0] - udp_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) - udp_approx_vnf._vnf_process = mock.MagicMock() - udp_approx_vnf._vnf_process.terminate = mock.Mock() - udp_approx_vnf.used_drivers = {"01:01.0": "i40e", - "01:01.1": "i40e"} - udp_approx_vnf.execute_command = mock.Mock() - udp_approx_vnf.ssh_helper = ssh_mock - udp_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py" - self.assertEqual(None, udp_approx_vnf.terminate()) + @mock.patch(SSH_HELPER) + def test_terminate(self, ssh, mock_time, _): + mock_ssh(ssh) + + udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, self.VNFD_0) + udp_replay_approx_vnf._vnf_process = mock.MagicMock() + udp_replay_approx_vnf._vnf_process.terminate = mock.Mock() + udp_replay_approx_vnf.used_drivers = {"01:01.0": "i40e", "01:01.1": "i40e"} + udp_replay_approx_vnf.dpdk_nic_bind = "dpdk_nic_bind.py" + self.assertEqual(None, udp_replay_approx_vnf.terminate()) if __name__ == '__main__': unittest.main() diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py index c3d53ff03..958099a03 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py @@ -73,7 +73,7 @@ class TestFWApproxVnf(unittest.TestCase): 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', @@ -88,7 +88,7 @@ class TestFWApproxVnf(unittest.TestCase): 'type': 'PCI-PASSTHROUGH', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', @@ -142,7 +142,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': FWApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -170,7 +170,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': FWApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -195,7 +195,7 @@ class TestFWApproxVnf(unittest.TestCase): 'ip': '1.2.1.1', 'interfaces': {'xe0': {'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': FWApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -205,7 +205,7 @@ class TestFWApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'dpdk_port_num': 0}, 'xe1': {'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': FWApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', diff --git a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py index ffd0d539b..757109d11 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py @@ -36,8 +36,8 @@ stl_patch.start() if stl_patch: from yardstick.network_services.vnf_generic.vnf.vpe_vnf import ConfigCreate from yardstick.network_services.nfvi.resource import ResourceProfile - from yardstick.network_services.vnf_generic.vnf import vpe_vnf - from yardstick.network_services.vnf_generic.vnf.vpe_vnf import VpeApproxVnf + from yardstick.network_services.vnf_generic.vnf.vpe_vnf import \ + VpeApproxVnf, VpeApproxSetupEnvHelper from tests.unit.network_services.vnf_generic.vnf.test_base import FileAbsPath from tests.unit.network_services.vnf_generic.vnf.test_base import mock_ssh @@ -57,8 +57,8 @@ class TestConfigCreate(unittest.TestCase): def test___init__(self): config_create = ConfigCreate([0], [1], 2) - self.assertEqual(config_create.priv_ports, [0]) - self.assertEqual(config_create.pub_ports, [1]) + self.assertEqual(config_create.uplink_ports, [0]) + self.assertEqual(config_create.downlink_ports, [1]) self.assertEqual(config_create.socket, 2) def test_vpe_initialize(self): @@ -110,7 +110,7 @@ class TestConfigCreate(unittest.TestCase): self.assertNotEqual(result, '') def test_create_vpe_config(self): - priv_ports = [ + uplink_ports = [ { 'index': 0, 'dpdk_port_num': 1, @@ -121,7 +121,7 @@ class TestConfigCreate(unittest.TestCase): }, ] - pub_ports = [ + downlink_ports = [ { 'index': 2, 'dpdk_port_num': 3, @@ -132,7 +132,7 @@ class TestConfigCreate(unittest.TestCase): }, ] - config_create = ConfigCreate(priv_ports, pub_ports, 23) + config_create = ConfigCreate(uplink_ports, downlink_ports, 23) curr_path = os.path.dirname(os.path.abspath(__file__)) vpe_cfg = "samples/vnf_samples/nsut/vpe/vpe_config" vnf_cfg = os.path.join(curr_path, "../../../../..", vpe_cfg) @@ -185,14 +185,15 @@ class TestVpeApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.0', 'local_ip': '152.16.100.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': '', 'netmask': '255.255.255.0', - 'dpdk_port_num': '0', + 'dpdk_port_num': 0, 'bandwidth': '10 Gbps', 'driver': "i40e", 'dst_ip': '152.16.100.20', 'local_iface_name': 'xe0', 'local_mac': '00:00:00:00:00:02', + 'vld_id': 'uplink_0', + 'ifname': 'xe0', }, 'vnfd-connection-point-ref': 'xe0', 'name': 'xe0', @@ -203,14 +204,15 @@ class TestVpeApproxVnf(unittest.TestCase): 'vpci': '0000:05:00.1', 'local_ip': '152.16.40.19', 'type': 'PCI-PASSTHROUGH', - 'vld_id': '', 'driver': "i40e", 'netmask': '255.255.255.0', - 'dpdk_port_num': '1', + 'dpdk_port_num': 1, 'bandwidth': '10 Gbps', 'dst_ip': '152.16.40.20', 'local_iface_name': 'xe1', 'local_mac': '00:00:00:00:00:01', + 'vld_id': 'downlink_0', + 'ifname': 'xe1', }, 'vnfd-connection-point-ref': 'xe1', 'name': 'xe1', @@ -258,7 +260,7 @@ class TestVpeApproxVnf(unittest.TestCase): SCENARIO_CFG = { 'options': { 'packetsize': 64, - 'traffic_type': 4 , + 'traffic_type': 4, 'rfc2544': { 'allowed_drop_rate': '0.8 - 1', }, @@ -308,7 +310,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens513f0', - 'vld_id': 'public', + 'vld_id': VpeApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.20', 'dst_mac': '00:00:00:00:00:01', @@ -342,7 +344,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens785f0', - 'vld_id': 'private', + 'vld_id': VpeApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.20', 'dst_mac': '00:00:00:00:00:02', @@ -373,7 +375,7 @@ class TestVpeApproxVnf(unittest.TestCase): 'interfaces': { 'xe0': { 'local_iface_name': 'ens786f0', - 'vld_id': 'private', + 'vld_id': VpeApproxVnf.UPLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.100.19', 'dst_mac': '00:00:00:00:00:04', @@ -385,7 +387,7 @@ class TestVpeApproxVnf(unittest.TestCase): }, 'xe1': { 'local_iface_name': 'ens786f1', - 'vld_id': 'public', + 'vld_id': VpeApproxVnf.DOWNLINK, 'netmask': '255.255.255.0', 'local_ip': '152.16.40.19', 'dst_mac': '00:00:00:00:00:03', @@ -499,9 +501,6 @@ class TestVpeApproxVnf(unittest.TestCase): vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0) vpe_approx_vnf.tc_file_name = get_file_abspath(TEST_FILE_YAML) - vpe_approx_vnf.generate_port_pairs = mock.Mock() - vpe_approx_vnf.tg_port_pairs = [[[0], [1]]] - vpe_approx_vnf.vnf_port_pairs = [[[0], [1]]] vpe_approx_vnf.vnf_cfg = { 'lb_config': 'SW', 'lb_count': 1, @@ -513,16 +512,56 @@ class TestVpeApproxVnf(unittest.TestCase): NAME: { 'traffic_type': '4', 'topology': 'nsb_test_case.yaml', + 'vnf_config': 'vpe_config', } } } vpe_approx_vnf.topology = "nsb_test_case.yaml" vpe_approx_vnf.nfvi_type = "baremetal" vpe_approx_vnf._provide_config_file = mock.Mock() + vpe_approx_vnf._build_config = mock.MagicMock() self.assertIsInstance(vpe_approx_vnf.ssh_helper, mock.Mock) + self.assertIsInstance(vpe_approx_vnf.ssh_helper, mock.Mock) self.assertIsNone(vpe_approx_vnf._run()) + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.MultiPortConfig") + @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") + @mock.patch("yardstick.network_services.vnf_generic.vnf.vpe_vnf.ConfigCreate") + @mock.patch("yardstick.network_services.vnf_generic.vnf.vpe_vnf.open") + @mock.patch(SSH_HELPER) + def test_build_config(self, mock_mul, mock_context, mock_config, mock_open, ssh, _): + mock_ssh(ssh) + vpe_approx_vnf = VpeApproxSetupEnvHelper(mock.MagicMock(), + mock.MagicMock, mock.MagicMock) + vpe_approx_vnf.tc_file_name = get_file_abspath(TEST_FILE_YAML) + vpe_approx_vnf.generate_port_pairs = mock.Mock() + vpe_approx_vnf.vnf_cfg = { + 'lb_config': 'SW', + 'lb_count': 1, + 'worker_config': '1C/1T', + 'worker_threads': 1, + } + vpe_approx_vnf.scenario_helper.scenario_cfg = { + 'options': { + NAME: { + 'traffic_type': '4', + 'topology': 'nsb_test_case.yaml', + 'vnf_config': 'vpe_config', + } + } + } + vpe_approx_vnf.topology = "nsb_test_case.yaml" + vpe_approx_vnf.nfvi_type = "baremetal" + vpe_approx_vnf._provide_config_file = mock.Mock() + + vpe_approx_vnf.ssh_helper = mock.MagicMock() + vpe_approx_vnf.scenario_helper = mock.MagicMock() + vpe_approx_vnf.ssh_helper.bin_path = mock.Mock() + vpe_approx_vnf.ssh_helper.upload_config_file = mock.MagicMock() + self.assertIsNone(vpe_approx_vnf._build_vnf_ports()) + self.assertIsNotNone(vpe_approx_vnf.build_config()) + @mock.patch(SSH_HELPER) def test_wait_for_instantiate(self, ssh, _): mock_ssh(ssh) diff --git a/tests/unit/test_ssh.py b/tests/unit/test_ssh.py index 27ed68c7b..b298c745b 100644 --- a/tests/unit/test_ssh.py +++ b/tests/unit/test_ssh.py @@ -527,7 +527,7 @@ class TestAutoConnectSSH(unittest.TestCase): 'key_filename': None, 'password': None, 'name': None, - 'wait': False, + 'wait': True, } result = auto_connect_ssh._make_dict() self.assertDictEqual(result, expected) diff --git a/yardstick/__init__.py b/yardstick/__init__.py index c1010d98c..b673e7c4a 100644 --- a/yardstick/__init__.py +++ b/yardstick/__init__.py @@ -16,9 +16,7 @@ from yardstick.common import utils as yardstick_utils yardstick_utils.makedirs(constants.LOG_DIR) LOG_FILE = os.path.join(constants.LOG_DIR, 'yardstick.log') -LOG_FORMATTER = ('%(asctime)s ' - '%(name)s %(filename)s:%(lineno)d ' - '%(levelname)s %(message)s') +LOG_FORMATTER = '%(asctime)s [%(levelname)s] %(name)s %(filename)s:%(lineno)d %(message)s' _LOG_FORMATTER = logging.Formatter(LOG_FORMATTER) _LOG_STREAM_HDLR = logging.StreamHandler() diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 575467f8f..9a7b3817f 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -83,9 +83,14 @@ class HeatContext(Context): external_network = os.environ.get("EXTERNAL_NETWORK", "net04_ext") have_external_network = any(net.get("external_network") for net in networks.values()) - if sorted_networks and not have_external_network: - # no external net defined, assign it to first network using os.environ - sorted_networks[0][1]["external_network"] = external_network + if not have_external_network: + # try looking for mgmt network first + try: + networks['mgmt']["external_network"] = external_network + except KeyError: + if sorted_networks: + # otherwise assign it to first network using os.environ + sorted_networks[0][1]["external_network"] = external_network return sorted_networks @@ -295,7 +300,7 @@ class HeatContext(Context): def deploy(self): """deploys template into a stack using cloud""" - print("Deploying context '%s'" % self.name) + LOG.info("Deploying context '%s' START", self.name) heat_template = HeatTemplate(self.name, self.template_file, self.heat_parameters) @@ -325,23 +330,33 @@ class HeatContext(Context): server.public_ip = \ self.stack.outputs[server.floating_ip["stack_name"]] - print("Context '%s' deployed" % self.name) + LOG.info("Deploying context '%s' DONE", self.name) def add_server_port(self, server): - # TODO(hafe) can only handle one internal network for now - port = next(iter(server.ports.values())) - server.private_ip = self.stack.outputs[port["stack_name"]] + # use private ip from first port in first network + try: + private_port = next(iter(server.ports.values()))[0] + except IndexError: + LOG.exception("Unable to find first private port in %s", server.ports) + raise + server.private_ip = self.stack.outputs[private_port["stack_name"]] server.interfaces = {} - for network_name, port in server.ports.items(): - server.interfaces[network_name] = self.make_interface_dict( - network_name, port['stack_name'], self.stack.outputs) - - def make_interface_dict(self, network_name, stack_name, outputs): + for network_name, ports in server.ports.items(): + for port in ports: + # port['port'] is either port name from mapping or default network_name + server.interfaces[port['port']] = self.make_interface_dict(network_name, + port['port'], + port['stack_name'], + self.stack.outputs) + + def make_interface_dict(self, network_name, port, stack_name, outputs): private_ip = outputs[stack_name] mac_address = outputs[h_join(stack_name, "mac_address")] + # these are attributes of the network, not the port output_subnet_cidr = outputs[h_join(self.name, network_name, 'subnet', 'cidr')] + # these are attributes of the network, not the port output_subnet_gateway = outputs[h_join(self.name, network_name, 'subnet', 'gateway_ip')] @@ -355,6 +370,7 @@ class HeatContext(Context): "mac_address": mac_address, "device_id": outputs[h_join(stack_name, "device_id")], "network_id": outputs[h_join(stack_name, "network_id")], + # this should be == vld_id for NSB tests "network_name": network_name, # to match vnf_generic "local_mac": mac_address, @@ -364,10 +380,10 @@ class HeatContext(Context): def undeploy(self): """undeploys stack from cloud""" if self.stack: - print("Undeploying context '%s'" % self.name) + LOG.info("Undeploying context '%s' START", self.name) self.stack.delete() self.stack = None - print("Context '%s' undeployed" % self.name) + LOG.info("Undeploying context '%s' DONE", self.name) if os.path.exists(self.key_filename): try: @@ -397,10 +413,6 @@ class HeatContext(Context): attr_name: either a name for a server created by yardstick or a dict with attribute name mapping when using external heat templates """ - key_filename = pkg_resources.resource_filename( - 'yardstick.resources', - h_join('files/yardstick_key', get_short_key_uuid(self.key_uuid))) - if isinstance(attr_name, collections.Mapping): node_name, cname = self.split_name(attr_name['name']) if cname is None or cname != self.name: @@ -418,14 +430,20 @@ class HeatContext(Context): if server is None: return None + pkey = pkg_resources.resource_string( + 'yardstick.resources', + h_join('files/yardstick_key', get_short_key_uuid(self.key_uuid))).decode('utf-8') + result = { "user": server.context.user, - "key_filename": key_filename, + "pkey": pkey, "private_ip": server.private_ip, "interfaces": server.interfaces, "routing_table": self.generate_routing_table(server), # empty IPv6 routing table "nd_route_tbl": [], + # we want to save the contex name so we can generate pod.yaml + "name": server.name, } # Target server may only have private_ip if server.public_ip: @@ -438,9 +456,11 @@ class HeatContext(Context): network = self.networks.get(attr_name, None) else: - # Don't generalize too much Just support vld_id - vld_id = attr_name.get('vld_id', {}) - network_iter = (n for n in self.networks.values() if n.vld_id == vld_id) + # Only take the first key, value + key, value = next(iter(attr_name.items()), (None, None)) + if key is None: + return None + network_iter = (n for n in self.networks.values() if getattr(n, key) == value) network = next(network_iter, None) if network is None: @@ -448,7 +468,6 @@ class HeatContext(Context): result = { "name": network.name, - "vld_id": network.vld_id, "segmentation_id": network.segmentation_id, "network_type": network.network_type, "physical_network": network.physical_network, diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py index 0b8197ce9..facfab892 100644 --- a/yardstick/benchmark/contexts/model.py +++ b/yardstick/benchmark/contexts/model.py @@ -11,9 +11,15 @@ """ from __future__ import absolute_import + +import six +import logging from six.moves import range +LOG = logging.getLogger(__name__) + + class Object(object): """Base class for classes in the logical model Contains common attributes and methods @@ -208,6 +214,7 @@ class Server(Object): # pragma: no cover self.instances = attrs["instances"] # dict with key network name, each item is a dict with port name and ip + self.network_ports = attrs.get("network_ports", {}) self.ports = {} self.floating_ip = None @@ -253,37 +260,54 @@ class Server(Object): # pragma: no cover """adds to the template one server and corresponding resources""" port_name_list = [] for network in networks: - port_name = server_name + "-" + network.name + "-port" - self.ports[network.name] = {"stack_name": port_name} - # we can't use secgroups if port_security_enabled is False - if network.port_security_enabled is False: - sec_group_id = None + # if explicit mapping skip unused networks + if self.network_ports: + try: + ports = self.network_ports[network.name] + except KeyError: + # no port for this network + continue + else: + if isinstance(ports, six.string_types): + if ports.startswith('-'): + LOG.warning("possible YAML error, port name starts with - '%s", ports) + ports = [ports] + # otherwise add a port for every network with port name as network name else: - # if port_security_enabled is None we still need to add to secgroup - sec_group_id = self.secgroup_name - # don't refactor to pass in network object, that causes JSON - # circular ref encode errors - template.add_port(port_name, network.stack_name, network.subnet_stack_name, - network.vnic_type, sec_group_id=sec_group_id, - provider=network.provider, - allowed_address_pairs=network.allowed_address_pairs) - port_name_list.append(port_name) - - if self.floating_ip: - external_network = self.floating_ip["external_network"] - if network.has_route_to(external_network): - self.floating_ip["stack_name"] = server_name + "-fip" - template.add_floating_ip(self.floating_ip["stack_name"], - external_network, - port_name, - network.router.stack_if_name, - sec_group_id) - self.floating_ip_assoc["stack_name"] = \ - server_name + "-fip-assoc" - template.add_floating_ip_association( - self.floating_ip_assoc["stack_name"], - self.floating_ip["stack_name"], - port_name) + ports = [network.name] + for port in ports: + port_name = "{0}-{1}-port".format(server_name, port) + self.ports.setdefault(network.name, []).append( + {"stack_name": port_name, "port": port}) + # we can't use secgroups if port_security_enabled is False + if network.port_security_enabled is False: + sec_group_id = None + else: + # if port_security_enabled is None we still need to add to secgroup + sec_group_id = self.secgroup_name + # don't refactor to pass in network object, that causes JSON + # circular ref encode errors + template.add_port(port_name, network.stack_name, network.subnet_stack_name, + network.vnic_type, sec_group_id=sec_group_id, + provider=network.provider, + allowed_address_pairs=network.allowed_address_pairs) + port_name_list.append(port_name) + + if self.floating_ip: + external_network = self.floating_ip["external_network"] + if network.has_route_to(external_network): + self.floating_ip["stack_name"] = server_name + "-fip" + template.add_floating_ip(self.floating_ip["stack_name"], + external_network, + port_name, + network.router.stack_if_name, + sec_group_id) + self.floating_ip_assoc["stack_name"] = \ + server_name + "-fip-assoc" + template.add_floating_ip_association( + self.floating_ip_assoc["stack_name"], + self.floating_ip["stack_name"], + port_name) if self.flavor: if isinstance(self.flavor, dict): self.flavor["name"] = \ diff --git a/yardstick/benchmark/contexts/node.py b/yardstick/benchmark/contexts/node.py index 250032efc..ffc82c8ed 100644 --- a/yardstick/benchmark/contexts/node.py +++ b/yardstick/benchmark/contexts/node.py @@ -74,11 +74,11 @@ class NodeContext(Context): self.nodes.extend(cfg["nodes"]) self.controllers.extend([node for node in cfg["nodes"] - if node["role"] == "Controller"]) + if node.get("role") == "Controller"]) self.computes.extend([node for node in cfg["nodes"] - if node["role"] == "Compute"]) + if node.get("role") == "Compute"]) self.baremetals.extend([node for node in cfg["nodes"] - if node["role"] == "Baremetal"]) + if node.get("role") == "Baremetal"]) LOG.debug("Nodes: %r", self.nodes) LOG.debug("Controllers: %r", self.controllers) LOG.debug("Computes: %r", self.computes) diff --git a/yardstick/benchmark/core/plugin.py b/yardstick/benchmark/core/plugin.py index 24f1b6b25..56ecd29d9 100644 --- a/yardstick/benchmark/core/plugin.py +++ b/yardstick/benchmark/core/plugin.py @@ -38,19 +38,19 @@ class Plugin(object): plugins, deployment = parser.parse_plugin() plugin_name = plugins.get("name") - print("Installing plugin: %s" % plugin_name) + LOG.info("Installing plugin: %s", plugin_name) - LOG.info("Executing _install_setup()") + LOG.debug("Executing _install_setup()") self._install_setup(plugin_name, deployment) - LOG.info("Executing _run()") + LOG.debug("Executing _run()") self._run(plugin_name) total_end_time = time.time() - LOG.info("total finished in %d secs", + LOG.info("Total finished in %d secs", total_end_time - total_start_time) - print("Done, exiting") + LOG.info("Plugin %s Done, exiting", plugin_name) def remove(self, args): """Remove a plugin.""" diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index a49a2cb71..75703cf50 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -97,8 +97,8 @@ class Task(object): # pragma: no cover task_args = [args.task_args] task_args_fnames = [args.task_args_file] - LOG.info("\ntask_files:%s, \ntask_args:%s, \ntask_args_fnames:%s", - task_files, task_args, task_args_fnames) + LOG.debug("task_files:%s, task_args:%s, task_args_fnames:%s", + task_files, task_args, task_args_fnames) if args.parse_only: sys.exit(0) @@ -139,7 +139,7 @@ class Task(object): # pragma: no cover context.undeploy() self.contexts = [] one_task_end_time = time.time() - LOG.info("task %s finished in %d secs", task_files[i], + LOG.info("Task %s finished in %d secs", task_files[i], one_task_end_time - one_task_start_time) result = self._get_format_result(testcases) @@ -148,14 +148,13 @@ class Task(object): # pragma: no cover self._generate_reporting(result) total_end_time = time.time() - LOG.info("total finished in %d secs", + LOG.info("Total finished in %d secs", total_end_time - total_start_time) scenario = scenarios[0] - print("To generate report execute => yardstick report generate ", - scenario['task_id'], scenario['tc']) - - print("Done, exiting") + LOG.info("To generate report, execute command " + "'yardstick report generate %(task_id)s %(tc)s'", scenario) + LOG.info("Task ALL DONE, exiting") return result def _generate_reporting(self, result): @@ -163,7 +162,7 @@ class Task(object): # pragma: no cover with open(constants.REPORTING_FILE, 'w') as f: f.write(env.from_string(report_template).render(result)) - LOG.info('yardstick reporting generate in %s', constants.REPORTING_FILE) + LOG.info("Report can be found in '%s'", constants.REPORTING_FILE) def _set_log(self): log_format = '%(asctime)s %(name)s %(filename)s:%(lineno)d %(levelname)s %(message)s' @@ -265,7 +264,7 @@ class Task(object): # pragma: no cover raise RuntimeError self.outputs.update(runner.get_output()) result.extend(runner.get_result()) - print("Runner ended, output in", output_file) + LOG.info("Runner ended, output in %s", output_file) else: # run serially for scenario in scenarios: @@ -277,7 +276,7 @@ class Task(object): # pragma: no cover raise RuntimeError self.outputs.update(runner.get_output()) result.extend(runner.get_result()) - print("Runner ended, output in", output_file) + LOG.info("Runner ended, output in %s", output_file) # Abort background runners for runner in background_runners: @@ -302,7 +301,7 @@ class Task(object): # pragma: no cover base_runner.Runner.terminate_all() if self.contexts: - print("Undeploying all contexts") + LOG.info("Undeploying all contexts") for context in self.contexts[::-1]: context.undeploy() @@ -363,9 +362,10 @@ class Task(object): # pragma: no cover context_cfg["nodes"] = parse_nodes_with_context(scenario_cfg) context_cfg["networks"] = get_networks_from_nodes( context_cfg["nodes"]) + runner = base_runner.Runner.get(runner_cfg) - print("Starting runner of type '%s'" % runner_cfg["type"]) + LOG.info("Starting runner of type '%s'", runner_cfg["type"]) runner.run(scenario_cfg, context_cfg) return runner @@ -377,8 +377,6 @@ class Task(object): # pragma: no cover target_attr: either a name for a server created by yardstick or a dict with attribute name mapping when using external heat templates """ - host = None - target = None for context in self.contexts: if context.__context_type__ != "Heat": continue @@ -477,7 +475,7 @@ class TaskParser(object): # pragma: no cover def parse_task(self, task_id, task_args=None, task_args_file=None): """parses the task file and return an context and scenario instances""" - print("Parsing task config:", self.path) + LOG.info("Parsing task config: %s", self.path) try: kw = {} @@ -494,10 +492,9 @@ class TaskParser(object): # pragma: no cover input_task = f.read() rendered_task = TaskTemplate.render(input_task, **kw) except Exception as e: - print("Failed to render template:\n%(task)s\n%(err)s\n" - % {"task": input_task, "err": e}) + LOG.exception('Failed to render template:\n%s\n', input_task) raise e - print("Input task is:\n%s\n" % rendered_task) + LOG.debug("Input task is:\n%s\n", rendered_task) cfg = yaml_load(rendered_task) except IOError as ioerror: @@ -628,11 +625,11 @@ def get_networks_from_nodes(nodes): continue interfaces = node.get('interfaces', {}) for interface in interfaces.values(): - vld_id = interface.get('vld_id') - # mgmt network doesn't have vld_id - if not vld_id: + # vld_id is network_name + network_name = interface.get('network_name') + if not network_name: continue - network = Context.get_network({"vld_id": vld_id}) + network = Context.get_network(network_name) if network: networks[network['name']] = network return networks diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py index 69d744562..c2c6a8f19 100644 --- a/yardstick/benchmark/runners/duration.py +++ b/yardstick/benchmark/runners/duration.py @@ -40,7 +40,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg, interval = runner_cfg.get("interval", 1) duration = runner_cfg.get("duration", 60) - LOG.info("worker START, duration %d sec, class %s", duration, cls) + LOG.info("Worker START, duration is %ds", duration) + LOG.debug("class is %s", cls) runner_cfg['runner_id'] = os.getpid() @@ -95,7 +96,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg, if (errors and sla_action is None) or \ (time.time() - start > duration or aborted.is_set()): - LOG.info("worker END") + LOG.info("Worker END") break benchmark.teardown() diff --git a/yardstick/benchmark/scenarios/availability/director.py b/yardstick/benchmark/scenarios/availability/director.py index c9187c34d..f152af090 100644 --- a/yardstick/benchmark/scenarios/availability/director.py +++ b/yardstick/benchmark/scenarios/availability/director.py @@ -111,3 +111,8 @@ class Director(object): while self.executionSteps: singleStep = self.executionSteps.pop() singleStep.rollback() + + def store_result(self, result): + LOG.debug("store result ....") + if hasattr(self, 'monitorMgr'): + self.monitorMgr.store_result(result) diff --git a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py index 0027925d6..a6c1a28bd 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py +++ b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py @@ -44,7 +44,11 @@ class MonitorMgr(object): monitor_ins = monitor_cls(monitor_cfg, context, self.monitor_mgr_data) if "key" in monitor_cfg: - monitor_ins.key = monitor_cfg["key"] + monitor_ins.tag = monitor_ins.key = monitor_cfg["key"] + elif monitor_type == "openstack-cmd": + monitor_ins.tag = monitor_cfg["command_name"].replace(" ", "-") + elif monitor_type == "process": + monitor_ins.tag = monitor_type + "_" + monitor_cfg["process_name"] self._monitor_list.append(monitor_ins) def __getitem__(self, item): @@ -67,6 +71,12 @@ class MonitorMgr(object): sla_pass = sla_pass & monitor.verify_SLA() return sla_pass + def store_result(self, result): + for monitor in self._monitor_list: + monitor_result = monitor.get_result() + for k, v in monitor_result.items(): + result[monitor.tag + "_" + k] = v + class BaseMonitor(multiprocessing.Process): """docstring for BaseMonitor""" @@ -83,6 +93,7 @@ class BaseMonitor(multiprocessing.Process): self._event = multiprocessing.Event() self.monitor_data = data self.setup_done = False + self.tag = "" @staticmethod def get_monitor_cls(monitor_type): @@ -164,5 +175,5 @@ class BaseMonitor(multiprocessing.Process): def verify_SLA(self): pass - def result(self): + def get_result(self): return self._result diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py index d7d1545da..dce69f45f 100644 --- a/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py +++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py @@ -47,7 +47,7 @@ class MultiMonitor(basemonitor.BaseMonitor): last_outage = 0 for monitor in self.monitors: - monitor_result = monitor.result() + monitor_result = monitor.get_result() monitor_first_outage = monitor_result.get('first_outage', 0) monitor_last_outage = monitor_result.get('last_outage', 0) @@ -71,6 +71,7 @@ class MultiMonitor(basemonitor.BaseMonitor): max_outage_time = self._config["sla"]["max_recover_time"] else: raise RuntimeError("monitor max_outage_time config is not found") + self._result = {"outage_time": outage_time} if outage_time > max_outage_time: LOG.error("SLA failure: %f > %f", outage_time, max_outage_time) diff --git a/yardstick/benchmark/scenarios/availability/scenario_general.py b/yardstick/benchmark/scenarios/availability/scenario_general.py index c7ed1d6ec..9ac55471d 100644 --- a/yardstick/benchmark/scenarios/availability/scenario_general.py +++ b/yardstick/benchmark/scenarios/availability/scenario_general.py @@ -60,6 +60,8 @@ class ScenarioGeneral(base.Scenario): verify_result = self.director.verify() + self.director.store_result(result) + for k, v in self.director.data.items(): if v == 0: result['sla_pass'] = 0 diff --git a/yardstick/benchmark/scenarios/availability/serviceha.py b/yardstick/benchmark/scenarios/availability/serviceha.py index d0f5e9e4d..6d0d812af 100755 --- a/yardstick/benchmark/scenarios/availability/serviceha.py +++ b/yardstick/benchmark/scenarios/availability/serviceha.py @@ -78,6 +78,7 @@ class ServiceHA(base.Scenario): LOG.info("The service process not found in the host envrioment, \ the HA test case NOT pass") return + self.monitorMgr.store_result(result) if sla_pass: result['sla_pass'] = 1 LOG.info("The HA test case PASS the SLA") diff --git a/yardstick/benchmark/scenarios/compute/qemu_migrate.py b/yardstick/benchmark/scenarios/compute/qemu_migrate.py index 6c0446bb7..6cfedc17a 100644 --- a/yardstick/benchmark/scenarios/compute/qemu_migrate.py +++ b/yardstick/benchmark/scenarios/compute/qemu_migrate.py @@ -106,7 +106,7 @@ class QemuMigrate(base.Scenario): cmd_args = " %s %s %s %s %s %s" %\ (smp, qmp_sock_src, qmp_sock_dst, incoming_ip, migrate_to_port, max_down_time) - cmd = "bash migrate_benchmark.sh %s" % (cmd_args) + cmd = "bash qemu_migrate_benchmark.sh %s" % (cmd_args) LOG.debug("Executing command: %s", cmd) status, stdout, stderr = self.host.execute(cmd) if status: diff --git a/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash b/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash index 552098103..d9a440c89 100644 --- a/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash +++ b/yardstick/benchmark/scenarios/compute/qemu_migrate_benchmark.bash @@ -14,6 +14,7 @@ set -e # Commandline arguments src=$2 +dst=$3 dst_ip=$4 migrate_to_port=$5 max_down_time=$6 @@ -22,7 +23,6 @@ OUTPUT_FILE=/tmp/output-qemu.log do_migrate() { -# local src=`echo $OPTIONS | cut -d ':' -f 2 | cut -d ',' -f 1` echo "info status" | nc -U $src # with no speed limit echo "migrate_set_speed 0" |nc -U $src @@ -45,7 +45,9 @@ output_qemu() # print detail information echo "info migrate" | nc -U $src echo "quit" | nc -U $src + echo "quit" | nc -u $dst sleep 5 + echo "Migration executed successfully" } > $OUTPUT_FILE @@ -64,5 +66,7 @@ echo -e "{ \ main() { do_migrate + output_qemu + output_json } main diff --git a/yardstick/benchmark/scenarios/compute/spec_cpu.py b/yardstick/benchmark/scenarios/compute/spec_cpu.py index 520618631..df361cd94 100644 --- a/yardstick/benchmark/scenarios/compute/spec_cpu.py +++ b/yardstick/benchmark/scenarios/compute/spec_cpu.py @@ -103,6 +103,9 @@ class SpecCPU(base.Scenario): cmd = "cd /usr/cpu2006/ && . ./shrc && runspec --config %s" % self.runspec_config cmd_args = "" + if "rate" in self.options: + cmd_args += " --rate %s" % self.options["runspec_rate"] + if "output_format" in self.options: cmd_args += " --output_format %s" % self.options["output_format"] diff --git a/yardstick/benchmark/scenarios/lib/create_keypair.py b/yardstick/benchmark/scenarios/lib/create_keypair.py index 2185bfa5d..f5b1fff7a 100644 --- a/yardstick/benchmark/scenarios/lib/create_keypair.py +++ b/yardstick/benchmark/scenarios/lib/create_keypair.py @@ -47,7 +47,7 @@ class CreateKeypair(base.Scenario): rsa_key = paramiko.RSAKey.generate(bits=2048, progress_func=None) rsa_key.write_private_key_file(self.key_filename) - print("Writing %s ..." % self.key_filename) + LOG.info("Writing key_file %s ...", self.key_filename) with open(self.key_filename + ".pub", "w") as pubkey_file: pubkey_file.write( "%s %s\n" % (rsa_key.get_name(), rsa_key.get_base64())) diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py index 6a7927de4..3bade73e2 100644 --- a/yardstick/benchmark/scenarios/networking/ping.py +++ b/yardstick/benchmark/scenarios/networking/ping.py @@ -67,7 +67,7 @@ class Ping(base.Scenario): else: target_vm = self.scenario_cfg['target'] - LOG.debug("ping '%s' '%s'", options, dest) + LOG.debug("ping %s %s", options, dest) with open(self.target_script, "r") as stdin_file: exit_status, stdout, stderr = self.connection.execute( "/bin/sh -s {0} {1}".format(dest, options), diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py index f7b2915a2..450f83f6a 100644 --- a/yardstick/benchmark/scenarios/networking/vnf_generic.py +++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py @@ -25,10 +25,11 @@ import re from itertools import chain import six -from operator import itemgetter +import yaml from collections import defaultdict from yardstick.benchmark.scenarios import base +from yardstick.common.constants import LOG_DIR from yardstick.common.utils import import_modules_from_package, itersubclasses from yardstick.common.yaml_loader import yaml_load from yardstick.network_services.collector.subscriber import Collector @@ -63,10 +64,11 @@ class IncorrectSetup(Exception): class SshManager(object): - def __init__(self, node): + def __init__(self, node, timeout=120): super(SshManager, self).__init__() self.node = node self.conn = None + self.timeout = timeout def __enter__(self): """ @@ -75,7 +77,7 @@ class SshManager(object): """ try: self.conn = ssh.SSH.from_node(self.node) - self.conn.wait() + self.conn.wait(timeout=self.timeout) except SSHError as error: LOG.info("connect failed to %s, due to %s", self.node["ip"], error) # self.conn defaults to None @@ -134,6 +136,7 @@ class NetworkServiceTestCase(base.Scenario): self.vnfs = [] self.collector = None self.traffic_profile = None + self.node_netdevs = {} def _get_ip_flow_range(self, ip_start_range): @@ -168,15 +171,17 @@ class NetworkServiceTestCase(base.Scenario): def _get_traffic_flow(self): flow = {} try: + # TODO: should be .0 or .1 so we can use list + # but this also roughly matches uplink_0, downlink_0 fflow = self.scenario_cfg["options"]["flow"] for index, src in enumerate(fflow.get("src_ip", [])): - flow["src_ip{}".format(index)] = self._get_ip_flow_range(src) + flow["src_ip_{}".format(index)] = self._get_ip_flow_range(src) for index, dst in enumerate(fflow.get("dst_ip", [])): - flow["dst_ip{}".format(index)] = self._get_ip_flow_range(dst) + flow["dst_ip_{}".format(index)] = self._get_ip_flow_range(dst) - for index, publicip in enumerate(fflow.get("publicip", [])): - flow["public_ip{}".format(index)] = publicip + for index, publicip in enumerate(fflow.get("public_ip", [])): + flow["public_ip_{}".format(index)] = publicip flow["count"] = fflow["count"] except KeyError: @@ -201,8 +206,8 @@ class NetworkServiceTestCase(base.Scenario): traffic_map_data = { 'flow': self._get_traffic_flow(), 'imix': self._get_traffic_imix(), - 'private': {}, - 'public': {}, + TrafficProfile.UPLINK: {}, + TrafficProfile.DOWNLINK: {}, } traffic_vnfd = vnfdgen.generate_vnfd(traffic_mapping, traffic_map_data) @@ -216,7 +221,26 @@ class NetworkServiceTestCase(base.Scenario): @staticmethod def get_vld_networks(networks): - return {n['vld_id']: n for n in networks.values()} + # network name is vld_id + vld_map = {} + for name, n in networks.items(): + try: + vld_map[n['vld_id']] = n + except KeyError: + vld_map[name] = n + return vld_map + + @staticmethod + def find_node_if(nodes, name, if_name, vld_id): + try: + # check for xe0, xe1 + intf = nodes[name]["interfaces"][if_name] + except KeyError: + # if not xe0, then maybe vld_id, uplink_0, downlink_0 + # pop it and re-insert with the correct name from topology + intf = nodes[name]["interfaces"].pop(vld_id) + nodes[name]["interfaces"][if_name] = intf + return intf def _resolve_topology(self): for vld in self.topology["vld"]: @@ -234,8 +258,8 @@ class NetworkServiceTestCase(base.Scenario): try: nodes = self.context_cfg["nodes"] - node0_if = nodes[node0_name]["interfaces"][node0_if_name] - node1_if = nodes[node1_name]["interfaces"][node1_if_name] + node0_if = self.find_node_if(nodes, node0_name, node0_if_name, vld["id"]) + node1_if = self.find_node_if(nodes, node1_name, node1_if_name, vld["id"]) # names so we can do reverse lookups node0_if["ifname"] = node0_if_name @@ -244,7 +268,6 @@ class NetworkServiceTestCase(base.Scenario): node0_if["node_name"] = node0_name node1_if["node_name"] = node1_name - vld_networks = self.get_vld_networks(self.context_cfg["networks"]) node0_if["vld_id"] = vld["id"] node1_if["vld_id"] = vld["id"] @@ -257,6 +280,7 @@ class NetworkServiceTestCase(base.Scenario): node1_if["peer_ifname"] = node0_if_name # just load the network + vld_networks = self.get_vld_networks(self.context_cfg["networks"]) node0_if["network"] = vld_networks.get(vld["id"], {}) node1_if["network"] = vld_networks.get(vld["id"], {}) @@ -285,8 +309,8 @@ class NetworkServiceTestCase(base.Scenario): node1_if_name = node1_data["vnfd-connection-point-ref"] nodes = self.context_cfg["nodes"] - node0_if = nodes[node0_name]["interfaces"][node0_if_name] - node1_if = nodes[node1_name]["interfaces"][node1_if_name] + node0_if = self.find_node_if(nodes, node0_name, node0_if_name, vld["id"]) + node1_if = self.find_node_if(nodes, node1_name, node1_if_name, vld["id"]) # add peer interface dict, but remove circular link # TODO: don't waste memory @@ -306,17 +330,16 @@ class NetworkServiceTestCase(base.Scenario): vnfd = self._find_vnfd_from_vnf_idx(vnf_idx) self.context_cfg["nodes"][vnf_name].update(vnfd) - @staticmethod - def _sort_dpdk_port_num(netdevs): - # dpdk_port_num is PCI BUS ID ordering, lowest first - s = sorted(netdevs.values(), key=itemgetter('pci_bus_id')) - for dpdk_port_num, netdev in enumerate(s): - netdev['dpdk_port_num'] = dpdk_port_num + def _probe_netdevs(self, node, node_dict, timeout=120): + try: + return self.node_netdevs[node] + except KeyError: + pass - def _probe_netdevs(self, node, node_dict): - cmd = "PATH=$PATH:/sbin:/usr/sbin ip addr show" netdevs = {} - with SshManager(node_dict) as conn: + cmd = "PATH=$PATH:/sbin:/usr/sbin ip addr show" + + with SshManager(node_dict, timeout=timeout) as conn: if conn: exit_status = conn.execute(cmd)[0] if exit_status != 0: @@ -327,6 +350,8 @@ class NetworkServiceTestCase(base.Scenario): raise IncorrectSetup( "Cannot find netdev info in sysfs" % node) netdevs = node_dict['netdevs'] = self.parse_netdev_info(stdout) + + self.node_netdevs[node] = netdevs return netdevs @classmethod @@ -342,6 +367,36 @@ class NetworkServiceTestCase(base.Scenario): 'ifindex': netdev['ifindex'], }) + def _generate_pod_yaml(self): + context_yaml = os.path.join(LOG_DIR, "pod-{}.yaml".format(self.scenario_cfg['task_id'])) + # convert OrderedDict to a list + # pod.yaml nodes is a list + nodes = [] + for node in self.context_cfg["nodes"].values(): + # name field is required + # remove context suffix + node['name'] = node['name'].split('.')[0] + nodes.append(node) + nodes = self._convert_pkeys_to_string(nodes) + pod_dict = { + "nodes": nodes, + "networks": self.context_cfg["networks"] + } + with open(context_yaml, "w") as context_out: + yaml.safe_dump(pod_dict, context_out, default_flow_style=False, + explicit_start=True) + + @staticmethod + def _convert_pkeys_to_string(nodes): + # make copy because we are mutating + nodes = nodes[:] + for i, node in enumerate(nodes): + try: + nodes[i] = dict(node, pkey=ssh.convert_key_to_str(node["pkey"])) + except KeyError: + pass + return nodes + TOPOLOGY_REQUIRED_KEYS = frozenset({ "vpci", "local_ip", "netmask", "local_mac", "driver"}) @@ -351,6 +406,10 @@ class NetworkServiceTestCase(base.Scenario): :return: None. Side effect: context_cfg is updated """ + num_nodes = len(self.context_cfg["nodes"]) + # OpenStack instance creation time is probably proportional to the number + # of instances + timeout = 120 * num_nodes for node, node_dict in self.context_cfg["nodes"].items(): for network in node_dict["interfaces"].values(): @@ -361,7 +420,7 @@ class NetworkServiceTestCase(base.Scenario): # only ssh probe if there are missing values # ssh probe won't work on Ixia, so we had better define all our values try: - netdevs = self._probe_netdevs(node, node_dict) + netdevs = self._probe_netdevs(node, node_dict, timeout=timeout) except (SSHError, SSHTimeout): raise IncorrectConfig( "Unable to probe missing interface fields '%s', on node %s " @@ -378,6 +437,8 @@ class NetworkServiceTestCase(base.Scenario): "Require interface fields '%s' not found, topology file " "corrupted" % ', '.join(missing)) + # we have to generate pod.yaml here so we have vpci and driver + self._generate_pod_yaml() # 3. Use topology file to find connections & resolve dest address self._resolve_topology() self._update_context_with_topology() @@ -439,10 +500,26 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \ (expected_name, classes_found)) @staticmethod - def update_interfaces_from_node(vnfd, node): - for intf in vnfd["vdu"][0]["external-interface"]: - node_intf = node['interfaces'][intf['name']] - intf['virtual-interface'].update(node_intf) + def create_interfaces_from_node(vnfd, node): + ext_intfs = vnfd["vdu"][0]["external-interface"] = [] + # have to sort so xe0 goes first + for intf_name, intf in sorted(node['interfaces'].items()): + # only interfaces with vld_id are added. + # Thus there are two layers of filters, only intefaces with vld_id + # show up in interfaces, and only interfaces with traffic profiles + # are used by the generators + if intf.get('vld_id'): + # force dpkd_port_num to int so we can do reverse lookup + try: + intf['dpdk_port_num'] = int(intf['dpdk_port_num']) + except KeyError: + pass + ext_intf = { + "name": intf_name, + "virtual-interface": intf, + "vnfd-connection-point-ref": intf_name, + } + ext_intfs.append(ext_intf) def load_vnf_models(self, scenario_cfg=None, context_cfg=None): """ Create VNF objects based on YAML descriptors @@ -472,7 +549,14 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \ vnfd = vnfdgen.generate_vnfd(vnf_model, node) # TODO: here add extra context_cfg["nodes"] regardless of template vnfd = vnfd["vnfd:vnfd-catalog"]["vnfd"][0] - self.update_interfaces_from_node(vnfd, node) + # force inject pkey if it exists + # we want to standardize Heat using pkey as a string so we don't rely + # on the filesystem + try: + vnfd['mgmt-interface']['pkey'] = node['pkey'] + except KeyError: + pass + self.create_interfaces_from_node(vnfd, node) vnf_impl = self.get_vnf_impl(vnfd['id']) vnf_instance = vnf_impl(node_name, vnfd) vnfs.append(vnf_instance) diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py index bd5447836..e2e8bf67d 100644 --- a/yardstick/cmd/commands/task.py +++ b/yardstick/cmd/commands/task.py @@ -51,7 +51,7 @@ class TaskCommands(object): # pragma: no cover self.output_file = param.output_file result = {} - + LOG.info('Task START') try: result = Task().start(param, **kwargs) except Exception as e: @@ -59,9 +59,9 @@ class TaskCommands(object): # pragma: no cover LOG.exception("") if result.get('result', {}).get('criteria') == 'PASS': - LOG.info('Task Success') + LOG.info('Task SUCCESS') else: - LOG.info('Task Failed') + LOG.info('Task FAILED') raise RuntimeError('Task Failed') def _write_error_data(self, error): diff --git a/yardstick/common/httpClient.py b/yardstick/common/httpClient.py index 11c2d752d..54f7be670 100644 --- a/yardstick/common/httpClient.py +++ b/yardstick/common/httpClient.py @@ -9,6 +9,7 @@ from __future__ import absolute_import import logging +import time from oslo_serialization import jsonutils import requests @@ -18,18 +19,21 @@ logger = logging.getLogger(__name__) class HttpClient(object): - def post(self, url, data): + def post(self, url, data, timeout=0): data = jsonutils.dump_as_bytes(data) headers = {'Content-Type': 'application/json'} - try: - response = requests.post(url, data=data, headers=headers) - result = response.json() - logger.debug('The result is: %s', result) - - return result - except Exception as e: - logger.debug('Failed: %s', e) - raise + t_end = time.time() + timeout + while True: + try: + response = requests.post(url, data=data, headers=headers) + result = response.json() + logger.debug('The result is: %s', result) + return result + except Exception: + if time.time() > t_end: + logger.exception('') + raise + time.sleep(1) def get(self, url): response = requests.get(url) diff --git a/yardstick/network_services/helpers/dpdknicbind_helper.py b/yardstick/network_services/helpers/dpdknicbind_helper.py new file mode 100644 index 000000000..605d08d38 --- /dev/null +++ b/yardstick/network_services/helpers/dpdknicbind_helper.py @@ -0,0 +1,145 @@ +# 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. +import re +import itertools + +NETWORK_KERNEL = 'network_kernel' +NETWORK_DPDK = 'network_dpdk' +NETWORK_OTHER = 'network_other' +CRYPTO_KERNEL = 'crypto_kernel' +CRYPTO_DPDK = 'crypto_dpdk' +CRYPTO_OTHER = 'crypto_other' + + +class DpdkBindHelperException(Exception): + pass + + +class DpdkBindHelper(object): + DPDK_STATUS_CMD = "{dpdk_nic_bind} --status" + DPDK_BIND_CMD = "sudo {dpdk_nic_bind} {force} -b {driver} {vpci}" + + NIC_ROW_RE = re.compile("([^ ]+) '([^']+)' (?:if=([^ ]+) )?drv=([^ ]+) " + "unused=([^ ]*)(?: (\*Active\*))?") + SKIP_RE = re.compile('(====|<none>|^$)') + NIC_ROW_FIELDS = ['vpci', 'dev_type', 'iface', 'driver', 'unused', 'active'] + + HEADER_DICT_PAIRS = [ + (re.compile('^Network.*DPDK.*$'), NETWORK_DPDK), + (re.compile('^Network.*kernel.*$'), NETWORK_KERNEL), + (re.compile('^Other network.*$'), NETWORK_OTHER), + (re.compile('^Crypto.*DPDK.*$'), CRYPTO_DPDK), + (re.compile('^Crypto.*kernel$'), CRYPTO_KERNEL), + (re.compile('^Other crypto.*$'), CRYPTO_OTHER), + ] + + def clean_status(self): + self.dpdk_status = { + NETWORK_KERNEL: [], + NETWORK_DPDK: [], + CRYPTO_KERNEL: [], + CRYPTO_DPDK: [], + NETWORK_OTHER: [], + CRYPTO_OTHER: [], + } + + def __init__(self, ssh_helper): + self.dpdk_status = None + self.status_nic_row_re = None + self._dpdk_nic_bind_attr = None + self._status_cmd_attr = None + + self.ssh_helper = ssh_helper + self.clean_status() + + def _dpdk_execute(self, *args, **kwargs): + res = self.ssh_helper.execute(*args, **kwargs) + if res[0] != 0: + raise DpdkBindHelperException('{} command failed with rc={}'.format( + self._dpdk_nic_bind, res[0])) + return res + + @property + def _dpdk_nic_bind(self): + if self._dpdk_nic_bind_attr is None: + self._dpdk_nic_bind_attr = self.ssh_helper.provision_tool(tool_file="dpdk-devbind.py") + return self._dpdk_nic_bind_attr + + @property + def _status_cmd(self): + if self._status_cmd_attr is None: + self._status_cmd_attr = self.DPDK_STATUS_CMD.format(dpdk_nic_bind=self._dpdk_nic_bind) + return self._status_cmd_attr + + def _addline(self, active_list, line): + if active_list is None: + return + res = self.NIC_ROW_RE.match(line) + if res is None: + return + new_data = {k: v for k, v in zip(self.NIC_ROW_FIELDS, res.groups())} + new_data['active'] = bool(new_data['active']) + self.dpdk_status[active_list].append(new_data) + + @classmethod + def _switch_active_dict(cls, a_row, active_dict): + for regexp, a_dict in cls.HEADER_DICT_PAIRS: + if regexp.match(a_row): + return a_dict + return active_dict + + def parse_dpdk_status_output(self, input): + active_dict = None + self.clean_status() + for a_row in input.splitlines(): + if self.SKIP_RE.match(a_row): + continue + active_dict = self._switch_active_dict(a_row, active_dict) + self._addline(active_dict, a_row) + return self.dpdk_status + + def _get_bound_pci_addresses(self, active_dict): + return [iface['vpci'] for iface in self.dpdk_status[active_dict]] + + @property + def dpdk_bound_pci_addresses(self): + return self._get_bound_pci_addresses(NETWORK_DPDK) + + @property + def kernel_bound_pci_addresses(self): + return self._get_bound_pci_addresses(NETWORK_KERNEL) + + @property + def interface_driver_map(self): + return {interface['vpci']: interface['driver'] + for interface in itertools.chain(*self.dpdk_status.values())} + + def read_status(self): + return self.parse_dpdk_status_output(self._dpdk_execute(self._status_cmd)[1]) + + def bind(self, pci, driver, force=True): + cmd = self.DPDK_BIND_CMD.format(dpdk_nic_bind=self._dpdk_nic_bind, + driver=driver, + vpci=' '.join(list(pci)), + force='--force' if force else '') + self._dpdk_execute(cmd) + # update the inner status dict + self.read_status() + + def save_used_drivers(self): + self.used_drivers = self.interface_driver_map + + def rebind_drivers(self, force=True): + for vpci, driver in self.used_drivers.items(): + self.bind(vpci, driver, force) diff --git a/yardstick/network_services/helpers/samplevnf_helper.py b/yardstick/network_services/helpers/samplevnf_helper.py index dfc5cb972..5f87f788d 100644 --- a/yardstick/network_services/helpers/samplevnf_helper.py +++ b/yardstick/network_services/helpers/samplevnf_helper.py @@ -19,7 +19,7 @@ import logging import os import sys from collections import OrderedDict, defaultdict -from itertools import chain +from itertools import chain, repeat import six from six.moves.configparser import ConfigParser @@ -62,6 +62,98 @@ SCRIPT_TPL = """ """ +class PortPairs(object): + + DOWNLINK = "downlink" + UPLINK = "uplink" + + def __init__(self, interfaces): + super(PortPairs, self).__init__() + self.interfaces = interfaces + self._all_ports = None + self._uplink_ports = None + self._downlink_ports = None + self._networks = None + self._port_pair_list = None + self._valid_networks = None + + @property + def networks(self): + if self._networks is None: + self._networks = {} + for intf in self.interfaces: + vintf = intf['virtual-interface'] + try: + vld_id = vintf['vld_id'] + except KeyError: + # probably unused port? + LOG.warning("intf without vld_id, %s", vintf) + else: + self._networks.setdefault(vld_id, []).append(vintf["ifname"]) + return self._networks + + @classmethod + def get_downlink_id(cls, vld_id): + # partition returns a tuple + parts = list(vld_id.partition(cls.UPLINK)) + if parts[0]: + # 'uplink' was not in or not leftmost in the string + return + parts[1] = cls.DOWNLINK + public_id = ''.join(parts) + return public_id + + @property + # this only works for vnfs that have both uplink and public visible + def valid_networks(self): + if self._valid_networks is None: + self._valid_networks = [] + for vld_id in self.networks: + downlink_id = self.get_downlink_id(vld_id) + if downlink_id in self.networks: + self._valid_networks.append((vld_id, downlink_id)) + return self._valid_networks + + @property + def all_ports(self): + if self._all_ports is None: + self._all_ports = sorted(set(self.uplink_ports + self.downlink_ports)) + return self._all_ports + + @property + def uplink_ports(self): + if self._uplink_ports is None: + intfs = chain.from_iterable( + intfs for vld_id, intfs in self.networks.items() if + vld_id.startswith(self.UPLINK)) + self._uplink_ports = sorted(set(intfs)) + return self._uplink_ports + + @property + def downlink_ports(self): + if self._downlink_ports is None: + intfs = chain.from_iterable( + intfs for vld_id, intfs in self.networks.items() if + vld_id.startswith(self.DOWNLINK)) + self._downlink_ports = sorted(set(intfs)) + return self._downlink_ports + + @property + def port_pair_list(self): + if self._port_pair_list is None: + self._port_pair_list = [] + + for uplink, downlink in self.valid_networks: + for uplink_intf in self.networks[uplink]: + # only VNFs have uplink, public peers + peer_intfs = self.networks.get(downlink, []) + if peer_intfs: + for downlink_intf in peer_intfs: + port_pair = uplink_intf, downlink_intf + self._port_pair_list.append(port_pair) + return self._port_pair_list + + class MultiPortConfig(object): HW_LB = "HW" @@ -108,7 +200,7 @@ class MultiPortConfig(object): ip_addr = cls.make_ip_addr(ip_addr, prefixlen) return ip_addr.ip.exploded, ip_addr.network.prefixlen - def __init__(self, topology_file, config_tpl, tmp_file, interfaces=None, + def __init__(self, topology_file, config_tpl, tmp_file, vnfd_helper, vnf_type='CGNAT', lb_count=2, worker_threads=3, worker_config='1C/1T', lb_config='SW', socket=0): @@ -118,8 +210,7 @@ class MultiPortConfig(object): self.worker_threads = self.get_worker_threads(worker_threads) self.vnf_type = vnf_type self.pipe_line = 0 - self.interfaces = interfaces if interfaces else {} - self.networks = {} + self.vnfd_helper = vnfd_helper self.write_parser = ConfigParser() self.read_parser = ConfigParser() self.read_parser.read(config_tpl) @@ -138,6 +229,8 @@ class MultiPortConfig(object): self.start_core = "" self.pipeline_counter = "" self.txrx_pipeline = "" + self._port_pairs = None + self.all_ports = [] self.port_pair_list = [] self.lb_to_port_pair_mapping = {} self.init_eal() @@ -145,12 +238,11 @@ class MultiPortConfig(object): self.lb_index = None self.mul = 0 self.port_pairs = [] - self.port_pair_list = [] self.ports_len = 0 self.prv_que_handler = None self.vnfd = None self.rules = None - self.pktq_out = '' + self.pktq_out = [] @staticmethod def gen_core(core): @@ -160,18 +252,19 @@ class MultiPortConfig(object): return str(core) def make_port_pairs_iter(self, operand, iterable): - return (operand(x[-1], y) for y in iterable for x in chain(*self.port_pairs)) + return (operand(self.vnfd_helper.port_num(x), y) for y in iterable for x in + chain.from_iterable(self.port_pairs)) def make_range_port_pairs_iter(self, operand, start, end): return self.make_port_pairs_iter(operand, range(start, end)) def init_eal(self): - vpci = [v['virtual-interface']["vpci"] for v in self.interfaces] + lines = ['[EAL]\n'] + vpci = (v['virtual-interface']["vpci"] for v in self.vnfd_helper.interfaces) + lines.extend('w = {0}\n'.format(item) for item in vpci) + lines.append('\n') with open(self.tmp_file, 'w') as fh: - fh.write('[EAL]\n') - for item in vpci: - fh.write('w = {0}\n'.format(item)) - fh.write('\n') + fh.writelines(lines) def update_timer(self): timer_tpl = self.get_config_tpl_data('TIMER') @@ -226,35 +319,6 @@ class MultiPortConfig(object): except ValueError: self.start_core = int(self.start_core[:-1]) + 1 - @staticmethod - def get_port_pairs(interfaces): - port_pair_list = [] - networks = defaultdict(list) - for private_intf in interfaces: - vintf = private_intf['virtual-interface'] - networks[vintf['vld_id']].append(vintf) - - for name, net in networks.items(): - # partition returns a tuple - parts = list(name.partition('private')) - if parts[0]: - # 'private' was not in or not leftmost in the string - continue - parts[1] = 'public' - public_id = ''.join(parts) - for private_intf in net: - try: - public_peer_intfs = networks[public_id] - except KeyError: - LOG.warning("private network without peer %s, %s not found", name, public_id) - continue - - for public_intf in public_peer_intfs: - port_pair = private_intf["ifname"], public_intf["ifname"] - port_pair_list.append(port_pair) - - return port_pair_list, networks - def get_lb_count(self): self.lb_count = int(min(len(self.port_pair_list), self.lb_count)) @@ -262,50 +326,51 @@ class MultiPortConfig(object): self.lb_to_port_pair_mapping = defaultdict(int) port_pair_count = len(self.port_pair_list) lb_pair_count = int(port_pair_count / self.lb_count) - for i in range(self.lb_count): - self.lb_to_port_pair_mapping[i + 1] = lb_pair_count - for i in range(port_pair_count % self.lb_count): - self.lb_to_port_pair_mapping[i + 1] += 1 + extra = port_pair_count % self.lb_count + extra_iter = repeat(lb_pair_count + 1, extra) + norm_iter = repeat(lb_pair_count, port_pair_count - extra) + new_values = {i: v for i, v in enumerate(chain(extra_iter, norm_iter), 1)} + self.lb_to_port_pair_mapping.update(new_values) def set_priv_to_pub_mapping(self): - return "".join(str(y) for y in [(int(x[0][-1]), int(x[1][-1])) for x in - self.port_pair_list]) + port_nums = [tuple(self.vnfd_helper.port_nums(x)) for x in self.port_pair_list] + return "".join(str(y).replace(" ", "") for y in + port_nums) def set_priv_que_handler(self): # iterated twice, can't be generator - priv_to_pub_map = [(int(x[0][-1]), int(x[1][-1])) for x in self.port_pairs] + priv_to_pub_map = [tuple(self.vnfd_helper.port_nums(x)) for x in self.port_pairs] # must be list to use .index() port_list = list(chain.from_iterable(priv_to_pub_map)) - priv_ports = (x[0] for x in priv_to_pub_map) + uplink_ports = (x[0] for x in priv_to_pub_map) self.prv_que_handler = '({})'.format( - ",".join((str(port_list.index(x)) for x in priv_ports))) + "".join(("{},".format(port_list.index(x)) for x in uplink_ports))) def generate_arp_route_tbl(self): - arp_config = [] arp_route_tbl_tmpl = "({port0_dst_ip_hex},{port0_netmask_hex},{port_num}," \ "{next_hop_ip_hex})" - for port_pair in self.port_pair_list: - for port in port_pair: - port_num = int(port[-1]) - interface = self.interfaces[port_num] - # We must use the dst because we are on the VNF and we need to - # reach the TG. - dst_port0_ip = \ - ipaddress.ip_interface(six.text_type( - "%s/%s" % (interface["virtual-interface"]["dst_ip"], - interface["virtual-interface"]["netmask"]))) - arp_vars = { - "port0_dst_ip_hex": ip_to_hex(dst_port0_ip.network.network_address.exploded), - "port0_netmask_hex": ip_to_hex(dst_port0_ip.network.netmask.exploded), - # this is the port num that contains port0 subnet and next_hop_ip_hex - "port_num": port_num, - # next hop is dst in this case - # must be within subnet - "next_hop_ip_hex": ip_to_hex(dst_port0_ip.ip.exploded), - } - arp_config.append(arp_route_tbl_tmpl.format(**arp_vars)) - - return ' '.join(arp_config) + + def build_arp_config(port): + dpdk_port_num = self.vnfd_helper.port_num(port) + interface = self.vnfd_helper.find_interface(name=port)["virtual-interface"] + # We must use the dst because we are on the VNF and we need to + # reach the TG. + dst_port0_ip = ipaddress.ip_interface(six.text_type( + "%s/%s" % (interface["dst_ip"], interface["netmask"]))) + + arp_vars = { + "port0_dst_ip_hex": ip_to_hex(dst_port0_ip.network.network_address.exploded), + "port0_netmask_hex": ip_to_hex(dst_port0_ip.network.netmask.exploded), + # this is the port num that contains port0 subnet and next_hop_ip_hex + # this is LINKID which should be based on DPDK port number + "port_num": dpdk_port_num, + # next hop is dst in this case + # must be within subnet + "next_hop_ip_hex": ip_to_hex(dst_port0_ip.ip.exploded), + } + return arp_route_tbl_tmpl.format(**arp_vars) + + return ' '.join(build_arp_config(port) for port in self.all_ports) def generate_arpicmp_data(self): swq_in_str = self.make_range_str('SWQ{}', self.swq, offset=self.lb_count) @@ -313,9 +378,11 @@ class MultiPortConfig(object): swq_out_str = self.make_range_str('SWQ{}', self.swq, offset=self.lb_count) self.swq += self.lb_count # ports_mac_list is disabled for some reason - # mac_iter = (self.interfaces[int(x[-1])]['virtual-interface']['local_mac'] - # for port_pair in self.port_pair_list for x in port_pair) - pktq_in_iter = ('RXQ{}'.format(float(x[0][-1])) for x in self.port_pair_list) + + # mac_iter = (self.vnfd_helper.find_interface(name=port)['virtual-interface']['local_mac'] + # for port in self.all_ports) + pktq_in_iter = ('RXQ{}.0'.format(self.vnfd_helper.port_num(x[0])) for x in + self.port_pair_list) arpicmp_data = { 'core': self.gen_core(self.start_core), @@ -500,7 +567,10 @@ class MultiPortConfig(object): self.vnf_tpl = self.get_config_tpl_data(self.vnf_type) def generate_config(self): - self.port_pair_list, self.networks = self.get_port_pairs(self.interfaces) + self._port_pairs = PortPairs(self.vnfd_helper.interfaces) + self.port_pair_list = self._port_pairs.port_pair_list + self.all_ports = self._port_pairs.all_ports + self.get_lb_count() self.generate_lb_to_port_pair_mapping() self.generate_config_data() @@ -509,18 +579,16 @@ class MultiPortConfig(object): self.write_parser.write(tfh) def generate_link_config(self): + def build_args(port): + # lookup interface by name + virtual_interface = self.vnfd_helper.find_interface(name=port)["virtual-interface"] + local_ip = virtual_interface["local_ip"] + netmask = virtual_interface["netmask"] + port_num = self.vnfd_helper.port_num(port) + port_ip, prefix_len = self.validate_ip_and_prefixlen(local_ip, netmask) + return LINK_CONFIG_TEMPLATE.format(port_num, port_ip, prefix_len) - link_configs = [] - for port_pair in self.port_pair_list: - for port in port_pair: - port = port[-1] - virtual_interface = self.interfaces[int(port)]["virtual-interface"] - local_ip = virtual_interface["local_ip"] - netmask = virtual_interface["netmask"] - port_ip, prefix_len = self.validate_ip_and_prefixlen(local_ip, netmask) - link_configs.append(LINK_CONFIG_TEMPLATE.format(port, port_ip, prefix_len)) - - return ''.join(link_configs) + return ''.join(build_args(port) for port in self.all_ports) def get_route_data(self, src_key, data_key, port): route_list = self.vnfd['vdu'][0].get(src_key, []) @@ -543,37 +611,38 @@ class MultiPortConfig(object): def generate_arp_config(self): arp_config = [] - for port_pair in self.port_pair_list: - for port in port_pair: - # ignore gateway, always use TG IP - # gateway = self.get_ports_gateway(port) - dst_mac = self.interfaces[int(port[-1])]["virtual-interface"]["dst_mac"] - dst_ip = self.interfaces[int(port[-1])]["virtual-interface"]["dst_ip"] - # arp_config.append((port[-1], gateway, dst_mac, self.txrx_pipeline)) - # so dst_mac is the TG dest mac, so we need TG dest IP. - arp_config.append((port[-1], dst_ip, dst_mac, self.txrx_pipeline)) + for port in self.all_ports: + # ignore gateway, always use TG IP + # gateway = self.get_ports_gateway(port) + vintf = self.vnfd_helper.find_interface(name=port)["virtual-interface"] + dst_mac = vintf["dst_mac"] + dst_ip = vintf["dst_ip"] + # arp_config.append( + # (self.vnfd_helper.port_num(port), gateway, dst_mac, self.txrx_pipeline)) + # so dst_mac is the TG dest mac, so we need TG dest IP. + # should be dpdk_port_num + arp_config.append( + (self.vnfd_helper.port_num(port), dst_ip, dst_mac, self.txrx_pipeline)) return '\n'.join(('p {3} arpadd {0} {1} {2}'.format(*values) for values in arp_config)) def generate_arp_config6(self): arp_config6 = [] - for port_pair in self.port_pair_list: - for port in port_pair: - # ignore gateway, always use TG IP - # gateway6 = self.get_ports_gateway6(port) - dst_mac6 = self.interfaces[int(port[-1])]["virtual-interface"]["dst_mac"] - dst_ip6 = self.interfaces[int(port[-1])]["virtual-interface"]["dst_ip"] - # arp_config6.append((port[-1], gateway6, dst_mac6, self.txrx_pipeline)) - arp_config6.append((port[-1], dst_ip6, dst_mac6, self.txrx_pipeline)) + for port in self.all_ports: + # ignore gateway, always use TG IP + # gateway6 = self.get_ports_gateway6(port) + vintf = self.vnfd_helper.find_interface(name=port)["virtual-interface"] + dst_mac6 = vintf["dst_mac"] + dst_ip6 = vintf["dst_ip"] + # arp_config6.append( + # (self.vnfd_helper.port_num(port), gateway6, dst_mac6, self.txrx_pipeline)) + arp_config6.append( + (self.vnfd_helper.port_num(port), dst_ip6, dst_mac6, self.txrx_pipeline)) return '\n'.join(('p {3} arpadd {0} {1} {2}'.format(*values) for values in arp_config6)) def generate_action_config(self): - port_list = [] - for port_pair in self.port_pair_list: - for port in port_pair: - port_list.append(port[-1]) - + port_list = (self.vnfd_helper.port_num(p) for p in self.all_ports) if self.vnf_type == "VFW": template = FW_ACTION_TEMPLATE else: @@ -584,8 +653,9 @@ class MultiPortConfig(object): def get_ip_from_port(self, port): # we can't use gateway because in OpenStack gateways interfer with floating ip routing # return self.make_ip_addr(self.get_ports_gateway(port), self.get_netmask_gateway(port)) - ip = self.interfaces[port]["virtual-interface"]["local_ip"] - netmask = self.interfaces[port]["virtual-interface"]["netmask"] + vintf = self.vnfd_helper.find_interface(name=port)["virtual-interface"] + ip = vintf["local_ip"] + netmask = vintf["netmask"] return self.make_ip_addr(ip, netmask) def get_network_and_prefixlen_from_ip_of_port(self, port): @@ -602,12 +672,12 @@ class MultiPortConfig(object): new_rules = [] new_ipv6_rules = [] pattern = 'p {0} add {1} {2} {3} {4} {5} 0 65535 0 65535 0 0 {6}' - for port_pair in self.port_pair_list: - src_port = int(port_pair[0][-1]) - dst_port = int(port_pair[1][-1]) + for src_intf, dst_intf in self.port_pair_list: + src_port = self.vnfd_helper.port_num(src_intf) + dst_port = self.vnfd_helper.port_num(dst_intf) - src_net, src_prefix_len = self.get_network_and_prefixlen_from_ip_of_port(src_port) - dst_net, dst_prefix_len = self.get_network_and_prefixlen_from_ip_of_port(dst_port) + src_net, src_prefix_len = self.get_network_and_prefixlen_from_ip_of_port(src_intf) + dst_net, dst_prefix_len = self.get_network_and_prefixlen_from_ip_of_port(dst_intf) # ignore entires with empty values if all((src_net, src_prefix_len, dst_net, dst_prefix_len)): new_rules.append((cmd, self.txrx_pipeline, src_net, src_prefix_len, @@ -632,7 +702,8 @@ class MultiPortConfig(object): return ''.join([rules_config, new_rules_config, acl_apply]) def generate_script_data(self): - self.port_pair_list, self.networks = self.get_port_pairs(self.interfaces) + self._port_pairs = PortPairs(self.vnfd_helper.interfaces) + self.port_pair_list = self._port_pairs.port_pair_list self.get_lb_count() script_data = { 'link_config': self.generate_link_config(), @@ -670,5 +741,5 @@ set_hash_input_set {0} ipv6-udp src-ipv6 udp-src-port add set_hash_input_set {1} ipv6-udp dst-ipv6 udp-dst-port add """ for port_pair in self.port_pair_list: - script += hwlb_tpl.format(port_pair[0][-1], port_pair[1][-1]) + script += hwlb_tpl.format(*(self.vnfd_helper.port_nums(port_pair))) return script diff --git a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py index 38831ee86..4b906508c 100644 --- a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py +++ b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py @@ -113,10 +113,10 @@ class IxNextgen(object): } MODE_SEEDS_MAP = { - 0: ('private_1', ['256', '2048']), + 0: ('uplink_0', ['256', '2048']), } - MODE_SEEDS_DEFAULT = 'public_1', ['2048', '256'] + MODE_SEEDS_DEFAULT = 'downlink_0', ['2048', '256'] @staticmethod def find_view_obj(view_name, views): diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py index f0ae67616..fa32a4dcf 100644 --- a/yardstick/network_services/nfvi/resource.py +++ b/yardstick/network_services/nfvi/resource.py @@ -21,11 +21,11 @@ import os import os.path import re import multiprocessing -from collections import Sequence from oslo_config import cfg from yardstick import ssh +from yardstick.common.utils import validate_non_string_sequence from yardstick.network_services.nfvi.collectd import AmqpConsumer from yardstick.network_services.utils import get_nsb_option @@ -45,16 +45,14 @@ class ResourceProfile(object): def __init__(self, mgmt, interfaces=None, cores=None): self.enable = True - self.connection = None - self.cores = cores if isinstance(cores, Sequence) else [] + self.cores = validate_non_string_sequence(cores, default=[]) self._queue = multiprocessing.Queue() self.amqp_client = None - self.interfaces = interfaces if isinstance(interfaces, Sequence) else [] + self.interfaces = validate_non_string_sequence(interfaces, default=[]) # why the host or ip? self.vnfip = mgmt.get("host", mgmt["ip"]) self.connection = ssh.SSH.from_node(mgmt, overrides={"ip": self.vnfip}) - self.connection.wait() def check_if_sa_running(self, process): @@ -111,7 +109,7 @@ class ResourceProfile(object): @classmethod def parse_intel_pmu_stats(cls, key, value): - return {''.join(key): value.split(":")[1]} + return {''.join(str(v) for v in key): value.split(":")[1]} def parse_collectd_result(self, metrics, core_list): """ convert collectd data into json""" @@ -203,6 +201,7 @@ class ResourceProfile(object): self._provide_config_file(bin_path, 'collectd.conf', kwargs) def _start_collectd(self, connection, bin_path): + LOG.debug("Starting collectd to collect NFVi stats") connection.execute('sudo pkill -9 collectd') bin_path = get_nsb_option("bin_path") collectd_path = os.path.join(bin_path, "collectd", "collectd") @@ -233,7 +232,7 @@ class ResourceProfile(object): connection.execute("sudo rabbitmqctl delete_user guest") connection.execute("sudo rabbitmqctl add_user admin admin") connection.execute("sudo rabbitmqctl authenticate_user admin admin") - connection.execute("sudo rabbitmqctl set_permissions -p / admin \".*\" \".*\" \".*\"") + connection.execute("sudo rabbitmqctl set_permissions -p / admin '.*' '.*' '.*'") LOG.debug("Start collectd service.....") connection.execute("sudo %s" % collectd_path) diff --git a/yardstick/network_services/traffic_profile/base.py b/yardstick/network_services/traffic_profile/base.py index 906498586..ad256b444 100644 --- a/yardstick/network_services/traffic_profile/base.py +++ b/yardstick/network_services/traffic_profile/base.py @@ -22,6 +22,8 @@ class TrafficProfile(object): This class defines the behavior """ + UPLINK = "uplink" + DOWNLINK = "downlink" @staticmethod def get(tp_config): @@ -44,7 +46,7 @@ class TrafficProfile(object): # IMIX = {"10K": 0.1, "100M": 0.5} self.params = tp_config - def execute(self, traffic_generator): + def execute_traffic(self, traffic_generator): """ This methods defines the behavior of the traffic generator. It will be called in a loop until the traffic generator exits. diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py index 36a464e2f..cb8a34796 100644 --- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -23,11 +23,17 @@ LOG = logging.getLogger(__name__) class IXIARFC2544Profile(TrexProfile): - def _get_ixia_traffic_profile(self, profile_data, mac={}, - xfile=None, static_traffic={}): + + def _get_ixia_traffic_profile(self, profile_data, mac=None, xfile=None, static_traffic=None): + if mac is None: + mac = {} + + if static_traffic is None: + static_traffic = {} + result = {} if xfile: - with open(xfile, 'r') as stream: + with open(xfile) as stream: try: static_traffic = json.load(stream) except Exception as exc: @@ -46,6 +52,7 @@ class IXIARFC2544Profile(TrexProfile): mac["src_mac_{}".format(traffic['id'])] traffic['outer_l2']['dstmac'] = \ mac["dst_mac_{}".format(traffic['id'])] + # outer_l3 if "outer_l3v6" in list(value.keys()): traffic['outer_l3'] = value['outer_l3v6'] @@ -71,8 +78,8 @@ class IXIARFC2544Profile(TrexProfile): def _ixia_traffic_generate(self, traffic_generator, traffic, ixia_obj): for key, value in traffic.items(): - if "public" in key or "private" in key: - traffic[key]["iload"] = str(self.rate) + if key.startswith((self.UPLINK, self.DOWNLINK)): + value["iload"] = str(self.rate) ixia_obj.ix_update_frame(traffic) ixia_obj.ix_update_ether(traffic) ixia_obj.add_ip_header(traffic, 4) @@ -80,16 +87,27 @@ class IXIARFC2544Profile(TrexProfile): self.tmp_drop = 0 self.tmp_throughput = 0 - def execute(self, traffic_generator, ixia_obj, mac={}, xfile=None): + def update_traffic_profile(self, traffic_generator): + def port_generator(): + for vld_id, intfs in sorted(traffic_generator.networks.items()): + if not vld_id.startswith((self.UPLINK, self.DOWNLINK)): + continue + profile_data = self.params.get(vld_id) + if not profile_data: + continue + self.profile_data = profile_data + self.get_streams(self.profile_data) + self.full_profile.update({vld_id: self.profile_data}) + for intf in intfs: + yield traffic_generator.vnfd_helper.port_num(intf) + + self.ports = [port for port in port_generator()] + + def execute_traffic(self, traffic_generator, ixia_obj, mac={}, xfile=None): if self.first_run: self.full_profile = {} self.pg_id = 0 - self.profile = 'private_1' - for key, value in self.params.items(): - if "private" in key or "public" in key: - self.profile_data = self.params[key] - self.get_streams(self.profile_data) - self.full_profile.update({key: self.profile_data}) + self.update_traffic_profile(traffic_generator) traffic = \ self._get_ixia_traffic_profile(self.full_profile, mac, xfile) self.max_rate = self.rate @@ -104,7 +122,9 @@ class IXIARFC2544Profile(TrexProfile): def start_ixia_latency(self, traffic_generator, ixia_obj, mac={}, xfile=None): - traffic = self._get_ixia_traffic_profile(self.full_profile, mac) + self.update_traffic_profile(traffic_generator) + traffic = \ + self._get_ixia_traffic_profile(self.full_profile, mac, xfile) self._ixia_traffic_generate(traffic_generator, traffic, ixia_obj, xfile) diff --git a/yardstick/network_services/traffic_profile/prox_ACL.py b/yardstick/network_services/traffic_profile/prox_ACL.py index cb6246fcd..7f2255d99 100644 --- a/yardstick/network_services/traffic_profile/prox_ACL.py +++ b/yardstick/network_services/traffic_profile/prox_ACL.py @@ -26,6 +26,10 @@ class ProxACLProfile(ProxProfile): """ This profile adds a single stream at the beginning of the traffic session """ + + def __init__(self, tp_config): + super(ProxACLProfile, self).__init__(tp_config) + def run_test_with_pkt_size(self, traffic_gen, pkt_size, duration): """Run the test for a single packet size. @@ -39,17 +43,9 @@ class ProxACLProfile(ProxProfile): """ test_value = self.upper_bound - # throughput and packet loss from the last successful test - while test_value == self.upper_bound: - result = traffic_gen.resource_helper.run_test(pkt_size, duration, - test_value, self.tolerated_loss) - - if result.success: - LOG.debug("Success! ") - else: - LOG.debug("Failure...") - - samples = result.get_samples(pkt_size) - self.fill_samples(samples, traffic_gen) + for _ in range(self.prox_config["attempts"]): + result, port_samples = traffic_gen.run_test(pkt_size, duration, + test_value, self.tolerated_loss) + samples = result.get_samples(pkt_size, result.pkt_loss, port_samples) self.queue.put(samples) diff --git a/yardstick/network_services/traffic_profile/prox_profile.py b/yardstick/network_services/traffic_profile/prox_profile.py index daeaf42ed..0a9de9bb6 100644 --- a/yardstick/network_services/traffic_profile/prox_profile.py +++ b/yardstick/network_services/traffic_profile/prox_profile.py @@ -88,7 +88,7 @@ class ProxProfile(TrafficProfile): def run_test_with_pkt_size(self, traffic_generator, pkt_size, duration): raise NotImplementedError - def execute(self, traffic_generator): + def execute_traffic(self, traffic_generator): try: pkt_size = next(self.pkt_size_iterator) except StopIteration: diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py index a3b803673..16e809b65 100644 --- a/yardstick/network_services/traffic_profile/rfc2544.py +++ b/yardstick/network_services/traffic_profile/rfc2544.py @@ -43,7 +43,7 @@ class RFC2544Profile(TrexProfile): def register_generator(self, generator): self.generator = generator - def execute(self, traffic_generator=None): + def execute_traffic(self, traffic_generator=None): """ Generate the stream and run traffic on the given ports """ if traffic_generator is not None and self.generator is None: self.generator = traffic_generator @@ -52,21 +52,19 @@ class RFC2544Profile(TrexProfile): return self.ports = [] - priv_ports = self.generator.priv_ports - pub_ports = self.generator.pub_ports - # start from 1 for private_1, public_1, etc. - for index, (priv_port, pub_port) in enumerate(zip(priv_ports, pub_ports), 1): - profile_data = self.params.get('private_{}'.format(index), '') - self.ports.append(priv_port) - # pass profile_data directly, don't use self.profile_data - self.generator.client.add_streams(self.get_streams(profile_data), ports=priv_port) - profile_data = self.params.get('public_{}'.format(index), '') + for vld_id, intfs in sorted(self.generator.networks.items()): + profile_data = self.params.get(vld_id) + # no profile for this port + if not profile_data: + continue # correlated traffic doesn't use public traffic? - if not profile_data or self.generator.rfc2544_helper.correlated_traffic: + if vld_id.startswith(self.DOWNLINK) and \ + self.generator.rfc2544_helper.correlated_traffic: continue - # just get the pub_port - self.ports.append(pub_port) - self.generator.client.add_streams(self.get_streams(profile_data), ports=pub_port) + for intf in intfs: + port = self.generator.vnfd_helper.port_num(intf) + self.ports.append(port) + self.generator.client.add_streams(self.get_streams(profile_data), ports=port) self.max_rate = self.rate self.min_rate = 0 @@ -86,7 +84,7 @@ class RFC2544Profile(TrexProfile): if generator is None: generator = self.generator run_duration = self.generator.RUN_DURATION - samples = self.generator.generate_samples() + samples = self.generator.generate_samples(self.ports) in_packets = sum([value['in_packets'] for value in samples.values()]) out_packets = sum([value['out_packets'] for value in samples.values()]) @@ -135,8 +133,8 @@ class RFC2544Profile(TrexProfile): # TODO(esm): why don't we discard results that are out of tolerance? self.min_rate = self.rate - generator.clear_client_stats() - generator.start_client(mult=self.get_multiplier(), + generator.clear_client_stats(self.ports) + generator.start_client(self.ports, mult=self.get_multiplier(), duration=run_duration, force=True) # if correlated traffic update the Throughput @@ -154,34 +152,30 @@ class RFC2544Profile(TrexProfile): return samples def execute_latency(self, generator=None, samples=None): - if generator is None: - generator = self.generator + if generator is not None and self.generator is None: + self.generator = generator if samples is None: - samples = generator.generate_samples() + samples = self.generator.generate_samples() self.pps, multiplier = self.calculate_pps(samples) self.ports = [] self.pg_id = self.params['traffic_profile'].get('pg_id', 1) - priv_ports = generator.priv_ports - pub_ports = generator.pub_ports - for index, (priv_port, pub_port) in enumerate(zip(priv_ports, pub_ports), 1): - profile_data = self.params.get('private_{}'.format(index), '') - self.ports.append(priv_port) - generator.client.add_streams(self.get_streams(profile_data), - ports=priv_port) - - profile_data = self.params.get('public_{}'.format(index), '') - if not profile_data or generator.correlated_traffic: + for vld_id, intfs in sorted(self.generator.networks.items()): + profile_data = self.params.get(vld_id) + if not profile_data: continue + # correlated traffic doesn't use public traffic? + if vld_id.startswith(self.DOWNLINK) and \ + self.generator.rfc2544_helper.correlated_traffic: + continue + for intf in intfs: + port = self.generator.vnfd_helper.port_num(intf) + self.ports.append(port) + self.generator.client.add_streams(self.get_streams(profile_data), ports=port) - pub_port = generator.pub_ports[index] - self.ports.append(pub_port) - generator.client.add_streams(self.get_streams(profile_data), - ports=pub_port) - - generator.start_client(ports=self.ports, mult=str(multiplier), - duration=120, force=True) + self.generator.start_client(ports=self.ports, mult=str(multiplier), + duration=120, force=True) self.first_run = False def calculate_pps(self, samples): diff --git a/yardstick/network_services/traffic_profile/traffic_profile.py b/yardstick/network_services/traffic_profile/traffic_profile.py index 7bbe89268..3feb92bb6 100644 --- a/yardstick/network_services/traffic_profile/traffic_profile.py +++ b/yardstick/network_services/traffic_profile/traffic_profile.py @@ -33,203 +33,86 @@ from trex_stl_lib.trex_stl_packet_builder_scapy import STLScVmRaw from trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFixIpv4 from trex_stl_lib import api as Pkt +SRC = 'src' +DST = 'dst' +ETHERNET = 'Ethernet' +IP = 'IP' +IPv6 = 'IPv6' +UDP = 'UDP' +DSCP = 'DSCP' +SRC_PORT = 'sport' +DST_PORT = 'dport' +TYPE_OF_SERVICE = 'tos' + class TrexProfile(TrafficProfile): """ This class handles Trex Traffic profile generation and execution """ - def __init__(self, yaml_data): - super(TrexProfile, self).__init__(yaml_data) - self.flows = 100 - self.pps = 100 - self.pg_id = 0 - self.first_run = True - self.streams = 1 - self.profile_data = [] - self.profile = None - self.base_pkt = None - self.fsize = None - self.trex_vm = None - self.vms = [] - self.rate = None - self.ip_packet = None - self.ip6_packet = None - self.udp_packet = None - self.udp_dport = '' - self.udp_sport = '' - self.qinq_packet = None - self.qinq = False - self.vm_flow_vars = [] - self.packets = [] - self.ether_packet = [] - - def execute(self, traffic_generator): - """ Generate the stream and run traffic on the given ports """ - pass - - def _set_ether_fields(self, **kwargs): - """ set ethernet protocol fields """ - if not self.ether_packet: - self.ether_packet = Pkt.Ether() - for key, value in six.iteritems(kwargs): - setattr(self.ether_packet, key, value) - - def _set_ip_fields(self, **kwargs): - """ set l3 ipv4 protocol fields """ - - if not self.ip_packet: - self.ip_packet = Pkt.IP() - for key in kwargs: - setattr(self.ip_packet, key, kwargs[key]) - - def _set_ip6_fields(self, **kwargs): - """ set l3 ipv6 protocol fields """ - if not self.ip6_packet: - self.ip6_packet = Pkt.IPv6() - for key in kwargs: - setattr(self.ip6_packet, key, kwargs[key]) - - def _set_udp_fields(self, **kwargs): - """ set l4 udp ports fields """ - if not self.udp_packet: - self.udp_packet = Pkt.UDP() - for key in kwargs: - setattr(self.udp_packet, key, kwargs[key]) - - def set_src_mac(self, src_mac): - """ set source mac address fields """ - src_macs = src_mac.split('-') - min_value = src_macs[0] - if len(src_macs) == 1: - src_mac = min_value - self._set_ether_fields(src=src_mac) - else: - stl_vm_flow_var = STLVmFlowVar(name="mac_src", - min_value=1, - max_value=30, - size=4, - op='inc', - step=1) - self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='mac_src', - pkt_offset='Ether.src') - self.vm_flow_vars.append(stl_vm_wr_flow_var) - - def set_dst_mac(self, dst_mac): - """ set destination mac address fields """ - dst_macs = dst_mac.split('-') - min_value = dst_macs[0] - if len(dst_macs) == 1: - dst_mac = min_value - self._set_ether_fields(dst=dst_mac) - else: - stl_vm_flow_var = STLVmFlowVar(name="mac_dst", + PROTO_MAP = { + ETHERNET: ('ether_packet', Pkt.Ether), + IP: ('ip_packet', Pkt.IP), + IPv6: ('ip6_packet', Pkt.IPv6), + UDP: ('udp_packet', Pkt.UDP), + } + + def _general_single_action_partial(self, protocol): + def f(field): + def partial(value): + kwargs = { + field: value + } + self._set_proto_fields(protocol, **kwargs) + return partial + return f + + def _ethernet_range_action_partial(self, direction, _): + def partial(min_value, max_value): + stl_vm_flow_var = STLVmFlowVar(name="mac_{}".format(direction), min_value=1, max_value=30, size=4, op='inc', step=1) self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='mac_dst', - pkt_offset='Ether.dst') + stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='mac_{}'.format(direction), + pkt_offset='Ether.{}'.format(direction)) self.vm_flow_vars.append(stl_vm_wr_flow_var) + return partial - def set_src_ip4(self, src_ip4, count=1): - """ set source ipv4 address fields """ - src_ips = src_ip4.split('-') - min_value = src_ips[0] - max_value = src_ips[1] if len(src_ips) == 2 else src_ips[0] - if len(src_ips) == 1: - src_ip4 = min_value - self._set_ip_fields(src=src_ip4) - else: - stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="ip4_src", + def _ip_range_action_partial(self, direction, count=1): + def partial(min_value, max_value): + stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="ip4_{}".format(direction), min_value=min_value, max_value=max_value, size=4, limit=int(count), seed=0x1235) self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip4_src', - pkt_offset='IP.src') + stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip4_{}'.format(direction), + pkt_offset='IP.{}'.format(direction)) self.vm_flow_vars.append(stl_vm_wr_flow_var) stl_vm_fix_ipv4 = STLVmFixIpv4(offset="IP") self.vm_flow_vars.append(stl_vm_fix_ipv4) + return partial - def set_dst_ip4(self, dst_ip4, count=1): - """ set destination ipv4 address fields """ - dst_ips = dst_ip4.split('-') - min_value = dst_ips[0] - max_value = dst_ips[1] if len(dst_ips) == 2 else dst_ips[0] - if len(dst_ips) == 1: - dst_ip4 = min_value - self._set_ip_fields(dst=dst_ip4) - else: - stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="dst_ip4", - min_value=min_value, - max_value=max_value, - size=4, - limit=int(count), - seed=0x1235) - self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='dst_ip4', - pkt_offset='IP.dst') - self.vm_flow_vars.append(stl_vm_wr_flow_var) - stl_vm_fix_ipv4 = STLVmFixIpv4(offset="IP") - self.vm_flow_vars.append(stl_vm_fix_ipv4) - - def set_src_ip6(self, src_ip6): - """ set source ipv6 address fields """ - src_ips = src_ip6.split('-') - min_value = src_ips[0] - max_value = src_ips[1] if len(src_ips) == 2 else src_ips[0] - src_ip6 = min_value - self._set_ip6_fields(src=src_ip6) - if len(src_ips) == 2: - min_value, max_value = \ - self._get_start_end_ipv6(min_value, max_value) - stl_vm_flow_var = STLVmFlowVar(name="ip6_src", + def _ip6_range_action_partial(self, direction, _): + def partial(min_value, max_value): + min_value, max_value = self._get_start_end_ipv6(min_value, max_value) + stl_vm_flow_var = STLVmFlowVar(name="ip6_{}".format(direction), min_value=min_value, max_value=max_value, size=8, op='random', step=1) self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip6_src', - pkt_offset='IPv6.src', + stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip6_{}'.format(direction), + pkt_offset='IPv6.{}'.format(direction), offset_fixup=8) self.vm_flow_vars.append(stl_vm_wr_flow_var) + return partial - def set_dst_ip6(self, dst_ip6): - """ set destination ipv6 address fields """ - dst_ips = dst_ip6.split('-') - min_value = dst_ips[0] - max_value = dst_ips[1] if len(dst_ips) == 2 else dst_ips[0] - dst_ip6 = min_value - self._set_ip6_fields(dst=dst_ip6) - if len(dst_ips) == 2: - min_value, max_value = \ - self._get_start_end_ipv6(min_value, max_value) - stl_vm_flow_var = STLVmFlowVar(name="dst_ip6", - min_value=min_value, - max_value=max_value, - size=8, - op='random', - step=1) - self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='dst_ip6', - pkt_offset='IPv6.dst', - offset_fixup=8) - self.vm_flow_vars.append(stl_vm_wr_flow_var) - - def set_dscp(self, dscp): - """ set dscp for trex """ - dscps = str(dscp).split('-') - min_value = int(dscps[0]) - max_value = int(dscps[1]) if len(dscps) == 2 else int(dscps[0]) - if len(dscps) == 1: - dscp = min_value - self._set_ip_fields(tos=dscp) - else: + def _dscp_range_action_partial(self, *_): + def partial(min_value, max_value): stl_vm_flow_var = STLVmFlowVar(name="dscp", min_value=min_value, max_value=max_value, @@ -241,54 +124,112 @@ class TrexProfile(TrafficProfile): pkt_offset='IP.tos') self.vm_flow_vars.append(stl_vm_wr_flow_var) - def set_src_port(self, src_port, count=1): - """ set packet source port """ - src_ports = str(src_port).split('-') - min_value = int(src_ports[0]) - if len(src_ports) == 1: - max_value = int(src_ports[0]) - src_port = min_value - self._set_udp_fields(sport=src_port) - else: - max_value = int(src_ports[1]) - stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="port_src", + def _udp_range_action_partial(self, field, count=1): + def partial(min_value, max_value): + stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="port_{}".format(field), min_value=min_value, max_value=max_value, size=2, limit=int(count), seed=0x1235) self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_src', - pkt_offset=self.udp_sport) + stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_{}'.format(field), + pkt_offset=self.udp[field]) self.vm_flow_vars.append(stl_vm_wr_flow_var) + return partial + + def __init__(self, yaml_data): + super(TrexProfile, self).__init__(yaml_data) + self.flows = 100 + self.pps = 100 + self.pg_id = 0 + self.first_run = True + self.streams = 1 + self.profile_data = [] + self.profile = None + self.base_pkt = None + self.fsize = None + self.trex_vm = None + self.vms = [] + self.rate = None + self.ether_packet = None + self.ip_packet = None + self.ip6_packet = None + self.udp_packet = None + self.udp = { + SRC_PORT: '', + DST_PORT: '', + } + self.qinq_packet = None + self.qinq = False + self.vm_flow_vars = [] + self.packets = [] + + self._map_proto_actions = { + # the tuple is (single value function, range value function, if the values should be + # converted to integer). + ETHERNET: (self._general_single_action_partial(ETHERNET), + self._ethernet_range_action_partial, + False, + ), + IP: (self._general_single_action_partial(IP), + self._ip_range_action_partial, + False, + ), + IPv6: (self._general_single_action_partial(IPv6), + self._ip6_range_action_partial, + False, + ), + DSCP: (self._general_single_action_partial(IP), + self._dscp_range_action_partial, + True, + ), + UDP: (self._general_single_action_partial(UDP), + self._udp_range_action_partial, + True, + ), + } + + def execute_traffic(self, traffic_generator): + """ Generate the stream and run traffic on the given ports """ + raise NotImplementedError() - def set_dst_port(self, dst_port, count=1): - """ set packet destnation port """ - dst_ports = str(dst_port).split('-') - min_value = int(dst_ports[0]) - if len(dst_ports) == 1: - max_value = int(dst_ports[0]) - dst_port = min_value - self._set_udp_fields(dport=dst_port) + def _call_on_range(self, range, single_action, range_action, count=1, to_int=False): + def convert_to_int(val): + return int(val) if to_int else val + + range_iter = iter(str(range).split('-')) + min_value = convert_to_int(next(range_iter)) + try: + max_value = convert_to_int(next(range_iter)) + except StopIteration: + single_action(min_value) else: - max_value = int(dst_ports[1]) - stl_vm_flow_var = \ - STLVmFlowVarRepeatableRandom(name="port_dst", - min_value=min_value, - max_value=max_value, - size=2, - limit=int(count), - seed=0x1235) - self.vm_flow_vars.append(stl_vm_flow_var) - stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_dst', - pkt_offset=self.udp_dport) - self.vm_flow_vars.append(stl_vm_wr_flow_var) + range_action(min_value=min_value, max_value=max_value) + + def _set_proto_addr(self, protocol, field, address, count=1): + single_action, range_action, to_int = self._map_proto_actions[protocol] + self._call_on_range(address, + single_action(field), + range_action(field, count), + to_int=to_int, + ) + + def _set_proto_fields(self, protocol, **kwargs): + _attr_name, _class = self.PROTO_MAP[protocol] + + if not getattr(self, _attr_name): + setattr(self, _attr_name, _class()) + + _attr = getattr(self, _attr_name) + for key, value in six.iteritems(kwargs): + setattr(_attr, key, value) def set_svlan_cvlan(self, svlan, cvlan): """ set svlan & cvlan """ self.qinq = True ether_params = {'type': 0x8100} - self._set_ether_fields(**ether_params) + self._set_proto_fields(ETHERNET, **ether_params) svlans = str(svlan['id']).split('-') svlan_min = int(svlans[0]) svlan_max = int(svlans[1]) if len(svlans) == 2 else int(svlans[0]) @@ -309,69 +250,69 @@ class TrexProfile(TrafficProfile): """ set qinq in packet """ self.set_svlan_cvlan(qinq['S-VLAN'], qinq['C-VLAN']) - def set_outer_l2_fields(self, outer_l2): + def _set_outer_l2_fields(self, outer_l2): """ setup outer l2 fields from traffic profile """ ether_params = {'type': 0x800} - self._set_ether_fields(**ether_params) + self._set_proto_fields(ETHERNET, **ether_params) if 'srcmac' in outer_l2: - self.set_src_mac(outer_l2['srcmac']) + self._set_proto_addr(ETHERNET, SRC, outer_l2['srcmac']) if 'dstmac' in outer_l2: - self.set_dst_mac(outer_l2['dstmac']) + self._set_proto_addr(ETHERNET, DST, outer_l2['dstmac']) if 'QinQ' in outer_l2: self.set_qinq(outer_l2['QinQ']) - def set_outer_l3v4_fields(self, outer_l3v4): + def _set_outer_l3v4_fields(self, outer_l3v4): """ setup outer l3v4 fields from traffic profile """ ip_params = {} if 'proto' in outer_l3v4: - ip_params['proto'] = outer_l3v4['proto'] + ip_params['proto'] = socket.getprotobyname(outer_l3v4['proto']) if outer_l3v4['proto'] == 'tcp': self.udp_packet = Pkt.TCP() - self.udp_dport = 'TCP.dport' - self.udp_sport = 'TCP.sport' + self.udp[DST_PORT] = 'TCP.dport' + self.udp[SRC_PORT] = 'TCP.sport' tcp_params = {'flags': '', 'window': 0} - self._set_udp_fields(**tcp_params) + self._set_proto_fields(UDP, **tcp_params) if 'ttl' in outer_l3v4: ip_params['ttl'] = outer_l3v4['ttl'] - self._set_ip_fields(**ip_params) + self._set_proto_fields(IP, **ip_params) if 'dscp' in outer_l3v4: - self.set_dscp(outer_l3v4['dscp']) + self._set_proto_addr(DSCP, TYPE_OF_SERVICE, outer_l3v4['dscp']) if 'srcip4' in outer_l3v4: - self.set_src_ip4(outer_l3v4['srcip4'], outer_l3v4['count']) + self._set_proto_addr(IP, SRC, outer_l3v4['srcip4'], outer_l3v4['count']) if 'dstip4' in outer_l3v4: - self.set_dst_ip4(outer_l3v4['dstip4'], outer_l3v4['count']) + self._set_proto_addr(IP, DST, outer_l3v4['dstip4'], outer_l3v4['count']) - def set_outer_l3v6_fields(self, outer_l3v6): + def _set_outer_l3v6_fields(self, outer_l3v6): """ setup outer l3v6 fields from traffic profile """ ether_params = {'type': 0x86dd} - self._set_ether_fields(**ether_params) + self._set_proto_fields(ETHERNET, **ether_params) ip6_params = {} if 'proto' in outer_l3v6: ip6_params['proto'] = outer_l3v6['proto'] if outer_l3v6['proto'] == 'tcp': self.udp_packet = Pkt.TCP() - self.udp_dport = 'TCP.dport' - self.udp_sport = 'TCP.sport' + self.udp[DST_PORT] = 'TCP.dport' + self.udp[SRC_PORT] = 'TCP.sport' tcp_params = {'flags': '', 'window': 0} - self._set_udp_fields(**tcp_params) + self._set_proto_fields(UDP, **tcp_params) if 'ttl' in outer_l3v6: ip6_params['ttl'] = outer_l3v6['ttl'] if 'tc' in outer_l3v6: ip6_params['tc'] = outer_l3v6['tc'] if 'hlim' in outer_l3v6: ip6_params['hlim'] = outer_l3v6['hlim'] - self._set_ip6_fields(**ip6_params) + self._set_proto_fields(IPv6, **ip6_params) if 'srcip6' in outer_l3v6: - self.set_src_ip6(outer_l3v6['srcip6']) + self._set_proto_addr(IPv6, SRC, outer_l3v6['srcip6']) if 'dstip6' in outer_l3v6: - self.set_dst_ip6(outer_l3v6['dstip6']) + self._set_proto_addr(IPv6, DST, outer_l3v6['dstip6']) - def set_outer_l4_fields(self, outer_l4): + def _set_outer_l4_fields(self, outer_l4): """ setup outer l4 fields from traffic profile """ if 'srcport' in outer_l4: - self.set_src_port(outer_l4['srcport'], outer_l4['count']) + self._set_proto_addr(UDP, SRC_PORT, outer_l4['srcport'], outer_l4['count']) if 'dstport' in outer_l4: - self.set_dst_port(outer_l4['dstport'], outer_l4['count']) + self._set_proto_addr(UDP, DST_PORT, outer_l4['dstport'], outer_l4['count']) def generate_imix_data(self, packet_definition): """ generate packet size for a given traffic profile """ @@ -425,8 +366,8 @@ class TrexProfile(TrafficProfile): self.ip_packet = Pkt.IP() self.ip6_packet = None self.udp_packet = Pkt.UDP() - self.udp_dport = 'UDP.dport' - self.udp_sport = 'UDP.sport' + self.udp[DST_PORT] = 'UDP.dport' + self.udp[SRC_PORT] = 'UDP.sport' self.qinq = False self.vm_flow_vars = [] outer_l2 = packet_definition.get('outer_l2', None) @@ -434,13 +375,13 @@ class TrexProfile(TrafficProfile): outer_l3v6 = packet_definition.get('outer_l3v6', None) outer_l4 = packet_definition.get('outer_l4', None) if outer_l2: - self.set_outer_l2_fields(outer_l2) + self._set_outer_l2_fields(outer_l2) if outer_l3v4: - self.set_outer_l3v4_fields(outer_l3v4) + self._set_outer_l3v4_fields(outer_l3v4) if outer_l3v6: - self.set_outer_l3v6_fields(outer_l3v6) + self._set_outer_l3v6_fields(outer_l3v6) if outer_l4: - self.set_outer_l4_fields(outer_l4) + self._set_outer_l4_fields(outer_l4) self.trex_vm = STLScVmRaw(self.vm_flow_vars) def generate_packets(self): diff --git a/yardstick/network_services/vnf_generic/vnf/acl_vnf.py b/yardstick/network_services/vnf_generic/vnf/acl_vnf.py index 5f3c8a0cd..3ba38dec2 100644 --- a/yardstick/network_services/vnf_generic/vnf/acl_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/acl_vnf.py @@ -24,7 +24,7 @@ LOG = logging.getLogger(__name__) # ACL should work the same on all systems, we can provide the binary ACL_PIPELINE_COMMAND = \ - 'sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}' + 'sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}' ACL_COLLECT_KPI = r"""\ ACL TOTAL:[^p]+pkts_processed"?:\s(\d+),[^p]+pkts_drop"?:\s(\d+),[^p]+pkts_received"?:\s(\d+),""" diff --git a/yardstick/network_services/vnf_generic/vnf/base.py b/yardstick/network_services/vnf_generic/vnf/base.py index 955f9f03d..42e3d2a48 100644 --- a/yardstick/network_services/vnf_generic/vnf/base.py +++ b/yardstick/network_services/vnf_generic/vnf/base.py @@ -16,6 +16,8 @@ from __future__ import absolute_import import logging +from yardstick.network_services.helpers.samplevnf_helper import PortPairs + LOG = logging.getLogger(__name__) @@ -59,6 +61,10 @@ class QueueFileWrapper(object): class VnfdHelper(dict): + def __init__(self, *args, **kwargs): + super(VnfdHelper, self).__init__(*args, **kwargs) + self.port_pairs = PortPairs(self['vdu'][0]['external-interface']) + @property def mgmt_interface(self): return self["mgmt-interface"] @@ -92,9 +98,35 @@ class VnfdHelper(dict): if interface[key] == value: return interface + # hide dpdk_port_num key so we can abstract + def find_interface_by_port(self, port): + for interface in self.interfaces: + virtual_intf = interface["virtual-interface"] + # we have to convert to int to compare + if int(virtual_intf['dpdk_port_num']) == port: + return interface + + def port_num(self, name): + # we need interface name -> DPDK port num (PMD ID) -> LINK ID + # LINK ID -> PMD ID is governed by the port mask + """ + + :rtype: int + :type name: str + """ + intf = self.find_interface(name=name) + return int(intf["virtual-interface"]["dpdk_port_num"]) + + def port_nums(self, intfs): + return [self.port_num(i) for i in intfs] + class VNFObject(object): + # centralize network naming convention + UPLINK = PortPairs.UPLINK + DOWNLINK = PortPairs.DOWNLINK + def __init__(self, name, vnfd): super(VNFObject, self).__init__() self.name = name diff --git a/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py b/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py index f9980b165..b5072c194 100644 --- a/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/cgnapt_vnf.py @@ -13,16 +13,14 @@ # limitations under the License. from __future__ import absolute_import -import time import logging -from six.moves import zip from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper LOG = logging.getLogger(__name__) # CGNAPT should work the same on all systems, we can provide the binary -CGNAPT_PIPELINE_COMMAND = 'sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}' +CGNAPT_PIPELINE_COMMAND = 'sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}' WAIT_FOR_STATIC_NAPT = 4 CGNAPT_COLLECT_KPI = """\ @@ -55,7 +53,7 @@ class CgnaptApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): yield '.'.join(ip_parts) @staticmethod - def _update_cgnat_script_file(ip_pipeline_cfg, mcpi, vnf_str): + def _update_cgnat_script_file(ip_pipeline_cfg, mcpi): pipeline_config_str = str(ip_pipeline_cfg) input_cmds = '\n'.join(mcpi) icmp_flag = 'link 0 down' in input_cmds @@ -67,16 +65,13 @@ class CgnaptApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): raise NotImplementedError def _get_cgnapt_config(self, interfaces=None): + # TODO: static CGNAPT is broken, don't use it if interfaces is None: interfaces = self.vnfd_helper.interfaces - gateway_ips = [] - # fixme: Get private port and gateway from port list - priv_ports = interfaces[::2] - for interface in priv_ports: - gateway_ips.append(self._get_ports_gateway(interface["name"])) - return gateway_ips + uplink_ports = self.vnfd_helper.port_pairs.uplink_ports + return [self._get_ports_gateway(intf["name"]) for intf in uplink_ports] class CgnaptApproxVnf(SampleVNF): @@ -103,21 +98,23 @@ class CgnaptApproxVnf(SampleVNF): if self.scenario_helper.options.get('napt', 'static') != 'static': return - ip_iter = self.setup_helper._generate_ip_from_pool("152.16.40.10") - gw_ips = self.setup_helper._get_cgnapt_config() - if self.scenario_helper.vnf_cfg.get("lb_config", "SW") == 'HW': - pipeline = self.setup_helper.HW_DEFAULT_CORE - offset = 3 - else: - pipeline = self.setup_helper.SW_DEFAULT_CORE - 1 - offset = 0 - - worker_threads = int(self.scenario_helper.vnf_cfg["worker_threads"]) - cmd_template = "p {0} entry addm {1} 1 {2} 1 0 32 65535 65535 65535" - for gw, ip in zip(gw_ips, ip_iter): - cmd = cmd_template.format(pipeline, gw, ip) - pipeline += worker_threads - pipeline += offset - self.vnf_execute(cmd) - - time.sleep(WAIT_FOR_STATIC_NAPT) + # ip_iter = self.setup_helper._generate_ip_from_pool("152.16.40.10") + # gw_ips = self.setup_helper._get_cgnapt_config() + # if self.scenario_helper.vnf_cfg.get("lb_config", "SW") == 'HW': + # pipeline = self.setup_helper.HW_DEFAULT_CORE + # offset = 3 + # else: + # pipeline = self.setup_helper.SW_DEFAULT_CORE - 1 + # offset = 0 + # + # worker_threads = int(self.scenario_helper.vnf_cfg["worker_threads"]) + # # p <pipeline id> entry addm <prv_ipv4/6> prvport> <pub_ip> <pub_port> <phy_port> <ttl> + # # <no_of_entries> <end_prv_port> <end_pub_port> + # cmd_template = "p {0} entry addm {1} 1 {2} 1 0 32 65535 65535 65535" + # for gw, ip in zip(gw_ips, ip_iter): + # cmd = cmd_template.format(pipeline, gw, ip) + # pipeline += worker_threads + # pipeline += offset + # self.vnf_execute(cmd) + # + # time.sleep(WAIT_FOR_STATIC_NAPT) diff --git a/yardstick/network_services/vnf_generic/vnf/iniparser.py b/yardstick/network_services/vnf_generic/vnf/iniparser.py index 70e24de5b..98256e08a 100644 --- a/yardstick/network_services/vnf_generic/vnf/iniparser.py +++ b/yardstick/network_services/vnf_generic/vnf/iniparser.py @@ -14,163 +14,236 @@ class ParseError(Exception): - def __init__(self, message, lineno, line): + + def __init__(self, message, line_no, line): self.msg = message self.line = line - self.lineno = lineno + self.line_no = line_no def __str__(self): - return 'at line %d, %s: %r' % (self.lineno, self.msg, self.line) + return 'at line %d, %s: %r' % (self.line_no, self.msg, self.line) + + +class SectionParseError(ParseError): + + pass + + +class LineParser(object): + + PARSE_EXC = ParseError + + @staticmethod + def strip_key_value(key, value): + key = key.strip() + value = value.strip() + if value and value[0] == value[-1] and value.startswith(('"', "'")): + value = value[1:-1] + return key, [value] + + def __init__(self, line, line_no): + super(LineParser, self).__init__() + self.line = line + self.line_no = line_no + self.continuation = line != line.lstrip() + semi_active, _, semi_comment = line.partition(';') + pound_active, _, pound_comment = line.partition('#') + if not semi_comment and not pound_comment: + self.active = line.strip() + self.comment = '' + elif len(semi_comment) > len(pound_comment): + self.active = semi_active.strip() + self.comment = semi_comment.strip() + else: + self.active = pound_active.strip() + self.comment = pound_comment.strip() + self._section_name = None + + def __repr__(self): + template = "line %d: active '%s' comment '%s'\n%s" + return template % (self.line_no, self.active, self.comment, self.line) + + @property + def section_name(self): + if self._section_name is None: + if not self.active.startswith('['): + raise self.error_no_section_start_bracket() + if not self.active.endswith(']'): + raise self.error_no_section_end_bracket() + self._section_name = '' + if self.active: + self._section_name = self.active[1:-1] + if not self._section_name: + raise self.error_no_section_name() + return self._section_name + + def is_active_line(self): + return bool(self.active) + + def is_continuation(self): + return self.continuation + + def split_key_value(self): + for sep in ['=', ':']: + words = self.active.split(sep, 1) + try: + return self.strip_key_value(*words) + except TypeError: + pass + + return self.active.rstrip(), '@' + + def error_invalid_assignment(self): + return self.PARSE_EXC("No ':' or '=' found in assignment", self.line_no, self.line) + + def error_empty_key(self): + return self.PARSE_EXC('Key cannot be empty', self.line_no, self.line) + + def error_unexpected_continuation(self): + return self.PARSE_EXC('Unexpected continuation line', self.line_no, self.line) + + def error_no_section_start_bracket(self): + return SectionParseError('Invalid section (must start with [)', self.line_no, self.line) + + def error_no_section_end_bracket(self): + return self.PARSE_EXC('Invalid section (must end with ])', self.line_no, self.line) + + def error_no_section_name(self): + return self.PARSE_EXC('Empty section name', self.line_no, self.line) class BaseParser(object): - lineno = 0 - parse_exc = ParseError - def _assignment(self, key, value): - self.assignment(key, value) - return None, [] + def parse(self, data=None): + if data is not None: + return self._parse(data.splitlines()) - def _get_section(self, line): - if not line.endswith(']'): - return self.error_no_section_end_bracket(line) - if len(line) <= 2: - return self.error_no_section_name(line) + def _next_key_value(self, line_parser, key, value): + self.comment(line_parser) - return line[1:-1] + if not line_parser.is_active_line(): + # Blank line, ends multi-line values + if key: + key, value = self.assignment(key, value, line_parser) + return key, value - def _split_key_value(self, line): - colon = line.find(':') - equal = line.find('=') - if colon < 0 and equal < 0: - return line.strip(), '@' + if line_parser.is_continuation(): + # Continuation of previous assignment + if key is None: + raise line_parser.error_unexpected_continuation() - if colon < 0 or (equal >= 0 and equal < colon): - key, value = line[:equal], line[equal + 1:] + value.append(line_parser.active.lstrip()) + return key, value + + if key: + # Flush previous assignment, if any + key, value = self.assignment(key, value, line_parser) + + try: + # Section start + self.new_section(line_parser) + except SectionParseError: + pass else: - key, value = line[:colon], line[colon + 1:] + return key, value - value = value.strip() - if value and value[0] == value[-1] and value.startswith(("\"", "'")): - value = value[1:-1] - return key.strip(), [value] + key, value = line_parser.split_key_value() + if not key: + raise line_parser.error_empty_key() + return key, value - def parse(self, lineiter): + def _parse(self, line_iter): key = None value = [] - for line in lineiter: - self.lineno += 1 - - line = line.rstrip() - lines = line.split(';') - line = lines[0] - if not line: - # Blank line, ends multi-line values - if key: - key, value = self._assignment(key, value) - continue - elif line.startswith((' ', '\t')): - # Continuation of previous assignment - if key is None: - self.error_unexpected_continuation(line) - else: - value.append(line.lstrip()) - continue - - if key: - # Flush previous assignment, if any - key, value = self._assignment(key, value) - - if line.startswith('['): - # Section start - section = self._get_section(line) - if section: - self.new_section(section) - elif line.startswith(('#', ';')): - self.comment(line[1:].lstrip()) - else: - key, value = self._split_key_value(line) - if not key: - return self.error_empty_key(line) + parse_iter = (LineParser(line, line_no) for line_no, line in enumerate(line_iter)) + for line_parser in parse_iter: + key, value = self._next_key_value(line_parser, key, value) if key: # Flush previous assignment, if any - self._assignment(key, value) + self.assignment(key, value, LineParser('EOF', -1)) - def assignment(self, key, value): + def _assignment(self, key, value, line_parser): """Called when a full assignment is parsed.""" raise NotImplementedError() - def new_section(self, section): + def assignment(self, key, value, line_parser): + self._assignment(key, value, line_parser) + return None, [] + + def new_section(self, line_parser): """Called when a new section is started.""" raise NotImplementedError() - def comment(self, comment): + def comment(self, line_parser): """Called when a comment is parsed.""" - pass - - def error_invalid_assignment(self, line): - raise self.parse_exc("No ':' or '=' found in assignment", - self.lineno, line) - - def error_empty_key(self, line): - raise self.parse_exc('Key cannot be empty', self.lineno, line) - - def error_unexpected_continuation(self, line): - raise self.parse_exc('Unexpected continuation line', - self.lineno, line) - - def error_no_section_end_bracket(self, line): - raise self.parse_exc('Invalid section (must end with ])', - self.lineno, line) - - def error_no_section_name(self, line): - raise self.parse_exc('Empty section name', self.lineno, line) + raise NotImplementedError() class ConfigParser(BaseParser): """Parses a single config file, populating 'sections' to look like: - {'DEFAULT': {'key': [value, ...], ...}, - ...} + [ + [ + 'section1', + [ + ['key1', 'value1\nvalue2'], + ['key2', 'value3\nvalue4'], + ], + ], + [ + 'section2', + [ + ['key3', 'value5\nvalue6'], + ], + ], + ] """ - def __init__(self, filename, sections): + def __init__(self, filename, sections=None): super(ConfigParser, self).__init__() self.filename = filename - self.sections = sections + if sections is not None: + self.sections = sections + else: + self.sections = [] + self.section_name = None self.section = None - def parse(self): - with open(self.filename) as f: - return super(ConfigParser, self).parse(f) + def parse(self, data=None): + if not data: + data = self.filename + with open(data) as f: + return self._parse(f) - def find_section(self, sections, section): - return next((i for i, sect in enumerate(sections) if sect == section), -1) + def __iter__(self): + return iter(self.sections) - def new_section(self, section): - self.section = section - index = self.find_section(self.sections, section) - if index == -1: - self.sections.append([section, []]) + def find_section_index(self, section_name): + return next((i for i, (name, value) in enumerate(self) if name == section_name), -1) - def assignment(self, key, value): - if not self.section: - raise self.error_no_section() + def find_section(self, section_name): + return next((value for name, value in self.sections if name == section_name), None) - value = '\n'.join(value) - - def append(sections, section): - entry = [key, value] - index = self.find_section(sections, section) - sections[index][1].append(entry) + def new_section(self, line_parser): + section_name = line_parser.section_name + index = self.find_section_index(section_name) + self.section_name = section_name + if index == -1: + self.section = [section_name, []] + self.sections.append(self.section) + else: + self.section = self.sections[index] - append(self.sections, self.section) + def _assignment(self, key, value, line_parser): + if not self.section_name: + raise line_parser.error_no_section_name() - def parse_exc(self, msg, lineno, line=None): - return ParseError(msg, lineno, line) + value = '\n'.join(value) + entry = [key, value] + self.section[1].append(entry) - def error_no_section(self): - return self.parse_exc('Section must be started before assignment', - self.lineno) + def comment(self, line_parser): + """Called when a comment is parsed.""" + pass diff --git a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py index d6ec271c9..d24710132 100644 --- a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py +++ b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py @@ -28,6 +28,7 @@ from contextlib import contextmanager from itertools import repeat, chain import six +from multiprocessing import Queue from six.moves import zip, StringIO from six.moves import cStringIO @@ -597,8 +598,9 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): self.remote_path = None super(ProxDpdkVnfSetupEnvHelper, self).__init__(vnfd_helper, ssh_helper, scenario_helper) self.remote_prox_file_name = None - self.prox_config_dict = None + self._prox_config_data = None self.additional_files = {} + self.config_queue = Queue() def _build_pipeline_kwargs(self): tool_path = self.ssh_helper.provision_tool(tool_file=self.APP_NAME) @@ -639,9 +641,10 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): prox_config.parse() # Ensure MAC is set "hardware" - ext_intf = self.vnfd_helper.interfaces - # we are using enumeration to map logical port numbers to interfaces - for port_num, intf in enumerate(ext_intf): + all_ports = self.vnfd_helper.port_pairs.all_ports + # use dpdk port number + for port_name in all_ports: + port_num = self.vnfd_helper.port_num(port_name) port_section_name = "port {}".format(port_num) for section_name, section in sections: if port_section_name != section_name: @@ -659,13 +662,15 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): if item_val.startswith("@@dst_mac"): tx_port_iter = re.finditer(r'\d+', item_val) tx_port_no = int(next(tx_port_iter).group(0)) - mac = ext_intf[tx_port_no]["virtual-interface"]["dst_mac"] + intf = self.vnfd_helper.find_interface_by_port(tx_port_no) + mac = intf["virtual-interface"]["dst_mac"] section_data[1] = mac.replace(":", " ", 6) if item_key == "dst mac" and item_val.startswith("@@"): tx_port_iter = re.finditer(r'\d+', item_val) tx_port_no = int(next(tx_port_iter).group(0)) - mac = ext_intf[tx_port_no]["virtual-interface"]["dst_mac"] + intf = self.vnfd_helper.find_interface_by_port(tx_port_no) + mac = intf["virtual-interface"]["dst_mac"] section_data[1] = mac # if addition file specified in prox config @@ -714,13 +719,15 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): def generate_prox_lua_file(self): p = OrderedDict() - ext_intf = self.vnfd_helper.interfaces + all_ports = self.vnfd_helper.port_pairs.all_ports lua_param = self.LUA_PARAMETER_NAME - for intf in ext_intf: + for port_name in all_ports: peer = self.LUA_PARAMETER_PEER[lua_param] - port_num = intf["virtual-interface"]["dpdk_port_num"] - local_ip = intf["local_ip"] - dst_ip = intf["dst_ip"] + port_num = self.vnfd_helper.port_num(port_name) + intf = self.vnfd_helper.find_interface(name=port_name) + vintf = intf['virtual-interface'] + local_ip = vintf["local_ip"] + dst_ip = vintf["dst_ip"] local_ip_hex = ip_to_hex(local_ip, separator=' ') dst_ip_hex = ip_to_hex(dst_ip, separator=' ') p.update([ @@ -753,6 +760,15 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): return remote_path + CONFIG_QUEUE_TIMEOUT = 120 + + @property + def prox_config_data(self): + if self._prox_config_data is None: + # this will block, but it needs too + self._prox_config_data = self.config_queue.get(True, self.CONFIG_QUEUE_TIMEOUT) + return self._prox_config_data + def build_config_file(self): task_path = self.scenario_helper.task_path options = self.scenario_helper.options @@ -766,13 +782,17 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): prox_files = [prox_files] for key_prox_file in prox_files: base_prox_file = os.path.basename(key_prox_file) - remote_prox_file = self.copy_to_target(key_prox_file, base_prox_file) + key_prox_path = find_relative_file(key_prox_file, task_path) + remote_prox_file = self.copy_to_target(key_prox_path, base_prox_file) self.additional_files[base_prox_file] = remote_prox_file - self.prox_config_dict = self.generate_prox_config_file(config_path) - self.remote_path = self.upload_prox_config(config_file, self.prox_config_dict) + self._prox_config_data = self.generate_prox_config_file(config_path) + # copy config to queue so we can read it from traffic_runner process + self.config_queue.put(self._prox_config_data) + self.remote_path = self.upload_prox_config(config_file, self._prox_config_data) def build_config(self): + self.build_config_file() options = self.scenario_helper.options @@ -788,6 +808,7 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): return prox_cmd +# this might be bad, sometimes we want regular ResourceHelper methods, like collect_kpi class ProxResourceHelper(ClientResourceHelper): RESOURCE_WORD = 'prox' @@ -880,14 +901,23 @@ class ProxResourceHelper(ClientResourceHelper): self._run_traffic_once(traffic_profile) def _run_traffic_once(self, traffic_profile): - traffic_profile.execute(self) + traffic_profile.execute_traffic(self) if traffic_profile.done: self._queue.put({'done': True}) LOG.debug("tg_prox done") self._terminated.value = 1 - def start_collect(self): - pass + # For VNF use ResourceHelper method to collect KPIs directly. + # for TG leave the superclass ClientResourceHelper collect_kpi_method intact + def collect_collectd_kpi(self): + return self._collect_resource_kpi() + + def collect_kpi(self): + result = super(ProxResourceHelper, self).collect_kpi() + # add in collectd kpis manually + if result: + result['collect_stats'] = self._collect_resource_kpi() + return result def terminate(self): # should not be called, use VNF terminate @@ -922,12 +952,11 @@ class ProxResourceHelper(ClientResourceHelper): self.sut.stop_all() def run_test(self, pkt_size, duration, value, tolerated_loss=0.0): - # type: (object, object, object, object) -> object # do this assert in init? unless we expect interface count to # change from one run to another run... - interfaces = self.vnfd_helper.interfaces - interface_count = len(interfaces) - assert interface_count in {1, 2, 4}, \ + ports = self.vnfd_helper.port_pairs.all_ports + port_count = len(ports) + assert port_count in {1, 2, 4}, \ "Invalid number of ports: 1, 2 or 4 ports only supported at this time" with self.traffic_context(pkt_size, value): @@ -942,15 +971,18 @@ class ProxResourceHelper(ClientResourceHelper): latency = self.get_latency() deltas = data['delta'] - rx_total, tx_total = self.sut.port_stats(range(interface_count))[6:8] - pps = value / 100.0 * self.line_rate_to_pps(pkt_size, interface_count) + rx_total, tx_total = self.sut.port_stats(range(port_count))[6:8] + pps = value / 100.0 * self.line_rate_to_pps(pkt_size, port_count) samples = {} # we are currently using enumeration to map logical port num to interface - for index, iface in enumerate(interfaces): - port_rx_total, port_tx_total = self.sut.port_stats([index])[6:8] - samples[iface["name"]] = {"in_packets": port_rx_total, - "out_packets": port_tx_total} + for port_name in ports: + port = self.vnfd_helper.port_num(port_name) + port_rx_total, port_tx_total = self.sut.port_stats([port])[6:8] + samples[port_name] = { + "in_packets": port_rx_total, + "out_packets": port_tx_total, + } result = ProxTestDataTuple(tolerated_loss, tsc_hz, deltas.rx, deltas.tx, deltas.tsc, latency, rx_total, tx_total, pps) @@ -959,7 +991,7 @@ class ProxResourceHelper(ClientResourceHelper): def get_test_type(self): test_type = None - for section_name, section in self.setup_helper.prox_config_dict: + for section_name, section in self.setup_helper.prox_config_data: if section_name != "global": continue @@ -972,7 +1004,7 @@ class ProxResourceHelper(ClientResourceHelper): def get_cores(self, mode): cores = [] - for section_name, section in self.setup_helper.prox_config_dict: + for section_name, section in self.setup_helper.prox_config_data: if not section_name.startswith("core"): continue @@ -987,7 +1019,7 @@ class ProxResourceHelper(ClientResourceHelper): def get_cores_mpls(self, mode=PROX_CORE_GEN_MODE): cores_tagged = [] cores_plain = [] - for section_name, section in self.setup_helper.prox_config_dict: + for section_name, section in self.setup_helper.prox_config_data: if not section_name.startswith("core"): continue @@ -1016,9 +1048,6 @@ class ProxResourceHelper(ClientResourceHelper): return self.sut.lat_stats(self._latency_cores) return [] - def _get_logical_if_name(self, vpci): - return self._vpci_to_if_name_map[vpci] - def _connect(self, client=None): """Run and connect to prox on the remote system """ # De-allocating a large amount of hugepages takes some time. If a new diff --git a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py index cb09b43f6..2ac6ea412 100644 --- a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py @@ -51,9 +51,7 @@ class ProxApproxVnf(SampleVNF): try: return self.resource_helper.execute(cmd, *args, **kwargs) except OSError as e: - if ignore_errors and e.errno in {errno.EPIPE, errno.ESHUTDOWN}: - pass - else: + if not ignore_errors or e.errno not in {errno.EPIPE, errno.ESHUTDOWN}: raise def collect_kpi(self): @@ -66,11 +64,12 @@ class ProxApproxVnf(SampleVNF): } return result - if len(self.vnfd_helper.interfaces) not in {1, 2, 4}: + intf_count = len(self.vnfd_helper.interfaces) + if intf_count not in {1, 2, 4}: raise RuntimeError("Failed ..Invalid no of ports .. " "1, 2 or 4 ports only supported at this time") - port_stats = self.vnf_execute('port_stats', range(len(self.vnfd_helper.interfaces))) + port_stats = self.vnf_execute('port_stats', range(intf_count)) try: rx_total = port_stats[6] tx_total = port_stats[7] @@ -83,14 +82,16 @@ class ProxApproxVnf(SampleVNF): "packets_in": tx_total, "packets_dropped": (tx_total - rx_total), "packets_fwd": rx_total, - "collect_stats": self.resource_helper.collect_kpi(), + # we share ProxResourceHelper with TG, but we want to collect + # collectd KPIs here and not TG KPIs, so use a different method name + "collect_stats": self.resource_helper.collect_collectd_kpi(), } LOG.debug("%s collect KPIs %s", self.APP_NAME, result) return result def _tear_down(self): # this should be standardized for all VNFs or removed - self.setup_helper.rebind_drivers() + self.setup_helper.tear_down() def terminate(self): # try to quit with socket commands @@ -103,10 +104,3 @@ class ProxApproxVnf(SampleVNF): self.setup_helper.kill_vnf() self._tear_down() self.resource_helper.stop_collect() - - def instantiate(self, scenario_cfg, context_cfg): - # build config in parent process so we can access - # config from TG subprocesses - self.scenario_helper.scenario_cfg = scenario_cfg - self.setup_helper.build_config_file() - super(ProxApproxVnf, self).instantiate(scenario_cfg, context_cfg) diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index 9a7d39913..557009d30 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -30,7 +30,9 @@ from six.moves import cStringIO from yardstick.benchmark.contexts.base import Context from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file from yardstick.network_services.helpers.cpu import CpuSysCores +from yardstick.network_services.helpers.samplevnf_helper import PortPairs from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig +from yardstick.network_services.helpers.dpdknicbind_helper import DpdkBindHelper from yardstick.network_services.nfvi.resource import ResourceProfile from yardstick.network_services.vnf_generic.vnf.base import GenericVNF from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper @@ -126,15 +128,11 @@ class SetupEnvHelper(object): class DpdkVnfSetupEnvHelper(SetupEnvHelper): APP_NAME = 'DpdkVnf' - DPDK_BIND_CMD = "sudo {dpdk_nic_bind} {force} -b {driver} {vpci}" - DPDK_UNBIND_CMD = "sudo {dpdk_nic_bind} --force -b {driver} {vpci}" FIND_NET_CMD = "find /sys/class/net -lname '*{}*' -printf '%f'" HW_DEFAULT_CORE = 3 SW_DEFAULT_CORE = 2 - DPDK_STATUS_DRIVER_RE = re.compile(r"(\d{2}:\d{2}\.\d).*drv=([-\w]+)") - @staticmethod def _update_packet_type(ip_pipeline_cfg, traffic_options): match_str = 'pkt_type = ipv4' @@ -165,15 +163,9 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): super(DpdkVnfSetupEnvHelper, self).__init__(vnfd_helper, ssh_helper, scenario_helper) self.all_ports = None self.bound_pci = None - self._dpdk_nic_bind = None self.socket = None self.used_drivers = None - - @property - def dpdk_nic_bind(self): - if self._dpdk_nic_bind is None: - self._dpdk_nic_bind = self.ssh_helper.provision_tool(tool_file="dpdk-devbind.py") - return self._dpdk_nic_bind + self.dpdk_bind_helper = DpdkBindHelper(ssh_helper) def _setup_hugepages(self): cmd = "awk '/Hugepagesize/ { print $2$3 }' < /proc/meminfo" @@ -190,10 +182,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): self.ssh_helper.execute("echo %s | sudo tee %s" % (pages, memory_path)) - def _get_dpdk_port_num(self, name): - interface = self.vnfd_helper.find_interface(name=name) - return interface['virtual-interface']['dpdk_port_num'] - def build_config(self): vnf_cfg = self.scenario_helper.vnf_cfg task_path = self.scenario_helper.task_path @@ -216,7 +204,7 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): multiport = MultiPortConfig(self.scenario_helper.topology, config_tpl_cfg, config_basename, - self.vnfd_helper.interfaces, + self.vnfd_helper, self.VNF_TYPE, lb_count, worker_threads, @@ -234,7 +222,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): self.ssh_helper.upload_config_file(config_basename, new_config) self.ssh_helper.upload_config_file(script_basename, multiport.generate_script(self.vnfd_helper)) - self.all_ports = multiport.port_pair_list LOG.info("Provision and start the %s", self.APP_NAME) self._build_pipeline_kwargs() @@ -242,11 +229,19 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): def _build_pipeline_kwargs(self): tool_path = self.ssh_helper.provision_tool(tool_file=self.APP_NAME) - ports_len_hex = hex(2 ** (len(self.all_ports) + 1) - 1) + # count the number of actual ports in the list of pairs + # remove duplicate ports + # this is really a mapping from LINK ID to DPDK PMD ID + # e.g. 0x110 maps LINK0 -> PMD_ID_1, LINK1 -> PMD_ID_2 + # 0x1010 maps LINK0 -> PMD_ID_1, LINK1 -> PMD_ID_3 + ports = self.vnfd_helper.port_pairs.all_ports + port_nums = self.vnfd_helper.port_nums(ports) + # create mask from all the dpdk port numbers + ports_mask_hex = hex(sum(2 ** num for num in port_nums)) self.pipeline_kwargs = { 'cfg_file': self.CFG_CONFIG, 'script': self.CFG_SCRIPT, - 'ports_len_hex': ports_len_hex, + 'port_mask_hex': ports_mask_hex, 'tool_path': tool_path, } @@ -285,17 +280,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): def _validate_cpu_cfg(self): return self._get_cpu_sibling_list() - def _find_used_drivers(self): - cmd = "{0} -s".format(self.dpdk_nic_bind) - rc, dpdk_status, _ = self.ssh_helper.execute(cmd) - - self.used_drivers = { - vpci: (index, driver) - for index, (vpci, driver) - in enumerate(self.DPDK_STATUS_DRIVER_RE.findall(dpdk_status)) - if any(b.endswith(vpci) for b in self.bound_pci) - } - def setup_vnf_environment(self): self._setup_dpdk() resource = self._setup_resources() @@ -341,65 +325,31 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): def _detect_and_bind_drivers(self): interfaces = self.vnfd_helper.interfaces - self._find_used_drivers() - for vpci, (index, _) in self.used_drivers.items(): - try: - intf1 = next(v for v in interfaces if vpci == v['virtual-interface']['vpci']) - except StopIteration: - pass - else: - intf1['dpdk_port_num'] = index - - for vpci in self.bound_pci: - self._bind_dpdk('igb_uio', vpci) - time.sleep(2) + self.dpdk_bind_helper.read_status() + self.dpdk_bind_helper.save_used_drivers() - # debug dump after binding - self.ssh_helper.execute("sudo {} -s".format(self.dpdk_nic_bind)) + self.dpdk_bind_helper.bind(self.bound_pci, 'igb_uio') - def rebind_drivers(self, force=True): - if not self.used_drivers: - self._find_used_drivers() - for vpci, (_, driver) in self.used_drivers.items(): - self._bind_dpdk(driver, vpci, force) - - def _bind_dpdk(self, driver, vpci, force=True): - if force: - force = '--force ' - else: - force = '' - cmd = self.DPDK_BIND_CMD.format(force=force, - dpdk_nic_bind=self.dpdk_nic_bind, - driver=driver, - vpci=vpci) - self.ssh_helper.execute(cmd) + sorted_dpdk_pci_addresses = sorted(self.dpdk_bind_helper.dpdk_bound_pci_addresses) + for dpdk_port_num, vpci in enumerate(sorted_dpdk_pci_addresses): + try: + intf = next(v for v in interfaces + if vpci == v['virtual-interface']['vpci']) + # force to int + intf['virtual-interface']['dpdk_port_num'] = int(dpdk_port_num) + except: + pass + time.sleep(2) - def _detect_and_bind_dpdk(self, vpci, driver): + def get_local_iface_name_by_vpci(self, vpci): find_net_cmd = self.FIND_NET_CMD.format(vpci) - exit_status, _, _ = self.ssh_helper.execute(find_net_cmd) - if exit_status == 0: - # already bound - return None - self._bind_dpdk(driver, vpci) exit_status, stdout, _ = self.ssh_helper.execute(find_net_cmd) - if exit_status != 0: - # failed to bind - return None - return stdout - - def _bind_kernel_devices(self): - # only used by PingSetupEnvHelper? - for intf in self.vnfd_helper.interfaces: - vi = intf["virtual-interface"] - stdout = self._detect_and_bind_dpdk(vi["vpci"], vi["driver"]) - if stdout is not None: - vi["local_iface_name"] = posixpath.basename(stdout) + if exit_status == 0: + return stdout + return None def tear_down(self): - for vpci, (_, driver) in self.used_drivers.items(): - self.ssh_helper.execute(self.DPDK_UNBIND_CMD.format(dpdk_nic_bind=self.dpdk_nic_bind, - driver=driver, - vpci=vpci)) + self.dpdk_bind_helper.rebind_drivers() class ResourceHelper(object): @@ -458,14 +408,18 @@ class ClientResourceHelper(ResourceHelper): self.client = None self.client_started = Value('i', 0) - self.my_ports = None + self.all_ports = None self._queue = Queue() self._result = {} self._terminated = Value('i', 0) self._vpci_ascending = None def _build_ports(self): - self.my_ports = [0, 1] + self.networks = self.vnfd_helper.port_pairs.networks + self.uplink_ports = self.vnfd_helper.port_nums(self.vnfd_helper.port_pairs.uplink_ports) + self.downlink_ports = \ + 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 get_stats(self, *args, **kwargs): try: @@ -474,8 +428,9 @@ class ClientResourceHelper(ResourceHelper): LOG.exception("TRex client not connected") return {} - def generate_samples(self, key=None, default=None): - last_result = self.get_stats(self.my_ports) + def generate_samples(self, ports, key=None, default=None): + # needs to be used ports + last_result = self.get_stats(ports) key_value = last_result.get(key, default) if not isinstance(last_result, Mapping): # added for mock unit test @@ -483,27 +438,29 @@ class ClientResourceHelper(ResourceHelper): return {} samples = {} - for vpci_idx, vpci in enumerate(self._vpci_ascending): - name = self.vnfd_helper.find_virtual_interface(vpci=vpci)["name"] - # fixme: VNFDs KPIs values needs to be mapped to TRex structure - xe_value = last_result.get(vpci_idx, {}) - samples[name] = { - "rx_throughput_fps": float(xe_value.get("rx_pps", 0.0)), - "tx_throughput_fps": float(xe_value.get("tx_pps", 0.0)), - "rx_throughput_mbps": float(xe_value.get("rx_bps", 0.0)), - "tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)), - "in_packets": int(xe_value.get("ipackets", 0)), - "out_packets": int(xe_value.get("opackets", 0)), - } - if key: - samples[name][key] = key_value + # recalculate port for interface and see if it matches ports provided + for intf in self.vnfd_helper.interfaces: + name = intf["name"] + port = self.vnfd_helper.port_num(name) + if port in ports: + xe_value = last_result.get(port, {}) + samples[name] = { + "rx_throughput_fps": float(xe_value.get("rx_pps", 0.0)), + "tx_throughput_fps": float(xe_value.get("tx_pps", 0.0)), + "rx_throughput_mbps": float(xe_value.get("rx_bps", 0.0)), + "tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)), + "in_packets": int(xe_value.get("ipackets", 0)), + "out_packets": int(xe_value.get("opackets", 0)), + } + if key: + samples[name][key] = key_value return samples def _run_traffic_once(self, traffic_profile): - traffic_profile.execute(self) + traffic_profile.execute_traffic(self) self.client_started.value = 1 time.sleep(self.RUN_DURATION) - samples = self.generate_samples() + samples = self.generate_samples(traffic_profile.ports) time.sleep(self.QUEUE_WAIT_TIME) self._queue.put(samples) @@ -513,14 +470,14 @@ class ClientResourceHelper(ResourceHelper): try: self._build_ports() self.client = self._connect() - self.client.reset(ports=self.my_ports) - self.client.remove_all_streams(self.my_ports) # remove all streams + self.client.reset(ports=self.all_ports) + self.client.remove_all_streams(self.all_ports) # remove all streams traffic_profile.register_generator(self) while self._terminated.value == 0: self._run_traffic_once(traffic_profile) - self.client.stop(self.my_ports) + self.client.stop(self.all_ports) self.client.disconnect() self._terminated.value = 0 except STLError: @@ -534,12 +491,12 @@ class ClientResourceHelper(ResourceHelper): def clear_stats(self, ports=None): if ports is None: - ports = self.my_ports + ports = self.all_ports self.client.clear_stats(ports=ports) def start(self, ports=None, *args, **kwargs): if ports is None: - ports = self.my_ports + ports = self.all_ports self.client.start(ports=ports, *args, **kwargs) def collect_kpi(self): @@ -680,19 +637,19 @@ class ScenarioHelper(object): @property def task_path(self): - return self.scenario_cfg["task_path"] + return self.scenario_cfg['task_path'] @property def nodes(self): - return self.scenario_cfg['nodes'] + return self.scenario_cfg.get('nodes') @property def all_options(self): - return self.scenario_cfg["options"] + return self.scenario_cfg.get('options', {}) @property def options(self): - return self.all_options[self.name] + return self.all_options.get(self.name, {}) @property def vnf_cfg(self): @@ -730,24 +687,28 @@ class SampleVNF(GenericVNF): self.resource_helper = resource_helper_type(self.setup_helper) - self.all_ports = None self.context_cfg = None self.nfvi_context = None self.pipeline_kwargs = {} - self.priv_ports = None - self.pub_ports = None + self.uplink_ports = None + self.downlink_ports = None # TODO(esm): make QueueFileWrapper invert-able so that we # never have to manage the queues self.q_in = Queue() self.q_out = Queue() self.queue_wrapper = None self.run_kwargs = {} - self.scenario_cfg = None - self.tg_port_pairs = None self.used_drivers = {} self.vnf_port_pairs = None self._vnf_process = None + def _build_ports(self): + self._port_pairs = PortPairs(self.vnfd_helper.interfaces) + self.networks = self._port_pairs.networks + self.uplink_ports = self.vnfd_helper.port_nums(self._port_pairs.uplink_ports) + self.downlink_ports = self.vnfd_helper.port_nums(self._port_pairs.downlink_ports) + self.my_ports = self.vnfd_helper.port_nums(self._port_pairs.all_ports) + def _get_route_data(self, route_index, route_type): route_iter = iter(self.vnfd_helper.vdu0.get('nd_route_tbl', [])) for _ in range(route_index): @@ -826,6 +787,9 @@ class SampleVNF(GenericVNF): LOG.info("Waiting for %s VNF to start.. ", self.APP_NAME) time.sleep(1) + # Send ENTER to display a new prompt in case the prompt text was corrupted + # by other VNF output + self.q_in.put('\r\n') def _build_run_kwargs(self): self.run_kwargs = { @@ -926,7 +890,6 @@ class SampleVNFTrafficGen(GenericTrafficGen): self.runs_traffic = True self.traffic_finished = False - self.tg_port_pairs = None self._tg_process = None self._traffic_process = None @@ -937,7 +900,6 @@ class SampleVNFTrafficGen(GenericTrafficGen): def instantiate(self, scenario_cfg, context_cfg): self.scenario_helper.scenario_cfg = scenario_cfg self.resource_helper.generate_cfg() - self.setup_helper.setup_vnf_environment() self.resource_helper.setup() LOG.info("Starting %s server...", self.APP_NAME) diff --git a/yardstick/network_services/vnf_generic/vnf/tg_ping.py b/yardstick/network_services/vnf_generic/vnf/tg_ping.py index e65296287..9cd9f2574 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_ping.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_ping.py @@ -23,6 +23,7 @@ from ipaddress import IPv4Interface from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper +from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper LOG = logging.getLogger(__name__) @@ -59,7 +60,38 @@ class PingParser(object): class PingSetupEnvHelper(DpdkVnfSetupEnvHelper): def setup_vnf_environment(self): - self._bind_kernel_devices() + for intf in self.vnfd_helper.interfaces: + vi = intf['virtual-interface'] + vi['local_iface_name'] = self.get_local_iface_name_by_vpci(vi['vpci']) + + +class PingResourceHelper(ClientResourceHelper): + + def __init__(self, setup_helper): + super(PingResourceHelper, self).__init__(setup_helper) + self._queue = Queue() + self._parser = PingParser(self._queue) + + def run_traffic(self, traffic_profile): + # drop the connection in order to force a new one + self.ssh_helper.drop_connection() + + self.client_started.value = 1 + cmd_list = [ + "sudo ip addr flush {local_if_name}", + "sudo ip addr add {local_ip}/24 dev {local_if_name}", + "sudo ip link set {local_if_name} up", + ] + + self.cmd_kwargs['packet_size'] = traffic_profile.params['traffic_profile']['frame_size'] + + for cmd in cmd_list: + self.ssh_helper.execute(cmd.format(**self.cmd_kwargs)) + + ping_cmd = "nohup ping -s {packet_size} {target_ip}&" + self.ssh_helper.run(ping_cmd.format(**self.cmd_kwargs), + stdout=self._parser, + keep_stdin_open=True, pty=True) class PingTrafficGen(SampleVNFTrafficGen): @@ -69,16 +101,17 @@ class PingTrafficGen(SampleVNFTrafficGen): """ TG_NAME = 'Ping' + APP_NAME = 'Ping' RUN_WAIT = 4 def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None): if setup_env_helper_type is None: setup_env_helper_type = PingSetupEnvHelper + if resource_helper_type is None: + resource_helper_type = PingResourceHelper super(PingTrafficGen, self).__init__(name, vnfd, setup_env_helper_type, resource_helper_type) - self._queue = Queue() - self._parser = PingParser(self._queue) self._result = {} def scale(self, flavor=""): @@ -89,12 +122,23 @@ class PingTrafficGen(SampleVNFTrafficGen): return self._tg_process.is_alive() def instantiate(self, scenario_cfg, context_cfg): + self._start_server() self._result = { "packets_received": 0, "rtt": 0, } + intf = self.vnfd_helper.interfaces[0]["virtual-interface"] + self.resource_helper.cmd_kwargs = { + 'target_ip': IPv4Interface(intf["dst_ip"]).ip.exploded, + 'local_ip': IPv4Interface(intf["local_ip"]).ip.exploded, + 'local_if_name': intf["local_iface_name"].split('/')[0], + } + self.setup_helper.setup_vnf_environment() + def wait_for_instantiate(self): + pass + def listen_traffic(self, traffic_profile): """ Not needed for ping @@ -102,27 +146,3 @@ class PingTrafficGen(SampleVNFTrafficGen): :return: """ pass - - def _traffic_runner(self, traffic_profile): - intf = self.vnfd_helper.interfaces[0]["virtual-interface"] - profile = traffic_profile.params["traffic_profile"] - cmd_kwargs = { - 'target_ip': IPv4Interface(intf["dst_ip"]).ip.exploded, - 'local_ip': IPv4Interface(intf["local_ip"]).ip.exploded, - 'local_if_name': intf["local_iface_name"].split('/')[0], - 'packet_size': profile["frame_size"], - } - - cmd_list = [ - "sudo ip addr flush {local_if_name}", - "sudo ip addr add {local_ip}/24 dev {local_if_name}", - "sudo ip link set {local_if_name} up", - ] - - for cmd in cmd_list: - self.ssh_helper.execute(cmd.format(**cmd_kwargs)) - - ping_cmd = "ping -s {packet_size} {target_ip}" - self.ssh_helper.run(ping_cmd.format(**cmd_kwargs), - stdout=self._parser, - keep_stdin_open=True, pty=True) diff --git a/yardstick/network_services/vnf_generic/vnf/tg_prox.py b/yardstick/network_services/vnf_generic/vnf/tg_prox.py index c266f2c0f..40eda753f 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_prox.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_prox.py @@ -56,7 +56,6 @@ class ProxTrafficGen(SampleVNFTrafficGen): self.runs_traffic = True self.traffic_finished = False - self.tg_port_pairs = None self._tg_process = None self._traffic_process = None diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py index c758baa4c..449f22296 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py @@ -40,11 +40,14 @@ except ImportError: class IxiaRfc2544Helper(Rfc2544ResourceHelper): - pass + def is_done(self): + return self.latency and self.iteration.value > 10 class IxiaResourceHelper(ClientResourceHelper): + LATENCY_TIME_SLEEP = 120 + def __init__(self, setup_helper, rfc_helper_type=None): super(IxiaResourceHelper, self).__init__(setup_helper) self.scenario_helper = setup_helper.scenario_helper @@ -55,52 +58,66 @@ class IxiaResourceHelper(ClientResourceHelper): rfc_helper_type = IxiaRfc2544Helper self.rfc_helper = rfc_helper_type(self.scenario_helper) - self.tg_port_pairs = [] - self.priv_ports = None - self.pub_ports = None + self.uplink_ports = None + self.downlink_ports = None + self._connect() def _connect(self, client=None): self.client._connect(self.vnfd_helper) - def _build_ports(self): - # self.generate_port_pairs(self.topology) - self.priv_ports = [int(x[0][2:]) for x in self.tg_port_pairs] - self.pub_ports = [int(x[1][2:]) for x in self.tg_port_pairs] - self.my_ports = list(set(self.priv_ports).union(set(self.pub_ports))) - def get_stats(self, *args, **kwargs): - return self.client.ix_get_statistics()[1] + return self.client.ix_get_statistics() def stop_collect(self): - self._terminated.value = 0 - if self.client and self.client.ixnet: + self._terminated.value = 1 + if self.client: self.client.ix_stop_traffic() - def generate_samples(self, key=None, default=None): - last_result = self.get_stats() + def generate_samples(self, ports, key=None, default=None): + stats = self.get_stats() + last_result = stats[1] + latency = stats[0] samples = {} - for vpci_idx, interface in enumerate(self.vnfd_helper.interfaces): - name = "xe{0}".format(vpci_idx) - samples[name] = { - "rx_throughput_kps": float(last_result["Rx_Rate_Kbps"][vpci_idx]), - "tx_throughput_kps": float(last_result["Tx_Rate_Kbps"][vpci_idx]), - "rx_throughput_mbps": float(last_result["Rx_Rate_Mbps"][vpci_idx]), - "tx_throughput_mbps": float(last_result["Tx_Rate_Mbps"][vpci_idx]), - "in_packets": int(last_result["Valid_Frames_Rx"][vpci_idx]), - "out_packets": int(last_result["Frames_Tx"][vpci_idx]), - "RxThroughput": int(last_result["Valid_Frames_Rx"][vpci_idx]) / 30, - "TxThroughput": int(last_result["Frames_Tx"][vpci_idx]) / 30, - } + for interface in self.vnfd_helper.interfaces: + try: + name = interface["name"] + # this is not DPDK port num, but this is whatever number we gave + # when we selected ports and programmed the profile + port = self.vnfd_helper.port_num(name) + if port in ports: + samples[name] = { + "rx_throughput_kps": float(last_result["Rx_Rate_Kbps"][port]), + "tx_throughput_kps": float(last_result["Tx_Rate_Kbps"][port]), + "rx_throughput_mbps": float(last_result["Rx_Rate_Mbps"][port]), + "tx_throughput_mbps": float(last_result["Tx_Rate_Mbps"][port]), + "in_packets": int(last_result["Valid_Frames_Rx"][port]), + "out_packets": int(last_result["Frames_Tx"][port]), + "RxThroughput": int(last_result["Valid_Frames_Rx"][port]) / 30, + "TxThroughput": int(last_result["Frames_Tx"][port]) / 30, + } + if key: + avg_latency = latency["Store-Forward_Avg_latency_ns"][port] + min_latency = latency["Store-Forward_Min_latency_ns"][port] + max_latency = latency["Store-Forward_Max_latency_ns"][port] + samples[name][key] = \ + {"Store-Forward_Avg_latency_ns": avg_latency, + "Store-Forward_Min_latency_ns": min_latency, + "Store-Forward_Max_latency_ns": max_latency} + except IndexError: + pass return samples def run_traffic(self, traffic_profile): + if self._terminated.value: + return + min_tol = self.rfc_helper.tolerance_low max_tol = self.rfc_helper.tolerance_high + default = "00:00:00:00:00:00" self._build_ports() - self._connect() # we don't know client_file_name until runtime as instantiate client_file_name = \ @@ -112,11 +129,12 @@ class IxiaResourceHelper(ClientResourceHelper): self.client.ix_assign_ports() mac = {} + # TODO: shouldn't this index map to port number we used to generate the profile for index, interface in enumerate(self.vnfd_helper.interfaces, 1): virt_intf = interface["virtual-interface"] mac.update({ - "src_mac_{}".format(index): virt_intf["local_mac"], - "dst_mac_{}".format(index): virt_intf["dst_mac"], + "src_mac_{}".format(index): virt_intf.get("local_mac", default), + "dst_mac_{}".format(index): virt_intf.get("dst_mac", default), }) samples = {} @@ -124,23 +142,48 @@ class IxiaResourceHelper(ClientResourceHelper): ixia_file = find_relative_file("ixia_traffic.cfg", self.scenario_helper.scenario_cfg["task_path"]) # Generate ixia traffic config... - while not self._terminated.value: - traffic_profile.execute(self, self.client, mac, ixia_file) - self.client_started.value = 1 - time.sleep(WAIT_FOR_TRAFFIC) + try: + while not self._terminated.value: + traffic_profile.execute_traffic(self, self.client, mac, ixia_file) + self.client_started.value = 1 + time.sleep(WAIT_FOR_TRAFFIC) + self.client.ix_stop_traffic() + samples = self.generate_samples(traffic_profile.ports) + self._queue.put(samples) + status, samples = traffic_profile.get_drop_percentage(self, samples, min_tol, + max_tol, self.client, mac, + ixia_file) + + current = samples['CurrentDropPercentage'] + if min_tol <= current <= max_tol or status == 'Completed': + self._terminated.value = 1 + self.client.ix_stop_traffic() - samples = self.generate_samples() self._queue.put(samples) - status, samples = traffic_profile.get_drop_percentage(self, samples, min_tol, - max_tol, self.client, mac, - ixia_file) + except Exception: + LOG.info("Run Traffic terminated") + pass - current = samples['CurrentDropPercentage'] - if min_tol <= current <= max_tol or status == 'Completed': - self._terminated.value = 1 + if not self.rfc_helper.is_done(): + self._terminated.value = 1 + return + + traffic_profile.execute_traffic(self, self.client, mac, ixia_file) + for _ in range(5): + time.sleep(self.LATENCY_TIME_SLEEP) + self.client.ix_stop_traffic() + samples = self.generate_samples(traffic_profile.ports, 'latency', {}) + self._queue.put(samples) + traffic_profile.start_ixia_latency(self, self.client, mac, ixia_file) + if self._terminated.value: + break self.client.ix_stop_traffic() - self._queue.put(samples) + self._terminated.value = 1 + + def collect_kpi(self): + self.rfc_helper.iteration.value += 1 + return super(IxiaResourceHelper, self).collect_kpi() class IxiaTrafficGen(SampleVNFTrafficGen): @@ -155,7 +198,6 @@ class IxiaTrafficGen(SampleVNFTrafficGen): resource_helper_type) self._ixia_traffic_gen = None self.ixia_file_name = '' - self.tg_port_pairs = [] self.vnf_port_pairs = [] def _check_status(self): diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py index 15c9c0e1d..4e9f4bdc1 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_trex.py @@ -18,9 +18,7 @@ from __future__ import print_function import time import logging from collections import Mapping -from itertools import chain -from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig from yardstick.network_services.vnf_generic.vnf.tg_trex import TrexTrafficGen from yardstick.network_services.vnf_generic.vnf.sample_vnf import Rfc2544ResourceHelper from yardstick.network_services.vnf_generic.vnf.tg_trex import TrexResourceHelper @@ -47,23 +45,15 @@ class TrexRfcResourceHelper(TrexResourceHelper): rfc_helper_type = TrexRfc2544ResourceHelper self.rfc2544_helper = rfc_helper_type(self.scenario_helper) - # self.tg_port_pairs = [] - - def _build_ports(self): - self.tg_port_pairs, self.networks = MultiPortConfig.get_port_pairs( - self.vnfd_helper.interfaces) - self.priv_ports = [int(x[0][2:]) for x in self.tg_port_pairs] - self.pub_ports = [int(x[1][2:]) for x in self.tg_port_pairs] - self.my_ports = list(set(chain(self.priv_ports, self.pub_ports))) def _run_traffic_once(self, traffic_profile): if self._terminated.value: return - traffic_profile.execute(self) + traffic_profile.execute_traffic(self) self.client_started.value = 1 time.sleep(self.RUN_DURATION) - self.client.stop(self.my_ports) + self.client.stop(traffic_profile.ports) time.sleep(self.WAIT_TIME) samples = traffic_profile.get_drop_percentage(self) self._queue.put(samples) @@ -71,30 +61,30 @@ class TrexRfcResourceHelper(TrexResourceHelper): if not self.rfc2544_helper.is_done(): return - self.client.stop(self.my_ports) - self.client.reset(ports=self.my_ports) - self.client.remove_all_streams(self.my_ports) - traffic_profile.execute_latency(samples=samples) + self.client.stop(traffic_profile.ports) + self.client.reset(ports=traffic_profile.ports) + self.client.remove_all_streams(traffic_profile.ports) + traffic_profile.execute_traffic_latency(samples=samples) multiplier = traffic_profile.calculate_pps(samples)[1] for _ in range(5): time.sleep(self.LATENCY_TIME_SLEEP) - self.client.stop(self.my_ports) + self.client.stop(traffic_profile.ports) time.sleep(self.WAIT_TIME) - last_res = self.client.get_stats(self.my_ports) + last_res = self.client.get_stats(traffic_profile.ports) if not isinstance(last_res, Mapping): self._terminated.value = 1 continue - self.generate_samples('latency', {}) + self.generate_samples(traffic_profile.ports, 'latency', {}) self._queue.put(samples) self.client.start(mult=str(multiplier), - ports=self.my_ports, + ports=traffic_profile.ports, duration=120, force=True) - def start_client(self, mult, duration, force=True): - self.client.start(ports=self.my_ports, mult=mult, duration=duration, force=force) + def start_client(self, ports, mult=None, duration=None, force=True): + self.client.start(ports=ports, mult=mult, duration=duration, force=force) - def clear_client_stats(self): - self.client.clear_stats(ports=self.my_ports) + def clear_client_stats(self, ports): + self.client.clear_stats(ports=ports) def collect_kpi(self): self.rfc2544_helper.iteration.value += 1 diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py index 616b331ba..1fe790f08 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py @@ -25,10 +25,19 @@ from yardstick.common.utils import mac_address_to_hex_list from yardstick.network_services.utils import get_nsb_option from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNFTrafficGen from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper +from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper LOG = logging.getLogger(__name__) +class TrexDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper): + APP_NAME = "t-rex-64" + CFG_CONFIG = "" + CFG_SCRIPT = "" + PIPELINE_COMMAND = "" + VNF_TYPE = "TG" + + class TrexResourceHelper(ClientResourceHelper): CONF_FILE = '/tmp/trex_cfg.yaml' @@ -36,16 +45,14 @@ class TrexResourceHelper(ClientResourceHelper): RESOURCE_WORD = 'trex' RUN_DURATION = 0 - SYNC_PORT = 4500 - ASYNC_PORT = 4501 + ASYNC_PORT = 4500 + SYNC_PORT = 4501 def generate_cfg(self): ext_intf = self.vnfd_helper.interfaces vpci_list = [] port_list = [] trex_cfg = { - 'port_limit': 0, - 'version': '2', 'interfaces': vpci_list, 'port_info': port_list, "port_limit": len(ext_intf), @@ -79,6 +86,7 @@ class TrexResourceHelper(ClientResourceHelper): DISABLE_DEPLOY = True def setup(self): + super(TrexResourceHelper, self).setup() if self.DISABLE_DEPLOY: return @@ -130,6 +138,9 @@ class TrexTrafficGen(SampleVNFTrafficGen): if resource_helper_type is None: resource_helper_type = TrexResourceHelper + if setup_env_helper_type is None: + setup_env_helper_type = TrexDpdkVnfSetupEnvHelper + super(TrexTrafficGen, self).__init__(name, vnfd, setup_env_helper_type, resource_helper_type) diff --git a/yardstick/network_services/vnf_generic/vnf/udp_replay.py b/yardstick/network_services/vnf_generic/vnf/udp_replay.py index 6e206f2b2..6b7779782 100644 --- a/yardstick/network_services/vnf_generic/vnf/udp_replay.py +++ b/yardstick/network_services/vnf_generic/vnf/udp_replay.py @@ -16,51 +16,83 @@ from __future__ import absolute_import import logging from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF +from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper +from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper + LOG = logging.getLogger(__name__) # UDP_Replay should work the same on all systems, we can provide the binary + +# we can't match the prompt regexp due to extra noise +# yardstick.ssh ssh.py:302 DEBUG stdout: UDP_Replay: lcore 0 has nothing to do +# eplUDP_Replay: -- lcoreid=1 portid=0 rxqueueid=0 +# ay> +# +# try decreasing log level to RTE_LOG_NOTICE (5) REPLAY_PIPELINE_COMMAND = ( - """sudo {tool_path} -c {cpu_mask_hex} -n 4 -w {whitelist} -- """ - """{hw_csum} -p {ports_len_hex} --config='{config}'""" + """sudo {tool_path} --log-level=5 -c {cpu_mask_hex} -n 4 -w {whitelist} -- """ + """{hw_csum} -p {port_mask_hex} --config='{config}'""" ) -# {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}' +# {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}' + + +class UdpReplaySetupEnvHelper(DpdkVnfSetupEnvHelper): + + APP_NAME = "UDP_Replay" + + +class UdpReplayResourceHelper(ClientResourceHelper): + pass class UdpReplayApproxVnf(SampleVNF): APP_NAME = "UDP_Replay" APP_WORD = "UDP_Replay" - PIPELINE_COMMAND = REPLAY_PIPELINE_COMMAND - VNF_PROMPT = 'Replay>' + # buffering issue? + VNF_PROMPT = 'eplay>' - CSUM_MAP = { - 'baremetal': '', - 'sriov': '', - } + VNF_TYPE = 'UdpReplay' - def scale(self, flavor=""): - """ scale vnfbased on flavor input """ - raise NotImplementedError + HW_OFFLOADING_NFVI_TYPES = {'baremetal', 'sriov'} - def _build_config(self): - pass + PIPELINE_COMMAND = REPLAY_PIPELINE_COMMAND + + def __init__(self, name, vnfd, setup_env_helper_type=None, resource_helper_type=None): + if resource_helper_type is None: + resource_helper_type = UdpReplayResourceHelper - def _deploy(self): - self.generate_port_pairs() - super(UdpReplayApproxVnf, self)._deploy() + if setup_env_helper_type is None: + setup_env_helper_type = UdpReplaySetupEnvHelper + + super(UdpReplayApproxVnf, self).__init__(name, vnfd, setup_env_helper_type, + resource_helper_type) def _build_pipeline_kwargs(self): - tool_path = self.ssh_helper.provision_tool(self.APP_NAME) - ports_mask = 2 ** len(self.all_ports) - 1 - ports_mask_hex = hex(ports_mask) - cpu_mask_hex = hex(ports_mask * 2) - hw_csum = self.CSUM_MAP.get(self.nfvi_type, "--no-hw-csum") - config_value = "".join(str((port, 0, port + 1)) for port in self.all_ports) - - whitelist = " -w ".join(self.bound_pci) + ports = self.vnfd_helper.port_pairs.all_ports + number_of_ports = len(ports) + + tool_path = self.ssh_helper.provision_tool(tool_file=self.APP_NAME) + port_nums = self.vnfd_helper.port_nums(ports) + ports_mask_hex = hex(sum(2 ** num for num in port_nums)) + # one core extra for master + cpu_mask_hex = hex(2 ** (number_of_ports + 1) - 1) + hw_csum = "" + if (not self.scenario_helper.options.get('hw_csum', False) or + self.nfvi_context.attrs.get('nfvi_type') not in self.HW_OFFLOADING_NFVI_TYPES): + hw_csum = '--no-hw-csum' + + # tuples of (FLD_PORT, FLD_QUEUE, FLD_LCORE) + # [--config (port,queue,lcore)[,(port,queue,lcore]]" + # start with lcore = 1 since we use lcore=0 for master + config_value = ",".join( + str((self.vnfd_helper.port_num(port), 0, core)).replace(" ", "") for core, port in + enumerate(self.vnfd_helper.port_pairs.all_ports, 1)) + + whitelist = " -w ".join(self.setup_helper.bound_pci) self.pipeline_kwargs = { - 'ports_len_hex': ports_mask_hex, + 'port_mask_hex': ports_mask_hex, 'tool_path': tool_path, 'hw_csum': hw_csum, 'whitelist': whitelist, @@ -68,18 +100,24 @@ class UdpReplayApproxVnf(SampleVNF): 'config': config_value, } + def _build_config(self): + self._build_pipeline_kwargs() + return self.PIPELINE_COMMAND.format(**self.pipeline_kwargs) + def collect_kpi(self): def get_sum(offset): return sum(int(i) for i in split_stats[offset::5]) + number_of_ports = len(self.vnfd_helper.port_pairs.all_ports) + stats = self.get_stats() stats_words = stats.split() - split_stats = stats_words[stats_words.index('0'):][:len(self.all_ports) * 5] + split_stats = stats_words[stats_words.index('0'):][:number_of_ports * 5] result = { "packets_in": get_sum(1), "packets_fwd": get_sum(2), "packets_dropped": get_sum(3) + get_sum(4), - "collect_stats": {}, + 'collect_stats': self.resource_helper.collect_kpi(), } LOG.debug("UDP Replay collect KPIs %s", result) diff --git a/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py b/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py index 32a08c7bd..6c95648ce 100644 --- a/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/vfw_vnf.py @@ -22,7 +22,7 @@ from yardstick.network_services.yang_model import YangModel LOG = logging.getLogger(__name__) # vFW should work the same on all systems, we can provide the binary -FW_PIPELINE_COMMAND = """sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}""" +FW_PIPELINE_COMMAND = """sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}""" FW_COLLECT_KPI = (r"""VFW TOTAL:[^p]+pkts_received"?:\s(\d+),[^p]+pkts_fw_forwarded"?:\s(\d+),""" r"""[^p]+pkts_drop_fw"?:\s(\d+),\s""") diff --git a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py index 310ab67cb..cd4a008ce 100644 --- a/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/vpe_vnf.py @@ -15,6 +15,8 @@ from __future__ import absolute_import from __future__ import print_function + + import os import logging import re @@ -22,17 +24,17 @@ import posixpath from six.moves import configparser, zip +from yardstick.network_services.helpers.samplevnf_helper import PortPairs from yardstick.network_services.pipeline import PipelineRules from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF, DpdkVnfSetupEnvHelper LOG = logging.getLogger(__name__) -VPE_PIPELINE_COMMAND = """sudo {tool_path} -p {ports_len_hex} -f {cfg_file} -s {script}""" +VPE_PIPELINE_COMMAND = """sudo {tool_path} -p {port_mask_hex} -f {cfg_file} -s {script}""" VPE_COLLECT_KPI = """\ Pkts in:\s(\d+)\r\n\ -\tPkts dropped by Pkts in:\s(\d+)\r\n\ -\tPkts dropped by AH:\s(\d+)\r\n\\ +\tPkts dropped by AH:\s(\d+)\r\n\ \tPkts dropped by other:\s(\d+)\ """ @@ -48,13 +50,13 @@ class ConfigCreate(object): config.set(tm_q, 'cfg', '/tmp/full_tm_profile_10G.cfg') return config - def __init__(self, priv_ports, pub_ports, socket): + def __init__(self, uplink_ports, downlink_ports, socket): super(ConfigCreate, self).__init__() self.sw_q = -1 self.sink_q = -1 self.n_pipeline = 1 - self.priv_ports = priv_ports - self.pub_ports = pub_ports + self.uplink_ports = uplink_ports + self.downlink_ports = downlink_ports self.pipeline_per_port = 9 self.socket = socket @@ -74,7 +76,7 @@ class ConfigCreate(object): return config def vpe_rxq(self, config): - for port in self.pub_ports: + for port in self.downlink_ports: new_section = 'RXQ{0}.0'.format(port) config.add_section(new_section) config.set(new_section, 'mempool', 'MEMPOOL1') @@ -92,24 +94,23 @@ class ConfigCreate(object): pktq = "SWQ{0}{1}".format(self.sw_q, sink) return pktq - def vpe_upstream(self, vnf_cfg, intf): + def vpe_upstream(self, vnf_cfg, index=0): parser = configparser.ConfigParser() parser.read(os.path.join(vnf_cfg, 'vpe_upstream')) + for pipeline in parser.sections(): for k, v in parser.items(pipeline): if k == "pktq_in": - index = intf['index'] if "RXQ" in v: - value = "RXQ{0}.0".format(index) + value = "RXQ{0}.0".format(self.uplink_ports[index]) else: value = self.get_sink_swq(parser, pipeline, k, index) parser.set(pipeline, k, value) elif k == "pktq_out": - index = intf['peer_intf']['index'] if "TXQ" in v: - value = "TXQ{0}.0".format(index) + value = "TXQ{0}.0".format(self.downlink_ports[index]) else: self.sw_q += 1 value = self.get_sink_swq(parser, pipeline, k, index) @@ -123,21 +124,19 @@ class ConfigCreate(object): self.n_pipeline += 1 return parser - def vpe_downstream(self, vnf_cfg, intf): + def vpe_downstream(self, vnf_cfg, index): parser = configparser.ConfigParser() parser.read(os.path.join(vnf_cfg, 'vpe_downstream')) for pipeline in parser.sections(): for k, v in parser.items(pipeline): - index = intf['dpdk_port_num'] - peer_index = intf['peer_intf']['dpdk_port_num'] if k == "pktq_in": if "RXQ" not in v: value = self.get_sink_swq(parser, pipeline, k, index) elif "TM" in v: - value = "RXQ{0}.0 TM{1}".format(peer_index, index) + value = "RXQ{0}.0 TM{1}".format(self.downlink_ports[index], index) else: - value = "RXQ{0}.0".format(peer_index) + value = "RXQ{0}.0".format(self.downlink_ports[index]) parser.set(pipeline, k, value) @@ -146,9 +145,9 @@ class ConfigCreate(object): self.sw_q += 1 value = self.get_sink_swq(parser, pipeline, k, index) elif "TM" in v: - value = "TXQ{0}.0 TM{1}".format(peer_index, index) + value = "TXQ{0}.0 TM{1}".format(self.uplink_ports[index], index) else: - value = "TXQ{0}.0".format(peer_index) + value = "TXQ{0}.0".format(self.uplink_ports[index]) parser.set(pipeline, k, value) @@ -166,16 +165,16 @@ class ConfigCreate(object): config = self.vpe_initialize(config) config = self.vpe_rxq(config) config.write(cfg_file) - for index, priv_port in enumerate(self.priv_ports): - config = self.vpe_upstream(vnf_cfg, priv_port) + for index in range(0, len(self.uplink_ports)): + config = self.vpe_upstream(vnf_cfg, index) config.write(cfg_file) - config = self.vpe_downstream(vnf_cfg, priv_port) + config = self.vpe_downstream(vnf_cfg, index) config = self.vpe_tmq(config, index) config.write(cfg_file) def generate_vpe_script(self, interfaces): rules = PipelineRules(pipeline_id=1) - for priv_port, pub_port in zip(self.priv_ports, self.pub_ports): + for priv_port, pub_port in zip(self.uplink_ports, self.downlink_ports): priv_intf = interfaces[priv_port]["virtual-interface"] pub_intf = interfaces[pub_port]["virtual-interface"] @@ -199,36 +198,41 @@ class ConfigCreate(object): return rules.get_string() + def generate_tm_cfg(self, vnf_cfg, index=0): + vnf_cfg = os.path.join(vnf_cfg, "full_tm_profile_10G.cfg") + if os.path.exists(vnf_cfg): + return open(vnf_cfg).read() + class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): + APP_NAME = 'vPE_vnf' CFG_CONFIG = "/tmp/vpe_config" CFG_SCRIPT = "/tmp/vpe_script" + TM_CONFIG = "/tmp/full_tm_profile_10G.cfg" CORES = ['0', '1', '2', '3', '4', '5'] PIPELINE_COMMAND = VPE_PIPELINE_COMMAND + def _build_vnf_ports(self): + self._port_pairs = PortPairs(self.vnfd_helper.interfaces) + self.uplink_ports = self._port_pairs.uplink_ports + self.downlink_ports = self._port_pairs.downlink_ports + self.all_ports = self._port_pairs.all_ports + def build_config(self): vpe_vars = { "bin_path": self.ssh_helper.bin_path, "socket": self.socket, } - all_ports = [] - priv_ports = [] - pub_ports = [] - for interface in self.vnfd_helper.interfaces: - all_ports.append(interface['name']) - vld_id = interface['virtual-interface']['vld_id'] - if vld_id.startswith('private'): - priv_ports.append(interface) - elif vld_id.startswith('public'): - pub_ports.append(interface) - - vpe_conf = ConfigCreate(priv_ports, pub_ports, self.socket) + self._build_vnf_ports() + vpe_conf = ConfigCreate(self.vnfd_helper.port_pairs.uplink_ports, + self.vnfd_helper.port_pairs.downlink_ports, self.socket) vpe_conf.create_vpe_config(self.scenario_helper.vnf_cfg) config_basename = posixpath.basename(self.CFG_CONFIG) script_basename = posixpath.basename(self.CFG_SCRIPT) + tm_basename = posixpath.basename(self.TM_CONFIG) with open(self.CFG_CONFIG) as handle: vpe_config = handle.read() @@ -237,6 +241,15 @@ class VpeApproxSetupEnvHelper(DpdkVnfSetupEnvHelper): vpe_script = vpe_conf.generate_vpe_script(self.vnfd_helper.interfaces) self.ssh_helper.upload_config_file(script_basename, vpe_script.format(**vpe_vars)) + tm_config = vpe_conf.generate_tm_cfg(self.scenario_helper.vnf_cfg) + self.ssh_helper.upload_config_file(tm_basename, tm_config) + + LOG.info("Provision and start the %s", self.APP_NAME) + LOG.info(self.CFG_CONFIG) + LOG.info(self.CFG_SCRIPT) + self._build_pipeline_kwargs() + return self.PIPELINE_COMMAND.format(**self.pipeline_kwargs) + class VpeApproxVnf(SampleVNF): """ This class handles vPE VNF model-driver definitions """ diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py index 8c7b1e429..455ddc34e 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -89,14 +89,14 @@ class HeatStack(HeatObject): if self.uuid is None: return - log.info("Deleting stack '%s', uuid:%s", self.name, self.uuid) + log.info("Deleting stack '%s' START, uuid:%s", self.name, self.uuid) heat = self.heat_client template = heat.stacks.get(self.uuid) start_time = time.time() template.delete() for status in iter(self.status, u'DELETE_COMPLETE'): - log.debug("stack state %s", status) + log.debug("Deleting stack state: %s", status) if status == u'DELETE_FAILED': raise RuntimeError( heat.stacks.get(self.uuid).stack_status_reason) @@ -104,7 +104,7 @@ class HeatStack(HeatObject): time.sleep(2) end_time = time.time() - log.info("Deleted stack '%s' in %d secs", self.name, + log.info("Deleting stack '%s' DONE in %d secs", self.name, end_time - start_time) self.uuid = None @@ -599,7 +599,7 @@ name (i.e. %s).\ :param: timeout: timeout in seconds for Heat create, default 3600s :type timeout: int """ - log.info("Creating stack '%s'", self.name) + log.info("Creating stack '%s' START", self.name) # create stack early to support cleanup, e.g. ctrl-c while waiting stack = HeatStack(self.name) @@ -613,13 +613,13 @@ name (i.e. %s).\ if not block: self.outputs = stack.outputs = {} end_time = time.time() - log.info("Created stack '%s' in %.3e secs", + log.info("Creating stack '%s' DONE in %d secs", self.name, end_time - start_time) return stack time_limit = start_time + timeout for status in iter(self.status, self.HEAT_CREATE_COMPLETE_STATUS): - log.debug("stack state %s", status) + log.debug("Creating stack state: %s", status) if status == u'CREATE_FAILED': stack_status_reason = heat_client.stacks.get(self.uuid).stack_status_reason heat_client.stacks.delete(self.uuid) @@ -631,7 +631,7 @@ name (i.e. %s).\ end_time = time.time() outputs = heat_client.stacks.get(self.uuid).outputs - log.info("Created stack '%s' in %.3e secs", + log.info("Creating stack '%s' DONE in %d secs", self.name, end_time - start_time) # keep outputs as unicode diff --git a/yardstick/ssh.py b/yardstick/ssh.py index a024cf64a..e98ee98b7 100644 --- a/yardstick/ssh.py +++ b/yardstick/ssh.py @@ -64,6 +64,7 @@ Eventlet: """ from __future__ import absolute_import import os +import io import select import socket import time @@ -81,6 +82,14 @@ from yardstick.common.utils import try_int from yardstick.network_services.utils import provision_tool +def convert_key_to_str(key): + if not isinstance(key, (paramiko.RSAKey, paramiko.DSSKey)): + return key + k = io.StringIO() + key.write_private_key(k) + return k.getvalue() + + class SSHError(Exception): pass @@ -432,8 +441,9 @@ class SSH(object): class AutoConnectSSH(SSH): + # always wait or we will get OpenStack SSH errors def __init__(self, user, host, port=None, pkey=None, - key_filename=None, password=None, name=None, wait=False): + key_filename=None, password=None, name=None, wait=True): super(AutoConnectSSH, self).__init__(user, host, port, pkey, key_filename, password, name) self._wait = wait |