diff options
156 files changed, 4078 insertions, 1128 deletions
diff --git a/INFO.yaml b/INFO.yaml new file mode 100644 index 000000000..f84f6952e --- /dev/null +++ b/INFO.yaml @@ -0,0 +1,80 @@ +--- +project: 'Test framework for verifying infrastructure compliance (yardstick)' +project_creation_date: 'April 28th, 2015' +project_category: 'Integration & Testing' +lifecycle_state: 'Incubation' +project_lead: &opnfv_yardstick_ptl + name: 'Ross Brattain' + email: 'ross.b.brattain@intel.com' + id: 'rbbratta' + company: 'intel.com' + timezone: 'PST' +primary_contact: *opnfv_yardstick_ptl +issue_tracking: + type: 'jira' + url: 'https://jira.opnfv.org/projects/Yardstick' + key: 'Yardstick' +mailing_list: + type: 'mailman2' + url: 'opnfv-tech-discuss@lists.opnfv.org' + tag: '[yardstick]' +realtime_discussion: + type: irc + server: 'freenode.net' + channel: '#opnfv-yardstick' +meetings: + - type: 'gotomeeting+irc' + agenda: 'https://wiki.opnfv.org/display/yardstick/Yardstick+Meetings' + url: 'https://global.gotomeeting.com/join/819733085' + server: 'freenode.net' + channel: '#opnfv-yardstick' + repeats: 'weekly' + time: '08:30 UTC' +repositories: + - 'yardstick' +committers: + - <<: *opnfv_yardstick_ptl + - name: 'Jörgen Karlsson' + email: 'jorgen.w.karlsson@ericsson.com' + company: 'ericsson.com' + id: 'jnon' + - name: 'Kubi' + email: 'jean.gaoliang@huawei.com' + company: 'huawei.com' + id: 'kubi' + - name: 'Rex Lee' + email: 'limingjiang@huawei.com' + company: 'huawei.com' + id: 'rexlee8776' + - name: 'Jing Lu' + email: 'lvjing5@huawei.com' + company: 'huawei.com' + id: 'JingLu5' + - name: 'zhihui wu' + email: 'wu.zhihui1@zte.com.cn' + company: 'zte.com.cn' + id: 'wu.zhihui' + - name: 'Trevor Cooper' + email: 'trevor.cooper@intel.com' + company: 'intel.com' + id: 'trev' + - name: 'Jack Chan' + email: 'chenjiankun1@huawei.com' + company: 'huawei.com' + id: 'chenjiankun' + - name: 'Emma Foley' + email: 'emma.l.foley@intel.com' + company: 'intel.com' + id: 'elfoley' + - name: 'Rodolfo Alonso Hernandez' + email: 'rodolfo.alonso.hernandez@intel.com' + company: 'intel.com' + id: 'rodolfo.ah' + - name: 'Kanglin Yin' + email: '14_ykl@tongji.edu.cn' + company: 'tongji.edu.cn' + id: 'tjuyinkanglin' +tsc: + # yamllint disable rule:line-length + approval: 'http//meetbot.opnfv.org/meetings/' + # yamllint enable rule:line-length diff --git a/ansible/infra_deploy.yml b/ansible/infra_deploy.yml new file mode 100644 index 000000000..948dd338a --- /dev/null +++ b/ansible/infra_deploy.yml @@ -0,0 +1,19 @@ +# Copyright (c) 2018 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. +--- +- hosts: jumphost + + roles: + - infra_check_requirements + - infra_destroy_previous_configuration diff --git a/ansible/load_images.yml b/ansible/load_images.yml index a4c130d46..d4b24c864 100644 --- a/ansible/load_images.yml +++ b/ansible/load_images.yml @@ -29,41 +29,15 @@ IMAGE_COMMAND: yardstick-img-modify IMAGE_OUTPUT: "/tmp/workspace/yardstick/yardstick-image.tar.gz" -# QCOW_IMAGE: "/tmp/workspace/yardstick/yardstick-image.img" -# RAW_IMAGE: "/tmp/workspace/yardstick/yardstick-image.tar.gz" -# IMAGE_COMMANDS: -# 'lxd': yardstick-img-lxd-modify -# 'default': yardstick-img-modify - - roles: - role: add_fuel_jumphost when: "INSTALLER_TYPE == 'fuel'" - role: detect_fuel_arch when: "INSTALLER_TYPE == 'fuel'" -# post_tasks: -# -# - command: "{{ DEPLOY_VARS[DEPLOY_SCENARIO].IMAGE_COMMAND }}" "{{ IMAGE_MODIFY_SCRIPT }}" -# become: true -# register: image_modify_result -# retries: 2 -# untils: image_modify_result|succeeded -# -# - stat: path="{{ DEPLOY_VARS[DEPLOY_SCENARIO].IMAGE_OUTPUT }}"} -# register: output_stat -# -# - fail: msg="" -# when: not output_stat - - - include: build_yardstick_image.yml + vars: + img_property: normal - include: image_uploaders/upload_yardstick_image.yml -# upload cirros -# upload vanilla ubuntu cloud_image - -# - include: create_flavors.yml - - diff --git a/ansible/prepare_openstack.yml b/ansible/prepare_openstack.yml index 8456c9e59..6f54ef522 100644 --- a/ansible/prepare_openstack.yml +++ b/ansible/prepare_openstack.yml @@ -12,27 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: convert openrc_file to openrc env dict +- name: Convert openrc_file to openrc env dict hosts: jumphost vars_files: - yardstick_config.yml roles: - convert_openrc -### -# Build yardstick image for openstack quest -# check included file for other vars/env -### -- include: build_yardstick_image.yml +- name: Build Yardstick image for OpenStack + include: build_yardstick_image.yml vars: YARD_IMG_ARCH: amd64 release: xenial + img_property: nsb -### -# Delete old yardstick image and flavors -# Upload new image -### -- name: cleanup old openstack images, upload new +- name: Cleanup old OpenStack images and upload the new one hosts: jumphost vars_files: - yardstick_config.yml diff --git a/ansible/roles/create_samplevnfs_image/tasks/main.yml b/ansible/roles/create_samplevnfs_image/tasks/main.yml index c83cccab5..ab7371a12 100644 --- a/ansible/roles/create_samplevnfs_image/tasks/main.yml +++ b/ansible/roles/create_samplevnfs_image/tasks/main.yml @@ -19,6 +19,6 @@ is_public: yes disk_format: qcow2 container_format: bare - filename: "{{ raw_imgfile }}" + filename: "{{ imgfile }}" properties: hw_vif_multiqueue_enabled: true diff --git a/ansible/roles/download_civetweb/defaults/main.yml b/ansible/roles/download_civetweb/defaults/main.yml index 5efc9bb56..289e52ce8 100644 --- a/ansible/roles/download_civetweb/defaults/main.yml +++ b/ansible/roles/download_civetweb/defaults/main.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -civetweb_url: https://sourceforge.net/projects/civetweb/files/1.9/CivetWeb_V1.9.zip +civetweb_url: https://iweb.dl.sourceforge.net/project/civetweb/1.9.1/CivetWeb_V1.9.1.zip civetweb_file: "{{ civetweb_url|basename }}" civetweb_dest: "{{ clone_dest }}/civetweb" -civetweb_sha256s: "sha256:947a546bfccd733c79dff9565227fa74f4d17750650ff49312ef4b2d032fa8c8" +civetweb_sha256s: "sha256:69a82f042eae0197fb50b09861a8e2c5fff2871c196a21edd122bb8ce34ca0f3" diff --git a/ansible/roles/download_drivers/defaults/main.yml b/ansible/roles/download_drivers/defaults/main.yml new file mode 100644 index 000000000..ab68a3c6d --- /dev/null +++ b/ansible/roles/download_drivers/defaults/main.yml @@ -0,0 +1,21 @@ +# Copyright (c) 2018 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. +--- +i40evf_version: "3.4.2" +i40evf_gzfile: "i40evf-{{ i40evf_version }}.tar.gz" +i40evf_url: "https://netix.dl.sourceforge.net/project/e1000/i40evf%20stable/{{ i40evf_version }}/{{ i40evf_gzfile }}" +i40evf_dest: "{{ clone_dest }}/" +i40evf_path: "{{ i40evf_dest }}/{{ i40evf_gzfile|regex_replace('[.]tar[.]gz$', '') }}" +i40evf_checksum: + "3.4.2": "sha256:a8e2a722fb2f8ac874cb39545a331761841f1724830ff1581d2012dd37314645" diff --git a/ansible/roles/download_drivers/tasks/i40evf.yml b/ansible/roles/download_drivers/tasks/i40evf.yml new file mode 100644 index 000000000..cb8a09d6c --- /dev/null +++ b/ansible/roles/download_drivers/tasks/i40evf.yml @@ -0,0 +1,36 @@ +# Copyright (c) 2018 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. +--- +- name: Directory to store i40evf driver + file: + path: "{{ i40evf_dest }}" + state: directory + +- name: Fetch i40evf driver + get_url: + url: "{{ i40evf_url }}" + dest: "{{ i40evf_dest }}/{{ i40evf_gzfile }}" + validate_certs: False + checksum: "{{ i40evf_checksum[i40evf_version] }}" + +- name: Unarchive the i40evf file + unarchive: + src: "{{ i40evf_dest }}/{{ i40evf_gzfile }}" + dest: "{{ i40evf_dest }}" + copy: no + +- name: Cleanup the archive to save space + file: + path: "{{ i40evf_dest }}/{{ i40evf_gzfile }}" + state: absent diff --git a/ansible/roles/download_drivers/tasks/main.yml b/ansible/roles/download_drivers/tasks/main.yml new file mode 100644 index 000000000..b7c1e0f1f --- /dev/null +++ b/ansible/roles/download_drivers/tasks/main.yml @@ -0,0 +1,15 @@ +# Copyright (c) 2018 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. +--- +- include: i40evf.yml diff --git a/ansible/roles/enable_iommu_on_boot/tasks/main.yml b/ansible/roles/enable_iommu_on_boot/tasks/main.yml new file mode 100644 index 000000000..1b98a50b1 --- /dev/null +++ b/ansible/roles/enable_iommu_on_boot/tasks/main.yml @@ -0,0 +1,72 @@ +# 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. +--- +- name: Set iommu_boot_params for Intel + set_fact: + iommu_boot_params: ' intel_iommu=on iommu=pt' + when: hostvars[inventory_hostname]['ansible_system_vendor'] == "Intel Corporation" + +- name: Set iommu_boot_params for AMD + set_fact: + iommu_boot_params: ' amd_iommu=on iommu=pt' + when: hostvars[inventory_hostname]['ansible_system_vendor'] == "AuthenticAMD" + +- name: Set facts for this role + set_fact: + hugepages_help_string: ' # added by hugepages role' + iommu_help_string: ', added by iommu role' + hugepages_params: " default_hugepagesz=1G hugepagesz=1G hugepages=8" + iommu_original_kernel_params: 'GRUB_CMDLINE_LINUX="\$GRUB_CMDLINE_LINUX{{ hugepages_params }}' + iommu_enabled_kernel_params: '{{ iommu_original_kernel_params }}{{ iommu_boot_params }}"' + iommu_enabled_kernel_params_with_help: '{{ iommu_original_kernel_params }}{{ iommu_boot_params }}"{{ hugepages_help_string }}{{ iommu_help_string }}' + +- name: check if iommu is set by this role in /etc/default/grub + lineinfile: + path: /etc/default/grub + line: '{{ iommu_enabled_kernel_params_with_help }}' + #changed_when: no + check_mode: yes + register: is_mine_iommu_etc_grub + ignore_errors: True + +- name: check if iommu is set by someone else + command: "grep -o 'iommu' /etc/default/grub" + register: is_iommu + ignore_errors: True + +- fail: + msg: "Iommu already set by someone else" + when: is_mine_iommu_etc_grub.changed == false and is_iommu.stdout != "" + +- name: 'Configure iommu in /etc/default/grub' +# and /boot/grub/grub.cfg(when: ansible_distribution == "Ubuntu")' + lineinfile: + path: /etc/default/grub + regexp: '({{ iommu_original_kernel_params }})"{{ hugepages_help_string }}' + line: '\1{{ iommu_boot_params }}"{{ hugepages_help_string }}{{ iommu_help_string }}' + backrefs: yes + when: is_mine_iommu_etc_grub.changed == true + +- name: find boot grub.cfg + find: + paths: /boot + file_type: file + patterns: 'grub*.cfg' + recurse: yes + register: grub_files + +- include: manual_modify_grub.yml + # only tested on Ubuntu, kernel line is probably different on other distros + with_items: "{{ grub_files.files }}" + when: ansible_distribution == "Ubuntu" diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml b/ansible/roles/enable_iommu_on_boot/tasks/manual_modify_grub.yml index 73fea8122..6760c3f9d 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml +++ b/ansible/roles/enable_iommu_on_boot/tasks/manual_modify_grub.yml @@ -11,34 +11,24 @@ # 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/http_tests/FileSize-1K_Requests-1M_Concurrency-100.yaml - topology: ../../acl-tg-topology-http.yaml - nodes: - vnf__0: vnf.yardstick - tg__0: trafficgen_1.yardstick - tg__1: trafficgen_2.yardstick - options: - acl: - rules: ../../acl_rules.yaml - cfg: "../../acl_config" - script: "../../acl_script" +- name: check if iommu is set by this role in /boot grub.cfg files + lineinfile: + path: "{{ item.path }}" + regexp: '{{ hugepages_params }}{{ iommu_boot_params }}' + line: '' + #changed_when: no + check_mode: yes + register: is_mine_iommu_boot_grub + ignore_errors: True - runner: - type: Duration - duration: 2 +- name: added iommu to grub manually because we can't run update-grub in chroot + replace: + path: "{{ item.path }}" + regexp: '(.*linux\s+/boot/vmlinuz.*)$' + replace: '\1{{ iommu_boot_params }}' + when: is_mine_iommu_boot_grub.msg != "line replaced" -context: - type: Node-ovs - name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml +- debug: var=ansible_kernel diff --git a/ansible/roles/enable_iommu_on_boot/vars/main.yml b/ansible/roles/enable_iommu_on_boot/vars/main.yml new file mode 100644 index 000000000..1b642dcb5 --- /dev/null +++ b/ansible/roles/enable_iommu_on_boot/vars/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2017 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +--- +update_grub: + Debian: "update-grub2" + RedHat: "grub2-mkconfig -o /boot/grub2/grub.cfg" diff --git a/ansible/roles/infra_check_requirements/tasks/main.yml b/ansible/roles/infra_check_requirements/tasks/main.yml new file mode 100644 index 000000000..8d05bbdb7 --- /dev/null +++ b/ansible/roles/infra_check_requirements/tasks/main.yml @@ -0,0 +1,43 @@ +# Copyright (c) 2018 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. +--- +- name: Include + include_vars: + file: "{{rs_file}}" + name: infra_deploy_vars + +- name: Store total CPU, RAM, Disk requested resources + set_fact: + vcpu_t: "{{item.vcpus|int + vcpu_t|int}}" + vram_t: "{{item.ram|int + vram_t|int}}" + disk_t: "{{item.disk|int + disk_t|int}}" + with_items: "{{infra_deploy_vars.nodes}}" + +- name: Fail if not enough RAM + fail: + msg: "Failed, not enough RAM, required: {{ vram_t }}, available {{ ansible_memory_mb.nocache.free }}" + when: ansible_memory_mb.nocache.free < vram_t|int + +- name: Fail if not enough CPU + fail: + msg: "Failed, not enough CPU, required: {{ vcpu_t }}, available {{ ansible_processor_vcpus }}" + when: ansible_processor_vcpus < vcpu_t|int + + +- name: Fail if not enough Disk space + set_fact: + disk_avail: "{% for mount in ansible_mounts if mount.mount == '/' %}{{ (mount.size_available/1024/1024)|int }}{% endfor %}" +- fail: + msg: "Failed, not enough disk space, required {{ disk_t }}, available: {{ disk_avail }}" + when: disk_avail|int < disk_t|int diff --git a/ansible/roles/infra_check_requirements/vars/main.yml b/ansible/roles/infra_check_requirements/vars/main.yml new file mode 100644 index 000000000..219c33875 --- /dev/null +++ b/ansible/roles/infra_check_requirements/vars/main.yml @@ -0,0 +1,17 @@ +# Copyright (c) 2018 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. +--- +vcpu_t: 0 +vram_t: 0 +disk_t: 0 diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml new file mode 100644 index 000000000..314ee30af --- /dev/null +++ b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml @@ -0,0 +1,48 @@ +# Copyright (c) 2017-2018 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. +--- +- name: Destroy old networks created by virt + virt_net: + name: "{{ network_item.name }}" + command: destroy + when: network_item.name in virt_nets.list_nets + +# Ignoring erros as network can be created without being defined. +# This can happen if a user manually creates a network using the virsh command. +# If the network is not defined the undefine code will throw an error. +- name: Undefine old networks defined by virt + virt_net: + name: "{{ network_item.name }}" + command: undefine + when: network_item.name in virt_nets.list_nets + ignore_errors: yes + +- name: Check if "ovs-vsctl" command is present + command: which ovs-vsctl + register: ovs_vsctl_present + ignore_errors: yes + +- name: Destroy OVS bridge if it exists + command: ovs-vsctl --if-exists -- del-br "{{ network_item.name }}" + when: ovs_vsctl_present.rc == 0 + +- name: Check if linux bridge is present + stat: path="{{ '/sys/class/net/'+network_item.name+'/brif/' }}" + register: check_linux_bridge + +- name: Remove linux bridge if it exists + shell: | + ifconfig "{{ network_item.name }}" down + brctl delbr "{{ network_item.name }}" + when: check_linux_bridge.stat.exists diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml new file mode 100644 index 000000000..5595cd501 --- /dev/null +++ b/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml @@ -0,0 +1,47 @@ +# Copyright (c) 2017-2018 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. +--- +- name: Include + include_vars: + file: "{{ rs_file }}" + name: infra_deploy_vars + +- name: List virt-nets + virt_net: command=list_nets + register: virt_nets + +- name: List VMs + virt: command=list_vms + register: virt_vms + +- name: Destroy old VMs + virt: + command: destroy + name: "{{ item.hostname }}" + when: item.hostname in virt_vms.list_vms + with_items: "{{ infra_deploy_vars.nodes }}" + +- name: Undefine old VMs + virt: + command: undefine + name: "{{ item.hostname }}" + when: item.hostname in virt_vms.list_vms + with_items: "{{ infra_deploy_vars.nodes }}" + +- name: Delete old networks + include_tasks: delete_network.yml + extra_vars: "{{ virt_nets }}" + loop_control: + loop_var: network_item + with_items: "{{ infra_deploy_vars.networks }}" diff --git a/ansible/roles/install_drivers/tasks/Debian.yml b/ansible/roles/install_drivers/tasks/Debian.yml new file mode 100755 index 000000000..27f6b74cc --- /dev/null +++ b/ansible/roles/install_drivers/tasks/Debian.yml @@ -0,0 +1,16 @@ +# Copyright (c) 2018 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. +--- +- name: Install kernel headers + action: "{{ ansible_pkg_mgr }} name=linux-headers-{{ chroot_kernel }} state=present" diff --git a/ansible/roles/install_drivers/tasks/RedHat.yml b/ansible/roles/install_drivers/tasks/RedHat.yml new file mode 100644 index 000000000..d2e2a3768 --- /dev/null +++ b/ansible/roles/install_drivers/tasks/RedHat.yml @@ -0,0 +1,16 @@ +# Copyright (c) 2018 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. +--- +- name: Install kernel headers + action: "{{ ansible_pkg_mgr }} name=kernel-headers-{{ chroot_kernel }} state=present" diff --git a/ansible/roles/install_drivers/tasks/i40evf.yml b/ansible/roles/install_drivers/tasks/i40evf.yml new file mode 100644 index 000000000..1cd95ceb0 --- /dev/null +++ b/ansible/roles/install_drivers/tasks/i40evf.yml @@ -0,0 +1,31 @@ +# Copyright (c) 2018 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. +--- +- name: Make i40evf + make: + chdir: "{{ i40evf_path }}/src" + params: + BUILD_KERNEL: "{{ chroot_kernel }}" + +- name: Make i40evf install + make: + chdir: "{{ i40evf_path }}/src" + target: install + params: + BUILD_KERNEL: "{{ chroot_kernel }}" + +- name: Configure i40evf to load on boot + copy: + content: i40evf + dest: /etc/modules-load.d/i40evf.conf diff --git a/ansible/roles/install_drivers/tasks/main.yml b/ansible/roles/install_drivers/tasks/main.yml new file mode 100644 index 000000000..72a432e54 --- /dev/null +++ b/ansible/roles/install_drivers/tasks/main.yml @@ -0,0 +1,28 @@ +# Copyright (c) 2018 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. +--- +- name: Find kernel for image, (including chroot) + find_kernel: + kernel: "{{ ansible_kernel }}" + register: found_kernel + +# Do this before installing kernel headers +- name: Set chroot_kernel to be the kernel we found + set_fact: + chroot_kernel: "{{ found_kernel.kernel }}" + +- include: "{{ ansible_os_family }}.yml" + +# Install drivers +- include: i40evf.yml diff --git a/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml b/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml index dff7f976a..85afa2a30 100644 --- a/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml +++ b/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml @@ -62,3 +62,5 @@ - install_pmu_tools - download_collectd - install_collectd + - download_drivers + - install_drivers diff --git a/docker/Dockerfile b/docker/Dockerfile index 2ee5b4c06..ddd8dfaf8 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -26,7 +26,7 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \ RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean RUN easy_install -U setuptools==30.0.0 -RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 +RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 RUN mkdir -p ${REPOS_DIR} diff --git a/docs/testing/user/userguide/15-list-of-tcs.rst b/docs/testing/user/userguide/15-list-of-tcs.rst index b62bf6390..47526cdda 100644 --- a/docs/testing/user/userguide/15-list-of-tcs.rst +++ b/docs/testing/user/userguide/15-list-of-tcs.rst @@ -80,6 +80,9 @@ H A opnfv_yardstick_tc052.rst opnfv_yardstick_tc053.rst opnfv_yardstick_tc054.rst + opnfv_yardstick_tc056.rst + opnfv_yardstick_tc057.rst + opnfv_yardstick_tc058.rst IPv6 ---- diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc042.rst b/docs/testing/user/userguide/opnfv_yardstick_tc042.rst index 8660d9297..a0c487c7b 100644 --- a/docs/testing/user/userguide/opnfv_yardstick_tc042.rst +++ b/docs/testing/user/userguide/opnfv_yardstick_tc042.rst @@ -4,7 +4,7 @@ .. (c) OPNFV, ZTE and others. *************************************** -Yardstick Test Case Description TC0042 +Yardstick Test Case Description TC042 *************************************** .. _DPDK: http://dpdk.org/doc/guides/index.html diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc056.rst b/docs/testing/user/userguide/opnfv_yardstick_tc056.rst index 01aa99ac2..e6e06df57 100644 --- a/docs/testing/user/userguide/opnfv_yardstick_tc056.rst +++ b/docs/testing/user/userguide/opnfv_yardstick_tc056.rst @@ -98,7 +98,7 @@ Yardstick Test Case Description TC056 | | | +--------------+--------------------------------------------------------------+ |configuration | This test case needs two configuration files: | -| | 1) test case file:opnfv_yardstick_tc056.yaml | +| | 1) test case file: opnfv_yardstick_tc056.yaml | | | -Attackers: see above "attackers" description | | | -waiting_time: which is the time (seconds) from the process | | | being killed to stoping monitors the monitors | diff --git a/etc/infra/infra_deploy.yaml.sample b/etc/infra/infra_deploy.yaml.sample new file mode 100644 index 000000000..df682ac3b --- /dev/null +++ b/etc/infra/infra_deploy.yaml.sample @@ -0,0 +1,34 @@ +nodes: + - name: Yardstick VM + hostname: yardstickvm + interfaces: + - network: management + ip: 192.168.1.10 + netmask: 255.255.255.0 + user: ubuntu + pasword: password + image: /tmp/image1.qcow + disk: 50000 + ram: 8192 + vcpus: 4 + + - name: Controller_Compute VM + openstack_node: controller_compute + hostname: controller_compute + interfaces: + - network: management + ip: 192.168.1.20 + netmask: 255.255.255.0 + - network: traffic + ip: 192.20.1.20 + netmask: 255.255.255.0 + user: ubuntu + pasword: password + image: /tmp/image_2.qcow + disk: 40000 + ram: 32768 + vcpus: 4 + +networks: + - name: management + host_ip: 192.168.1.1 # not mandatory diff --git a/etc/yardstick/nodes/fuel_baremetal/pod.yaml b/etc/yardstick/nodes/fuel_baremetal/pod.yaml index acdb44741..5ce555293 100644 --- a/etc/yardstick/nodes/fuel_baremetal/pod.yaml +++ b/etc/yardstick/nodes/fuel_baremetal/pod.yaml @@ -23,29 +23,29 @@ nodes: name: node1 role: Controller ip: ip1 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node2 role: Controller ip: ip2 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node3 role: Controller ip: ip3 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node4 role: Compute ip: ip4 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile - name: node5 role: Compute ip: ip5 - user: root - key_filename: /root/.ssh/id_rsa + user: node_username + key_filename: node_keyfile diff --git a/nsb_setup.sh b/nsb_setup.sh index a983f4de7..4a8e4db93 100755 --- a/nsb_setup.sh +++ b/nsb_setup.sh @@ -42,6 +42,16 @@ proxy_env: https_proxy: ${https_proxy} no_proxy: ${no_proxy} EOF + + mkdir -p /etc/systemd/system/docker.service.d + cat <<EOF > /etc/systemd/system/docker.service.d/http-proxy.conf +--- +[Service] +Environment="HTTP_PROXY=${http_proxy}" "HTTPS_PROXY=${https_proxy}" "NO_PROXY=${no_proxy}" +EOF + + systemctl daemon-reload + systemctl restart docker fi apt-get update > /dev/null 2>&1 @@ -59,6 +69,6 @@ ANSIBLE_SCRIPTS="ansible" cd ${ANSIBLE_SCRIPTS} &&\ ansible-playbook \ - -e img_modify_playbook='ubuntu_server_cloudimg_modify_samplevnfs.yml' \ + -e img_property="nsb" \ -e YARD_IMG_ARCH='amd64' ${extra_args}\ -i yardstick-install-inventory.ini nsb_setup.yml diff --git a/samples/vnf_samples/nsut/firewall/firewall-tg-topology-4port.yaml b/samples/vnf_samples/nsut/firewall/firewall-tg-topology-4port.yaml new file mode 100644 index 000000000..105f85d99 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall-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/firewall_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/firewall/firewall-tg-topology.yaml b/samples/vnf_samples/nsut/firewall/firewall-tg-topology.yaml new file mode 100644 index 000000000..b93137be5 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall-tg-topology.yaml @@ -0,0 +1,50 @@ +# 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: 2node-topology + name: 2node-topology + short-name: 2node-topology + description: 2node-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/firewall_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 diff --git a/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia.yaml b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia.yaml new file mode 100644 index 000000000..9913a0588 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia.yaml @@ -0,0 +1,50 @@ +# 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: vFW + name: vFW + short-name: vFW + description: scenario with vFW VNF + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/firewall_vnf.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: '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 diff --git a/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia_4port.yaml b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia_4port.yaml new file mode 100644 index 000000000..411c63d8a --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixia_4port.yaml @@ -0,0 +1,72 @@ +# 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: vFW + name: vFW + short-name: vFW + description: scenario with vFW VNF + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/ixia_rfc2544_tpl.yaml + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/firewall_vnf.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: '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/firewall/firewall_vnf_topology_ixload.yaml b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixload.yaml new file mode 100644 index 000000000..2ccf54bf1 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixload.yaml @@ -0,0 +1,50 @@ +# 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: VFW + name: VFW + short-name: VFW + description: scenario with HTTP and vFW VNF + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/tg_ixload.yaml + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/firewall_vnf.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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__0 # VNF + + - 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 # VFW VNF diff --git a/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixload_4port.yaml b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixload_4port.yaml new file mode 100644 index 000000000..be90f5a1f --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/firewall_vnf_topology_ixload_4port.yaml @@ -0,0 +1,72 @@ +# 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: VFW + name: VFW + short-name: VFW + description: scenario with HTTP and vFW VNF + constituent-vnfd: + - member-vnf-index: '1' + vnfd-id-ref: tg__0 + VNF model: ../../vnf_descriptors/tg_ixload.yaml + - member-vnf-index: '2' + vnfd-id-ref: vnf__0 + VNF model: ../../vnf_descriptors/firewall_vnf.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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe0 + vnfd-id-ref: vnf__0 # VNF + + - 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe1 + vnfd-id-ref: tg__0 # VFW VNF + + - 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 # HTTP Client + - member-vnf-index-ref: '2' + vnfd-connection-point-ref: xe2 + vnfd-id-ref: vnf__0 # VNF + + - 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 # HTTP Server + - member-vnf-index-ref: '1' + vnfd-connection-point-ref: xe3 + vnfd-id-ref: tg__0 # VFW VNF diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS.yaml new file mode 100644 index 000000000..ddad56c9c --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CPS-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS_4port.yaml new file mode 100644 index 000000000..ed27983f3 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_CPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CPS-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency.yaml new file mode 100644 index 000000000..20b26a984 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CC-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency_4port.yaml new file mode 100644 index 000000000..dd6040ecf --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_Concurrency_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CC-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS.yaml new file mode 100644 index 000000000..13ba807d9 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPS-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS_4port.yaml new file mode 100644 index 000000000..aa95e8bc5 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPS-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT.yaml new file mode 100644 index 000000000..ab1808696 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPUT-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT_4port.yaml new file mode 100644 index 000000000..d064ac4cc --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1024k_Requests-1M_TPUT_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1024k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPUT-1024K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_CPS.yaml index d51b42f84..dba9bd7b9 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_CPS.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Intel Corporation +# 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. @@ -16,30 +16,28 @@ schema: yardstick:task:0.1 scenarios: - type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml + traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml nodes: tg__0: trafficgen_1.yardstick vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_voice.yaml" + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CPS-1B.rxf # Need vlan update context: - type: Node-ovs + type: Node name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_CPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_CPS_4port.yaml new file mode 100644 index 000000000..2417346ff --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_CPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CPS-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_Concurrency.yaml index 37da8e6c7..1c710b0ea 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_Concurrency.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Intel Corporation +# 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. @@ -16,30 +16,28 @@ schema: yardstick:task:0.1 scenarios: - type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml + traffic_profile: "../../traffic_profiles/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml nodes: tg__0: trafficgen_1.yardstick vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_video.yaml" + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CC-1B.rxf # Need vlan update context: - type: Node-ovs + type: Node name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_Concurrency_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_Concurrency_4port.yaml new file mode 100644 index 000000000..bc68d4c95 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_Concurrency_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CC-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS.yaml new file mode 100644 index 000000000..1c769c839 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPS-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS_4port.yaml new file mode 100644 index 000000000..68d5f068d --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPS-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT.yaml new file mode 100644 index 000000000..652f6f226 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPUT-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT_4port.yaml new file mode 100644 index 000000000..95c6c49b1 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_1b_Requests-1M_TPUT_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_1b-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPUT-1B.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS.yaml new file mode 100644 index 000000000..bb8062540 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CPS-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS_4port.yaml new file mode 100644 index 000000000..cdbabcc5b --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_CPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CPS-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency.yaml new file mode 100644 index 000000000..cbdf03711 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CC-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency_4port.yaml new file mode 100644 index 000000000..cab1254a6 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_Concurrency_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CC-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS.yaml new file mode 100644 index 000000000..7f3938598 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPS-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS_4port.yaml new file mode 100644 index 000000000..7fde53f6b --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPS-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT.yaml new file mode 100644 index 000000000..455679627 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPUT-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT_4port.yaml new file mode 100644 index 000000000..76c541ede --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_256k_Requests-1M_TPUT_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_256k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPUT-256K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS.yaml new file mode 100644 index 000000000..c6ff4f4fc --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CPS-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS_4port.yaml new file mode 100644 index 000000000..7e0b67494 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_CPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CPS-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_Concurrency.yaml index 0ca0005b2..bd7223742 100644 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_Concurrency.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Intel Corporation +# 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. @@ -16,30 +16,28 @@ schema: yardstick:task:0.1 scenarios: - type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml + traffic_profile: "../../traffic_profiles/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml nodes: tg__0: trafficgen_1.yardstick vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_storage.yaml" + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CC-4K.rxf # Need vlan update context: - type: Node-ovs + type: Node name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_Concurrency_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_Concurrency_4port.yaml new file mode 100644 index 000000000..a66b820ca --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_Concurrency_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CC-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS.yaml new file mode 100644 index 000000000..9e32e8f40 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPS-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS_4port.yaml new file mode 100644 index 000000000..49e55e081 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPS-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT.yaml new file mode 100644 index 000000000..6d2fa5477 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPUT-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT_4port.yaml new file mode 100644 index 000000000..54191dedc --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_4k_Requests-1M_TPUT_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_4k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPUT-4K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS.yaml new file mode 100644 index 000000000..5a1e30fac --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CPS-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS_4port.yaml new file mode 100644 index 000000000..194eb59b5 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_CPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CPS-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency.yaml new file mode 100644 index 000000000..fe4e7f1ab --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-CC-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency_4port.yaml new file mode 100644 index 000000000..ed9a777bd --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_Concurrency_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-CC-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS.yaml new file mode 100644 index 000000000..f6e014d65 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPS-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS_4port.yaml new file mode 100644 index 000000000..6eee4bc4d --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPS_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPS-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT.yaml new file mode 100644 index 000000000..db9b6a68e --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + traffic_type: 4 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + 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 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_2Ports-TPUT-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT_4port.yaml new file mode 100644 index 000000000..2d70c9164 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_http_ixload_64k_Requests-1M_TPUT_4port.yaml @@ -0,0 +1,43 @@ +# 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/http_tests/HTTP_64k-requests_1M_concurrency.yaml" + topology: firewall_vnf_topology_ixload_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {64B: 100} + public: {64B: 100} + 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} + nfvi_enable: True + runner: + type: Duration + duration: 2 + ixia_profile: ../../traffic_profiles/vfw/HTTP-vFW_IPv4_4Ports-TPUT-64K.rxf # Need vlan update +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml index 1fe2ed943..a2595f62a 100644 --- a/samples/vnf_samples/nsut/prox/baremetal/throughput/tc_ipv4_1flow_64B_packetsize.yaml +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1flow_64B_trex.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Intel Corporation +# 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. @@ -16,21 +16,30 @@ schema: yardstick:task:0.1 scenarios: - type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: "../../prox-tg-topology.yaml" + traffic_profile: ../../traffic_profiles/ipv4_throughput.yaml + topology: firewall-tg-topology.yaml nodes: tg__0: trafficgen_1.yardstick vnf__0: vnf.yardstick - tc_options: + options: + framesize: + private: {64B: 100} + public: {64B: 100} + flow: + src_ip: + - '152.16.100.181' + dst_ip: + - '152.16.40.181' + count: 1 + traffic_type: 4 rfc2544: - allowed_drop_rate: 0.8 - 1 + allowed_drop_rate: 0.0001 - 0.0001 + vnf__0: + nfvi_enable: True runner: - type: Duration - duration: 400 + type: Iteration + iterations: 2 interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_voice.yaml" context: type: Node name: yardstick diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml new file mode 100644 index 000000000..b9235eeec --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml @@ -0,0 +1,48 @@ +# 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: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {1518B: 100} + public: {1518B: 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 + 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 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_1518B.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia_4port.yaml new file mode 100644 index 000000000..eb5ae3ebb --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_1518B_ixia_4port.yaml @@ -0,0 +1,50 @@ +# 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. +# vfw_ipv4_profile_1flows.ixncfg + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" + topology: firewall_vnf_topology_ixia_4port.yaml + nodes: + tg__0: trafficgen_1.yardstick + vnf__0: vnf.yardstick + options: + framesize: + private: {1518B: 100} + public: {1518B: 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} + nfvi_enable: True + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_muttiport_1518B.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia_4port.yaml +#/etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml new file mode 100644 index 000000000..7f43ed2ed --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -0,0 +1,48 @@ +# 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: firewall_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 + 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 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_64B.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_4port.yaml b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_4port.yaml new file mode 100644 index 000000000..8754f4d24 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia_4port.yaml @@ -0,0 +1,50 @@ +# 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. +# vfw_ipv4_profile_1flows.ixncfg + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: "../../traffic_profiles/ixia_ipv4_latency.yaml" + topology: firewall_vnf_topology_ixia_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} + nfvi_enable: True + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_muttiport_64B.ixncfg +context: + type: Node + name: yardstick + nfvi_type: baremetal + file: /etc/yardstick/nodes/pod_ixia_4port.yaml +#/etc/yardstick/nodes/pod_ixia.yaml diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1024B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1024B_ixia.yaml new file mode 100644 index 000000000..fa302d5d7 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1024B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {1024B: 100} + public: {1024B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_1024B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1280B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1280B_ixia.yaml new file mode 100644 index 000000000..97b19ad48 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1280B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {1280B: 100} + public: {1280B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_1280B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_128B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_128B_ixia.yaml new file mode 100644 index 000000000..4cab0f2d9 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_128B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {128B: 100} + public: {128B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_128B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml new file mode 100644 index 000000000..fd30946f9 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_1518B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {1518B: 100} + public: {1518B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_1518B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_256B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_256B_ixia.yaml new file mode 100644 index 000000000..63150af13 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_256B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {256B: 100} + public: {256B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_256B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_512B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_512B_ixia.yaml new file mode 100644 index 000000000..9482a394e --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_512B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + vnf__0: vnf.yardstick + options: + framesize: + private: {512B: 100} + public: {512B: 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_512B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml new file mode 100644 index 000000000..42dfcc187 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml @@ -0,0 +1,82 @@ +# 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. + +--- +schema: yardstick:task:0.1 +scenarios: +- type: NSPerf + traffic_profile: ../../traffic_profiles/ixia_ipv4_latency.yaml + topology: firewall_vnf_topology_ixia.yaml + nodes: + tg__0: trafficgen_1.yardstick1 + 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 + ixia_profile: ../../traffic_profiles/vfw/vfw_ipv4_profile_1flows_64B.ixncfg +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: yardstick1 + type: Node + file: ixia.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + 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: uplink_0 + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False diff --git a/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml new file mode 100644 index 000000000..fec585190 --- /dev/null +++ b/samples/vnf_samples/nsut/firewall/tc_heat_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -0,0 +1,79 @@ +# 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.yaml + topology: firewall-tg-topology.yaml + nodes: + tg__0: trafficgen_1.baremetal + 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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: baremetal + type: Node + file: trex-baremetal.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + networks: + mgmt: + cidr: '10.0.1.0/24' + xe0: + cidr: '10.0.2.0/24' + gateway_ip: 'null' + provider: true + physical_network: phystenant1 + port_security_enabled: False + xe1: + cidr: '10.0.3.0/24' + gateway_ip: 'null' + provider: true + physical_network: phystenant2 + port_security_enabled: False 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 deleted file mode 100644 index cbe3e97ae..000000000 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -schema: yardstick:task:0.1 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_storage.yaml" -context: - type: Node-ovs - name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml 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 deleted file mode 100644 index 707b46e7f..000000000 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -schema: yardstick:task:0.1 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_voice.yaml" -context: - type: Node-ovs - name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml 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 deleted file mode 100644 index b1003df3d..000000000 --- a/samples/vnf_samples/nsut/prox/ovs-dpdk/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - ---- -schema: yardstick:task:0.1 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_video.yaml" -context: - type: Node-ovs - name: yardstick - nfvi_type: ovs - vm_deploy: True - file: /etc/yardstick/nodes/pod_ovs.yaml diff --git a/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml b/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml index 10902a7b8..f59146c0b 100644 --- a/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-1.yaml @@ -21,10 +21,10 @@ nsd:nsd-catalog: constituent-vnfd: - member-vnf-index: '1' vnfd-id-ref: tg__0 - VNF model: ../../vnf_descriptors/tg_prox_tpl-1.yaml + VNF model: ../../vnf_descriptors/tg_prox_tpl.yaml - member-vnf-index: '2' vnfd-id-ref: vnf__0 - VNF model: ../../vnf_descriptors/prox_vnf-1.yaml + VNF model: ../../vnf_descriptors/prox_vnf.yaml vld: - id: uplink_0 name: tg__0 to vnf__0 link 1 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 11eed52fc..63d0acc91 100644 --- a/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-2.yaml @@ -21,10 +21,10 @@ nsd:nsd-catalog: constituent-vnfd: - member-vnf-index: '1' vnfd-id-ref: tg__0 - VNF model: ../../vnf_descriptors/tg_prox_tpl-2.yaml + VNF model: ../../vnf_descriptors/tg_prox_tpl.yaml - member-vnf-index: '2' vnfd-id-ref: vnf__0 - VNF model: ../../vnf_descriptors/prox_vnf-2.yaml + VNF model: ../../vnf_descriptors/prox_vnf.yaml vld: - id: uplink_0 name: tg__0 to vnf__0 link 1 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 eda239e3b..b4b003680 100644 --- a/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml +++ b/samples/vnf_samples/nsut/prox/prox-tg-topology-4.yaml @@ -21,10 +21,10 @@ nsd:nsd-catalog: constituent-vnfd: - member-vnf-index: '1' vnfd-id-ref: tg__0 - VNF model: ../../vnf_descriptors/tg_prox_tpl-4.yaml + VNF model: ../../vnf_descriptors/tg_prox_tpl.yaml - member-vnf-index: '2' vnfd-id-ref: vnf__0 - VNF model: ../../vnf_descriptors/prox_vnf-4.yaml + VNF model: ../../vnf_descriptors/prox_vnf.yaml vld: - id: uplink_0 name: tg__0 to vnf__0 link 1 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 deleted file mode 100644 index 15892b886..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/http_tests/tc_FileSize-1K_Requests-1M_Concurrency-100.yaml +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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" - -scenarios: -- - type: NSPerf - traffic_profile: ../../../../traffic_profiles/http_tests/FileSize-1K_Requests-1M_Concurrency-100.yaml - topology: ../../acl-tg-topology-http.yaml - - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - - options: - acl: - rules: ../../acl_rules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - - runner: - type: Duration - duration: 2 - -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index 1238ed41c..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_1518B_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_storage.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index 059a6502f..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_64B_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_voice.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index b6aa48a0e..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_1rule_1flow_IMIX_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_1rule.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_video.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index baa4b5997..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_1518B_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_storage.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index 590150602..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_64B_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_voice.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml 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 deleted file mode 100644 index 517dd9024..000000000 --- a/samples/vnf_samples/nsut/prox/sriov/throughput/tc_ipv4_worstcaserules_1flow_IMIX_packetsize.yaml +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# Copyright 2012 - 2016 Intel Corporation All Rights Reserved. -# deepak.s@intel.com -# 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 -scenarios: -- type: NSPerf - traffic_profile: "../../../../traffic_profiles/ipv4_throughput.yaml" - topology: ../../acl-tg-topology.yaml - nodes: - tg__0: trafficgen_1.yardstick - vnf__0: vnf.yardstick - tg__1: trafficgen_2.yardstick - tc_options: - rfc2544: - allowed_drop_rate: 0.8 - 1 - options: - acl: - rules: ../../acl_worstcaserules.yaml - cfg: "../../acl_config" - script: "../../acl_script" - runner: - type: Duration - duration: 400 - interval: 35 - traffic_options: - flow: "../../../../traffic_profiles/ipv4_1flow_Packets.yaml" - imix: "../../../../traffic_profiles/imix_video.yaml" -context: - type: Node-sriov - name: yardstick - nfvi_type: sriov - vm_deploy: True - file: /etc/yardstick/nodes/pod_sriov.yaml diff --git a/samples/vnf_samples/nsut/vfw/tc_heat_sriov_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml b/samples/vnf_samples/nsut/vfw/tc_heat_sriov_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml new file mode 100644 index 000000000..4be8e9b16 --- /dev/null +++ b/samples/vnf_samples/nsut/vfw/tc_heat_sriov_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml @@ -0,0 +1,88 @@ +# Copyright (c) 2016-2018 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: vfw-tg-topology.yaml + nodes: + tg__0: trafficgen_1.baremetal + vnf__0: vnf.yardstick + options: + framesize: + uplink: {64B: 100} + downlink: {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 + vnf__0: + rules: acl_1rule.yaml + vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1} + runner: + type: Iteration + iterations: 10 + interval: 35 +contexts: + # put node context first, so we don't HEAT deploy if node has errors + - name: baremetal + type: Node + file: trex-baremetal.yml + - name: yardstick + image: yardstick-samplevnfs + flavor: + vcpus: 10 + ram: 20480 + disk: 6 + extra_specs: + hw:cpu_sockets: 1 + hw:cpu_cores: 10 + hw:cpu_threads: 1 + user: ubuntu + placement_groups: + pgrp1: + policy: "availability" + servers: + vnf: + floating_ip: true + placement: "pgrp1" + network_ports: + mgmt: + - mgmt + uplink_0: + - xe0 + downlink_0: + - xe1 + networks: + mgmt: + cidr: '10.0.1.0/24' + uplink_0: + cidr: '10.0.2.0/24' + gateway_ip: 'null' + provider: "sriov" + physical_network: physnet1 + port_security_enabled: False + enable_dhcp: 'false' + downlink_0: + cidr: '10.0.3.0/24' + gateway_ip: 'null' + provider: "sriov" + physical_network: physnet2 + port_security_enabled: False + enable_dhcp: 'false' diff --git a/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml deleted file mode 100644 index 13c4e9db7..000000000 --- a/samples/vnf_samples/vnf_descriptors/prox_vnf-2.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -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-4.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml deleted file mode 100644 index 13c4e9db7..000000000 --- a/samples/vnf_samples/vnf_descriptors/prox_vnf-4.yaml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -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-1.yaml b/samples/vnf_samples/vnf_descriptors/prox_vnf.yaml index 13c4e9db7..13c4e9db7 100644 --- a/samples/vnf_samples/vnf_descriptors/prox_vnf-1.yaml +++ b/samples/vnf_samples/vnf_descriptors/prox_vnf.yaml diff --git a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml deleted file mode 100644 index 730143972..000000000 --- a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-1.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -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-4.yaml b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml deleted file mode 100644 index 20bd12ca2..000000000 --- a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-4.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (c) 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -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.yaml index 20bd12ca2..20bd12ca2 100644 --- a/samples/vnf_samples/vnf_descriptors/tg_prox_tpl-2.yaml +++ b/samples/vnf_samples/vnf_descriptors/tg_prox_tpl.yaml @@ -53,6 +53,7 @@ setup( 'yardstick=yardstick.main:main', 'yardstick-plot=yardstick.plot.plotter:main [plot]' ], + 'yardstick.scenario': [] }, scripts=[ 'tools/yardstick-img-modify', diff --git a/tests/ci/ansible_load_images.sh b/tests/ci/ansible_load_images.sh index 9a2d8ef18..6e08e1a78 100755 --- a/tests/ci/ansible_load_images.sh +++ b/tests/ci/ansible_load_images.sh @@ -21,7 +21,7 @@ ANSIBLE_SCRIPTS="${0%/*}/../../ansible" cd ${ANSIBLE_SCRIPTS} &&\ ansible-playbook \ - -e img_modify_playbook='ubuntu_server_cloudimg_modify.yml' \ + -e img_property="normal" \ -e target_os='Ubuntu' \ -e YARD_IMG_ARCH='amd64' \ -vvv -i inventory.ini load_images.yml diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh index 44e2694f7..262b74c09 100755 --- a/tests/ci/prepare_env.sh +++ b/tests/ci/prepare_env.sh @@ -14,6 +14,8 @@ : ${INSTALLER_TYPE:='unknown'} : ${NODE_NAME:='unknown'} : ${EXTERNAL_NETWORK:='admin_floating_net'} +: ${USER_NAME:='ubuntu'} +: ${SSH_KEY:='/root/.ssh/id_rsa'} # Extract network name from EXTERNAL_NETWORK # e.g. EXTERNAL_NETWORK='ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24' @@ -97,6 +99,9 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then node_line_num=($(grep -n node[1-5] $pod_yaml | awk -F: '{print $1}')) node_ID=0; + # update 'user' and 'key_filename' according to CI env + sed -i "s|node_username|${USER_NAME}|;s|node_keyfile|${SSH_KEY}|" $pod_yaml; + if [[ ${controller_ips[0]} ]]; then sed -i "${node_line_num[0]}s/node1/node$((++node_ID))/;s/ip1/${controller_ips[0]}/" $pod_yaml; fi diff --git a/tests/unit/benchmark/contexts/standalone/test_model.py b/tests/unit/benchmark/contexts/standalone/test_model.py index a8c54f193..6090356b6 100644 --- a/tests/unit/benchmark/contexts/standalone/test_model.py +++ b/tests/unit/benchmark/contexts/standalone/test_model.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # Copyright (c) 2016-2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,9 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Unittest for yardstick.benchmark.contexts.standalone.model - -from __future__ import absolute_import import copy import os import unittest @@ -24,9 +19,9 @@ import mock from xml.etree import ElementTree +from yardstick.benchmark.contexts.standalone.model import Libvirt from yardstick.benchmark.contexts.standalone import model from yardstick.network_services import utils -from yardstick.network_services.helpers import cpu XML_SAMPLE = """<?xml version="1.0"?> @@ -185,6 +180,8 @@ class ModelLibvirtTestCase(unittest.TestCase): *args): # NOTE(ralonsoh): this test doesn't cover function execution. This test # should also check mocked function calls. + cfg_file = 'test_config_file.cfg' + self.addCleanup(os.remove, cfg_file) result = [4] with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) @@ -193,7 +190,7 @@ class ModelLibvirtTestCase(unittest.TestCase): ssh.return_value = ssh_mock mock_create_snapshot_qemu.return_value = "0.img" - status = model.Libvirt.build_vm_xml(ssh_mock, {}, "test", "vm_0", 0) + status = model.Libvirt.build_vm_xml(ssh_mock, {}, cfg_file, 'vm_0', 0) self.assertEqual(status[0], result[0]) def test_update_interrupts_hugepages_perf(self): @@ -202,21 +199,23 @@ class ModelLibvirtTestCase(unittest.TestCase): ssh_mock.execute = \ mock.Mock(return_value=(0, "a", "")) ssh.return_value = ssh_mock - # NOTE(ralonsoh): this test doesn't cover function execution. This test - # should also check mocked function calls. - model.Libvirt.update_interrupts_hugepages_perf(ssh_mock) - - @mock.patch.object(cpu.CpuSysCores, 'get_core_socket') - def test_pin_vcpu_for_perf(self, mock_get_core_socket): - mock_get_core_socket.return_value = { - 'cores_per_socket': 1, - 'thread_per_core': 1, - '0': [1, 2] - } - # NOTE(ralonsoh): this test doesn't cover function execution. This - # function needs more tests. - model.Libvirt.pin_vcpu_for_perf(mock.Mock()) - + # NOTE(ralonsoh): 'update_interrupts_hugepages_perf' always return + # None, this check is trivial. + #status = Libvirt.update_interrupts_hugepages_perf(ssh_mock) + #self.assertIsNone(status) + Libvirt.update_interrupts_hugepages_perf(ssh_mock) + + @mock.patch("yardstick.benchmark.contexts.standalone.model.CpuSysCores") + @mock.patch.object(model.Libvirt, 'update_interrupts_hugepages_perf') + def test_pin_vcpu_for_perf(self, *args): + # NOTE(ralonsoh): test mocked methods/variables. + with mock.patch("yardstick.ssh.SSH") as ssh: + ssh_mock = mock.Mock(autospec=ssh.SSH) + ssh_mock.execute = \ + mock.Mock(return_value=(0, "a", "")) + ssh.return_value = ssh_mock + status = Libvirt.pin_vcpu_for_perf(ssh_mock, 4) + self.assertIsNotNone(status) class StandaloneContextHelperTestCase(unittest.TestCase): @@ -268,8 +267,7 @@ class StandaloneContextHelperTestCase(unittest.TestCase): def test_get_nic_details(self, mock_get_kernel_module): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(1, "i40e ixgbe", "")) + ssh_mock.execute = mock.Mock(return_value=(1, "i40e ixgbe", "")) ssh.return_value = ssh_mock mock_get_kernel_module.return_value = "i40e" # NOTE(ralonsoh): this test doesn't cover function execution. This test @@ -317,6 +315,7 @@ class StandaloneContextHelperTestCase(unittest.TestCase): @mock.patch('yardstick.ssh.SSH') def test_get_mgmt_ip(self, *args): + # NOTE(ralonsoh): test mocked methods/variables. with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = mock.Mock( @@ -330,6 +329,7 @@ class StandaloneContextHelperTestCase(unittest.TestCase): @mock.patch('yardstick.ssh.SSH') def test_get_mgmt_ip_no(self, *args): + # NOTE(ralonsoh): test mocked methods/variables. with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ diff --git a/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py b/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py index 5d1b0421c..e39ecf4f2 100644 --- a/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py +++ b/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py @@ -17,12 +17,9 @@ from __future__ import absolute_import import os import unittest -import errno import mock -from yardstick.common import constants as consts from yardstick.benchmark.contexts.standalone import ovs_dpdk -from yardstick.network_services.utils import PciAddress class OvsDpdkContextTestCase(unittest.TestCase): @@ -68,7 +65,7 @@ class OvsDpdkContextTestCase(unittest.TestCase): self.ovs_dpdk.helper = mock_helper self.ovs_dpdk.vnf_node = mock_server self.assertIsNone(self.ovs_dpdk.file_path) - self.assertEqual(self.ovs_dpdk.first_run, True) + self.assertTrue(self.ovs_dpdk.first_run) def test_init(self): self.ovs_dpdk.helper.parse_pod_file = mock.Mock(return_value=[{}, {}, {}]) @@ -149,12 +146,9 @@ class OvsDpdkContextTestCase(unittest.TestCase): self.assertRaises(Exception, self.ovs_dpdk.check_ovs_dpdk_env) @mock.patch('yardstick.ssh.SSH') - def test_deploy(self, mock_ssh): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "a", "")) - ssh.return_value = ssh_mock + def test_deploy(self, ssh_mock): + ssh_mock.execute.return_value = (0, "a", "") + self.ovs_dpdk.vm_deploy = False self.assertIsNone(self.ovs_dpdk.deploy()) @@ -168,22 +162,21 @@ class OvsDpdkContextTestCase(unittest.TestCase): self.ovs_dpdk.setup_ovs_bridge_add_flows = mock.Mock(return_value={}) self.ovs_dpdk.setup_ovs_dpdk_context = mock.Mock(return_value={}) self.ovs_dpdk.wait_for_vnfs_to_start = mock.Mock(return_value={}) + # TODO(elfoley): This test should check states/sideeffects instead of + # output. self.assertIsNone(self.ovs_dpdk.deploy()) - @mock.patch('yardstick.benchmark.contexts.standalone.ovs_dpdk.Libvirt') + @mock.patch('yardstick.benchmark.contexts.standalone.model.Libvirt') @mock.patch('yardstick.ssh.SSH') - def test_undeploy(self, mock_ssh, mock_libvirt): - with mock.patch("yardstick.ssh.SSH") as ssh: - ssh_mock = mock.Mock(autospec=ssh.SSH) - ssh_mock.execute = \ - mock.Mock(return_value=(0, "a", "")) - ssh.return_value = ssh_mock + def test_undeploy(self, ssh_mock, _): + ssh_mock.execute.return_value = (0, "a", "") + self.ovs_dpdk.vm_deploy = False self.assertIsNone(self.ovs_dpdk.undeploy()) self.ovs_dpdk.vm_deploy = True - self.ovs_dpdk.connection = ssh_mock self.ovs_dpdk.vm_names = ['vm_0', 'vm_1'] + self.ovs_dpdk.connection = ssh_mock self.ovs_dpdk.drivers = ['vm_0', 'vm_1'] self.ovs_dpdk.cleanup_ovs_dpdk_env = mock.Mock() self.ovs_dpdk.networks = self.NETWORKS @@ -326,8 +319,8 @@ class OvsDpdkContextTestCase(unittest.TestCase): self.ovs_dpdk.get_vf_datas = mock.Mock(return_value="") self.assertIsNone(self.ovs_dpdk.configure_nics_for_ovs_dpdk()) - @mock.patch('yardstick.benchmark.contexts.standalone.ovs_dpdk.Libvirt') - def test__enable_interfaces(self, mock_add_ovs_interface): + @mock.patch('yardstick.benchmark.contexts.standalone.model.Libvirt.add_ovs_interface') + def test__enable_interfaces(self, _): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ @@ -343,7 +336,7 @@ class OvsDpdkContextTestCase(unittest.TestCase): @mock.patch('yardstick.benchmark.contexts.standalone.ovs_dpdk.Libvirt') @mock.patch('yardstick.benchmark.contexts.standalone.model.Server') - def test_setup_ovs_dpdk_context(self, mock_server, mock_libvirt): + def test_setup_ovs_dpdk_context(self, _, mock_libvirt): with mock.patch("yardstick.ssh.SSH") as ssh: ssh_mock = mock.Mock(autospec=ssh.SSH) ssh_mock.execute = \ @@ -372,6 +365,6 @@ class OvsDpdkContextTestCase(unittest.TestCase): mock_libvirt.build_vm_xml = mock.Mock(return_value=[6, "00:00:00:00:00:01"]) self.ovs_dpdk._enable_interfaces = mock.Mock(return_value="") mock_libvirt.virsh_create_vm = mock.Mock(return_value="") - mock_libvirt.pin_vcpu_for_perf= mock.Mock(return_value="") + mock_libvirt.pin_vcpu_for_perf = mock.Mock(return_value="") self.ovs_dpdk.vnf_node.generate_vnf_instance = mock.Mock(return_value={}) self.assertIsNotNone(self.ovs_dpdk.setup_ovs_dpdk_context()) diff --git a/tests/unit/benchmark/contexts/standalone/test_sriov.py b/tests/unit/benchmark/contexts/standalone/test_sriov.py index 3ea673abc..7f11a7d59 100644 --- a/tests/unit/benchmark/contexts/standalone/test_sriov.py +++ b/tests/unit/benchmark/contexts/standalone/test_sriov.py @@ -70,7 +70,7 @@ class SriovContextTestCase(unittest.TestCase): self.sriov.helper = mock_helper self.sriov.vnf_node = mock_server self.assertIsNone(self.sriov.file_path) - self.assertEqual(self.sriov.first_run, True) + self.assertTrue(self.sriov.first_run) def test_init(self): self.sriov.helper.parse_pod_file = mock.Mock(return_value=[{}, {}, {}]) diff --git a/tests/unit/benchmark/scenarios/availability/test_monitor_command.py b/tests/unit/benchmark/scenarios/availability/test_monitor_command.py index 6a9b3b157..b84cef23c 100644 --- a/tests/unit/benchmark/scenarios/availability/test_monitor_command.py +++ b/tests/unit/benchmark/scenarios/availability/test_monitor_command.py @@ -19,30 +19,26 @@ import unittest from yardstick.benchmark.scenarios.availability.monitor import monitor_command -@mock.patch( - 'yardstick.benchmark.scenarios.availability.monitor.monitor_command' - '.subprocess') +@mock.patch('subprocess.check_output') class ExecuteShellTestCase(unittest.TestCase): - def test__fun_execute_shell_command_successful(self, mock_subprocess): + def test__fun_execute_shell_command_successful(self, mock_subprocess_check_output): cmd = "env" - mock_subprocess.check_output.return_value = (0, 'unittest') - exitcode, output = monitor_command._execute_shell_command(cmd) + mock_subprocess_check_output.return_value = (0, 'unittest') + exitcode, _ = monitor_command._execute_shell_command(cmd) self.assertEqual(exitcode, 0) @mock.patch('yardstick.benchmark.scenarios.availability.monitor.monitor_command.LOG') def test__fun_execute_shell_command_fail_cmd_exception(self, mock_log, - mock_subprocess): + mock_subprocess_check_output): cmd = "env" - mock_subprocess.check_output.side_effect = RuntimeError - exitcode, output = monitor_command._execute_shell_command(cmd) + mock_subprocess_check_output.side_effect = RuntimeError + exitcode, _ = monitor_command._execute_shell_command(cmd) self.assertEqual(exitcode, -1) mock_log.error.assert_called_once() -@mock.patch( - 'yardstick.benchmark.scenarios.availability.monitor.monitor_command' - '.subprocess') +@mock.patch('subprocess.check_output') class MonitorOpenstackCmdTestCase(unittest.TestCase): def setUp(self): @@ -59,24 +55,24 @@ class MonitorOpenstackCmdTestCase(unittest.TestCase): 'sla': {'max_outage_time': 5} } - def test__monitor_command_monitor_func_successful(self, mock_subprocess): + def test__monitor_command_monitor_func_successful(self, mock_subprocess_check_output): instance = monitor_command.MonitorOpenstackCmd(self.config, None, {"nova-api": 10}) instance.setup() - mock_subprocess.check_output.return_value = (0, 'unittest') + mock_subprocess_check_output.return_value = (0, 'unittest') ret = instance.monitor_func() - self.assertEqual(ret, True) + self.assertTrue(ret) instance._result = {"outage_time": 0} instance.verify_SLA() @mock.patch('yardstick.benchmark.scenarios.availability.monitor.monitor_command.LOG') - def test__monitor_command_monitor_func_failure(self, mock_log, mock_subprocess): - mock_subprocess.check_output.return_value = (1, 'unittest') + def test__monitor_command_monitor_func_failure(self, mock_log, mock_subprocess_check_output): + mock_subprocess_check_output.return_value = (1, 'unittest') instance = monitor_command.MonitorOpenstackCmd(self.config, None, {"nova-api": 10}) instance.setup() - mock_subprocess.check_output.side_effect = RuntimeError + mock_subprocess_check_output.side_effect = RuntimeError ret = instance.monitor_func() - self.assertEqual(ret, False) + self.assertFalse(ret) mock_log.error.assert_called_once() instance._result = {"outage_time": 10} instance.verify_SLA() @@ -84,12 +80,13 @@ class MonitorOpenstackCmdTestCase(unittest.TestCase): @mock.patch( 'yardstick.benchmark.scenarios.availability.monitor.monitor_command' '.ssh') - def test__monitor_command_ssh_monitor_successful(self, mock_ssh, - mock_subprocess): + def test__monitor_command_ssh_monitor_successful(self, mock_ssh, mock_subprocess_check_output): + mock_subprocess_check_output.return_value = (0, 'unittest') self.config["host"] = "node1" instance = monitor_command.MonitorOpenstackCmd( self.config, self.context, {"nova-api": 10}) instance.setup() mock_ssh.SSH.from_node().execute.return_value = (0, "0", '') ret = instance.monitor_func() + self.assertTrue(ret) diff --git a/tests/unit/benchmark/scenarios/availability/test_serviceha.py b/tests/unit/benchmark/scenarios/availability/test_serviceha.py index 4ae508958..97d534894 100644 --- a/tests/unit/benchmark/scenarios/availability/test_serviceha.py +++ b/tests/unit/benchmark/scenarios/availability/test_serviceha.py @@ -18,9 +18,6 @@ import unittest from yardstick.benchmark.scenarios.availability import serviceha -@mock.patch('yardstick.benchmark.scenarios.availability.serviceha.basemonitor') -@mock.patch( - 'yardstick.benchmark.scenarios.availability.serviceha.baseattacker') class ServicehaTestCase(unittest.TestCase): def setUp(self): @@ -51,27 +48,32 @@ class ServicehaTestCase(unittest.TestCase): sla = {"outage_time": 5} self.args = {"options": options, "sla": sla} - def test__serviceha_setup_run_successful(self, mock_attacker, + @mock.patch('yardstick.benchmark.scenarios.availability.serviceha.basemonitor') + @mock.patch( + 'yardstick.benchmark.scenarios.availability.serviceha.baseattacker') + def test__serviceha_setup_run_successful(self, _, mock_monitor): p = serviceha.ServiceHA(self.args, self.ctx) p.setup() - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) mock_monitor.MonitorMgr().verify_SLA.return_value = True ret = {} p.run(ret) p.teardown() -""" - def test__serviceha_run_sla_error(self, mock_attacker, mock_monitor): - p = serviceha.ServiceHA(self.args, self.ctx) p.setup() - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) - result = {} - result["outage_time"] = 10 - mock_monitor.Monitor().get_result.return_value = result +# def test__serviceha_run_sla_error(self, mock_attacker, mock_monitor): +# p = serviceha.ServiceHA(self.args, self.ctx) - ret = {} - self.assertRaises(AssertionError, p.run, ret) -""" +# p.setup() +# self.assertTrue(p.setup_done) +# +# result = {} +# result["outage_time"] = 10 +# mock_monitor.Monitor().get_result.return_value = result + +# ret = {} +# self.assertRaises(AssertionError, p.run, ret) diff --git a/tests/unit/benchmark/scenarios/availability/test_util.py b/tests/unit/benchmark/scenarios/availability/test_util.py index 0974f385a..548efe91b 100644 --- a/tests/unit/benchmark/scenarios/availability/test_util.py +++ b/tests/unit/benchmark/scenarios/availability/test_util.py @@ -16,36 +16,43 @@ import unittest from yardstick.benchmark.scenarios.availability import util -@mock.patch('yardstick.benchmark.scenarios.availability.util.subprocess') + class ExecuteShellTestCase(unittest.TestCase): def setUp(self): self.param_config = {'serviceName': '@serviceName', 'value': 1} self.intermediate_variables = {'@serviceName': 'nova-api'} self.std_output = '| id | 1 |' - self.cmd_config = {'cmd':'ls','param':'-a'} + self.cmd_config = {'cmd': 'ls', 'param': '-a'} + + self._mock_subprocess = mock.patch.object(util, 'subprocess') + self.mock_subprocess = self._mock_subprocess.start() + self.addCleanup(self._stop_mock) + + def _stop_mock(self): + self._mock_subprocess.stop() - def test_util_build_command_shell(self,mock_subprocess): + def test_util_build_command_shell(self): result = util.build_shell_command(self.param_config, True, self.intermediate_variables) - self.assertEqual("nova-api" in result, True) + self.assertIn("nova-api", result) - def test_read_stdout_item(self,mock_subprocess): - result = util.read_stdout_item(self.std_output,'id') - self.assertEquals('1',result) + def test_read_stdout_item(self): + result = util.read_stdout_item(self.std_output, 'id') + self.assertEqual('1', result) - def test_buildshellparams(self,mock_subprocess): - result = util.buildshellparams(self.cmd_config,True) - self.assertEquals('/bin/bash -s {0} {1}', result) + def test_buildshellparams(self): + result = util.buildshellparams(self.cmd_config, True) + self.assertEqual('/bin/bash -s {0} {1}', result) - def test__fun_execute_shell_command_successful(self, mock_subprocess): + def test__fun_execute_shell_command_successful(self): cmd = "env" - mock_subprocess.check_output.return_value = (0, 'unittest') - exitcode, output = util.execute_shell_command(cmd) + self.mock_subprocess.check_output.return_value = (0, 'unittest') + exitcode, _ = util.execute_shell_command(cmd) self.assertEqual(exitcode, 0) - def test__fun_execute_shell_command_fail_cmd_exception(self, mock_subprocess): + def test__fun_execute_shell_command_fail_cmd_exception(self): cmd = "env" - mock_subprocess.check_output.side_effect = RuntimeError - exitcode, output = util.execute_shell_command(cmd) + self.mock_subprocess.check_output.side_effect = RuntimeError + exitcode, _ = util.execute_shell_command(cmd) self.assertEqual(exitcode, -1) diff --git a/tests/unit/benchmark/scenarios/compute/test_cyclictest.py b/tests/unit/benchmark/scenarios/compute/test_cyclictest.py index dc52a80c7..51ffd2488 100644 --- a/tests/unit/benchmark/scenarios/compute/test_cyclictest.py +++ b/tests/unit/benchmark/scenarios/compute/test_cyclictest.py @@ -74,7 +74,7 @@ class CyclictestTestCase(unittest.TestCase): c.setup() self.assertIsNotNone(c.guest) self.assertIsNotNone(c.host) - self.assertEqual(c.setup_done, True) + self.assertTrue(c.setup_done) def test_cyclictest_successful_no_sla(self, mock_ssh): result = {} diff --git a/tests/unit/benchmark/scenarios/compute/test_qemumigrate.py b/tests/unit/benchmark/scenarios/compute/test_qemumigrate.py index 1f0ff3c29..fb55b809f 100644 --- a/tests/unit/benchmark/scenarios/compute/test_qemumigrate.py +++ b/tests/unit/benchmark/scenarios/compute/test_qemumigrate.py @@ -71,7 +71,7 @@ class QemuMigrateTestCase(unittest.TestCase): q.setup() self.assertIsNotNone(q.host) - self.assertEqual(q.setup_done, True) + self.assertTrue(q.setup_done) def test_qemu_migrate_successful_no_sla(self, mock_ssh): result = {} diff --git a/tests/unit/benchmark/scenarios/compute/test_unixbench.py b/tests/unit/benchmark/scenarios/compute/test_unixbench.py index 7d071e91c..fec355b45 100644 --- a/tests/unit/benchmark/scenarios/compute/test_unixbench.py +++ b/tests/unit/benchmark/scenarios/compute/test_unixbench.py @@ -40,7 +40,7 @@ class UnixbenchTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(u.client) - self.assertEqual(u.setup_done, True) + self.assertTrue(u.setup_done) def test_unixbench_successful_no_sla(self, mock_ssh): diff --git a/tests/unit/benchmark/scenarios/dummy/test_dummy.py b/tests/unit/benchmark/scenarios/dummy/test_dummy.py index 560675d09..bc5131806 100644 --- a/tests/unit/benchmark/scenarios/dummy/test_dummy.py +++ b/tests/unit/benchmark/scenarios/dummy/test_dummy.py @@ -24,11 +24,11 @@ class DummyTestCase(unittest.TestCase): self.assertIsNone(self.test_context.scenario_cfg) self.assertIsNone(self.test_context.context_cfg) - self.assertEqual(self.test_context.setup_done, False) + self.assertFalse(self.test_context.setup_done) def test_run(self): result = {} self.test_context.run(result) self.assertEqual(result["hello"], "yardstick") - self.assertEqual(self.test_context.setup_done, True) + self.assertTrue(self.test_context.setup_done) diff --git a/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py b/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py index bdf1e66e5..1dd461d41 100644 --- a/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py +++ b/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py @@ -14,7 +14,8 @@ from yardstick.benchmark.scenarios.lib.check_numa_info import CheckNumaInfo class CheckNumaInfoTestCase(unittest.TestCase): - @mock.patch('yardstick.benchmark.scenarios.lib.check_numa_info.CheckNumaInfo._check_vm2_status') + @mock.patch( + 'yardstick.benchmark.scenarios.lib.check_numa_info.CheckNumaInfo._check_vm2_status') def test_check_numa_info(self, mock_check_vm2): scenario_cfg = {'info1': {}, 'info2': {}} obj = CheckNumaInfo(scenario_cfg, {}) @@ -37,7 +38,7 @@ class CheckNumaInfoTestCase(unittest.TestCase): scenario_cfg = {'info1': info1, 'info2': info2} obj = CheckNumaInfo(scenario_cfg, {}) status = obj._check_vm2_status(info1, info2) - self.assertEqual(status, True) + self.assertTrue(status) def test_check_vm2_status_length_gt_1(self): info1 = { @@ -55,7 +56,7 @@ class CheckNumaInfoTestCase(unittest.TestCase): scenario_cfg = {'info1': info1, 'info2': info2} obj = CheckNumaInfo(scenario_cfg, {}) status = obj._check_vm2_status(info1, info2) - self.assertEqual(status, False) + self.assertFalse(status) def test_check_vm2_status_length_not_in_set(self): info1 = { @@ -73,7 +74,7 @@ class CheckNumaInfoTestCase(unittest.TestCase): scenario_cfg = {'info1': info1, 'info2': info2} obj = CheckNumaInfo(scenario_cfg, {}) status = obj._check_vm2_status(info1, info2) - self.assertEqual(status, False) + self.assertFalse(status) def main(): diff --git a/tests/unit/benchmark/scenarios/networking/test_netperf.py b/tests/unit/benchmark/scenarios/networking/test_netperf.py index d0f862fb5..d82a00931 100755 --- a/tests/unit/benchmark/scenarios/networking/test_netperf.py +++ b/tests/unit/benchmark/scenarios/networking/test_netperf.py @@ -48,7 +48,7 @@ class NetperfTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.server) self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_netperf_successful_no_sla(self, mock_ssh): diff --git a/tests/unit/benchmark/scenarios/networking/test_netperf_node.py b/tests/unit/benchmark/scenarios/networking/test_netperf_node.py index 62874cc44..8be9bb94d 100755 --- a/tests/unit/benchmark/scenarios/networking/test_netperf_node.py +++ b/tests/unit/benchmark/scenarios/networking/test_netperf_node.py @@ -48,7 +48,7 @@ class NetperfNodeTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.server) self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_netperf_node_successful_no_sla(self, mock_ssh): diff --git a/tests/unit/benchmark/scenarios/networking/test_nstat.py b/tests/unit/benchmark/scenarios/networking/test_nstat.py index fe44cfdf4..4b58e06c1 100644 --- a/tests/unit/benchmark/scenarios/networking/test_nstat.py +++ b/tests/unit/benchmark/scenarios/networking/test_nstat.py @@ -19,6 +19,7 @@ import mock from yardstick.benchmark.scenarios.networking import nstat + @mock.patch('yardstick.benchmark.scenarios.networking.nstat.ssh') class NstatTestCase(unittest.TestCase): @@ -38,7 +39,7 @@ class NstatTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(n.client) - self.assertEqual(n.setup_done, True) + self.assertTrue(n.setup_done) def test_nstat_successful_no_sla(self, mock_ssh): @@ -51,17 +52,17 @@ class NstatTestCase(unittest.TestCase): n = nstat.Nstat(args, self.ctx) result = {} - sample_output = '#kernel\nIpInReceives 1837 0.0\nIpInHdrErrors 0 0.0\nIpInAddrErrors 2 0.0\nIcmpInMsgs 319 0.0\nIcmpInErrors 0 0.0\nTcpInSegs 36 0.0\nTcpInErrs 0 0.0\nUdpInDatagrams 1318 0.0\nUdpInErrors 0 0.0\n' + sample_output = '#kernel\nIpInReceives 1837 0.0\nIpInHdrErrors 0 0.0\nIpInAddrErrors 2 0.0\nIcmpInMsgs 319 0.0\nIcmpInErrors 0 0.0\nTcpInSegs 36 0.0\nTcpInErrs 0 0.0\nUdpInDatagrams 1318 0.0\nUdpInErrors 0 0.0\n' # pylint: disable=line-too-long mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') n.run(result) expected_result = {"TcpInErrs": 0, "UdpInDatagrams": 1318, - "Tcp_segment_error_rate": 0.0, "IpInAddrErrors": 2, - "IpInHdrErrors": 0, "IcmpInErrors": 0, "IpErrors": 2, - "TcpInSegs": 36, "IpInReceives": 1837, "IcmpInMsgs": 319, - "IP_datagram_error_rate": 0.001, "Udp_datagram_error_rate": 0.0, - "Icmp_message_error_rate": 0.0, "UdpInErrors": 0} + "Tcp_segment_error_rate": 0.0, "IpInAddrErrors": 2, + "IpInHdrErrors": 0, "IcmpInErrors": 0, "IpErrors": 2, + "TcpInSegs": 36, "IpInReceives": 1837, "IcmpInMsgs": 319, + "IP_datagram_error_rate": 0.001, "Udp_datagram_error_rate": 0.0, + "Icmp_message_error_rate": 0.0, "UdpInErrors": 0} self.assertEqual(result, expected_result) def test_nstat_successful_sla(self, mock_ssh): @@ -79,17 +80,17 @@ class NstatTestCase(unittest.TestCase): n = nstat.Nstat(args, self.ctx) result = {} - sample_output = '#kernel\nIpInReceives 1837 0.0\nIpInHdrErrors 0 0.0\nIpInAddrErrors 2 0.0\nIcmpInMsgs 319 0.0\nIcmpInErrors 0 0.0\nTcpInSegs 36 0.0\nTcpInErrs 0 0.0\nUdpInDatagrams 1318 0.0\nUdpInErrors 0 0.0\n' + sample_output = '#kernel\nIpInReceives 1837 0.0\nIpInHdrErrors 0 0.0\nIpInAddrErrors 2 0.0\nIcmpInMsgs 319 0.0\nIcmpInErrors 0 0.0\nTcpInSegs 36 0.0\nTcpInErrs 0 0.0\nUdpInDatagrams 1318 0.0\nUdpInErrors 0 0.0\n' # pylint: disable=line-too-long mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') n.run(result) expected_result = {"TcpInErrs": 0, "UdpInDatagrams": 1318, - "Tcp_segment_error_rate": 0.0, "IpInAddrErrors": 2, - "IpInHdrErrors": 0, "IcmpInErrors": 0, "IpErrors": 2, - "TcpInSegs": 36, "IpInReceives": 1837, "IcmpInMsgs": 319, - "IP_datagram_error_rate": 0.001, "Udp_datagram_error_rate": 0.0, - "Icmp_message_error_rate": 0.0, "UdpInErrors": 0} + "Tcp_segment_error_rate": 0.0, "IpInAddrErrors": 2, + "IpInHdrErrors": 0, "IcmpInErrors": 0, "IpErrors": 2, + "TcpInSegs": 36, "IpInReceives": 1837, "IcmpInMsgs": 319, + "IP_datagram_error_rate": 0.001, "Udp_datagram_error_rate": 0.0, + "Icmp_message_error_rate": 0.0, "UdpInErrors": 0} self.assertEqual(result, expected_result) def test_nstat_unsuccessful_cmd_error(self, mock_ssh): @@ -114,5 +115,6 @@ class NstatTestCase(unittest.TestCase): def main(): unittest.main() + if __name__ == '__main__': main() diff --git a/tests/unit/benchmark/scenarios/networking/test_ping6.py b/tests/unit/benchmark/scenarios/networking/test_ping6.py index ecce7cee5..d2be6f576 100644 --- a/tests/unit/benchmark/scenarios/networking/test_ping6.py +++ b/tests/unit/benchmark/scenarios/networking/test_ping6.py @@ -59,7 +59,7 @@ class PingTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '0', '') p.setup() - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) @mock.patch('yardstick.benchmark.scenarios.networking.ping6.ssh') def test_ping_successful_no_sla(self, mock_ssh): diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen.py b/tests/unit/benchmark/scenarios/networking/test_pktgen.py index 3928aacde..005b53177 100644 --- a/tests/unit/benchmark/scenarios/networking/test_pktgen.py +++ b/tests/unit/benchmark/scenarios/networking/test_pktgen.py @@ -50,7 +50,7 @@ class PktgenTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(p.server) self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_pktgen_successful_iptables_setup(self, mock_ssh): @@ -632,9 +632,13 @@ class PktgenTestCase(unittest.TestCase): def test_pktgen_run_with_setup_done(self, mock_ssh): args = { - 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True}, - 'sla': {'max_ppm': 1} - } + 'options': { + 'packetsize': 60, + 'number_of_ports': 10, + 'duration': 20, + 'multiqueue': True}, + 'sla': { + 'max_ppm': 1}} result = {} p = pktgen.Pktgen(args, self.ctx) p.server = mock_ssh.SSH.from_node() @@ -659,9 +663,13 @@ class PktgenTestCase(unittest.TestCase): def test_pktgen_run_with_ovs_multiqueque(self, mock_ssh): args = { - 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True}, - 'sla': {'max_ppm': 1} - } + 'options': { + 'packetsize': 60, + 'number_of_ports': 10, + 'duration': 20, + 'multiqueue': True}, + 'sla': { + 'max_ppm': 1}} result = {} p = pktgen.Pktgen(args, self.ctx) @@ -683,7 +691,7 @@ class PktgenTestCase(unittest.TestCase): mock_result3 = mock.Mock() mock_result3.return_value = 4 - p._enable_ovs_multiqueue = mock_result3 + p._enable_ovs_multiqueue = mock_result3 mock_result4 = mock.Mock() p._setup_irqmapping_ovs = mock_result4 @@ -704,9 +712,13 @@ class PktgenTestCase(unittest.TestCase): def test_pktgen_run_with_sriov_multiqueque(self, mock_ssh): args = { - 'options': {'packetsize': 60, 'number_of_ports': 10, 'duration': 20, 'multiqueue': True}, - 'sla': {'max_ppm': 1} - } + 'options': { + 'packetsize': 60, + 'number_of_ports': 10, + 'duration': 20, + 'multiqueue': True}, + 'sla': { + 'max_ppm': 1}} result = {} p = pktgen.Pktgen(args, self.ctx) @@ -739,8 +751,10 @@ class PktgenTestCase(unittest.TestCase): expected_result["packetsize"] = 60 self.assertEqual(result, expected_result) + def main(): unittest.main() + if __name__ == '__main__': main() diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py index b4b87522c..c9eec4b94 100644 --- a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py +++ b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py @@ -20,8 +20,6 @@ import yardstick.common.utils as utils from yardstick.benchmark.scenarios.networking import pktgen_dpdk -@mock.patch('yardstick.benchmark.scenarios.networking.pktgen_dpdk.time') -@mock.patch('yardstick.benchmark.scenarios.networking.pktgen_dpdk.ssh') class PktgenDPDKLatencyTestCase(unittest.TestCase): def setUp(self): @@ -39,7 +37,20 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): } } - def test_pktgen_dpdk_successful_setup(self, mock_ssh, mock_time): + self._mock_ssh = mock.patch( + 'yardstick.benchmark.scenarios.networking.pktgen_dpdk.ssh') + self.mock_ssh = self._mock_ssh.start() + self._mock_time = mock.patch( + 'yardstick.benchmark.scenarios.networking.pktgen_dpdk.time') + self.mock_time = self._mock_time.start() + + self.addCleanup(self._stop_mock) + + def _stop_mock(self): + self._mock_ssh.stop() + self._mock_time.stop() + + def test_pktgen_dpdk_successful_setup(self): args = { 'options': {'packetsize': 60}, @@ -47,66 +58,66 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) p.setup() - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(p.server) self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) - def test_pktgen_dpdk_successful_get_port_ip(self, mock_ssh, mock_time): + def test_pktgen_dpdk_successful_get_port_ip(self): args = { 'options': {'packetsize': 60}, } p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - p.server = mock_ssh.SSH.from_node() + p.server = self.mock_ssh.SSH.from_node() - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') utils.get_port_ip(p.server, "eth1") - mock_ssh.SSH.from_node().execute.assert_called_with( + self.mock_ssh.SSH.from_node().execute.assert_called_with( "ifconfig eth1 |grep 'inet addr' |awk '{print $2}' |cut -d ':' -f2 ") - def test_pktgen_dpdk_unsuccessful_get_port_ip(self, mock_ssh, mock_time): + def test_pktgen_dpdk_unsuccessful_get_port_ip(self): args = { 'options': {'packetsize': 60}, } p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - p.server = mock_ssh.SSH.from_node() + p.server = self.mock_ssh.SSH.from_node() - mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') self.assertRaises(RuntimeError, utils.get_port_ip, p.server, "eth1") - def test_pktgen_dpdk_successful_get_port_mac(self, mock_ssh, mock_time): + def test_pktgen_dpdk_successful_get_port_mac(self): args = { 'options': {'packetsize': 60}, } p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - p.server = mock_ssh.SSH.from_node() + p.server = self.mock_ssh.SSH.from_node() - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') utils.get_port_mac(p.server, "eth1") - mock_ssh.SSH.from_node().execute.assert_called_with( + self.mock_ssh.SSH.from_node().execute.assert_called_with( "ifconfig |grep HWaddr |grep eth1 |awk '{print $5}' ") - def test_pktgen_dpdk_unsuccessful_get_port_mac(self, mock_ssh, mock_time): + def test_pktgen_dpdk_unsuccessful_get_port_mac(self): args = { 'options': {'packetsize': 60}, } p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - p.server = mock_ssh.SSH.from_node() + p.server = self.mock_ssh.SSH.from_node() - mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') self.assertRaises(RuntimeError, utils.get_port_mac, p.server, "eth1") - def test_pktgen_dpdk_successful_no_sla(self, mock_ssh, mock_time): + def test_pktgen_dpdk_successful_no_sla(self): args = { 'options': {'packetsize': 60}, @@ -116,7 +127,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) sample_output = '100\n110\n112\n130\n149\n150\n90\n150\n200\n162\n' - mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') p.run(result) # with python 3 we get float, might be due python division changes @@ -125,7 +136,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): delta = result['avg_latency'] - 132 self.assertLessEqual(delta, 1) - def test_pktgen_dpdk_successful_sla(self, mock_ssh, mock_time): + def test_pktgen_dpdk_successful_sla(self): args = { 'options': {'packetsize': 60}, @@ -136,13 +147,13 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) sample_output = '100\n100\n100\n100\n100\n100\n100\n100\n100\n100\n' - mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') p.run(result) self.assertEqual(result, {"avg_latency": 100}) - def test_pktgen_dpdk_unsuccessful_sla(self, mock_ssh, mock_time): + def test_pktgen_dpdk_unsuccessful_sla(self): args = { 'options': {'packetsize': 60}, @@ -152,14 +163,14 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - p.server = mock_ssh.SSH.from_node() - p.client = mock_ssh.SSH.from_node() + p.server = self.mock_ssh.SSH.from_node() + p.client = self.mock_ssh.SSH.from_node() sample_output = '100\n110\n112\n130\n149\n150\n90\n150\n200\n162\n' - mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, sample_output, '') self.assertRaises(AssertionError, p.run, result) - def test_pktgen_dpdk_unsuccessful_script_error(self, mock_ssh, mock_time): + def test_pktgen_dpdk_unsuccessful_script_error(self): args = { 'options': {'packetsize': 60}, @@ -169,7 +180,7 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase): p = pktgen_dpdk.PktgenDPDKLatency(args, self.ctx) - mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR') self.assertRaises(RuntimeError, p.run, result) diff --git a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk_throughput.py b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk_throughput.py index d34097008..c2e35af75 100644 --- a/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk_throughput.py +++ b/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk_throughput.py @@ -20,7 +20,6 @@ from yardstick.benchmark.scenarios.networking import pktgen_dpdk_throughput @mock.patch('yardstick.benchmark.scenarios.networking.pktgen_dpdk_throughput.ssh') -@mock.patch('yardstick.benchmark.scenarios.networking.pktgen_dpdk_throughput.time') class PktgenDPDKTestCase(unittest.TestCase): def setUp(self): @@ -37,7 +36,16 @@ class PktgenDPDKTestCase(unittest.TestCase): } } - def test_pktgen_dpdk_throughput_successful_setup(self, mock__time, mock_ssh): + self._mock_time = mock.patch( + 'yardstick.benchmark.scenarios.networking.pktgen_dpdk_throughput.time') + self.mock_time = self._mock_time.start() + + self.addCleanup(self._cleanup) + + def _cleanup(self): + self._mock_time.stop() + + def test_pktgen_dpdk_throughput_successful_setup(self, mock_ssh): args = { 'options': {'packetsize': 60}, } @@ -47,9 +55,9 @@ class PktgenDPDKTestCase(unittest.TestCase): mock_ssh.SSH().execute.return_value = (0, '', '') self.assertIsNotNone(p.server) self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) - def test_pktgen_dpdk_throughput_successful_no_sla(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_successful_no_sla(self, mock_ssh): args = { 'options': {'packetsize': 60, 'number_of_ports': 10}, } @@ -75,7 +83,7 @@ class PktgenDPDKTestCase(unittest.TestCase): expected_result["packetsize"] = 60 self.assertEqual(result, expected_result) - def test_pktgen_dpdk_throughput_successful_sla(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_successful_sla(self, mock_ssh): args = { 'options': {'packetsize': 60, 'number_of_ports': 10}, 'sla': {'max_ppm': 10000} @@ -101,7 +109,7 @@ class PktgenDPDKTestCase(unittest.TestCase): expected_result["packetsize"] = 60 self.assertEqual(result, expected_result) - def test_pktgen_dpdk_throughput_unsuccessful_sla(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_unsuccessful_sla(self, mock_ssh): args = { 'options': {'packetsize': 60, 'number_of_ports': 10}, 'sla': {'max_ppm': 1000} @@ -122,7 +130,8 @@ class PktgenDPDKTestCase(unittest.TestCase): mock_ssh.SSH().execute.return_value = (0, sample_output, '') self.assertRaises(AssertionError, p.run, result) - def test_pktgen_dpdk_throughput_unsuccessful_script_error(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_unsuccessful_script_error( + self, mock_ssh): args = { 'options': {'packetsize': 60, 'number_of_ports': 10}, 'sla': {'max_ppm': 1000} @@ -137,7 +146,7 @@ class PktgenDPDKTestCase(unittest.TestCase): mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR') self.assertRaises(RuntimeError, p.run, result) - def test_pktgen_dpdk_throughput_is_dpdk_setup(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_is_dpdk_setup(self, mock_ssh): args = { 'options': {'packetsize': 60}, } @@ -151,7 +160,7 @@ class PktgenDPDKTestCase(unittest.TestCase): mock_ssh.SSH().execute.assert_called_with( "ip a | grep eth1 2>/dev/null") - def test_pktgen_dpdk_throughput_dpdk_setup(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_dpdk_setup(self, mock_ssh): args = { 'options': {'packetsize': 60}, } @@ -163,9 +172,9 @@ class PktgenDPDKTestCase(unittest.TestCase): p.dpdk_setup() - self.assertEqual(p.dpdk_setup_done, True) + self.assertTrue(p.dpdk_setup_done) - def test_pktgen_dpdk_throughput_dpdk_get_result(self, mock__time, mock_ssh): + def test_pktgen_dpdk_throughput_dpdk_get_result(self, mock_ssh): args = { 'options': {'packetsize': 60}, } @@ -180,8 +189,10 @@ class PktgenDPDKTestCase(unittest.TestCase): mock_ssh.SSH().execute.assert_called_with( "sudo /dpdk/destdir/bin/dpdk-procinfo -- --stats-reset > /dev/null 2>&1") + def main(): unittest.main() + if __name__ == '__main__': main() diff --git a/tests/unit/benchmark/scenarios/networking/test_vsperf.py b/tests/unit/benchmark/scenarios/networking/test_vsperf.py index cbbfc2b34..be8ac55d0 100644 --- a/tests/unit/benchmark/scenarios/networking/test_vsperf.py +++ b/tests/unit/benchmark/scenarios/networking/test_vsperf.py @@ -66,7 +66,7 @@ class VsperfTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_vsperf_teardown(self, mock_ssh, mock_subprocess): p = vsperf.Vsperf(self.args, self.ctx) @@ -77,10 +77,10 @@ class VsperfTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) p.teardown() - self.assertEqual(p.setup_done, False) + self.assertFalse(p.setup_done) def test_vsperf_run_ok(self, mock_ssh, mock_subprocess): p = vsperf.Vsperf(self.args, self.ctx) diff --git a/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py b/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py index 5759f0a90..fbe3ed804 100644 --- a/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py +++ b/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py @@ -27,7 +27,6 @@ from yardstick.benchmark.scenarios.networking import vsperf_dpdk @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.subprocess') -@mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.ssh') class VsperfDPDKTestCase(unittest.TestCase): def setUp(self): @@ -63,7 +62,16 @@ class VsperfDPDKTestCase(unittest.TestCase): } } - def test_vsperf_dpdk_setup(self, mock_ssh, mock_subprocess): + self._mock_ssh = mock.patch( + 'yardstick.benchmark.scenarios.networking.vsperf_dpdk.ssh') + self.mock_ssh = self._mock_ssh.start() + + self.addCleanup(self._cleanup) + + def _cleanup(self): + self._mock_ssh.stop() + + def test_vsperf_dpdk_setup(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -71,9 +79,9 @@ class VsperfDPDKTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) - def test_vsperf_dpdk_teardown(self, mock_ssh, mock_subprocess): + def test_vsperf_dpdk_teardown(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -81,12 +89,12 @@ class VsperfDPDKTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) p.teardown() - self.assertEqual(p.setup_done, False) + self.assertFalse(p.setup_done) - def test_vsperf_dpdk_is_dpdk_setup_no(self, mock_ssh, mock_subprocess): + def test_vsperf_dpdk_is_dpdk_setup_no(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -94,15 +102,15 @@ class VsperfDPDKTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) # is_dpdk_setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, 'dummy', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, 'dummy', '') result = p._is_dpdk_setup() - self.assertEqual(result, False) + self.assertFalse(result) - def test_vsperf_dpdk_is_dpdk_setup_yes(self, mock_ssh, mock_subprocess): + def test_vsperf_dpdk_is_dpdk_setup_yes(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -110,16 +118,16 @@ class VsperfDPDKTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) # is_dpdk_setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') result = p._is_dpdk_setup() - self.assertEqual(result, True) + self.assertTrue(result) - @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') - def test_vsperf_dpdk_dpdk_setup_first(self, mock_time, mock_ssh, mock_subprocess): + @mock.patch('time.sleep') + def test_vsperf_dpdk_dpdk_setup_first(self, _, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks @@ -127,61 +135,61 @@ class VsperfDPDKTestCase(unittest.TestCase): p.setup() self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) # is_dpdk_setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, 'dummy', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, 'dummy', '') p.dpdk_setup() - self.assertEqual(p._is_dpdk_setup(), False) - self.assertEqual(p.dpdk_setup_done, True) + self.assertFalse(p._is_dpdk_setup()) + self.assertTrue(p.dpdk_setup_done) - @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') - def test_vsperf_dpdk_dpdk_setup_next(self, mock_time, mock_ssh, mock_subprocess): + @mock.patch('time.sleep') + def test_vsperf_dpdk_dpdk_setup_next(self, _, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.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) + self.assertTrue(p.setup_done) p.dpdk_setup() - self.assertEqual(p._is_dpdk_setup(), True) - self.assertEqual(p.dpdk_setup_done, True) + self.assertTrue(p._is_dpdk_setup()) + self.assertTrue(p.dpdk_setup_done) - @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') - def test_vsperf_dpdk_dpdk_setup_fail(self, mock_time, mock_ssh, mock_subprocess): + @mock.patch('time.sleep') + def test_vsperf_dpdk_dpdk_setup_fail(self, _, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') mock_subprocess.call().execute.return_value = None p.setup() self.assertIsNotNone(p.client) - mock_ssh.SSH.from_node().execute.return_value = (1, '', '') - self.assertEqual(p.setup_done, True) + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', '') + self.assertTrue(p.setup_done) self.assertRaises(RuntimeError, p.dpdk_setup) - @mock.patch('yardstick.benchmark.scenarios.networking.vsperf_dpdk.time') - def test_vsperf_dpdk_run_ok(self, mock_time, mock_ssh, mock_subprocess): + @mock.patch('time.sleep') + def test_vsperf_dpdk_run_ok(self, _, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.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) + self.assertTrue(p.setup_done) # run() specific mocks mock_subprocess.call().execute.return_value = None - mock_ssh.SSH.from_node().execute.return_value = ( + self.mock_ssh.SSH.from_node().execute.return_value = ( 0, 'throughput_rx_fps\r\n14797660.000\r\n', '') result = {} @@ -189,42 +197,41 @@ class VsperfDPDKTestCase(unittest.TestCase): self.assertEqual(result['throughput_rx_fps'], '14797660.000') - def test_vsperf_dpdk_run_falied_vsperf_execution(self, mock_ssh, - mock_subprocess): + def test_vsperf_dpdk_run_falied_vsperf_execution(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.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) + self.assertTrue(p.setup_done) # 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 = (1, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', '') result = {} self.assertRaises(RuntimeError, p.run, result) - def test_vsperf_dpdk_run_falied_csv_report(self, mock_ssh, mock_subprocess): + def test_vsperf_dpdk_run_falied_csv_report(self, mock_subprocess): p = vsperf_dpdk.VsperfDPDK(self.args, self.ctx) # setup() specific mocks - mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.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) + self.assertTrue(p.setup_done) # 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, '', '') - mock_ssh.SSH.from_node().execute.return_value = (1, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (0, '', '') + self.mock_ssh.SSH.from_node().execute.return_value = (1, '', '') result = {} self.assertRaises(RuntimeError, p.run, result) diff --git a/tests/unit/benchmark/scenarios/parser/test_parser.py b/tests/unit/benchmark/scenarios/parser/test_parser.py index 59b98a092..ee2bbc07d 100644 --- a/tests/unit/benchmark/scenarios/parser/test_parser.py +++ b/tests/unit/benchmark/scenarios/parser/test_parser.py @@ -9,50 +9,67 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -# Unittest for yardstick.benchmark.scenarios.parser.Parser - -from __future__ import absolute_import +import subprocess import unittest - import mock + from oslo_serialization import jsonutils from yardstick.benchmark.scenarios.parser import parser -@mock.patch('yardstick.benchmark.scenarios.parser.parser.subprocess') class ParserTestCase(unittest.TestCase): def setUp(self): - pass - - def test_parser_successful_setup(self, mock_subprocess): - - p = parser.Parser({}, {}) - mock_subprocess.call().return_value = 0 - p.setup() - self.assertEqual(p.setup_done, True) - - def test_parser_successful(self, mock_subprocess): args = { 'options': {'yangfile': '/root/yardstick/samples/yang.yaml', 'toscafile': '/root/yardstick/samples/tosca.yaml'}, } - p = parser.Parser(args, {}) + self.scenario = parser.Parser(scenario_cfg=args, context_cfg={}) + + self._mock_popen = mock.patch.object(subprocess, 'Popen') + self.mock_popen = self._mock_popen.start() + self._mock_call = mock.patch.object(subprocess, 'call') + self.mock_call = self._mock_call.start() + + self.addCleanup(self._stop_mock) + + def _stop_mock(self): + self._mock_popen.stop() + self._mock_call.stop() + + def test_setup_successful(self): + + self.mock_call.return_value = 0 + self.scenario.setup() + self.assertTrue(self.scenario.setup_done) + + def test_run_successful(self): + result = {} - mock_subprocess.call().return_value = 0 - sample_output = '{"yangtotosca": "success"}' - p.run(result) - expected_result = jsonutils.loads(sample_output) + self.mock_popen().returncode = 0 + + expected_result = jsonutils.loads('{"yangtotosca": "success"}') + + self.scenario.run(result) + self.assertEqual(result, expected_result) + + def test_run_fail(self): + result = {} + + self.mock_popen().returncode = 1 + expected_result = jsonutils.loads('{"yangtotosca": "fail"}') + + self.scenario.run(result) + self.assertEqual(result, expected_result) - def test_parser_teardown_successful(self, mock_subprocess): + def test_teardown_successful(self): - p = parser.Parser({}, {}) - mock_subprocess.call().return_value = 0 - p.teardown() - self.assertEqual(p.teardown_done, True) + self.mock_call.return_value = 0 + self.scenario.teardown() + self.assertTrue(self.scenario.teardown_done) def main(): diff --git a/tests/unit/benchmark/scenarios/storage/test_fio.py b/tests/unit/benchmark/scenarios/storage/test_fio.py index 17594b9f4..0cffea224 100644 --- a/tests/unit/benchmark/scenarios/storage/test_fio.py +++ b/tests/unit/benchmark/scenarios/storage/test_fio.py @@ -53,7 +53,7 @@ class FioTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_fio_job_file_successful_setup(self, mock_ssh): @@ -67,7 +67,7 @@ class FioTestCase(unittest.TestCase): mock_ssh.SSH.from_node().execute.return_value = (0, '', '') self.assertIsNotNone(p.client) - self.assertEqual(p.setup_done, True) + self.assertTrue(p.setup_done) def test_fio_successful_no_sla(self, mock_ssh): diff --git a/tests/unit/benchmark/scenarios/test_base.py b/tests/unit/benchmark/scenarios/test_base.py index 78e342978..a95e6bc86 100644 --- a/tests/unit/benchmark/scenarios/test_base.py +++ b/tests/unit/benchmark/scenarios/test_base.py @@ -51,3 +51,56 @@ class ScenarioTestCase(unittest.TestCase): pass self.assertEqual(str(None), DummyScenario.get_description()) + + def test_get_types(self): + scenario_names = set( + scenario.__scenario_type__ for scenario in + base.Scenario.get_types() if hasattr(scenario, + '__scenario_type__')) + existing_scenario_class_names = { + 'Iperf3', 'CACHEstat', 'SpecCPU2006', 'Dummy', 'NSPerf', 'Parser'} + self.assertTrue(existing_scenario_class_names.issubset(scenario_names)) + + def test_get_cls_existing_scenario(self): + scenario_name = 'NSPerf' + scenario = base.Scenario.get_cls(scenario_name) + self.assertEqual(scenario_name, scenario.__scenario_type__) + + def test_get_cls_non_existing_scenario(self): + wrong_scenario_name = 'Non-existing-scenario' + with self.assertRaises(RuntimeError) as exc: + base.Scenario.get_cls(wrong_scenario_name) + self.assertEqual('No such scenario type %s' % wrong_scenario_name, + str(exc.exception)) + + def test_get_existing_scenario(self): + scenario_name = 'NSPerf' + scenario_module = ('yardstick.benchmark.scenarios.networking.' + 'vnf_generic.NetworkServiceTestCase') + self.assertEqual(scenario_module, base.Scenario.get(scenario_name)) + + def test_get_non_existing_scenario(self): + wrong_scenario_name = 'Non-existing-scenario' + with self.assertRaises(RuntimeError) as exc: + base.Scenario.get(wrong_scenario_name) + self.assertEqual('No such scenario type %s' % wrong_scenario_name, + str(exc.exception)) + + +class IterScenarioClassesTestCase(unittest.TestCase): + + def test_no_scenario_type_defined(self): + some_existing_scenario_class_names = [ + 'Iperf3', 'CACHEstat', 'SpecCPU2006', 'Dummy', 'NSPerf', 'Parser'] + scenario_types = [scenario.__scenario_type__ for scenario + in base._iter_scenario_classes()] + for class_name in some_existing_scenario_class_names: + self.assertIn(class_name, scenario_types) + + def test_scenario_type_defined(self): + some_existing_scenario_class_names = [ + 'Iperf3', 'CACHEstat', 'SpecCPU2006', 'Dummy', 'NSPerf', 'Parser'] + for class_name in some_existing_scenario_class_names: + scenario_class = next(base._iter_scenario_classes( + scenario_type=class_name)) + self.assertEqual(class_name, scenario_class.__scenario_type__) diff --git a/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py index 0f1cf7d92..9bb5ed3a7 100644 --- a/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py +++ b/tests/unit/network_services/helpers/test_dpdkbindnic_helper.py @@ -25,8 +25,6 @@ from yardstick.network_services.helpers.dpdkbindnic_helper import CRYPTO_DPDK from yardstick.network_services.helpers.dpdkbindnic_helper import NETWORK_OTHER from yardstick.network_services.helpers.dpdkbindnic_helper import CRYPTO_OTHER -pass - class TestDpdkBindHelper(unittest.TestCase): EXAMPLE_OUTPUT = """ @@ -116,8 +114,8 @@ Other crypto devices dpdk_bind_helper = DpdkBindHelper(conn) - self.assertEquals(conn, dpdk_bind_helper.ssh_helper) - self.assertEquals(self.CLEAN_STATUS, dpdk_bind_helper.dpdk_status) + self.assertEqual(conn, dpdk_bind_helper.ssh_helper) + self.assertEqual(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) @@ -127,7 +125,8 @@ Other crypto devices 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')) + self.assertEqual((0, 'output', 'error'), + dpdk_bind_helper._dpdk_execute('command')) def test__dpdk_execute_failure(self): conn = mock.Mock() @@ -145,7 +144,7 @@ Other crypto devices 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]) + self.assertEqual(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" @@ -165,7 +164,7 @@ Other crypto devices dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) self.maxDiff = None - self.assertEquals(self.PARSED_EXAMPLE, dpdk_bind_helper.dpdk_status) + self.assertEqual(self.PARSED_EXAMPLE, dpdk_bind_helper.dpdk_status) def test_read_status(self): conn = mock.Mock() @@ -174,7 +173,7 @@ Other crypto devices dpdk_bind_helper = DpdkBindHelper(conn) - self.assertEquals(self.PARSED_EXAMPLE, dpdk_bind_helper.read_status()) + self.assertEqual(self.PARSED_EXAMPLE, dpdk_bind_helper.read_status()) def test__get_bound_pci_addresses(self): conn = mock.Mock() @@ -183,9 +182,9 @@ Other crypto devices dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) - self.assertEquals(['0000:00:04.0', '0000:00:05.0'], + self.assertEqual(['0000:00:04.0', '0000:00:05.0'], dpdk_bind_helper._get_bound_pci_addresses(NETWORK_DPDK)) - self.assertEquals(['0000:00:03.0'], + self.assertEqual(['0000:00:03.0'], dpdk_bind_helper._get_bound_pci_addresses(NETWORK_KERNEL)) def test_interface_driver_map(self): @@ -195,7 +194,7 @@ Other crypto devices dpdk_bind_helper.parse_dpdk_status_output(self.EXAMPLE_OUTPUT) - self.assertEquals({'0000:00:04.0': 'igb_uio', + self.assertEqual({'0000:00:04.0': 'igb_uio', '0000:00:03.0': 'virtio-pci', '0000:00:05.0': 'igb_uio', }, diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py index 5c2f890e8..7ad166249 100644 --- a/tests/unit/network_services/nfvi/test_resource.py +++ b/tests/unit/network_services/nfvi/test_resource.py @@ -12,11 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -import unittest - import errno + import mock +import unittest from yardstick.network_services.nfvi.resource import ResourceProfile from yardstick.network_services.nfvi import resource, collectd @@ -103,16 +102,18 @@ class TestResourceProfile(unittest.TestCase): self.resource_profile.connection = self.ssh_mock def test___init__(self): - self.assertEqual(True, self.resource_profile.enable) + self.assertTrue(self.resource_profile.enable) - def test_check_if_sa_running(self): - self.assertEqual(self.resource_profile.check_if_sa_running("collectd"), + def test_check_if_system_agent_running(self): + self.assertEqual(self.resource_profile.check_if_system_agent_running("collectd"), (0, "")) - def test_check_if_sa_running_excetion(self): + def test_check_if_system_agent_running_excetion(self): with mock.patch.object(self.resource_profile.connection, "execute") as mock_execute: mock_execute.side_effect = OSError(errno.ECONNRESET, "error") - self.assertEqual(self.resource_profile.check_if_sa_running("collectd"), (1, None)) + self.assertEqual( + self.resource_profile.check_if_system_agent_running("collectd"), + (1, None)) def test_get_cpu_data(self): reskey = ["", "cpufreq", "cpufreq-0"] @@ -135,12 +136,12 @@ class TestResourceProfile(unittest.TestCase): self.resource_profile._prepare_collectd_conf("/opt/nsb_bin")) def test__setup_ovs_stats(self): + # TODO(elfoley): This method doesn't actually return anything, the side + # effects should be checked self.assertIsNone( self.resource_profile._setup_ovs_stats(self.ssh_mock)) - @mock.patch("yardstick.network_services.nfvi.resource.open") - @mock.patch("yardstick.network_services.nfvi.resource.os") - def test__provide_config_file(self, mock_open, mock_os): + def test__provide_config_file(self,): loadplugin = range(5) port_names = range(5) kwargs = { @@ -151,14 +152,12 @@ class TestResourceProfile(unittest.TestCase): self.resource_profile._provide_config_file("/opt/nsb_bin", "collectd.conf", kwargs) self.ssh_mock.execute.assert_called_once() - @mock.patch("yardstick.network_services.nfvi.resource.open") - def test_initiate_systemagent(self, mock_open): + def test_initiate_systemagent(self): self.resource_profile._start_collectd = mock.Mock() self.assertIsNone( self.resource_profile.initiate_systemagent("/opt/nsb_bin")) - @mock.patch("yardstick.network_services.nfvi.resource.open") - def test_initiate_systemagent_raise(self, mock_open): + def test_initiate_systemagent_raise(self): self.resource_profile._start_collectd = mock.Mock(side_effect=RuntimeError) with self.assertRaises(RuntimeError): self.resource_profile.initiate_systemagent("/opt/nsb_bin") @@ -267,8 +266,10 @@ class TestResourceProfile(unittest.TestCase): def test_stop(self): self.assertIsNone(self.resource_profile.stop()) - def test_stop(self): + def test_stop_amqp_not_running(self): self.resource_profile.amqp_client = mock.MagicMock() + # TODO(efoley): Fix this incorrect test. + # Should check that we don't try to stop amqp when it's not running self.assertIsNone(self.resource_profile.stop()) if __name__ == '__main__': 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 ed49c7000..0ac46c632 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 @@ -16,15 +16,17 @@ # from itertools import repeat, chain -import mock import os import socket import time + +import mock import unittest 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) stl_patch.start() @@ -1433,9 +1435,9 @@ class TestProxResourceHelper(unittest.TestCase): helper = ProxResourceHelper(mock.MagicMock()) helper.resource = resource = mock.MagicMock() - resource.check_if_sa_running.return_value = 0, '1234' + resource.check_if_system_agent_running.return_value = 0, '1234' resource.amqp_collect_nfvi_kpi.return_value = 543 - resource.check_if_sa_running.return_value = (0, None) + resource.check_if_system_agent_running.return_value = (0, None) expected = {'core': 543} result = helper.collect_collectd_kpi() @@ -1447,9 +1449,9 @@ class TestProxResourceHelper(unittest.TestCase): helper._result = {'z': 123} helper.resource = resource = mock.MagicMock() - resource.check_if_sa_running.return_value = 0, '1234' + resource.check_if_system_agent_running.return_value = 0, '1234' resource.amqp_collect_nfvi_kpi.return_value = 543 - resource.check_if_sa_running.return_value = (0, None) + resource.check_if_system_agent_running.return_value = (0, None) queue.empty.return_value = False queue.get.return_value = {'a': 789} 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 beb4f8f9f..af941c04f 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 @@ -704,8 +704,8 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase): 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']) + self.assertEqual(0, intf_0['dpdk_port_num']) + self.assertEqual(1, intf_1['dpdk_port_num']) def test_tear_down(self): vnfd_helper = VnfdHelper(self.VNFD_0) 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 63b2ac4ab..fb26f20b5 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 @@ -80,7 +80,7 @@ class TestPingParser(unittest.TestCase): ping_parser = PingParser(q_out) ping_parser.write(sample_out) ping_parser.clear() - self.assertEqual(True, q_out.empty()) + self.assertTrue(q_out.empty()) def test_close(self): q_out = Queue() @@ -238,7 +238,7 @@ class TestPingTrafficGen(unittest.TestCase): self.assertIsInstance(ping_traffic_gen.setup_helper, PingSetupEnvHelper) self.assertIsInstance(ping_traffic_gen.resource_helper, PingResourceHelper) - self.assertEquals(ping_traffic_gen._result, {}) + self.assertEqual(ping_traffic_gen._result, {}) @mock.patch("yardstick.ssh.SSH") def test__bind_device_kernel_with_failure(self, ssh): @@ -282,8 +282,7 @@ class TestPingTrafficGen(unittest.TestCase): 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, *args): + def test_listen_traffic(self): ping_traffic_gen = PingTrafficGen('vnf1', self.VNFD_0) self.assertIsNone(ping_traffic_gen.listen_traffic({})) 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 7b4d79e02..0104e7f63 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 @@ -330,7 +330,7 @@ class TestProxTrafficGen(unittest.TestCase): prox_traffic_gen = ProxTrafficGen(NAME, self.VNFD0) prox_traffic_gen._vnf_wrapper.resource_helper.resource = mock.MagicMock( - **{"check_if_sa_running.return_value": [False]}) + **{"self.check_if_system_agent_running.return_value": [False]}) prox_traffic_gen._vnf_wrapper.vnf_execute = mock.Mock(return_value="") self.assertEqual({}, prox_traffic_gen.collect_kpi()) 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 635ce2735..cda3852fe 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 @@ -447,7 +447,7 @@ class TestUdpReplayApproxVnf(unittest.TestCase): 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) + self.assertEqual(udp_replay_approx_vnf.wait_for_instantiate(), 0) @mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.Context") @mock.patch('yardstick.ssh.SSH') 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 55cd4d2e8..1abc53688 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 @@ -15,11 +15,12 @@ # limitations under the License. # -import mock from multiprocessing import Process, Queue import os -import six.moves.configparser as configparser import time + +import mock +import six.moves.configparser as configparser import unittest from tests.unit import STL_MOCKS @@ -543,9 +544,9 @@ class TestVpeApproxVnf(unittest.TestCase): mock_ssh(ssh) resource = mock.Mock(autospec=ResourceProfile) - resource.check_if_sa_running.return_value = 1, '' + resource.check_if_system_agent_running.return_value = 1, '' resource.amqp_collect_nfvi_kpi.return_value = {'foo': 234} - resource.check_if_sa_running.return_value = (1, None) + resource.check_if_system_agent_running.return_value = (1, None) vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0) vpe_approx_vnf.q_in = mock.MagicMock() @@ -567,7 +568,7 @@ class TestVpeApproxVnf(unittest.TestCase): mock_ssh(ssh) resource = mock.Mock(autospec=ResourceProfile) - resource.check_if_sa_running.return_value = 0, '1234' + resource.check_if_system_agent_running.return_value = 0, '1234' resource.amqp_collect_nfvi_kpi.return_value = {'foo': 234} vpe_approx_vnf = VpeApproxVnf(NAME, self.VNFD_0) diff --git a/tools/virt_ci_rampup.sh b/tools/virt_ci_rampup.sh new file mode 100755 index 000000000..6a9f2e7cb --- /dev/null +++ b/tools/virt_ci_rampup.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Copyright (c) 2018 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. + +ANSIBLE_SCRIPTS="${0%/*}/../ansible" + +cd ${ANSIBLE_SCRIPTS} &&\ +sudo -EH ansible-playbook \ + -e rs_file='../etc/infra/infra_deploy.yaml' \ + -i inventory.ini infra_deploy.yml diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py index 0d58e91b0..30170832a 100644 --- a/yardstick/benchmark/contexts/standalone/model.py +++ b/yardstick/benchmark/contexts/standalone/model.py @@ -35,7 +35,7 @@ LOG = logging.getLogger(__name__) VM_TEMPLATE = """ <domain type="kvm"> - <name>{vm_name}</name> + <name>{vm_name}</name> <uuid>{random_uuid}</uuid> <memory unit="MB">{memory}</memory> <currentMemory unit="MB">{memory}</currentMemory> @@ -80,7 +80,13 @@ VM_TEMPLATE = """ <source bridge="br-int" /> <model type='virtio'/> </interface> - </devices> + <serial type='pty'> + <target port='0'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + </devices> </domain> """ WAIT_FOR_BOOT = 30 @@ -286,7 +292,8 @@ class StandaloneContextHelper(object): super(StandaloneContextHelper, self).__init__() @staticmethod - def install_req_libs(connection, extra_pkgs=[]): + def install_req_libs(connection, extra_pkgs=None): + extra_pkgs = extra_pkgs or [] pkgs = ["qemu-kvm", "libvirt-bin", "bridge-utils", "numactl", "fping"] pkgs.extend(extra_pkgs) cmd_template = "dpkg-query -W --showformat='${Status}\\n' \"%s\"|grep 'ok installed'" diff --git a/yardstick/benchmark/scenarios/base.py b/yardstick/benchmark/scenarios/base.py index 7af85834c..10a728828 100644 --- a/yardstick/benchmark/scenarios/base.py +++ b/yardstick/benchmark/scenarios/base.py @@ -16,20 +16,34 @@ # yardstick comment: this is a modified copy of # rally/rally/benchmark/scenarios/base.py -""" Scenario base class -""" +from stevedore import extension -from __future__ import absolute_import import yardstick.common.utils as utils +def _iter_scenario_classes(scenario_type=None): + """Generator over all 'Scenario' subclasses + + This function will iterate over all 'Scenario' subclasses defined in this + project and will load any class introduced by any installed plugin project, + defined in 'entry_points' section, under 'yardstick.scenarios' subsection. + """ + extension.ExtensionManager(namespace='yardstick.scenarios', + invoke_on_load=False) + for scenario in utils.itersubclasses(Scenario): + if not scenario_type: + yield scenario + elif getattr(scenario, '__scenario_type__', None) == scenario_type: + yield scenario + + class Scenario(object): def setup(self): """ default impl for scenario setup """ pass - def run(self, args): + def run(self, *args): """ catcher for not implemented run methods in subclasses """ raise RuntimeError("run method not implemented") @@ -41,16 +55,15 @@ class Scenario(object): def get_types(): """return a list of known runner type (class) names""" scenarios = [] - for scenario in utils.itersubclasses(Scenario): + for scenario in _iter_scenario_classes(): scenarios.append(scenario) return scenarios @staticmethod def get_cls(scenario_type): """return class of specified type""" - for scenario in utils.itersubclasses(Scenario): - if scenario_type == scenario.__scenario_type__: - return scenario + for scenario in _iter_scenario_classes(scenario_type): + return scenario raise RuntimeError("No such scenario type %s" % scenario_type) @@ -58,11 +71,8 @@ class Scenario(object): def get(scenario_type): """Returns instance of a scenario runner for execution type. """ - for scenario in utils.itersubclasses(Scenario): - if scenario_type == scenario.__scenario_type__: - return scenario.__module__ + "." + scenario.__name__ - - raise RuntimeError("No such scenario type %s" % scenario_type) + scenario = Scenario.get_cls(scenario_type) + return scenario.__module__ + "." + scenario.__name__ @classmethod def get_scenario_type(cls): diff --git a/yardstick/benchmark/scenarios/parser/parser.py b/yardstick/benchmark/scenarios/parser/parser.py index eb16833e5..5b2b49c2c 100644 --- a/yardstick/benchmark/scenarios/parser/parser.py +++ b/yardstick/benchmark/scenarios/parser/parser.py @@ -6,13 +6,13 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -from __future__ import print_function -from __future__ import absolute_import + import pkg_resources import logging import subprocess from yardstick.benchmark.scenarios import base + LOG = logging.getLogger(__name__) @@ -63,7 +63,7 @@ class Parser(base.Scenario): p = subprocess.Popen(cmd1, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p.communicate() - print("yangtotosca finished") + LOG.info("yangtotosca finished") result['yangtotosca'] = "success" if p.returncode == 0 else "fail" diff --git a/yardstick/network_services/collector/subscriber.py b/yardstick/network_services/collector/subscriber.py index 4dc5a796e..7e18302eb 100644 --- a/yardstick/network_services/collector/subscriber.py +++ b/yardstick/network_services/collector/subscriber.py @@ -62,12 +62,13 @@ class Collector(object): # Result example: # {"VNF1: { "tput" : [1000, 999] }, "VNF2": { "latency": 100 }} LOG.debug("collect KPI for %s", node_name) - if resource.check_if_sa_running("collectd")[0] != 0: + if resource.check_if_system_agent_running("collectd")[0] != 0: continue try: results[node_name] = {"core": resource.amqp_collect_nfvi_kpi()} LOG.debug("%s collect KPIs %s", node_name, results[node_name]['core']) - except Exception: - LOG.exception("") + # NOTE(elfoley): catch a more specific error + except Exception as exc: # pylint: disable=broad-except + LOG.exception(exc) return results diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py index adf4d8ae6..dc5c46a86 100644 --- a/yardstick/network_services/nfvi/resource.py +++ b/yardstick/network_services/nfvi/resource.py @@ -13,20 +13,16 @@ # limitations under the License. """ Resource collection definitions """ -from __future__ import absolute_import -from __future__ import print_function - -import logging -from itertools import chain - import errno -import jinja2 +from itertools import chain +import logging +import multiprocessing import os import os.path import re -import multiprocessing -import pkg_resources +import jinja2 +import pkg_resources from oslo_config import cfg from oslo_utils.encodeutils import safe_decode @@ -92,7 +88,7 @@ class ResourceProfile(object): return cls(node, plugins=plugins, interval=interval, timeout=timeout) - def check_if_sa_running(self, process): + def check_if_system_agent_running(self, process): """ verify if system agent is running """ try: err, pid, _ = self.connection.execute("pgrep -f %s" % process) @@ -101,7 +97,7 @@ class ResourceProfile(object): except OSError as e: if e.errno in {errno.ECONNRESET}: # if we can't connect to check, then we won't be able to connect to stop it - LOG.exception("can't connect to host to check collectd status") + LOG.exception("Can't connect to host to check %s status", process) return 1, None raise @@ -327,7 +323,7 @@ class ResourceProfile(object): self.amqp_client.terminate() LOG.debug("Check if %s is running", agent) - status, pid = self.check_if_sa_running(agent) + status, pid = self.check_if_system_agent_running(agent) LOG.debug("status %s pid %s", status, pid) if status != 0: return diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index 5eeb6c889..fbaaa0ca8 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -13,38 +13,34 @@ # limitations under the License. """ Base class implementation for generic vnf implementation """ -from __future__ import absolute_import - -import posixpath -import time +from collections import Mapping import logging +from multiprocessing import Queue, Value, Process import os +import posixpath import re -import subprocess -from collections import Mapping -from multiprocessing import Queue, Value, Process - from six.moves import cStringIO +import subprocess +import time +from trex_stl_lib.trex_stl_client import LoggerApi +from trex_stl_lib.trex_stl_client import STLClient +from trex_stl_lib.trex_stl_exceptions import STLError from yardstick.benchmark.contexts.base import Context from yardstick.benchmark.scenarios.networking.vnf_generic import find_relative_file from yardstick.common import exceptions as y_exceptions from yardstick.common.process import check_if_process_failed +from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkBindHelper from yardstick.network_services.helpers.samplevnf_helper import PortPairs from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig -from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkBindHelper from yardstick.network_services.nfvi.resource import ResourceProfile +from yardstick.network_services.utils import get_nsb_option from yardstick.network_services.vnf_generic.vnf.base import GenericVNF -from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper from yardstick.network_services.vnf_generic.vnf.base import GenericTrafficGen -from yardstick.network_services.utils import get_nsb_option - -from trex_stl_lib.trex_stl_client import STLClient -from trex_stl_lib.trex_stl_client import LoggerApi -from trex_stl_lib.trex_stl_exceptions import STLError - +from yardstick.network_services.vnf_generic.vnf.base import QueueFileWrapper from yardstick.ssh import AutoConnectSSH + DPDK_VERSION = "dpdk-16.07" LOG = logging.getLogger(__name__) @@ -346,7 +342,7 @@ class ResourceHelper(object): def _collect_resource_kpi(self): result = {} - status = self.resource.check_if_sa_running("collectd")[0] + status = self.resource.check_if_system_agent_running("collectd")[0] if status == 0: result = self.resource.amqp_collect_nfvi_kpi() diff --git a/yardstick/resources/scripts/install/ovs_deploy.bash b/yardstick/resources/scripts/install/ovs_deploy.bash index d94f30db1..beda9a5e0 100755 --- a/yardstick/resources/scripts/install/ovs_deploy.bash +++ b/yardstick/resources/scripts/install/ovs_deploy.bash @@ -14,6 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -e + INSTALL_OVS_BIN="/usr/src" cd $INSTALL_OVS_BIN @@ -22,20 +24,6 @@ if [[ $EUID -ne 0 ]]; then exit 1; fi -prerequisite() -{ - echo "Install required libraries to run collectd..." - pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev cmake qemu-kvm libvirt-bin bridge-utils numactl libnuma-dev libpcap-dev) - for i in "${pkg[@]}"; do - dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed" - if [ "$?" -eq "1" ]; then - apt-get update - apt-get -y install "${i}"; - fi - done - echo "Done" -} - download_zip() { url=$1 @@ -53,6 +41,7 @@ download_zip() dpdk_build() { + echo "Build DPDK libraries" pushd . if [[ $DPDK_VERSION != "" ]]; then export DPDK_DIR=$INSTALL_OVS_BIN/dpdk-stable-$DPDK_VERSION @@ -62,13 +51,15 @@ dpdk_build() DPDK_DOWNLOAD="http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.xz" download_zip "${DPDK_DOWNLOAD}" "DPDK" cd dpdk-stable-"$DPDK_VERSION" - make install -j T=$RTE_TARGET + make config T=$RTE_TARGET + make install -j $(nproc) T=$RTE_TARGET fi popd } ovs() { + echo "Build and install OVS with DPDK" pushd . if [[ $OVS_VERSION != "" ]]; then rm -rf openswitch-"$OVS_VERSION" @@ -82,7 +73,7 @@ ovs() else ./configure fi - make install -j + make install -j $(nproc) fi popd } diff --git a/yardstick/tests/unit/apiserver/resources/test_env_action.py b/yardstick/tests/unit/apiserver/resources/test_env_action.py index b7bfe294d..cf646a29c 100644 --- a/yardstick/tests/unit/apiserver/resources/test_env_action.py +++ b/yardstick/tests/unit/apiserver/resources/test_env_action.py @@ -32,7 +32,7 @@ class EnvTestCase(APITestCase): time.sleep(0) - self.assertTrue(u'status' in resp) + self.assertIn(u'status', resp) def main(): diff --git a/yardstick/tests/unit/common/test_yaml_loader.py b/yardstick/tests/unit/common/test_yaml_loader.py index 90cbb8157..6c2beb422 100644 --- a/yardstick/tests/unit/common/test_yaml_loader.py +++ b/yardstick/tests/unit/common/test_yaml_loader.py @@ -22,7 +22,7 @@ class TemplateFormatTestCase(unittest.TestCase): def test_parse_to_value_exception(self): - self.assertEquals(yaml_loader.yaml_load("string"), u"string") + self.assertEqual(yaml_loader.yaml_load("string"), u"string") def main(): diff --git a/tests/unit/test_cmd/__init__.py b/yardstick/tests/unit/test_cmd/__init__.py index e69de29bb..e69de29bb 100644 --- a/tests/unit/test_cmd/__init__.py +++ b/yardstick/tests/unit/test_cmd/__init__.py diff --git a/tests/unit/test_cmd/commands/__init__.py b/yardstick/tests/unit/test_cmd/commands/__init__.py index e69de29bb..e69de29bb 100644 --- a/tests/unit/test_cmd/commands/__init__.py +++ b/yardstick/tests/unit/test_cmd/commands/__init__.py diff --git a/tests/unit/test_cmd/commands/test_env.py b/yardstick/tests/unit/test_cmd/commands/test_env.py index 13c3ed44a..13c3ed44a 100644 --- a/tests/unit/test_cmd/commands/test_env.py +++ b/yardstick/tests/unit/test_cmd/commands/test_env.py diff --git a/tests/unit/test_cmd/commands/test_testcase.py b/yardstick/tests/unit/test_cmd/commands/test_testcase.py index 7ef157c19..7ef157c19 100644 --- a/tests/unit/test_cmd/commands/test_testcase.py +++ b/yardstick/tests/unit/test_cmd/commands/test_testcase.py diff --git a/tests/unit/test_cmd/test_NSBperf.py b/yardstick/tests/unit/test_cmd/test_NSBperf.py index 19eb0afa0..483e82a13 100644 --- a/tests/unit/test_cmd/test_NSBperf.py +++ b/yardstick/tests/unit/test_cmd/test_NSBperf.py @@ -59,7 +59,7 @@ class TestYardstickNSCli(unittest.TestCase): def test_handle_list_options(self): yardstick_ns_cli = YardstickNSCli() CLI_PATH = os.path.dirname(os.path.realpath(__file__)) - repo_dir = CLI_PATH + "/../../" + repo_dir = CLI_PATH + "/../../../" test_path = os.path.join(repo_dir, "../samples/vnf_samples/nsut/") args = {"list_vnfs": True, "list": False} self.assertRaises(SystemExit, yardstick_ns_cli.handle_list_options, |