summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INFO1
-rw-r--r--INFO.yaml4
-rw-r--r--ansible/build_yardstick_image.yml26
-rw-r--r--ansible/image_uploaders/upload_yardstick_image.yml7
-rw-r--r--ansible/infra_deploy.yml30
-rw-r--r--ansible/install.yaml44
-rw-r--r--ansible/multi_port_baremetal_ixia_correlated_test.yaml1
-rw-r--r--ansible/multi_port_baremetal_ixia_test.yaml1
-rw-r--r--ansible/nsb_setup.yml4
-rw-r--r--ansible/roles/add_repos_jumphost/tasks/Debian.yml81
-rw-r--r--ansible/roles/add_repos_jumphost/tasks/main.yml (renamed from ansible/install_dependencies.yml)9
-rw-r--r--ansible/roles/add_repos_jumphost/vars/main.yml17
-rw-r--r--ansible/roles/configure_gui/tasks/main.yml33
-rw-r--r--ansible/roles/configure_nginx/tasks/main.yml33
-rw-r--r--ansible/roles/configure_nginx/templates/yardstick.conf.j218
-rw-r--r--ansible/roles/configure_rabbitmq/tasks/main.yml30
-rw-r--r--ansible/roles/configure_uwsgi/tasks/main.yml45
-rw-r--r--ansible/roles/configure_uwsgi/templates/yardstick.ini.j218
-rw-r--r--ansible/roles/docker/tasks/Debian.yml14
-rw-r--r--ansible/roles/docker/vars/main.yml2
-rw-r--r--ansible/roles/download_collectd/defaults/main.yml2
-rw-r--r--ansible/roles/download_dpdk/defaults/main.yml14
-rw-r--r--ansible/roles/download_pktgen/defaults/main.yml8
-rw-r--r--ansible/roles/download_pktgen/tasks/main.yml38
-rw-r--r--ansible/roles/download_trex/tasks/main.yml5
-rw-r--r--ansible/roles/infra_check_requirements/tasks/main.yml55
-rw-r--r--ansible/roles/infra_create_network/tasks/create_xml.yml (renamed from ansible/roles/infra_create_network/tasks/create_xml.yaml)53
-rw-r--r--ansible/roles/infra_create_network/tasks/main.yml2
-rw-r--r--ansible/roles/infra_create_vms/tasks/configure_vm.yml20
-rw-r--r--ansible/roles/infra_create_vms/tasks/create_interfaces.yml10
-rw-r--r--ansible/roles/infra_create_vms/tasks/main.yml8
-rw-r--r--ansible/roles/infra_deploy_openstack/tasks/configure_kolla.yml40
-rw-r--r--ansible/roles/infra_deploy_openstack/tasks/configure_openstack.yml67
-rw-r--r--ansible/roles/infra_deploy_openstack/tasks/install_kolla.yml54
-rw-r--r--ansible/roles/infra_deploy_openstack/tasks/main.yml125
-rw-r--r--ansible/roles/infra_deploy_openstack/tasks/rampup_openstack.yml43
-rw-r--r--ansible/roles/infra_deploy_openstack/templates/multinode.j239
-rw-r--r--ansible/roles/infra_deploy_openstack/vars/main.yml18
-rw-r--r--ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml27
-rw-r--r--ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml8
-rw-r--r--ansible/roles/infra_destroy_previous_configuration/tasks/main.yml36
-rw-r--r--ansible/roles/infra_prepare_vms/tasks/main.yml105
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/tasks/configure_docker.yml48
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/tasks/install_packets.yml85
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/tasks/main.yml39
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/tasks/update_conf_files.yml69
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/tasks/update_keys.yml48
-rw-r--r--ansible/roles/infra_rampup_stack_nodes/vars/main.yml16
-rw-r--r--ansible/roles/install_civetweb/defaults/main.yml1
-rwxr-xr-xansible/roles/install_dependencies_jumphost/tasks/Debian.yml76
-rw-r--r--ansible/roles/install_dependencies_jumphost/tasks/RedHat.yml (renamed from ansible/roles/install_dependencies/tasks/RedHat.yml)12
-rw-r--r--[-rwxr-xr-x]ansible/roles/install_dependencies_jumphost/tasks/Suse.yml (renamed from ansible/roles/install_dependencies/tasks/Debian.yml)41
-rw-r--r--ansible/roles/install_dependencies_jumphost/tasks/main.yml (renamed from ansible/roles/install_dependencies/tasks/main.yml)0
-rw-r--r--ansible/roles/install_dpdk/tasks/main.yml2
-rw-r--r--ansible/roles/install_dpdk/vars/main.yml11
-rwxr-xr-xansible/roles/install_dpdk_shared/tasks/Debian.yml1
-rw-r--r--ansible/roles/install_dpdk_shared/tasks/main.yml16
-rw-r--r--ansible/roles/install_dpdk_shared/vars/main.yml9
-rw-r--r--ansible/roles/install_image_dependencies/defaults/main.yml1
-rw-r--r--ansible/roles/install_pktgen/tasks/main.yml25
-rw-r--r--ansible/roles/install_yardstick/tasks/main.yml46
-rw-r--r--ansible/roles/install_yardstick/tasks/regular_install.yml22
-rw-r--r--ansible/roles/install_yardstick/tasks/virtual_install.yml25
-rw-r--r--ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml3
-rw-r--r--ansible/standalone_ovs_scale_out_ixia_test.yaml1
-rw-r--r--ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml3
-rw-r--r--ansible/standalone_sriov_scale_out_ixia_test.yaml1
-rw-r--r--ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml2
-rw-r--r--api/database/v2/models.py1
-rw-r--r--api/resources/v1/env.py6
-rw-r--r--api/resources/v1/testsuites.py3
-rw-r--r--api/resources/v2/environments.py35
-rw-r--r--api/resources/v2/images.py69
-rw-r--r--api/resources/v2/tasks.py24
-rw-r--r--api/urls.py1
-rw-r--r--dashboard/opnfv_yardstick_tc006.json8
-rw-r--r--dashboard/opnfv_yardstick_tc019.json8
-rw-r--r--dashboard/opnfv_yardstick_tc045.json8
-rw-r--r--dashboard/opnfv_yardstick_tc046.json8
-rw-r--r--dashboard/opnfv_yardstick_tc047.json8
-rw-r--r--dashboard/opnfv_yardstick_tc048.json8
-rw-r--r--dashboard/opnfv_yardstick_tc051.json6
-rw-r--r--dashboard/opnfv_yardstick_tc052.json6
-rw-r--r--dashboard/opnfv_yardstick_tc056.json301
-rw-r--r--dashboard/opnfv_yardstick_tc058.json265
-rw-r--r--dashboard/opnfv_yardstick_tc082.json10
-rw-r--r--docker/Dockerfile25
-rw-r--r--docker/Dockerfile.aarch64.patch37
-rwxr-xr-xdocker/supervisor.sh5
-rw-r--r--docs/release/release-notes/release-notes.rst514
-rw-r--r--docs/release/results/euphrates_fraser_comparsion.rst8
-rw-r--r--docs/release/results/images/tc002_pod.pngbin0 -> 39106 bytes
-rw-r--r--docs/release/results/images/tc002_scenario.pngbin0 -> 44920 bytes
-rw-r--r--docs/release/results/images/tc010_pod.pngbin0 -> 44349 bytes
-rw-r--r--docs/release/results/images/tc010_scenario.pngbin0 -> 51251 bytes
-rw-r--r--docs/release/results/images/tc011_pod.pngbin0 -> 43308 bytes
-rw-r--r--docs/release/results/images/tc011_scenario.pngbin0 -> 43647 bytes
-rw-r--r--docs/release/results/images/tc012_pod.pngbin0 -> 47996 bytes
-rw-r--r--docs/release/results/images/tc012_scenario.pngbin0 -> 51405 bytes
-rw-r--r--docs/release/results/images/tc014_pod.pngbin0 -> 36462 bytes
-rw-r--r--docs/release/results/images/tc014_scenario.pngbin0 -> 42056 bytes
-rw-r--r--docs/release/results/images/tc069_pod.pngbin0 -> 41823 bytes
-rw-r--r--docs/release/results/images/tc069_scenario.pngbin0 -> 46728 bytes
-rw-r--r--docs/release/results/images/tc082_pod.pngbin0 -> 28096 bytes
-rw-r--r--docs/release/results/images/tc082_scenario.pngbin0 -> 16082 bytes
-rw-r--r--docs/release/results/images/tc083_pod.pngbin0 -> 29533 bytes
-rw-r--r--docs/release/results/images/tc083_scenario.pngbin0 -> 16481 bytes
-rw-r--r--docs/release/results/index.rst1
-rw-r--r--docs/release/results/os-nosdn-kvm-ha.rst270
-rw-r--r--docs/release/results/os-nosdn-nofeature-ha.rst492
-rw-r--r--docs/release/results/os-nosdn-nofeature-noha.rst259
-rw-r--r--docs/release/results/os-odl_l2-bgpvpn-ha.rst53
-rw-r--r--docs/release/results/os-odl_l2-nofeature-ha.rst743
-rw-r--r--docs/release/results/os-odl_l2-sfc-ha.rst231
-rw-r--r--docs/release/results/os-onos-nofeature-ha.rst257
-rw-r--r--docs/release/results/os-onos-sfc-ha.rst517
-rw-r--r--docs/release/results/overview.rst76
-rw-r--r--docs/release/results/results.rst32
-rw-r--r--docs/release/results/tc002-network-latency.rst317
-rw-r--r--docs/release/results/tc010-memory-read-latency.rst299
-rw-r--r--docs/release/results/tc011-packet-delay-variation.rst262
-rw-r--r--docs/release/results/tc012-memory-read-write-bandwidth.rst299
-rw-r--r--docs/release/results/tc014-cpu-processing-speed.rst298
-rw-r--r--docs/release/results/tc069-memory-write-bandwidth.rst300
-rw-r--r--docs/release/results/tc082-context-switches-under-load.rst129
-rw-r--r--docs/release/results/tc083-network-throughput-between-vm.rst129
-rwxr-xr-xdocs/testing/developer/devguide/devguide.rst3
-rwxr-xr-xdocs/testing/developer/devguide/devguide_nsb_prox.rst10
-rwxr-xr-xdocs/testing/user/userguide/01-introduction.rst32
-rwxr-xr-xdocs/testing/user/userguide/03-architecture.rst22
-rw-r--r--docs/testing/user/userguide/04-installation.rst292
-rw-r--r--docs/testing/user/userguide/05-operation.rst296
-rw-r--r--docs/testing/user/userguide/06-yardstick-plugin.rst (renamed from docs/testing/user/userguide/05-yardstick_plugin.rst)68
-rw-r--r--docs/testing/user/userguide/07-result-store-InfluxDB.rst (renamed from docs/testing/user/userguide/06-result-store-InfluxDB.rst)26
-rw-r--r--docs/testing/user/userguide/08-grafana.rst (renamed from docs/testing/user/userguide/07-grafana.rst)6
-rw-r--r--docs/testing/user/userguide/09-api.rst (renamed from docs/testing/user/userguide/08-api.rst)310
-rw-r--r--docs/testing/user/userguide/10-yardstick-user-interface.rst (renamed from docs/testing/user/userguide/09-yardstick_user_interface.rst)5
-rw-r--r--docs/testing/user/userguide/11-vtc-overview.rst (renamed from docs/testing/user/userguide/10-vtc-overview.rst)14
-rw-r--r--docs/testing/user/userguide/12-nsb-overview.rst (renamed from docs/testing/user/userguide/11-nsb-overview.rst)39
-rw-r--r--docs/testing/user/userguide/13-nsb-installation.rst (renamed from docs/testing/user/userguide/12-nsb_installation.rst)599
-rw-r--r--docs/testing/user/userguide/14-nsb-operation.rst (renamed from docs/testing/user/userguide/13-nsb_operation.rst)117
-rw-r--r--docs/testing/user/userguide/15-list-of-tcs.rst11
-rw-r--r--docs/testing/user/userguide/code/multi-devstack-compute-local.conf53
-rw-r--r--docs/testing/user/userguide/code/multi-devstack-controller-local.conf64
-rw-r--r--docs/testing/user/userguide/code/pod_ixia.yaml31
-rw-r--r--docs/testing/user/userguide/code/single-devstack-local.conf62
-rw-r--r--docs/testing/user/userguide/code/single-yardstick-pod.conf22
-rw-r--r--docs/testing/user/userguide/index.rst19
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc019.rst7
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc045.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc046.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc047.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc048.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc049.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc050.rst52
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc053.rst5
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc056.rst5
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc057.rst8
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc058.rst11
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc087.rst182
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc090.rst151
-rw-r--r--docs/testing/user/userguide/opnfv_yardstick_tc091.rst138
-rw-r--r--etc/infra/infra_deploy.yaml.sample35
-rw-r--r--etc/infra/infra_deploy_multi.yaml.sample97
-rw-r--r--etc/infra/infra_deploy_one.yaml.sample46
-rw-r--r--etc/infra/infra_deploy_two.yaml.sample63
-rw-r--r--etc/yardstick/nodes/apex_baremetal/pod.yaml46
-rw-r--r--etc/yardstick/nodes/apex_virtual/pod.yaml40
-rw-r--r--etc/yardstick/nodes/fuel_baremetal/pod.yaml13
-rw-r--r--etc/yardstick/nodes/pod.yaml.nsb.sample.ixia1
-rw-r--r--etc/yardstick/nodes/standalone/ixia_correlated_template.yaml3
-rw-r--r--etc/yardstick/nodes/standalone/ixia_template.yaml1
-rw-r--r--gui/app/index.html1
-rw-r--r--gui/app/scripts/controllers/container.controller.js5
-rw-r--r--gui/app/scripts/controllers/content.controller.js7
-rw-r--r--gui/app/scripts/controllers/projectDetail.controller.js34
-rw-r--r--gui/app/scripts/controllers/sut.controller.js58
-rw-r--r--gui/app/scripts/controllers/taskModify.controller.js63
-rw-r--r--gui/app/scripts/factory/main.factory.js15
-rw-r--r--gui/app/scripts/router.config.js9
-rw-r--r--gui/app/views/container.html2
-rw-r--r--gui/app/views/layout/sideNav.html5
-rw-r--r--gui/app/views/modal/taskCreate.html19
-rw-r--r--gui/app/views/sut.html33
-rw-r--r--gui/app/views/taskmodify.html23
-rwxr-xr-xinstall.sh12
-rwxr-xr-xnsb_setup.sh8
-rw-r--r--requirements.txt6
-rw-r--r--samples/dummy-no-context.yaml2
-rw-r--r--samples/dummy.yaml1
-rw-r--r--samples/netperf_soak.yaml71
-rw-r--r--samples/parser.yaml1
-rw-r--r--samples/ping_bottlenecks.yaml11
-rw-r--r--samples/storage_bottlenecks.yaml16
-rw-r--r--samples/storperf.yaml1
-rw-r--r--samples/test_suite.yaml3
-rw-r--r--samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_bottlenecks_scale_out.yaml123
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_l2fwd-2.cfg6
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_l2fwd-4.cfg13
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg15
-rw-r--r--samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg31
-rw-r--r--samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg7
-rw-r--r--samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg5
-rw-r--r--samples/vnf_samples/nsut/prox/configs/ipv4-2port.lua100
-rw-r--r--samples/vnf_samples/nsut/prox/configs/ipv4.lua130
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml2
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml2
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml5
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml3
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml5
-rw-r--r--samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml3
-rw-r--r--samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml1
-rw-r--r--samples/vnf_samples/vnf_descriptors/tg_ixload.yaml1
-rw-r--r--samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml1
-rwxr-xr-xtests/ci/load_images.sh37
-rwxr-xr-xtests/ci/prepare_env.sh81
-rwxr-xr-xtests/ci/yardstick-verify4
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml2
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc042.yaml11
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc050.yaml81
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml1
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc087.yaml278
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc090.yaml78
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc091.yaml59
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml276
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml313
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-canal-lb-noha_daily.yaml (renamed from tests/opnfv/test_suites/opnfv_vTC_daily.yaml)14
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-multus-lb-noha_daily.yaml (renamed from tests/opnfv/test_suites/opnfv_vTC_weekly.yaml)14
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-multus-nofeature-noha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-ha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml46
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-ha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-noha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-ocl-lb-noha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_k8-sriov-cni-nofeature-noha_daily.yaml18
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-calipso-noha_daily.yaml62
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-fdio-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm-noha_daily.yaml4
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-ha_daily.yaml11
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-noha_daily.yaml9
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-noha_daily.yaml4
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml186
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml8
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs-noha_daily.yaml4
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml21
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml19
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-ha_daily.yaml38
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-noha_daily.yaml38
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-ovs_offload-noha_daily.yaml38
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-sfc-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-sfc-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl-sriov-noha_daily.yaml38
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml2
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-noha_daily.yaml2
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-fdio-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-noha_daily.yaml4
-rw-r--r--tests/opnfv/test_suites/opnfv_os-odl_l3-ovs-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_os-onos-sfc-noha_daily.yaml4
-rw-r--r--tests/opnfv/test_suites/opnfv_os-ovn-nofeature-noha_daily.yaml6
-rw-r--r--tests/opnfv/test_suites/opnfv_performance.yaml8
-rw-r--r--tests/unit/network_services/helpers/test_samplevnf_helper.py8
-rw-r--r--tests/unit/network_services/nfvi/test_resource.py33
-rw-r--r--tests/unit/network_services/traffic_profile/test_prox_binsearch.py2
-rw-r--r--tests/unit/network_services/traffic_profile/test_rfc2544.py2
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_base.py8
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py30
-rw-r--r--tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py126
-rwxr-xr-xtools/virt_ci_rampup.sh28
-rw-r--r--yardstick/benchmark/contexts/base.py7
-rw-r--r--yardstick/benchmark/contexts/heat.py9
-rw-r--r--yardstick/benchmark/contexts/standalone/model.py92
-rw-r--r--yardstick/benchmark/contexts/standalone/ovs_dpdk.py207
-rw-r--r--yardstick/benchmark/contexts/standalone/sriov.py63
-rw-r--r--yardstick/benchmark/core/task.py53
-rwxr-xr-xyardstick/benchmark/runners/base.py2
-rw-r--r--yardstick/benchmark/runners/duration.py6
-rw-r--r--yardstick/benchmark/runners/iteration.py6
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/attacker_process.py15
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/baseattacker.py2
-rw-r--r--yardstick/benchmark/scenarios/availability/director.py22
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/add_server_to_existing_secgroup.bash26
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/create_instance_from_image.bash26
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_instance.bash24
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_privateip.bash24
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/nova/remove_server_from_secgroup.bash25
-rwxr-xr-xyardstick/benchmark/scenarios/availability/ha_tools/start_service.bash13
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/basemonitor.py2
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_command.py12
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py5
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_process.py10
-rw-r--r--yardstick/benchmark/scenarios/availability/operation_conf.yaml8
-rw-r--r--yardstick/benchmark/scenarios/availability/scenario_general.py28
-rwxr-xr-xyardstick/benchmark/scenarios/availability/serviceha.py27
-rw-r--r--yardstick/benchmark/scenarios/base.py30
-rw-r--r--yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash2
-rw-r--r--yardstick/benchmark/scenarios/lib/attach_volume.py35
-rw-r--r--yardstick/benchmark/scenarios/lib/create_floating_ip.py32
-rw-r--r--yardstick/benchmark/scenarios/lib/create_keypair.py49
-rw-r--r--yardstick/benchmark/scenarios/lib/create_network.py41
-rw-r--r--yardstick/benchmark/scenarios/lib/create_router.py46
-rw-r--r--yardstick/benchmark/scenarios/lib/create_sec_group.py40
-rw-r--r--yardstick/benchmark/scenarios/lib/create_server.py74
-rw-r--r--yardstick/benchmark/scenarios/lib/create_subnet.py60
-rw-r--r--yardstick/benchmark/scenarios/lib/create_volume.py49
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_floating_ip.py26
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_keypair.py29
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_network.py24
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_router.py24
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_router_interface.py28
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_server.py33
-rw-r--r--yardstick/benchmark/scenarios/lib/delete_volume.py30
-rw-r--r--yardstick/benchmark/scenarios/lib/detach_volume.py33
-rw-r--r--yardstick/benchmark/scenarios/lib/get_flavor.py37
-rw-r--r--yardstick/benchmark/scenarios/lib/get_server.py84
-rwxr-xr-xyardstick/benchmark/scenarios/networking/netperf.py4
-rw-r--r--yardstick/benchmark/scenarios/networking/pktgen_dpdk.py23
-rw-r--r--yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash32
-rw-r--r--yardstick/benchmark/scenarios/networking/testpmd_fwd.bash16
-rw-r--r--yardstick/benchmark/scenarios/networking/vnf_generic.py11
-rw-r--r--yardstick/cmd/commands/task.py15
-rw-r--r--yardstick/common/ansible_common.py53
-rw-r--r--yardstick/common/constants.py3
-rw-r--r--yardstick/common/exceptions.py142
-rw-r--r--yardstick/common/messaging/__init__.py36
-rw-r--r--yardstick/common/messaging/consumer.py85
-rw-r--r--yardstick/common/messaging/payloads.py53
-rw-r--r--yardstick/common/messaging/producer.py70
-rw-r--r--yardstick/common/openstack_utils.py939
-rw-r--r--yardstick/common/utils.py39
-rw-r--r--yardstick/network_services/collector/subscriber.py40
-rw-r--r--yardstick/network_services/constants.py2
-rw-r--r--yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py22
-rw-r--r--yardstick/network_services/nfvi/resource.py61
-rw-r--r--yardstick/network_services/traffic_profile/prox_binsearch.py8
-rw-r--r--yardstick/network_services/vnf_generic/vnf/base.py32
-rw-r--r--yardstick/network_services/vnf_generic/vnf/prox_helpers.py52
-rw-r--r--yardstick/network_services/vnf_generic/vnf/prox_vnf.py4
-rw-r--r--yardstick/network_services/vnf_generic/vnf/sample_vnf.py139
-rw-r--r--yardstick/network_services/vnf_generic/vnf/vnf_ssh_helper.py4
-rw-r--r--yardstick/orchestrator/heat.py26
-rw-r--r--yardstick/service/__init__.py12
-rw-r--r--yardstick/service/environment.py101
-rw-r--r--yardstick/tests/functional/common/messaging/__init__.py (renamed from tests/unit/network_services/collector/__init__.py)0
-rw-r--r--yardstick/tests/functional/common/messaging/test_messaging.py99
-rw-r--r--yardstick/tests/integration/dummy-scenario-heat-context.yaml38
-rw-r--r--yardstick/tests/unit/apiserver/resources/v1/__init__.py (renamed from tests/unit/network_services/libs/__init__.py)0
-rw-r--r--yardstick/tests/unit/apiserver/resources/v1/test_testsuites.py35
-rw-r--r--yardstick/tests/unit/apiserver/resources/v2/__init__.py (renamed from tests/unit/network_services/libs/ixia_libs/__init__.py)0
-rw-r--r--yardstick/tests/unit/apiserver/resources/v2/test_images.py46
-rw-r--r--yardstick/tests/unit/benchmark/contexts/standalone/test_model.py413
-rw-r--r--yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py238
-rw-r--r--yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py80
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_base.py7
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_heat.py22
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_kubernetes.py36
-rw-r--r--yardstick/tests/unit/benchmark/contexts/test_node.py18
-rw-r--r--yardstick/tests/unit/benchmark/core/test_task.py30
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py35
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/availability/test_serviceha.py19
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py6
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py52
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_floating_ip.py33
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py56
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py57
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py57
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py67
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py63
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py60
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py120
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py4
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py52
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py6
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py48
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_network.py23
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py51
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py4
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py54
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py51
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py49
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py53
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py52
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py8
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py4
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py69
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py2
-rw-r--r--yardstick/tests/unit/benchmark/scenarios/test_base.py30
-rw-r--r--yardstick/tests/unit/common/messaging/__init__.py0
-rw-r--r--yardstick/tests/unit/common/messaging/test_consumer.py54
-rw-r--r--yardstick/tests/unit/common/messaging/test_payloads.py46
-rw-r--r--yardstick/tests/unit/common/messaging/test_producer.py46
-rw-r--r--yardstick/tests/unit/common/test_ansible_common.py16
-rw-r--r--yardstick/tests/unit/common/test_openstack_utils.py617
-rw-r--r--yardstick/tests/unit/common/test_utils.py82
-rw-r--r--yardstick/tests/unit/network_services/__init__.py0
-rw-r--r--yardstick/tests/unit/network_services/collector/__init__.py0
-rw-r--r--yardstick/tests/unit/network_services/collector/test_publisher.py (renamed from tests/unit/network_services/collector/test_publisher.py)3
-rw-r--r--yardstick/tests/unit/network_services/collector/test_subscriber.py (renamed from tests/unit/network_services/collector/test_subscriber.py)44
-rw-r--r--yardstick/tests/unit/network_services/libs/__init__.py0
-rw-r--r--yardstick/tests/unit/network_services/libs/ixia_libs/__init__.py0
-rw-r--r--yardstick/tests/unit/network_services/libs/ixia_libs/test_IxNet.py (renamed from tests/unit/network_services/libs/ixia_libs/test_IxNet.py)34
-rw-r--r--yardstick/tests/unit/network_services/test_utils.py (renamed from tests/unit/network_services/test_utils.py)2
-rw-r--r--yardstick/tests/unit/network_services/test_yang_model.py (renamed from tests/unit/network_services/test_yang_model.py)12
-rw-r--r--yardstick/tests/unit/orchestrator/test_heat.py38
-rw-r--r--yardstick/tests/unit/service/__init__.py0
-rw-r--r--yardstick/tests/unit/service/test_environment.py49
-rw-r--r--yardstick/tests/unit/test_cmd/commands/test_env.py14
-rw-r--r--yardstick/tests/unit/test_cmd/commands/test_testcase.py2
437 files changed, 14350 insertions, 6883 deletions
diff --git a/INFO b/INFO
index 1a49af295..9bcc2922d 100644
--- a/INFO
+++ b/INFO
@@ -11,7 +11,6 @@ IRC: #opnfv-yardstick
Repository: yardstick
Committers:
-jorgen.w.karlsson@ericsson.com
jean.gaoliang@huawei.com
lvjing5@huawei.com
wu.zhihui1@zte.com.cn
diff --git a/INFO.yaml b/INFO.yaml
index 730cd4a6b..677c470cb 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -34,10 +34,6 @@ 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'
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml
index 7f709873e..072c12c66 100644
--- a/ansible/build_yardstick_image.yml
+++ b/ansible/build_yardstick_image.yml
@@ -30,6 +30,9 @@
workspace: "{{ lookup('env', 'workspace')|default('/tmp/workspace/yardstick', true) }}"
raw_imgfile_basename: "yardstick-{{ release }}-server.raw"
+ growpart_package:
+ RedHat: cloud-utils-growpart
+ Debian: cloud-guest-utils
environment:
- PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
- "{{ proxy_env }}"
@@ -39,6 +42,8 @@
key: image_builder
- package: name=parted state=present
+ - package: name=kpartx state=present
+ - package: name="{{ growpart_package[ansible_os_family] }}" state=present
- set_fact:
imgfile: "{{ normal_image_file }}"
@@ -54,7 +59,7 @@
- set_fact:
raw_imgfile: "{{ workspace }}/{{ raw_imgfile_basename }}"
- # cleanup non-lxd
+ # cleanup non-lxd
- name: unmount all old mount points
mount:
name: "{{ item }}"
@@ -69,6 +74,21 @@
command: kpartx -dv "{{ raw_imgfile }}"
ignore_errors: true
+ - name: Debug dump loop devices
+ command: losetup -a
+ ignore_errors: true
+
+ - name: delete loop devices for image file
+ # use this because kpartx -dv will fail if raw_imgfile was delete
+ # but in theory we could have deleted file still attached to loopback device?
+ # use grep because of // and awk
+ shell: losetup -O NAME,BACK-FILE | grep "{{ raw_imgfile_basename }}" | awk '{ print $1 }' | xargs -l1 losetup -v -d
+ ignore_errors: true
+
+ - name: Debug dump loop devices again
+ command: losetup -a
+ ignore_errors: true
+
- name: delete {{ raw_imgfile }}
file:
path: "{{ raw_imgfile }}"
@@ -99,7 +119,8 @@
command: "qemu-img resize -f raw {{ raw_imgfile }} +2G"
- name: resize parition to allow for more VNFs
- command: "parted -s -a optimal {{ raw_imgfile }} resizepart 1 100%"
+ # use growpart because maybe it handles GPT better than parted
+ command: growpart {{ raw_imgfile }} 1
- name: create mknod devices in chroot
command: "mknod -m 0660 /dev/loop{{ item }} b 7 {{ item }}"
@@ -109,7 +130,6 @@
tags: mknod_devices
- name: find first partition device
-# command: kpartx -l "{{ loop_device }}"
command: kpartx -l "{{ raw_imgfile }}"
register: kpartx_res
diff --git a/ansible/image_uploaders/upload_yardstick_image.yml b/ansible/image_uploaders/upload_yardstick_image.yml
index 9364c52a5..e61e2ab67 100644
--- a/ansible/image_uploaders/upload_yardstick_image.yml
+++ b/ansible/image_uploaders/upload_yardstick_image.yml
@@ -18,10 +18,9 @@
- get_url:
url: "{{ CLOUD_IMG_URL }}"
dest: "{{ CLOUD_IMAGE }}"
-
- - name: Extra cloud image kernel
- - unarchive:
- asdf:
+#
+# - name: Extra cloud image kernel
+# - unarchive:
- os_image:
name: yardstick-{{ release }}-kernel
diff --git a/ansible/infra_deploy.yml b/ansible/infra_deploy.yml
index 4ad21af00..8cf5dffef 100644
--- a/ansible/infra_deploy.yml
+++ b/ansible/infra_deploy.yml
@@ -13,9 +13,37 @@
# limitations under the License.
---
- hosts: jumphost
+ vars:
+ rs_file: "{{ RS_FILE }}"
+ clean_up: "{{ CLEAN_UP | default(False) }}" # If True will be delete all VMs, networks, disk images
+
+ tasks:
+ - set_fact:
+ proxy_host: "{{ lookup('env', 'http_proxy') | urlsplit('hostname') }}"
+ proxy_proto: "{{ lookup('env', 'http_proxy') | urlsplit('scheme') }}"
+ proxy_port: "{{ lookup('env', 'http_proxy') | urlsplit('port') }}"
+
+ - set_fact:
+ proxy_host_ip: "{{ lookup('dig', proxy_host) }}"
roles:
- - infra_check_requirements
- infra_destroy_previous_configuration
+ - infra_check_requirements
- infra_create_network
- infra_create_vms
+ - infra_prepare_vms
+
+- hosts: deploy,regular,yardstickG
+ gather_facts: no
+ become: yes
+
+ roles:
+ - infra_rampup_stack_nodes
+
+
+- hosts: deploy
+ become: yes
+ environment: "{{ proxy_env }}"
+
+ roles:
+ - infra_deploy_openstack
diff --git a/ansible/install.yaml b/ansible/install.yaml
new file mode 100644
index 000000000..c446b91f7
--- /dev/null
+++ b/ansible/install.yaml
@@ -0,0 +1,44 @@
+---
+- hosts: localhost
+
+ vars:
+ arch_amd64: "amd64"
+ arch_arm64: "arm64"
+ inst_mode_container: "container"
+ inst_mode_baremetal: "baremetal"
+ ubuntu_archive:
+ amd64: "http://archive.ubuntu.com/ubuntu/"
+ arm64: "http://ports.ubuntu.com/ubuntu-ports/"
+ installation_mode: "{{ INSTALLATION_MODE | default('baremetal') }}"
+ yardstick_dir: "{{ YARDSTICK_DIR | default('/home/opnfv/repos/yardstick') }}"
+ virtual_environment: "{{ VIRTUAL_ENVIRONMENT | default(False) }}"
+ nsb_dir: "{{ NSB_DIR | default('/opt/nsb_bin/') }}"
+
+ pre_tasks:
+
+ - name: Create NSB binaries directory, accesible to any user
+ file:
+ path: "{{ nsb_dir }}"
+ state: directory
+ owner: root
+ mode: 0777
+
+ roles:
+ - add_repos_jumphost
+ - install_dependencies_jumphost
+ - install_yardstick
+ - configure_uwsgi
+ - configure_nginx
+ - download_trex
+ - install_trex
+ - configure_rabbitmq
+
+ post_tasks:
+
+ - service:
+ name: nginx
+ state: restarted
+ when: installation_mode != inst_mode_container
+
+ - shell: uwsgi -i /etc/yardstick/yardstick.ini
+ when: installation_mode != inst_mode_container
diff --git a/ansible/multi_port_baremetal_ixia_correlated_test.yaml b/ansible/multi_port_baremetal_ixia_correlated_test.yaml
index ba92b5cd3..0d223181d 100644
--- a/ansible/multi_port_baremetal_ixia_correlated_test.yaml
+++ b/ansible/multi_port_baremetal_ixia_correlated_test.yaml
@@ -42,7 +42,6 @@
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/multi_port_baremetal_ixia_test.yaml b/ansible/multi_port_baremetal_ixia_test.yaml
index 52bc40b43..d2dfaa3c4 100644
--- a/ansible/multi_port_baremetal_ixia_test.yaml
+++ b/ansible/multi_port_baremetal_ixia_test.yaml
@@ -42,7 +42,6 @@
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/nsb_setup.yml b/ansible/nsb_setup.yml
index 98a59f984..fcde1d1b2 100644
--- a/ansible/nsb_setup.yml
+++ b/ansible/nsb_setup.yml
@@ -22,7 +22,7 @@
environment:
"{{ proxy_env }}"
roles:
- - install_dependencies
+ - install_dependencies_jumphost
- docker
- name: "handle all openstack stuff when: openrc_file is defined"
@@ -37,7 +37,7 @@
name: yardstick
pull: yes
recreate: yes
- image: opnfv/yardstick:latest
+ image: "{{ yardstick_docker_image|default('opnfv/yardstick:latest') }}"
state: started
restart_policy: always
privileged: yes
diff --git a/ansible/roles/add_repos_jumphost/tasks/Debian.yml b/ansible/roles/add_repos_jumphost/tasks/Debian.yml
new file mode 100644
index 000000000..626f0b037
--- /dev/null
+++ b/ansible/roles/add_repos_jumphost/tasks/Debian.yml
@@ -0,0 +1,81 @@
+# 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.
+---
+# Arguments needed: arch_arm64, arch_amd64, ubuntu_archive
+
+- name: Set the repositories architecture name
+ set_fact:
+ arch: "{{ arch_arm64 if ansible_architecture == 'aarch64' else arch_amd64 }}"
+ extra_arch: "{{ arch_amd64 if ansible_architecture == 'aarch64' else arch_arm64 }}"
+
+- name: Define the repositories names
+ set_fact:
+ repo: "{{ ubuntu_archive[arch] }}"
+ extra_repo: "{{ ubuntu_archive[extra_arch] }}"
+
+- name: Add architecture to the default repository list
+ replace:
+ path: "{{ sources_list_file }}"
+ regexp: '(^deb\s+)([^\[].*)$'
+ replace: 'deb [arch={{ arch }}] \2'
+
+- name: Remove support for source repositories
+ replace:
+ path: "{{ sources_list_file }}"
+ regexp: "^deb-src "
+ replace: "# deb-src "
+
+- name: Add extra architecture
+ command: "dpkg --add-architecture {{ extra_arch }}"
+
+- name: Define the default release version
+ copy:
+ dest: "{{ default_distro_file }}"
+ content: 'APT::Default-Release "{{ ansible_distribution_release }}";'
+
+- name: Remove extra repository file
+ file:
+ path: "{{ repo_file }}"
+ state: absent
+ ignore_errors: yes
+
+- name: Add extra repository file
+ file:
+ path: "{{ repo_file }}"
+ state: touch
+
+- name: Add the repository for qemu_static_user/xenial
+ blockinfile:
+ path: "{{ repo_file }}"
+ marker: "MARKER"
+ content: |
+ deb [arch={{ arch }}] {{ repo }} xenial-updates universe
+ when: ansible_distribution_release != "xenial"
+
+- name: Add extra architecture repositories if installing in container
+ blockinfile:
+ path: "{{ repo_file }}"
+ marker: "MARKER"
+ content: |
+ deb [arch={{ extra_arch }}] {{ extra_repo }} {{ ansible_distribution_release }} main universe multiverse restricted
+ deb [arch={{ extra_arch }}] {{ extra_repo }} {{ ansible_distribution_release }}-updates main universe multiverse restricted
+ deb [arch={{ extra_arch }}] {{ extra_repo }} {{ ansible_distribution_release }}-security main universe multiverse restricted
+ deb [arch={{ extra_arch }}] {{ extra_repo }} {{ ansible_distribution_release }}-proposed main universe multiverse restricted
+ when: installation_mode == "container"
+
+- name: Remove the marker
+ lineinfile:
+ dest: "{{ repo_file }}"
+ state: absent
+ regexp: "MARKER"
diff --git a/ansible/install_dependencies.yml b/ansible/roles/add_repos_jumphost/tasks/main.yml
index 1c7d20170..f50fd9f0d 100644
--- a/ansible/install_dependencies.yml
+++ b/ansible/roles/add_repos_jumphost/tasks/main.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation.
+# 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.
@@ -12,8 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-- name: install yardstick dependencies
- hosts: all
-
- roles:
- - install_dependencies
+- include: "{{ ansible_os_family }}.yml"
+ when: ansible_os_family == "Debian"
diff --git a/ansible/roles/add_repos_jumphost/vars/main.yml b/ansible/roles/add_repos_jumphost/vars/main.yml
new file mode 100644
index 000000000..30e444711
--- /dev/null
+++ b/ansible/roles/add_repos_jumphost/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.
+---
+repo_file: "/etc/apt/sources.list.d/yardstick.list"
+sources_list_file: "/etc/apt/sources.list"
+default_distro_file: "/etc/apt/apt.conf.d/default-distro"
diff --git a/ansible/roles/configure_gui/tasks/main.yml b/ansible/roles/configure_gui/tasks/main.yml
new file mode 100644
index 000000000..846a9cb47
--- /dev/null
+++ b/ansible/roles/configure_gui/tasks/main.yml
@@ -0,0 +1,33 @@
+# 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: Define variables
+ set_fact:
+ gui_dir: "{{ yardstick_dir }}/gui/"
+
+- name: Run gui.sh
+ shell:
+ cmd: /bin/bash gui.sh
+ chdir: "{{ gui_dir }}"
+
+- name: Create nginx/yardstick directory
+ file:
+ path: /etc/nginx/yardstick
+ state: directory
+ recurse: yes
+
+- name: Move dist to /etc/nginx/yardstick/gui
+ shell:
+ cmd: mv dist /etc/nginx/yardstick/gui
+ chdir: "{{ gui_dir }}"
diff --git a/ansible/roles/configure_nginx/tasks/main.yml b/ansible/roles/configure_nginx/tasks/main.yml
new file mode 100644
index 000000000..37b052725
--- /dev/null
+++ b/ansible/roles/configure_nginx/tasks/main.yml
@@ -0,0 +1,33 @@
+# 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: Define variables
+ set_fact:
+ socket_file: "{{ socket_file|default('/var/run/yardstick.sock') }}"
+
+- name: Make sure conf.d directory exists
+ file:
+ path: /etc/nginx/conf.d
+ state: directory
+
+- name: Create the nginx config file
+ template:
+ src: yardstick.conf.j2
+ dest: "/etc/nginx/conf.d/yardstick.conf"
+
+- name: Configure ports if RedHat OS
+ shell: |
+ semanage port -m -t http_port_t -p tcp 5000
+ semanage port -m -t http_port_t -p udp 5000
+ when: ansible_os_family == "RedHat" \ No newline at end of file
diff --git a/ansible/roles/configure_nginx/templates/yardstick.conf.j2 b/ansible/roles/configure_nginx/templates/yardstick.conf.j2
new file mode 100644
index 000000000..484096cec
--- /dev/null
+++ b/ansible/roles/configure_nginx/templates/yardstick.conf.j2
@@ -0,0 +1,18 @@
+server {
+ listen 5000;
+ server_name localhost;
+ index index.htm index.html;
+ location / {
+ include uwsgi_params;
+ client_max_body_size 2000m;
+ uwsgi_pass unix://{{ socket_file }};
+ }
+
+ location /gui/ {
+ alias /etc/nginx/yardstick/gui/;
+ }
+
+ location /report/ {
+ alias /tmp/;
+ }
+}
diff --git a/ansible/roles/configure_rabbitmq/tasks/main.yml b/ansible/roles/configure_rabbitmq/tasks/main.yml
new file mode 100644
index 000000000..3ad60c1ea
--- /dev/null
+++ b/ansible/roles/configure_rabbitmq/tasks/main.yml
@@ -0,0 +1,30 @@
+# 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: Restart rabbitmq
+ service:
+ name: rabbitmq-server
+ state: restarted
+
+- name: rabbitmqctl start_app
+ shell: rabbitmqctl start_app
+
+- name: Configure rabbitmq
+ rabbitmq_user:
+ user: yardstick
+ password: yardstick
+ configure_priv: .*
+ read_priv: .*
+ write_priv: .*
+ state: present
diff --git a/ansible/roles/configure_uwsgi/tasks/main.yml b/ansible/roles/configure_uwsgi/tasks/main.yml
new file mode 100644
index 000000000..6a2244657
--- /dev/null
+++ b/ansible/roles/configure_uwsgi/tasks/main.yml
@@ -0,0 +1,45 @@
+# 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: Define variables
+ set_fact:
+ config_dir: "/etc/yardstick/"
+ log_dir: "/var/log/yardstick/"
+ socket_file: "/var/run/yardstick.sock"
+
+- name: Create UWSGI config directory
+ file:
+ path: "/etc/yardstick"
+ state: directory
+ owner: root
+ mode: 0755
+
+- name: Create API log directory
+ file:
+ path: "{{ log_dir }}"
+ state: directory
+ owner: root
+ mode: 0777
+
+- name: Create the socket for communicating
+ file:
+ path: "{{ socket_file }}"
+ state: touch
+ owner: root
+ mode: 0644
+
+- name: Create the UWSGI config file
+ template:
+ src: yardstick.ini.j2
+ dest: "{{ config_dir }}yardstick.ini"
diff --git a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
new file mode 100644
index 000000000..c049daf84
--- /dev/null
+++ b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
@@ -0,0 +1,18 @@
+[uwsgi]
+master = true
+debug = true
+chdir = {{ yardstick_dir }}api
+module = server
+plugins = python
+processes = 10
+threads = 5
+async = true
+max-requests = 5000
+chmod-socket = 666
+callable = app_wrapper
+enable-threads = true
+close-on-exec = 1
+daemonize = {{ log_dir }}uwsgi.log
+socket = {{ socket_file }}
+{# If virtual environment, we need to add:
+ virtualenv = <virtual_env> #} \ No newline at end of file
diff --git a/ansible/roles/docker/tasks/Debian.yml b/ansible/roles/docker/tasks/Debian.yml
index cf4128774..7f998de45 100644
--- a/ansible/roles/docker/tasks/Debian.yml
+++ b/ansible/roles/docker/tasks/Debian.yml
@@ -12,15 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
- - name: add Ubuntu docker repo
- apt_repository: repo='deb [trusted=yes] {{ ubuntu_docker_url }} ubuntu-{{ ansible_distribution_release }} main' state=present
-
- - name: ensure correct docker version
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: "{{ docker_packages[ansible_os_family] }}"
-
- - name: remove Ubuntu docker repo
- apt_repository:
- repo: 'deb [trusted=yes] {{ ubuntu_docker_url }} ubuntu-{{ ansible_distribution_release }} main'
- state: absent
- update_cache: no
+ - name: Install docker.io
+ action: "{{ ansible_pkg_mgr }} name=docker.io state=present force=yes"
diff --git a/ansible/roles/docker/vars/main.yml b/ansible/roles/docker/vars/main.yml
index 8b5077490..a735d523d 100644
--- a/ansible/roles/docker/vars/main.yml
+++ b/ansible/roles/docker/vars/main.yml
@@ -16,5 +16,3 @@ docker_project_url: https://yum.dockerproject.org
docker_packages:
"RedHat":
- docker-engine-1.13.1
- "Debian":
- - docker-engine=1.13.1*
diff --git a/ansible/roles/download_collectd/defaults/main.yml b/ansible/roles/download_collectd/defaults/main.yml
index 9beaeb897..3f5632394 100644
--- a/ansible/roles/download_collectd/defaults/main.yml
+++ b/ansible/roles/download_collectd/defaults/main.yml
@@ -1,4 +1,4 @@
---
collectd_url: "https://github.com/collectd/collectd.git"
collectd_dest: "{{ clone_dest }}/collectd"
-collectd_version: "c870991a2d614e51c03c0da76e9aef997343551b"
+collectd_version: "collectd-5.8"
diff --git a/ansible/roles/download_dpdk/defaults/main.yml b/ansible/roles/download_dpdk/defaults/main.yml
index fb42ed48a..d548280f5 100644
--- a/ansible/roles/download_dpdk/defaults/main.yml
+++ b/ansible/roles/download_dpdk/defaults/main.yml
@@ -1,10 +1,14 @@
---
dpdk_version: "17.02"
-dpdk_url: "http://dpdk.org/browse/dpdk/snapshot/dpdk-{{ dpdk_version }}.zip"
+dpdk_url: "http://dpdk.org/browse/dpdk/snapshot/dpdk-{{ dpdk_version }}.tar.gz"
dpdk_file: "{{ dpdk_url|basename }}"
-dpdk_unarchive: "{{ dpdk_file|regex_replace('[.]zip$', '') }}"
+dpdk_unarchive: "{{ dpdk_file|regex_replace('[.]tar[.]gz$', '') }}"
dpdk_dest: "{{ clone_dest }}/"
+#Note DPDK 17.08 17.11 and 18.02 are currently unsupported due to prox build issues
dpdk_sha256s:
- "17.02": "sha256:c675285d5eab8e7e8537a10bdae6f03c603caa80cb4bf5b055ddd482e3b7d67f"
- "16.04": "sha256:65e587af439b21abf54c644f86ba5ce7ea65657b3272480dcd78b769d2aecac3"
- "16.07": "sha256:46fee52f9b3ff54df869414c69f122aea8f744de5ed5f8fb275a22cc9cefe094"
+ "16.07": "sha256:d876e4b2a7101f28e7e345d3c88e66afe877d15f0159c19c5bc5bc26b7b7d788"
+ "17.02": "sha256:b07b546e910095174bdb6152bb0d7ce057cc4b79aaa74771aeee4e8a7219fb38"
+ "17.05": "sha256:763bfb7e1765efcc949e79d645dc9f1ebd16591431ba0db5ce22becd928dcd0a"
+ "17.08": "sha256:3a08addbff45c636538514e9a5838fb91ea557661a4c071e03a9a6987d46e5b6" #unsupported
+ "17.11": "sha256:77a727bb3834549985f291409c9a77a1e8be1c9329ce4c3eb19a22d1461022e4" #unsupported
+ "18.02": "sha256:f1210310fd5f01a3babe3a09d9b3e5a9db791c2ec6ecfbf94ade9f893a0632b8" #unsupported
diff --git a/ansible/roles/download_pktgen/defaults/main.yml b/ansible/roles/download_pktgen/defaults/main.yml
new file mode 100644
index 000000000..b598e1d56
--- /dev/null
+++ b/ansible/roles/download_pktgen/defaults/main.yml
@@ -0,0 +1,8 @@
+---
+pktgen_version: "3.2.12"
+pktgen_url: "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-{{ pktgen_version }}.zip"
+pktgen_file: "{{ pktgen_url|basename }}"
+pktgen_unarchive: "{{ pktgen_file|regex_replace('[.]zip$', '') }}"
+pktgen_dest: "{{ clone_dest }}/"
+pktgen_sha256s:
+ "3.2.12": "sha256:a20aeb677fb847c0871acabb6e8f965ba3485e92f92e86e0bb5dc11c787b11d8"
diff --git a/ansible/roles/download_pktgen/tasks/main.yml b/ansible/roles/download_pktgen/tasks/main.yml
new file mode 100644
index 000000000..ff71f207d
--- /dev/null
+++ b/ansible/roles/download_pktgen/tasks/main.yml
@@ -0,0 +1,38 @@
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# 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.
+---
+- file:
+ path: "{{ pktgen_dest }}"
+ state: directory
+
+- name: fetch pktgen
+ get_url:
+ url: "{{ pktgen_url }}"
+ dest: "{{ pktgen_dest }}"
+ validate_certs: False
+ checksum: "{{ pktgen_sha256s[pktgen_version] }}"
+
+- unarchive:
+ src: "{{ pktgen_dest }}/{{ pktgen_file }}"
+ dest: "{{ pktgen_dest }}/"
+ copy: no
+
+- name: cleanup tar file to save space
+ file:
+ path: "{{ pktgen_dest }}/{{ pktgen_file }}"
+ state: absent
+
+- set_fact:
+ pktgen_path: "{{ pktgen_dest }}/{{ pktgen_unarchive }}"
+
diff --git a/ansible/roles/download_trex/tasks/main.yml b/ansible/roles/download_trex/tasks/main.yml
index baa964fd8..9df67d939 100644
--- a/ansible/roles/download_trex/tasks/main.yml
+++ b/ansible/roles/download_trex/tasks/main.yml
@@ -12,6 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
+- name: make sure trex_dest exists
+ file:
+ path: "{{ trex_dest }}"
+ state: directory
+
- name: fetch Trex
get_url:
url: "{{ trex_url }}"
diff --git a/ansible/roles/infra_check_requirements/tasks/main.yml b/ansible/roles/infra_check_requirements/tasks/main.yml
index 8d05bbdb7..991bd7383 100644
--- a/ansible/roles/infra_check_requirements/tasks/main.yml
+++ b/ansible/roles/infra_check_requirements/tasks/main.yml
@@ -12,32 +12,69 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
+- name: Reread system properties
+ setup:
+
- name: Include
include_vars:
- file: "{{rs_file}}"
+ 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}}"
+ 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
+ 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
+ when: ansible_processor_vcpus < vcpu_t | int
+
+- name: Define default network counter
+ set_fact:
+ num_default_network_detected: 0
+- name: Increment counter for every default network detected
+ set_fact:
+ num_default_network_detected: "{{ num_default_network_detected | int + 1 }}"
+ when:
+ - item.default_gateway is defined
+ - item.default_gateway == True
+ with_items: "{{ infra_deploy_vars.networks }}"
+
+- name: Fail if more than 1 or 0 default networks
+ fail:
+ msg: "Failed, there must be 1 default network: {{ num_default_network_detected }} detected"
+ when: num_default_network_detected | int != 1
- 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 %}"
+ 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
+ when: disk_avail|int < disk_t | int
+
+- set_fact:
+ ostack_nodes: "{{ ostack_nodes | default([]) + [item.openstack_node] }}"
+ when: item.openstack_node is defined
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+# all-in-one node node type must be controller, multinode requires at least one controller and one compute node
+- fail:
+ msg: "OpenStack node types currently supported: controller, compute. Check input VMs file."
+ when: ostack_nodes is undefined or ostack_nodes | length < 1
+
+- fail:
+ msg: "In all-in-one configuration OpenStack node type must be controller."
+ when: ostack_nodes | length == 1 and 'controller' not in ostack_nodes
+
+- fail:
+ msg: "At least one controller and one compute node expected when total number of OpenStack nodes is more than one."
+ when: ostack_nodes | length > 1 and not ('compute' in ostack_nodes and 'controller' in ostack_nodes)
diff --git a/ansible/roles/infra_create_network/tasks/create_xml.yaml b/ansible/roles/infra_create_network/tasks/create_xml.yml
index a01c7974a..345b77927 100644
--- a/ansible/roles/infra_create_network/tasks/create_xml.yaml
+++ b/ansible/roles/infra_create_network/tasks/create_xml.yml
@@ -40,48 +40,33 @@
xpath: /network
add_children:
- name: "{{ item.name }}"
- - bridge
- - ip
+ - forward:
+ mode: nat
+ - bridge:
+ name: "{{ item.name }}"
+ stp: "on"
+ delay: "0"
+ - ip:
+ address: "{{ item.host_ip }}"
+ netmask: "{{ item.netmask }}"
pretty_print: yes
-- name: Add "name" attribute to "bridge" node
+- name: Add new children nodes to "forward" node
xml:
path: "{{ xml_file }}"
- xpath: /network/bridge
- attribute: name
- value: "{{ item.name }}"
- pretty_print: yes
-
-- name: Add "stp" attribute to "bridge" node
- xml:
- path: "{{ xml_file }}"
- xpath: /network/bridge
- attribute: stp
- value: "on"
- pretty_print: yes
-
-- name: Add "delay" attribute to "bridge" node
- xml:
- path: "{{ xml_file }}"
- xpath: /network/bridge
- attribute: delay
- value: "0"
- pretty_print: yes
-
-- name: Add "address" attribute to "ip" node
- xml:
- path: "{{ xml_file }}"
- xpath: /network/ip
- attribute: address
- value: "{{ item.host_ip }}"
+ xpath: /network/forward
+ add_children:
+ - nat
pretty_print: yes
-- name: Add "netmask" attribute to "ip" node
+- name: Add new children nodes to "nat" node
xml:
path: "{{ xml_file }}"
- xpath: /network/ip
- attribute: netmask
- value: "{{ item.netmask }}"
+ xpath: /network/forward/nat
+ add_children:
+ - port:
+ start: "1024"
+ end: "65535"
pretty_print: yes
- name: Define the networks
diff --git a/ansible/roles/infra_create_network/tasks/main.yml b/ansible/roles/infra_create_network/tasks/main.yml
index eba4a3a49..025a775a1 100644
--- a/ansible/roles/infra_create_network/tasks/main.yml
+++ b/ansible/roles/infra_create_network/tasks/main.yml
@@ -18,5 +18,5 @@
name: infra_deploy_vars
- name: Create XML file
- include_tasks: create_xml.yaml
+ include_tasks: create_xml.yml
with_items: "{{ infra_deploy_vars.networks }}"
diff --git a/ansible/roles/infra_create_vms/tasks/configure_vm.yml b/ansible/roles/infra_create_vms/tasks/configure_vm.yml
index 5685e634f..a6a5e0618 100644
--- a/ansible/roles/infra_create_vms/tasks/configure_vm.yml
+++ b/ansible/roles/infra_create_vms/tasks/configure_vm.yml
@@ -47,8 +47,6 @@
output:
all: ">> /var/log/cloud-init.log"
ssh_pwauth: True
- bootcmd:
- - echo 127.0.0.1 {{ node_item.hostname }} >> /etc/hosts
users:
- name: {{ node_item.user }}
lock-passwd: False
@@ -222,6 +220,10 @@
- console:
type: pty
tty: '/dev/pts/14'
+ - graphics:
+ type: vnc
+ port: '-1'
+ autoport: 'yes'
pretty_print: yes
- name: Add new children nodes to "disk" node
@@ -241,6 +243,16 @@
name: virtio-disk0
pretty_print: yes
+- name: Add new children nodes to "graphics" node
+ xml:
+ path: "{{ xml_file }}"
+ xpath: /domain/devices/graphics
+ add_children:
+ - listen:
+ type: address
+ address: 0.0.0.0
+ pretty_print: yes
+
- name: Add new children nodes to "devices" node
xml:
path: "{{ xml_file }}"
@@ -305,7 +317,7 @@
- name: Populate network-config and add interface to xml file
include_tasks: create_interfaces.yml
- extra_vars: "{{ network_config, xml_file , slot_address, mac_address_counter }}"
+ extra_vars: "{{ network_config xml_file slot_address mac_address_counter }}"
loop_control:
loop_var: interface_item
with_items: "{{ node_item.interfaces }}"
@@ -326,7 +338,7 @@
shell: >
qemu-img convert -O qcow2 {{ node_item.image }} {{ image_dir+node_item.hostname+'.qcow2' }}
-- name: Copy and convert the ubuntu image
+- name: Resize image
shell: >
qemu-img resize {{ image_dir+node_item.hostname+'.qcow2' }} {{ node_item.disk }}M
diff --git a/ansible/roles/infra_create_vms/tasks/create_interfaces.yml b/ansible/roles/infra_create_vms/tasks/create_interfaces.yml
index 124421b56..34bfd1b71 100644
--- a/ansible/roles/infra_create_vms/tasks/create_interfaces.yml
+++ b/ansible/roles/infra_create_vms/tasks/create_interfaces.yml
@@ -24,6 +24,16 @@
addresses:
- {{ interface_item.ip }}/{{ interface_item.netmask }}
+- name: Add default gateway
+ blockinfile:
+ path: "{{ network_config }}"
+ insertafter: "{{ interface_item.ip }}"
+ marker: "MARKER"
+ block: |2
+ gateway4: {{ default_bridge.host_ip }}
+ when:
+ - default_bridge is defined
+ - default_bridge.name == interface_item.network
- name: Remove the marker introduced in network-data
lineinfile:
diff --git a/ansible/roles/infra_create_vms/tasks/main.yml b/ansible/roles/infra_create_vms/tasks/main.yml
index 62a023e7e..4d47f44ff 100644
--- a/ansible/roles/infra_create_vms/tasks/main.yml
+++ b/ansible/roles/infra_create_vms/tasks/main.yml
@@ -20,9 +20,15 @@
- set_fact:
mac_address_counter: 0
+- set_fact:
+ default_bridge: "{{ item }}"
+ when:
+ - item.default_gateway is defined
+ - item.default_gateway == True
+ with_items: "{{ infra_deploy_vars.networks }}"
+
- name: Create XML file
include_tasks: configure_vm.yml
- extra_vars: "{{ mac_address_counter }}"
loop_control:
loop_var: node_item
with_items: "{{ infra_deploy_vars.nodes }}"
diff --git a/ansible/roles/infra_deploy_openstack/tasks/configure_kolla.yml b/ansible/roles/infra_deploy_openstack/tasks/configure_kolla.yml
new file mode 100644
index 000000000..9713c0d1e
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/tasks/configure_kolla.yml
@@ -0,0 +1,40 @@
+# 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: Modify globals.yml
+ replace:
+ path: /etc/kolla/globals.yml
+ regexp: "{{ item.find }}"
+ replace: "{{ item.insert_after }}"
+ with_items:
+ - { find: '^#kolla_base_distro:.*', insert_after: 'kolla_base_distro: "ubuntu"' }
+ - { find: '^#kolla_install_type:.*', insert_after: 'kolla_install_type: "source"' }
+ - { find: '^#openstack_release:.*', insert_after: 'openstack_release: "pike"' }
+ - { find: 'kolla_internal_vip_address:.*', insert_after: 'kolla_internal_vip_address: "{{ deployvm_ip }}"' }
+ - { find: '^#network_interface:.*', insert_after: 'network_interface: "{{ hostvars[ansible_host].ansible_default_ipv4.interface }}"' }
+ - { find: '^#neutron_external_interface:.*', insert_after: 'neutron_external_interface: "{{ neutron_iface }}"' }
+ - { find: '^#enable_haproxy:.*', insert_after: 'enable_haproxy: "no"'}
+ - { find: '^#enable_heat:.*' , insert_after: 'enable_heat: "yes"'}
+ - { find: '^#docker_registry:.*', insert_after: 'docker_registry: "{{ ansible_host }}:4000"' }
+
+- name: Generate multinode from inventory
+ template:
+ src: templates/multinode.j2
+ dest: "{{ git_repos_path + 'multinode' }}"
+
+- set_fact:
+ path2multinode: "{{ git_repos_path + kolla_ans_path + '/ansible/inventory/multinode' }}"
+
+- name: Append rest groups to multinode file
+ shell: line=`grep -n '\[deployment\]' {{ path2multinode }} | cut -d ':' -f1` && tail -n +$line {{ path2multinode }} >> "{{ git_repos_path + 'multinode' }}"
diff --git a/ansible/roles/infra_deploy_openstack/tasks/configure_openstack.yml b/ansible/roles/infra_deploy_openstack/tasks/configure_openstack.yml
new file mode 100644
index 000000000..3963cb64c
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/tasks/configure_openstack.yml
@@ -0,0 +1,67 @@
+# 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: Create folders
+ file:
+ path: "{{ item }}"
+ state: directory
+ with_items:
+ - /etc/kolla/config/nova
+ - /etc/kolla/config/neutron
+
+- set_fact:
+ filter_ops: RetryFilter,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter
+
+- name: Configure OpenStack Nova
+ copy:
+ content: |
+ [filter_scheduler]
+ enabled_filters = {{ filter_ops }}
+ [libvirt]
+ cpu_mode = host-passthrough
+ dest: /etc/kolla/config/nova.conf
+
+- name: Configure OpenStack Neutron
+ copy:
+ content: |
+ [DEFAULT]
+ service_plugins=neutron.services.l3_router.l3_router_plugin.L3RouterPlugin
+ [securitygroup]
+ firewall_driver = neutron.agent.firewall.NoopFirewallDriver
+ [ml2]
+ extension_drivers=port_security
+ [agent]
+ extensions=port_security
+ dest: /etc/kolla/config/neutron.conf
+
+- name: Configure OpenStack ml2_plugin.ini
+ copy:
+ content: |
+ [ml2]
+ tenant_network_types = vxlan
+ extension_drivers = port_security
+ type_drivers = vlan,flat,local,vxlan
+ mechanism_drivers = openvswitch
+ [ml2_type_flat]
+ flat_networks = physnet1
+ [ml2_type_vlan]
+ network_vlan_ranges = physnet1
+ [securitygroup]
+ firewall_driver = iptables_hybrid
+ [ovs]
+ datapath_type = system
+ bridge_mappings = physnet1:br-ex
+ tunnel_bridge = br-tun
+ local_ip = {{ deployvm_ip }}
+ dest: /etc/kolla/config/neutron/ml2_plugin.ini
diff --git a/ansible/roles/infra_deploy_openstack/tasks/install_kolla.yml b/ansible/roles/infra_deploy_openstack/tasks/install_kolla.yml
new file mode 100644
index 000000000..38c163c6c
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/tasks/install_kolla.yml
@@ -0,0 +1,54 @@
+# 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: Download kolla and kolla-ansible from git repos
+ git:
+ repo: "{{ item.repo }}"
+ dest: "{{ git_repos_path + item.dir }}"
+ version: stable/pike
+ with_items:
+ - { dir: "{{ kolla_path }}", repo: 'https://git.openstack.org/openstack/kolla'}
+ - { dir: "{{ kolla_ans_path }}", repo: 'https://git.openstack.org/openstack/kolla-ansible' }
+
+- name: Copy kolla-ansible password.yml and globals.yml
+ shell: cp -r "{{ git_repos_path + kolla_ans_path + '/etc/kolla/' }}" /etc/
+
+- name: Copy kolla-ansible all-in-one, multinode
+ shell: cp * "{{ git_repos_path }}"
+ args:
+ chdir: "{{ git_repos_path + kolla_ans_path + '/ansible/inventory/' }}"
+
+- name: Install requirements
+ pip:
+ chdir: "{{ item[0] }}"
+ requirements: "{{ item[1] }}"
+ with_nested:
+ - [ "{{ git_repos_path + kolla_path }}", "{{ git_repos_path + kolla_ans_path }}" ]
+ - [ 'requirements.txt', 'test-requirements.txt' ]
+
+- name: pip install .
+ pip:
+ chdir: "{{ item }}"
+ name: '.'
+ with_items:
+ - "{{ git_repos_path + kolla_path }}"
+ - "{{ git_repos_path + kolla_ans_path }}"
+
+- name: Run setup.py
+ shell: "python setup.py install"
+ args:
+ chdir: "{{ item }}"
+ with_items:
+ - "{{ git_repos_path + kolla_path }}"
+ - "{{ git_repos_path + kolla_ans_path }}"
diff --git a/ansible/roles/infra_deploy_openstack/tasks/main.yml b/ansible/roles/infra_deploy_openstack/tasks/main.yml
new file mode 100644
index 000000000..ba5d5bc54
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/tasks/main.yml
@@ -0,0 +1,125 @@
+# 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.
+---
+# This script is based on https://docs.openstack.org/kolla-ansible/pike/user/quickstart.html
+- name: Include variables
+ include_vars:
+ file: "{{ rs_file }}"
+ name: infra_deploy_vars
+
+- set_fact:
+ traffic_ip: "{{ item.interfaces[1].ip }}"
+ when: item.hostname == ansible_host
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Get neutron iface
+ set_fact:
+ neutron_iface: "{{ item }}"
+ when:
+ - hostvars[ansible_host]['ansible_' + item.replace('-', '_')].ipv4 is defined
+ - hostvars[ansible_host]['ansible_' + item.replace('-', '_')].ipv4.address is defined
+ - hostvars[ansible_host]['ansible_' + item.replace('-', '_')].ipv4.address == traffic_ip
+ with_items: "{{ hostvars[ansible_host].ansible_interfaces }}"
+
+- name: Create a registry container
+ docker_container:
+ name: registry
+ image: registry:2
+ restart_policy: always
+ ports:
+ - "4000:5000"
+
+- name: Download and install Kolla
+ include_tasks: install_kolla.yml
+
+- name: Configure Kolla
+ include_tasks: configure_kolla.yml
+
+- name: Configure Open Stack
+ include_tasks: configure_openstack.yml
+
+- name: Ramp up Open Stack
+ include_tasks: rampup_openstack.yml
+
+- name: Update admin-openrc.sh
+ lineinfile:
+ path: /etc/kolla/admin-openrc.sh
+ regexp: "{{ item.find }}"
+ line: "{{ item.add }}"
+ with_items:
+ - { find: 'EXTERNAL_NETWORK', add: 'export EXTERNAL_NETWORK=public' }
+ - { find: 'OS_AUTH_TYPE', add: 'export OS_AUTH_TYPE=password' }
+
+- name: Copy env file
+ shell: cp /etc/kolla/admin-openrc.sh /tmp/admin-openrc.yaml
+
+- name: Rework as env vars
+ replace:
+ path: /tmp/admin-openrc.yaml
+ regexp: 'export\s+(.*)=(.*)'
+ replace: '\1: \2'
+
+- name: Download OpenStack env file
+ fetch:
+ src: /tmp/admin-openrc.yaml
+ dest: /tmp/
+ flat: yes
+
+- include_vars:
+ file: /tmp/admin-openrc.yaml
+ name: ostack_env
+
+- name: Re-assign IP address
+ shell: ip address show {{ neutron_iface }} | awk '/inet/ {print $2}'
+ when: neutron_iface is defined
+ register: ip_netmask
+
+- shell: >
+ ip addr del dev {{ neutron_iface }} {{ ip_netmask.stdout }} &&
+ ip addr add dev br-ex {{ infra_deploy_vars.networks[1].host_ip }}/{{ ip_netmask.stdout_lines[0].split('/')[1] }}
+ when:
+ - neutron_iface is defined
+ - ip_netmask.stdout | length > 0
+
+- name: Create external network
+ os_network:
+ name: public
+ external: yes
+ provider_physical_network: physnet1
+ provider_network_type: flat
+ environment:
+ - no_proxy: "{{ lookup('env', 'no_proxy') + ',' + ansible_host + ',' + hostvars[ansible_host].ansible_default_ipv4.address }}"
+ - "{{ ostack_env }}"
+
+- name: Create sub-network
+ os_subnet:
+ name: public-subnet
+ network_name: public
+ cidr: "{{ ip_netmask.stdout }}"
+ allocation_pool_start: "{{ infra_deploy_vars.networks[1].dhcp_ip_start }}"
+ allocation_pool_end: "{{ infra_deploy_vars.networks[1].dhcp_ip_stop }}"
+ gateway_ip: "{{ infra_deploy_vars.networks[1].host_ip }}"
+ enable_dhcp: no
+ environment:
+ - no_proxy: "{{ lookup('env', 'no_proxy') + ',' + ansible_host + ',' + hostvars[ansible_host].ansible_default_ipv4.address }}"
+ - "{{ ostack_env }}"
+
+- name: Upload OpenStack env file to Yardstick VM
+ copy:
+ src: /etc/kolla/admin-openrc.sh
+ dest: '/tmp/admin-openrc.sh'
+ delegate_to: "{{ item }}"
+ when: "groups['yardstickG'] is defined"
+ with_items:
+ - "{{ groups['yardstickG'] }}"
diff --git a/ansible/roles/infra_deploy_openstack/tasks/rampup_openstack.yml b/ansible/roles/infra_deploy_openstack/tasks/rampup_openstack.yml
new file mode 100644
index 000000000..c75bec685
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/tasks/rampup_openstack.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: Generate passwords
+ shell: kolla-genpwd
+
+- name: Generate the kolla-build.conf
+ shell: tox -e genconfig
+ args:
+ chdir: "{{ git_repos_path + kolla_path }}"
+
+- set_fact:
+ target: "{{ git_repos_path + 'all-in-one' }}"
+
+- set_fact:
+ target: "{{ git_repos_path + 'multinode' }}"
+ when: "groups['ostack'] | length > 1"
+
+- name: Run kolla-ansible precheck
+ shell: kolla-ansible prechecks -i "{{ target }}"
+
+- name: Build kolla-ansible
+ shell: kolla-build -b ubuntu -t source --profile default --tag pike --registry {{ ansible_host }}:4000 --push
+
+- name: Pull images from registry
+ shell: kolla-ansible pull -i "{{ target }}"
+
+- name: Run kolla-ansible deploy
+ shell: kolla-ansible deploy -i "{{ target }}"
+
+- name: Create an openrc file
+ shell: kolla-ansible post-deploy
diff --git a/ansible/roles/infra_deploy_openstack/templates/multinode.j2 b/ansible/roles/infra_deploy_openstack/templates/multinode.j2
new file mode 100644
index 000000000..57f87b521
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/templates/multinode.j2
@@ -0,0 +1,39 @@
+{% set control_dict = {} %}
+{% set compute_dict = {} %}
+{% for host in groups['ostack'] %}
+{% if hostvars[host].node_type is defined and hostvars[host].node_type == 'controller' %}
+{% set control_dict = control_dict.update({hostvars[host].ansible_host: hostvars[host].ansible_default_ipv4.interface}) %}
+{% endif %}
+{% endfor %}
+{% for host in groups['ostack'] %}
+{% if hostvars[host].node_type is defined and hostvars[host].node_type == 'compute' %}
+{% for iface in hostvars[host].ansible_interfaces %}
+{%- if ((hostvars[host]['ansible_' + iface.replace('-', '_')].ipv4 is defined) and
+ (hostvars[host]['ansible_' + iface.replace('-', '_')].ipv4.address is defined) and
+ (hostvars[host]['ansible_' + iface.replace('-', '_')].ipv4.address == hostvars[host].secondary_ip)) -%}
+{% set compute_dict = compute_dict.update({hostvars[host].ansible_host: iface}) %}
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endfor %}
+{% macro print_node(in_dict, iface_str='', cnt=1) %}
+{%- for host, iface in in_dict | dictsort -%}
+{% if loop.index <= cnt %}
+{% if iface_str %}
+{{ host }} ansible_ssh_user={{ hostvars[host].ansible_user }} ansible_private_key_file=/root/.ssh/id_rsa ansible_become=True {{ iface_str }}={{ iface }}
+{% else %}
+{{ host }} ansible_ssh_user={{ hostvars[host].ansible_user }} ansible_private_key_file=/root/.ssh/id_rsa ansible_become=True
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endmacro %}
+[control]
+{{ print_node(control_dict, iface_str='network_interface', cnt=control_dict | length) }}
+[compute]
+{{ print_node(compute_dict, iface_str='network_interface', cnt=compute_dict | length) }}
+[network]
+{{ print_node(control_dict, iface_str='', cnt=control_dict | length) }}
+[monitoring]
+{{ print_node(control_dict) }}
+[storage]
+{{ print_node(control_dict, iface_str='', cnt=control_dict | length) }}
diff --git a/ansible/roles/infra_deploy_openstack/vars/main.yml b/ansible/roles/infra_deploy_openstack/vars/main.yml
new file mode 100644
index 000000000..bbea56847
--- /dev/null
+++ b/ansible/roles/infra_deploy_openstack/vars/main.yml
@@ -0,0 +1,18 @@
+# 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.
+---
+kolla_path: "{{ 'https://git.openstack.org/openstack/kolla' | urlsplit('path') | basename }}"
+kolla_ans_path: "{{ 'https://git.openstack.org/openstack/kolla-ansible' | urlsplit('path') | basename }}"
+deployvm_ip: "{{ hostvars[ansible_host].host_ip }}"
+git_repos_path: '/tmp/repos/'
diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml
index 314ee30af..5e616335a 100644
--- a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml
+++ b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_network.yml
@@ -14,18 +14,18 @@
---
- name: Destroy old networks created by virt
virt_net:
- name: "{{ network_item.name }}"
+ name: "{{ network_item }}"
command: destroy
- when: network_item.name in virt_nets.list_nets
+ when: clean_up | bool or network_item in deploy_nets
-# Ignoring erros as network can be created without being defined.
+# Ignoring errors 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 }}"
+ name: "{{ network_item }}"
command: undefine
- when: network_item.name in virt_nets.list_nets
+ when: clean_up | bool or network_item in deploy_nets
ignore_errors: yes
- name: Check if "ovs-vsctl" command is present
@@ -34,15 +34,20 @@
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
+ command: ovs-vsctl --if-exists -- del-br "{{ network_item }}"
+ when:
+ - ovs_vsctl_present.rc == 0
+ - clean_up | bool or network_item in deploy_nets
+ ignore_errors: yes
- name: Check if linux bridge is present
- stat: path="{{ '/sys/class/net/'+network_item.name+'/brif/' }}"
+ stat: path="{{ '/sys/class/net/' + network_item + '/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
+ ifconfig "{{ network_item }}" down
+ brctl delbr "{{ network_item }}"
+ when:
+ - check_linux_bridge.stat.exists
+ - clean_up | bool or network_item in deploy_nets
diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml
index 5e43ee81e..91e949344 100644
--- a/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml
+++ b/ansible/roles/infra_destroy_previous_configuration/tasks/delete_vm.yml
@@ -16,14 +16,14 @@
- name: Destroy old VMs
virt:
command: destroy
- name: "{{ node_item.hostname }}"
- when: node_item.hostname in virt_vms.list_vms
+ name: "{{ vmhost_item }}"
+ when: clean_up | bool or vmhost_item in deploy_vms
ignore_errors: yes
# Ignore errors as VM can be running while undefined
- name: Undefine old VMs
virt:
command: undefine
- name: "{{ node_item.hostname }}"
- when: node_item.hostname in virt_vms.list_vms
+ name: "{{ vmhost_item }}"
+ when: clean_up | bool or vmhost_item in deploy_vms
ignore_errors: yes
diff --git a/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml b/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml
index e6c2c0229..6c4aa33cf 100644
--- a/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml
+++ b/ansible/roles/infra_destroy_previous_configuration/tasks/main.yml
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-- name: Include
+- name: Include input file
include_vars:
file: "{{ rs_file }}"
name: infra_deploy_vars
@@ -25,16 +25,40 @@
virt: command=list_vms
register: virt_vms
+- set_fact:
+ deploy_vms: "{{ deploy_vms | default([]) + [item.hostname] }}"
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Define old disk images to delete
+ shell: virsh domblklist {{ item }} | awk '/\/.*/ { print $2 }'
+ when: clean_up | bool or item in deploy_vms
+ with_items: "{{ virt_vms.list_vms }}"
+ register: virt_img
+
+- set_fact:
+ images: "{{ images | default([]) + item.stdout_lines }}"
+ when: item.stdout_lines is defined and item.stdout_lines | length > 0
+ with_items: "{{ virt_img.results }}"
+
- name: Destroy old VMs
include_tasks: delete_vm.yml
- extra_vars: "{{ virt_vms }}"
loop_control:
- loop_var: node_item
- with_items: "{{ infra_deploy_vars.nodes }}"
+ loop_var: vmhost_item
+ with_items: "{{ virt_vms.list_vms }}"
+
+- set_fact:
+ deploy_nets: "{{ deploy_nets | default([]) + [item.name] }}"
+ with_items: "{{ infra_deploy_vars.networks }}"
- 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 }}"
+ with_items: "{{ virt_nets.list_nets }}"
+
+- name: Delete old disk images
+ file:
+ path: "{{ item }}"
+ state: absent
+ when: images is defined and images | length > 0
+ with_items: "{{ images }}"
diff --git a/ansible/roles/infra_prepare_vms/tasks/main.yml b/ansible/roles/infra_prepare_vms/tasks/main.yml
new file mode 100644
index 000000000..d7ed08511
--- /dev/null
+++ b/ansible/roles/infra_prepare_vms/tasks/main.yml
@@ -0,0 +1,105 @@
+# 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 input file
+ include_vars:
+ file: "{{ rs_file }}"
+ name: infra_deploy_vars
+
+- name: Install setuptools
+ apt:
+ name: python-setuptools
+
+- name: Install pip
+ shell: easy_install pip
+ environment: "{{ proxy_env }}"
+
+- name: Install dependency for dns dig
+ pip:
+ name: dnspython
+ state: latest
+
+- set_fact:
+ block_str: "{{ block_str | default('') + item.interfaces[0].ip + ' ' + item.hostname + '\n'}}"
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Delete hosts between markers
+ blockinfile:
+ path: /etc/hosts
+ marker: "# {mark} generated hosts file"
+ content: ""
+
+- name: Update /etc/hosts
+ blockinfile:
+ path: /etc/hosts
+ block: |
+ {{ block_str }}
+ marker: "# {mark} generated hosts file"
+
+- name: Clear known hosts
+ shell: >
+ ssh-keygen -f /root/.ssh/known_hosts -R "{{ item.interfaces[0].ip }}";
+ ssh-keygen -f /root/.ssh/known_hosts -R "{{ item.hostname }}"
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- set_fact:
+ controllers: "{{ controllers | default([]) + [item.hostname] }}"
+ when:
+ - item.openstack_node is defined
+ - item.openstack_node == 'controller'
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Add host controller as deploy
+ add_host:
+ hostname: "{{ item.hostname }}"
+ host_ip: "{{ item.interfaces[0].ip }}"
+ groups: deploy, ostack
+ ansible_host: "{{ item.hostname }}"
+ ansible_user: "{{ item.user }}"
+ ansible_ssh_pass: "{{ item.password }}"
+ node_type: "{{ item.openstack_node }}"
+ secondary_ip: "{{ item.interfaces[1].ip }}"
+ when: item.hostname == controllers[0]
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Add hosts others as controller, compute
+ add_host:
+ hostname: "{{ item.hostname }}"
+ host_ip: "{{ item.interfaces[0].ip }}"
+ groups: regular,ostack
+ ansible_host: "{{ item.hostname }}"
+ ansible_user: "{{ item.user }}"
+ ansible_ssh_pass: "{{ item.password }}"
+ node_type: "{{ item.openstack_node }}"
+ secondary_ip: "{{ item.interfaces[1].ip }}"
+ when:
+ - item.openstack_node is defined
+ - item.openstack_node == 'controller' or item.openstack_node == 'compute'
+ - item.hostname != controllers[0]
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Add yardstick host to group
+ add_host:
+ hostname: "{{ item.hostname }}"
+ host_ip: "{{ item.interfaces[0].ip }}"
+ groups: yardstickG
+ ansible_host: "{{ item.hostname }}"
+ ansible_user: "{{ item.user }}"
+ ansible_ssh_pass: "{{ item.password }}"
+ secondary_ip: "{{ item.interfaces[1].ip }}"
+ when: item.hostname == 'yardstickvm'
+ with_items: "{{ infra_deploy_vars.nodes }}"
+
+- name: Workaround, not all VMs are ready by that time
+ pause: seconds=20
diff --git a/ansible/roles/infra_rampup_stack_nodes/tasks/configure_docker.yml b/ansible/roles/infra_rampup_stack_nodes/tasks/configure_docker.yml
new file mode 100644
index 000000000..a6ae00e51
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/tasks/configure_docker.yml
@@ -0,0 +1,48 @@
+# 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.
+---
+- file:
+ path: /lib/systemd/system/docker.service.d
+ state: directory
+
+- copy:
+ content: |
+ [Service]
+ MountFlags=shared
+ dest: /lib/systemd/system/docker.service.d/kolla.conf
+
+- set_fact:
+ ostack_hosts: "{{ ostack_hosts | default([]) + [hostvars[item].ansible_host] }}"
+ with_items: "{{ groups['ostack'] }}"
+
+- name: Create proxy configuration for docker
+ copy:
+ content: |
+ [Service]
+ Environment="HTTP_PROXY={{ lookup('env', 'http_proxy') }}"
+ Environment="HTTPS_PROXY={{ lookup('env', 'https_proxy') }}"
+ Environment="FTP_PROXY={{ lookup('env', 'ftp_proxy') }}"
+ Environment="NO_PROXY={{ lookup('env', 'no_proxy') }},{{ hostvars[ansible_host].ansible_default_ipv4.address }},{{ ostack_hosts | join(',') }}"
+ dest: /lib/systemd/system/docker.service.d/http-proxy.conf
+
+- name: Update /etc/default/docker
+ lineinfile:
+ path: /etc/default/docker
+ line: 'DOCKER_OPTS="--dns {{ hostvars[ansible_host].ansible_default_ipv4.gateway }} --insecure-registry {{ deploy_host }}:4000"'
+
+- name: reload restart docker
+ systemd:
+ state: restarted
+ daemon_reload: yes
+ name: docker
diff --git a/ansible/roles/infra_rampup_stack_nodes/tasks/install_packets.yml b/ansible/roles/infra_rampup_stack_nodes/tasks/install_packets.yml
new file mode 100644
index 000000000..d22e8155a
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/tasks/install_packets.yml
@@ -0,0 +1,85 @@
+# 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: Update apt cache
+ apt:
+ update_cache: yes
+ upgrade: yes
+ cache_valid_time: 36000
+ environment: "{{ proxy_env }}"
+
+- name: Install packets
+ apt:
+ name: "{{ item }}"
+ with_items:
+ - python-tox
+ - python-dev
+ - libffi-dev
+ - libssl-dev
+ - python3-dev
+ - ethtool
+ - ipmitool
+ - git
+ - ntp
+ - apparmor-utils
+ - docker.io
+ - libvirt-bin
+ - python-setuptools
+ - build-essential
+ environment: "{{ proxy_env }}"
+
+- name: Install pip
+ shell: easy_install pip
+ environment: "{{ proxy_env }}"
+
+- name: Update pip ansible docker
+ pip:
+ name: "{{ item }}"
+ state: latest
+ with_items:
+ - ansible
+ - docker
+ - tox
+ - shade
+ environment: "{{ proxy_env }}"
+
+- name: Remove conflicting packages
+ apt:
+ name: "{{ item }}"
+ state: absent
+ with_items:
+ - lxd
+ - lxc
+
+- name: Stop and disable libvirt
+ systemd:
+ state: stopped
+ enabled: no
+ name: libvirt-bin.service
+
+- name: Stop and disable apparmor service
+ systemd:
+ name: apparmor
+ state: stopped
+ enabled: no
+
+- name: Get stat of libvirtd apparmor profile
+ stat:
+ path: /etc/apparmor.d/disable/usr.sbin.libvirtd
+ register: apparmor_libvirtd_profile
+
+- name: Remove apparmor profile for libvirt
+ shell: ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ && apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
+ when:
+ - apparmor_libvirtd_profile.stat.exists == False
diff --git a/ansible/roles/infra_rampup_stack_nodes/tasks/main.yml b/ansible/roles/infra_rampup_stack_nodes/tasks/main.yml
new file mode 100644
index 000000000..65d5e59d8
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/tasks/main.yml
@@ -0,0 +1,39 @@
+# 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.
+---
+# Configure proxy and install python to support ansible
+- name: Create apt.conf proxy config
+ raw: >
+ echo 'Acquire::http::proxy "{{ hostvars[groups['jumphost'][0]].proxy_proto + '://' + hostvars[groups['jumphost'][0]].proxy_host_ip + ':' + hostvars[groups['jumphost'][0]].proxy_port }}";'
+ > /etc/apt/apt.conf.d/22proxy
+
+- name: Install python which is required to run ansible mudules
+ raw: apt-get update && apt-get install -y python
+
+- name: Gather facts
+ setup:
+
+- name: Update configuration files
+ include_tasks: update_conf_files.yml
+
+- name: Install packets
+ include_tasks: install_packets.yml
+ when: ansible_hostname in groups['ostack']
+
+- name: Configure docker settings
+ include_tasks: configure_docker.yml
+ when: ansible_hostname in groups['ostack']
+
+- name: generate and apply SSH keys
+ include_tasks: update_keys.yml
diff --git a/ansible/roles/infra_rampup_stack_nodes/tasks/update_conf_files.yml b/ansible/roles/infra_rampup_stack_nodes/tasks/update_conf_files.yml
new file mode 100644
index 000000000..424fb543b
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/tasks/update_conf_files.yml
@@ -0,0 +1,69 @@
+# 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: Set hostname
+ shell: hostname {{ ansible_hostname }}
+
+- name: Delete hosts between markers
+ blockinfile:
+ path: /etc/hosts
+ marker: "# {mark} generated hosts file"
+ content: ""
+
+- set_fact:
+ block_str: "{{ block_str | default('') + hostvars[item].host_ip + ' ' + hostvars[item].ansible_host + '\n'}}"
+ with_items: "{{ groups['ostack'] }}"
+
+- name: Update /etc/hosts
+ blockinfile:
+ path: /etc/hosts
+ block: |
+ {{ block_str }}
+ marker: "# {mark} generated hosts file"
+
+- name: Update /etc/hosts
+ lineinfile:
+ path: /etc/hosts
+ regexp: ".*{{ hostvars[groups['jumphost'][0]].proxy_host }}.*"
+ line: "{{ hostvars[groups['jumphost'][0]].proxy_host_ip }} {{ hostvars[groups['jumphost'][0]].proxy_host }}"
+
+- name: Turn off IPv6
+ lineinfile:
+ path: /etc/sysctl.conf
+ regexp: '^{{ item }}.*'
+ line: "{{ item }} = 1"
+ with_items:
+ - 'net.ipv6.conf.all.disable_ipv6'
+ - 'net.ipv6.conf.default.disable_ipv6'
+ - 'net.ipv6.conf.lo.disable_ipv6'
+
+- name: Update IP configuration
+ shell: sysctl -p
+
+- name: Update resolv.conf
+ shell: echo "{{ 'nameserver ' + hostvars[ansible_host].ansible_default_ipv4.gateway }}" > /etc/resolvconf/resolv.conf.d/base
+
+- name: Update name servers
+ shell: resolvconf -u
+
+- name: Update /etc/environment
+ lineinfile:
+ path: /etc/environment
+ regexp: "{{ item.find }}"
+ line: "{{ item.add }}"
+ with_items:
+ - { find: 'http_proxy=', add: "{{ 'export http_proxy=' + lookup('env', 'http_proxy') }}" }
+ - { find: 'https_proxy=', add: "{{ 'export https_proxy=' + lookup('env', 'https_proxy') }}" }
+ - { find: 'ftp_proxy=', add: "{{ 'export ftp_proxy=' + lookup('env', 'ftp_proxy') }}" }
+ - { find: 'no_proxy=', add: "{{ 'export no_proxy=' + lookup('env', 'no_proxy') + ',' + ansible_host + ',' + hostvars[ansible_host].ansible_default_ipv4.address }}" }
diff --git a/ansible/roles/infra_rampup_stack_nodes/tasks/update_keys.yml b/ansible/roles/infra_rampup_stack_nodes/tasks/update_keys.yml
new file mode 100644
index 000000000..816f7cbca
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/tasks/update_keys.yml
@@ -0,0 +1,48 @@
+# 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: Generate keys
+ user:
+ name: "{{ hostvars[ansible_host].ansible_user }}"
+ generate_ssh_key: yes
+ state: present
+ ssh_key_file: "/root/.ssh/id_rsa"
+
+- name: Get remote files
+ fetch:
+ src: "/root/.ssh/id_rsa.pub"
+ dest: "/tmp"
+
+- name: Update authorized_key
+ authorized_key:
+ key: "{{ lookup('file', '/tmp/{{ hostvars[item].ansible_host }}/root/.ssh/id_rsa.pub') }}"
+ state: present
+ user: "{{ hostvars[item].ansible_user }}"
+ with_items:
+ - "{{ groups['ostack'] }}"
+ - "{{ groups['yardstickG'] }}"
+
+- name: Make sure the known hosts file exists
+ file:
+ path: "{{ ssh_known_hosts_file }}"
+ state: touch
+
+- name: Add key to known hosts
+ known_hosts:
+ name: "{{ hostvars[item].ansible_host }}"
+ key: "{{ lookup('pipe', 'ssh-keyscan -t rsa {{ hostvars[item].ansible_host }}') }}"
+ path: "{{ ssh_known_hosts_file }}"
+ with_items:
+ - "{{ groups['ostack'] }}"
+ - "{{ groups['yardstickG'] }}"
diff --git a/ansible/roles/infra_rampup_stack_nodes/vars/main.yml b/ansible/roles/infra_rampup_stack_nodes/vars/main.yml
new file mode 100644
index 000000000..252eb86b3
--- /dev/null
+++ b/ansible/roles/infra_rampup_stack_nodes/vars/main.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.
+---
+ssh_known_hosts_file: "/root/.ssh/known_hosts"
+deploy_host: "{{ hostvars[groups['deploy'][0]].ansible_host }}"
diff --git a/ansible/roles/install_civetweb/defaults/main.yml b/ansible/roles/install_civetweb/defaults/main.yml
index 2235fe172..ed5ab27f2 100644
--- a/ansible/roles/install_civetweb/defaults/main.yml
+++ b/ansible/roles/install_civetweb/defaults/main.yml
@@ -15,6 +15,7 @@
civetweb_dest: "{{ clone_dest }}/civetweb"
civetweb_build_dependencies:
Debian:
+ - libjson-c-dev=0.11-4ubuntu2
- libjson0
- libjson0-dev
- libssl-dev
diff --git a/ansible/roles/install_dependencies_jumphost/tasks/Debian.yml b/ansible/roles/install_dependencies_jumphost/tasks/Debian.yml
new file mode 100755
index 000000000..9baf7e59e
--- /dev/null
+++ b/ansible/roles/install_dependencies_jumphost/tasks/Debian.yml
@@ -0,0 +1,76 @@
+# 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: Update repositories
+ apt:
+ update_cache: yes
+
+- name: Install core packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items:
+ - wget
+ - curl
+ - screen
+ - procps
+ - socat
+ - sshpass
+ - sudo
+ - vim
+ - libffi-dev
+ - libfuse-dev
+ - libssl-dev
+ - libxft-dev
+ - libxml2-dev
+ - libxss-dev
+ - libxslt-dev
+ - libxslt1-dev
+ - libzmq-dev
+ - qemu-user-static
+ - qemu-utils
+ - kpartx
+ - python
+ - python-setuptools
+ - python-dev
+ - python-pip
+ - python-libvirt
+ - python-virtualenv
+ - bridge-utils
+ - ebtables
+ - openssl
+ - ccze
+ - nginx-full
+ - uwsgi
+ - uwsgi-plugin-python
+ - supervisor
+ - lsof
+ - nodejs
+ - npm
+ - rabbitmq-server
+
+- name: Install libc6:arm64 package
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items:
+ - libc6:arm64
+ when:
+ - arch is defined
+ - arch != arch_arm64
+ - installation_mode == inst_mode_container
+
+- name: Remove dependencies that are no longer required
+ apt:
+ update_cache: yes
+
+- name: Remove useless packages from the cache
+ apt:
+ autoclean: yes
diff --git a/ansible/roles/install_dependencies/tasks/RedHat.yml b/ansible/roles/install_dependencies_jumphost/tasks/RedHat.yml
index a5d4d0b15..85eb1156a 100644
--- a/ansible/roles/install_dependencies/tasks/RedHat.yml
+++ b/ansible/roles/install_dependencies_jumphost/tasks/RedHat.yml
@@ -42,5 +42,13 @@
- python-setuptools
- libffi-devel
- python-devel
- - kpartx
-
+ - nodejs
+ - npm
+ - gcc
+ - lsof
+ - procps
+ - bridge-utils
+ - ebtables
+ - openssl
+ - python-virtualenv
+ - ccze
diff --git a/ansible/roles/install_dependencies/tasks/Debian.yml b/ansible/roles/install_dependencies_jumphost/tasks/Suse.yml
index bba6fb13c..af53c9cd5 100755..100644
--- a/ansible/roles/install_dependencies/tasks/Debian.yml
+++ b/ansible/roles/install_dependencies_jumphost/tasks/Suse.yml
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Intel Corporation.
+# 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.
@@ -12,39 +12,38 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
+- name: Install EPEL if needed
+ action: "{{ ansible_pkg_mgr }} name=epel-release state=present"
+ when: ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux']
+
- name: Install core packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items:
- - python-minimal
+ - deltarpm
- wget
+ - expect
- curl
- screen
- - procps
- git
- socat
- sshpass
- - libxslt1-dev
- - libffi-dev
- - libfuse-dev
- qemu-kvm
- - qemu-user-static
- - qemu-utils
- kpartx
- - libvirt0
- - python-libvirt
+ - libxslt-devel
+ - libffi-devel
+ - openssl-devel
+ - nginx
+ - uwsgi
+ - python-setuptools
+ - libffi-devel
+ - python-devel
+ - nodejs
+ - npm
+ - gcc
+ - lsof
+ - procps
- bridge-utils
- ebtables
- openssl
- - libssl-dev
- - python-dev
- python-virtualenv
- ccze
- - libxml2-dev
- - libxslt-dev
- - libzmq-dev
- - nginx-full
- - uwsgi
- - uwsgi-plugin-python
- - supervisor
- - python-setuptools
- - lsof
diff --git a/ansible/roles/install_dependencies/tasks/main.yml b/ansible/roles/install_dependencies_jumphost/tasks/main.yml
index 27660c3ca..27660c3ca 100644
--- a/ansible/roles/install_dependencies/tasks/main.yml
+++ b/ansible/roles/install_dependencies_jumphost/tasks/main.yml
diff --git a/ansible/roles/install_dpdk/tasks/main.yml b/ansible/roles/install_dpdk/tasks/main.yml
index e82ad8363..5bcfb50b1 100644
--- a/ansible/roles/install_dpdk/tasks/main.yml
+++ b/ansible/roles/install_dpdk/tasks/main.yml
@@ -116,7 +116,7 @@
- name: copy dpdk-devbind.py to correct location
copy:
- src: "{{ dpdk_devbind[dpdk_version] }}"
+ src: "{{ dpdk_devbind_usertools if dpdk_version|float >= 17.02 else dpdk_devbind_tools }}"
dest: "{{ INSTALL_BIN_PATH }}/dpdk-devbind.py"
remote_src: yes
force: yes
diff --git a/ansible/roles/install_dpdk/vars/main.yml b/ansible/roles/install_dpdk/vars/main.yml
index 45bcc339b..957f47e99 100644
--- a/ansible/roles/install_dpdk/vars/main.yml
+++ b/ansible/roles/install_dpdk/vars/main.yml
@@ -1,9 +1,10 @@
---
-dpdk_make_arch: x86_64-native-linuxapp-gcc
+dpdk_make_archs:
+ "amd64": "x86_64-native-linuxapp-gcc"
+ "arm64": "arm64-native-linuxapp-gcc"
+dpdk_make_arch: "{{ dpdk_make_archs[YARD_IMG_ARCH] }}"
dpdk_module_dir: "/lib/modules/{{ dpdk_kernel }}/extra"
hugetable_mount: /mnt/huge
-dpdk_devbind:
- "16.07": "{{ dpdk_path }}/tools/dpdk-devbind.py"
- "17.02": "{{ dpdk_path }}/usertools/dpdk-devbind.py"
- "17.04": "{{ dpdk_path }}/usertools/dpdk-devbind.py"
+dpdk_devbind_tools: "{{ dpdk_path }}/tools/dpdk-devbind.py"
+dpdk_devbind_usertools: "{{ dpdk_path }}/usertools/dpdk-devbind.py"
dpdk_pmd_path: /usr/lib/dpdk-pmd/
diff --git a/ansible/roles/install_dpdk_shared/tasks/Debian.yml b/ansible/roles/install_dpdk_shared/tasks/Debian.yml
index c77e4f96a..641d8f9cd 100755
--- a/ansible/roles/install_dpdk_shared/tasks/Debian.yml
+++ b/ansible/roles/install_dpdk_shared/tasks/Debian.yml
@@ -16,6 +16,7 @@
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items:
- libpcap-dev
+ - libnuma-dev
- name: Install kernel headers
action: "{{ ansible_pkg_mgr }} name=linux-headers-{{ dpdk_kernel }} state=present"
diff --git a/ansible/roles/install_dpdk_shared/tasks/main.yml b/ansible/roles/install_dpdk_shared/tasks/main.yml
index 65954be04..94b9215bd 100644
--- a/ansible/roles/install_dpdk_shared/tasks/main.yml
+++ b/ansible/roles/install_dpdk_shared/tasks/main.yml
@@ -42,6 +42,15 @@
set_fact:
RTE_KERNELDIR: "/lib/modules/{{ dpdk_kernel }}/build"
+# make clean must be run here as DPDK-shared is a copy of the DPDK directory
+# which has already run the make command
+# no T= target for clean
+- command: make -j {{ ansible_processor_vcpus }} clean O={{ dpdk_make_arch }}
+ args:
+ chdir: "{{ dpdk_shared_path }}"
+ environment:
+ RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
+
- command: make -j {{ ansible_processor_vcpus }} config T={{ dpdk_make_arch }} O={{ dpdk_make_arch }}
args:
chdir: "{{ dpdk_shared_path }}"
@@ -85,13 +94,6 @@
regexp: '^CONFIG_RTE_EAL_PMD_PATH=""'
line: 'CONFIG_RTE_EAL_PMD_PATH="{{ dpdk_pmd_path }}"'
- # no T= target for clean
-- command: make -j {{ ansible_processor_vcpus }} clean O={{ dpdk_make_arch }}
- args:
- chdir: "{{ dpdk_shared_path }}"
- environment:
- RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
-
# TODO: disable ASLR
- command: make -j {{ ansible_processor_vcpus }}
diff --git a/ansible/roles/install_dpdk_shared/vars/main.yml b/ansible/roles/install_dpdk_shared/vars/main.yml
index 45bcc339b..b663cedd2 100644
--- a/ansible/roles/install_dpdk_shared/vars/main.yml
+++ b/ansible/roles/install_dpdk_shared/vars/main.yml
@@ -1,9 +1,8 @@
---
-dpdk_make_arch: x86_64-native-linuxapp-gcc
+dpdk_make_archs:
+ "amd64": "x86_64-native-linuxapp-gcc"
+ "arm64": "arm64-native-linuxapp-gcc"
+dpdk_make_arch: "{{ dpdk_make_archs[YARD_IMG_ARCH] }}"
dpdk_module_dir: "/lib/modules/{{ dpdk_kernel }}/extra"
hugetable_mount: /mnt/huge
-dpdk_devbind:
- "16.07": "{{ dpdk_path }}/tools/dpdk-devbind.py"
- "17.02": "{{ dpdk_path }}/usertools/dpdk-devbind.py"
- "17.04": "{{ dpdk_path }}/usertools/dpdk-devbind.py"
dpdk_pmd_path: /usr/lib/dpdk-pmd/
diff --git a/ansible/roles/install_image_dependencies/defaults/main.yml b/ansible/roles/install_image_dependencies/defaults/main.yml
index f0b53215a..7a3f5fa7e 100644
--- a/ansible/roles/install_image_dependencies/defaults/main.yml
+++ b/ansible/roles/install_image_dependencies/defaults/main.yml
@@ -28,6 +28,7 @@ install_dependencies:
# for IxLoad
- libxft-dev
- libxss-dev
+ - expect
RedHat:
- bc
- fio
diff --git a/ansible/roles/install_pktgen/tasks/main.yml b/ansible/roles/install_pktgen/tasks/main.yml
new file mode 100644
index 000000000..294c77971
--- /dev/null
+++ b/ansible/roles/install_pktgen/tasks/main.yml
@@ -0,0 +1,25 @@
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# 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 build env vars
+ set_fact:
+ build_env_vars:
+ RTE_SDK: "{{ RTE_SDK }}"
+ RTE_TARGET: "{{ RTE_TARGET }}"
+
+- name: "make pktgen"
+ command: make
+ args:
+ chdir: "{{ pktgen_path }}"
+ environment: "{{ build_env_vars }}"
diff --git a/ansible/roles/install_yardstick/tasks/main.yml b/ansible/roles/install_yardstick/tasks/main.yml
new file mode 100644
index 000000000..ee1b83756
--- /dev/null
+++ b/ansible/roles/install_yardstick/tasks/main.yml
@@ -0,0 +1,46 @@
+# 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.
+---
+# Arguments needed: map_min_addr_file, yardstick_dir
+
+- name: Define variables
+ set_fact:
+ map_min_addr_file: "/etc/sysctl.d/mmap_min_addr.conf"
+
+- name: Remove the kernel minimum virtual address restriction that a process is allowed to mmap
+ copy:
+ dest: "{{ map_min_addr_file }}"
+ content: "vm.mmap_min_addr = 0\n"
+
+- name: Config git SSL
+ git_config:
+ name: http.sslVerify
+ scope: global
+ value: False
+
+# There is a bug with the easy install ansible module in suse linux.
+# Until this is fixed the shell command must be used
+- name: Install pip
+ shell: easy_install -U pip
+# easy_install:
+# name: pip
+# state: latest
+
+- name: install yardstick without virtual environment
+ include_tasks: regular_install.yml
+ when: virtual_environment == False
+
+- name: install yardstick with virtual environment
+ include_tasks: virtual_install.yml
+ when: virtual_environment == True
diff --git a/ansible/roles/install_yardstick/tasks/regular_install.yml b/ansible/roles/install_yardstick/tasks/regular_install.yml
new file mode 100644
index 000000000..4a9925ab4
--- /dev/null
+++ b/ansible/roles/install_yardstick/tasks/regular_install.yml
@@ -0,0 +1,22 @@
+# 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 Yardstick requirements
+ pip:
+ requirements: "{{ yardstick_dir }}/requirements.txt"
+
+- name: Install Yardstick code
+ pip:
+ name: "{{ yardstick_dir }}/."
+ extra_args: -e
diff --git a/ansible/roles/install_yardstick/tasks/virtual_install.yml b/ansible/roles/install_yardstick/tasks/virtual_install.yml
new file mode 100644
index 000000000..8545acbcb
--- /dev/null
+++ b/ansible/roles/install_yardstick/tasks/virtual_install.yml
@@ -0,0 +1,25 @@
+# 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 Yardstick requirements
+ pip:
+ requirements: "{{ yardstick_dir }}/requirements.txt"
+ virtualenv: "{{ yardstick_dir }}/virtualenv"
+
+- name: Install Yardstick code
+ pip:
+ name: "{{ yardstick_dir }}/."
+ extra_args: -e
+ virtualenv: "{{ yardstick_dir }}/virtualenv"
+
diff --git a/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml b/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml
index 516676576..b54ea9b57 100644
--- a/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml
+++ b/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml
@@ -51,13 +51,12 @@
user: ""
password: ""
key_filename: ~
- tg_config:
+ tg_config:
ixchassis: "1.1.1.127" #ixia chassis ip
tcl_port: "8009" # tcl server port
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/standalone_ovs_scale_out_ixia_test.yaml b/ansible/standalone_ovs_scale_out_ixia_test.yaml
index ff665377f..cae373432 100644
--- a/ansible/standalone_ovs_scale_out_ixia_test.yaml
+++ b/ansible/standalone_ovs_scale_out_ixia_test.yaml
@@ -60,7 +60,6 @@
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml b/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml
index 45a4a498b..0e3a0af55 100644
--- a/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml
+++ b/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml
@@ -43,13 +43,12 @@
user: ""
password: ""
key_filename: ~
- tg_config:
+ tg_config:
ixchassis: "1.1.1.127" #ixia chassis ip
tcl_port: "8009" # tcl server port
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/standalone_sriov_scale_out_ixia_test.yaml b/ansible/standalone_sriov_scale_out_ixia_test.yaml
index 659dbef07..8fb09d9b9 100644
--- a/ansible/standalone_sriov_scale_out_ixia_test.yaml
+++ b/ansible/standalone_sriov_scale_out_ixia_test.yaml
@@ -49,7 +49,6 @@
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/results"
version: "8.01.106.3"
pcis:
diff --git a/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml b/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml
index 85afa2a30..7aa6c8c12 100644
--- a/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml
+++ b/ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml
@@ -40,6 +40,8 @@
- install_dpdk
- download_trex
- install_trex
+ - download_pktgen
+ - install_pktgen
- download_civetweb
- install_civetweb
- download_samplevnfs
diff --git a/api/database/v2/models.py b/api/database/v2/models.py
index 59dab3ebc..0ee811698 100644
--- a/api/database/v2/models.py
+++ b/api/database/v2/models.py
@@ -92,6 +92,7 @@ class V2Task(Base):
case_name = Column(String(30))
suite = Column(Boolean)
content = Column(Text)
+ params = Column(Text)
result = Column(Text)
error = Column(Text)
status = Column(Integer)
diff --git a/api/resources/v1/env.py b/api/resources/v1/env.py
index 75c981a96..6c9eb8324 100644
--- a/api/resources/v1/env.py
+++ b/api/resources/v1/env.py
@@ -10,12 +10,16 @@ from __future__ import absolute_import
import errno
import logging
+
+import ipaddress
import os
import subprocess
import threading
import time
import uuid
import glob
+
+import six
import yaml
import collections
@@ -269,6 +273,8 @@ class V1Env(ApiResource):
LOG.info('Openrc file not found')
installer_ip = os.environ.get('INSTALLER_IP',
'192.168.200.2')
+ # validate installer_ip is a valid ipaddress
+ installer_ip = str(ipaddress.IPv4Address(six.u(installer_ip)))
installer_type = os.environ.get('INSTALLER_TYPE', 'compass')
LOG.info('Getting openrc file from %s', installer_type)
self._get_remote_rc_file(rc_file,
diff --git a/api/resources/v1/testsuites.py b/api/resources/v1/testsuites.py
index 5f72c2ea6..3e14670b4 100644
--- a/api/resources/v1/testsuites.py
+++ b/api/resources/v1/testsuites.py
@@ -20,6 +20,7 @@ from yardstick.common.utils import result_handler
from yardstick.benchmark.core import Param
from yardstick.benchmark.core.task import Task
from api.swagger import models
+from api.database.v1.handlers import TasksHandler
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
@@ -58,7 +59,7 @@ class V1Testsuite(ApiResource):
task_args.update(args.get('opts', {}))
param = Param(task_args)
- task_thread = TaskThread(Task().start, param)
+ task_thread = TaskThread(Task().start, param, TasksHandler())
task_thread.start()
return result_handler(consts.API_SUCCESS, {'task_id': task_id})
diff --git a/api/resources/v2/environments.py b/api/resources/v2/environments.py
index 158e98be7..7e587be85 100644
--- a/api/resources/v2/environments.py
+++ b/api/resources/v2/environments.py
@@ -11,6 +11,7 @@ import logging
from oslo_serialization import jsonutils
from docker import Client
+from docker.errors import APIError
from api import ApiResource
from api.database.v2.handlers import V2EnvironmentHandler
@@ -20,6 +21,7 @@ from api.database.v2.handlers import V2ContainerHandler
from yardstick.common.utils import result_handler
from yardstick.common.utils import change_obj_to_dict
from yardstick.common import constants as consts
+from yardstick.service.environment import Environment
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
@@ -124,10 +126,41 @@ class V2Environment(ApiResource):
LOG.debug('container name: %s', container.name)
try:
client.remove_container(container.name, force=True)
- except Exception:
+ except APIError:
LOG.exception('remove container failed')
container_handler.delete_by_uuid(v)
environment_handler.delete_by_uuid(environment_id)
return result_handler(consts.API_SUCCESS, {'environment': environment_id})
+
+
+class V2SUT(ApiResource):
+
+ def get(self, environment_id):
+ try:
+ uuid.UUID(environment_id)
+ except ValueError:
+ return result_handler(consts.API_ERROR, 'invalid environment id')
+
+ environment_handler = V2EnvironmentHandler()
+ try:
+ environment = environment_handler.get_by_uuid(environment_id)
+ except ValueError:
+ return result_handler(consts.API_ERROR, 'no such environment id')
+
+ if not environment.pod_id:
+ return result_handler(consts.API_SUCCESS, {'sut': {}})
+
+ pod_handler = V2PodHandler()
+ try:
+ pod = pod_handler.get_by_uuid(environment.pod_id)
+ except ValueError:
+ return result_handler(consts.API_ERROR, 'no such pod id')
+ else:
+ pod_content = pod.content
+
+ env = Environment(pod=pod_content)
+ sut_info = env.get_sut_info()
+
+ return result_handler(consts.API_SUCCESS, {'sut': sut_info})
diff --git a/api/resources/v2/images.py b/api/resources/v2/images.py
index 0c36a0a26..c3e5ee73e 100644
--- a/api/resources/v2/images.py
+++ b/api/resources/v2/images.py
@@ -18,8 +18,7 @@ from api.database.v2.handlers import V2ImageHandler
from api.database.v2.handlers import V2EnvironmentHandler
from yardstick.common.utils import result_handler
from yardstick.common.utils import source_env
-from yardstick.common.utils import change_obj_to_dict
-from yardstick.common.openstack_utils import get_nova_client
+from yardstick.common import openstack_utils
from yardstick.common.openstack_utils import get_glance_client
from yardstick.common import constants as consts
@@ -47,39 +46,21 @@ class V2Images(ApiResource):
def get(self):
try:
source_env(consts.OPENRC)
- except Exception:
+ except OSError:
return result_handler(consts.API_ERROR, 'source openrc error')
- nova_client = get_nova_client()
- try:
- images_list = nova_client.images.list()
- except Exception:
+ image_list = openstack_utils.list_images()
+
+ if image_list is False:
return result_handler(consts.API_ERROR, 'get images error')
- else:
- images = {i.name: self.get_info(change_obj_to_dict(i)) for i in images_list}
+
+ images = {i.name: format_image_info(i) for i in image_list}
return result_handler(consts.API_SUCCESS, {'status': 1, 'images': images})
def post(self):
return self._dispatch_post()
- def get_info(self, data):
- try:
- size = data['OS-EXT-IMG-SIZE:size']
- except KeyError:
- size = None
- else:
- size = float(size) / 1024 / 1024
-
- result = {
- 'name': data.get('name', ''),
- 'discription': data.get('description', ''),
- 'size': size,
- 'status': data.get('status'),
- 'time': data.get('updated')
- }
- return result
-
def load_image(self, args):
try:
image_name = args['name']
@@ -268,7 +249,7 @@ class V2Images(ApiResource):
r = requests.head(url)
try:
file_size = int(r.headers['content-length'])
- except Exception:
+ except (TypeError, ValueError):
return
with open(path, 'wb') as f:
@@ -303,14 +284,13 @@ class V2Image(ApiResource):
except ValueError:
return result_handler(consts.API_ERROR, 'no such image id')
- nova_client = get_nova_client()
- images = nova_client.images.list()
+ images = openstack_utils.list_images()
try:
image = next((i for i in images if i.name == image.name))
except StopIteration:
pass
- return_image = self.get_info(change_obj_to_dict(image))
+ return_image = format_image_info(image)
return_image['id'] = image_id
return result_handler(consts.API_SUCCESS, {'image': return_image})
@@ -349,19 +329,16 @@ class V2Image(ApiResource):
return result_handler(consts.API_SUCCESS, {'image': image_id})
- def get_info(self, data):
- try:
- size = data['OS-EXT-IMG-SIZE:size']
- except KeyError:
- size = None
- else:
- size = float(size) / 1024 / 1024
-
- result = {
- 'name': data.get('name', ''),
- 'description': data.get('description', ''),
- 'size': size,
- 'status': data.get('status'),
- 'time': data.get('updated')
- }
- return result
+
+def format_image_info(image):
+ image_dict = {}
+
+ if image is None:
+ return image_dict
+
+ image_dict['name'] = image.name
+ image_dict['size'] = float(image.size) / 1024 / 1024
+ image_dict['status'] = image.status.upper()
+ image_dict['time'] = image.updated_at
+
+ return image_dict
diff --git a/api/resources/v2/tasks.py b/api/resources/v2/tasks.py
index 25a9cf109..17241ed63 100644
--- a/api/resources/v2/tasks.py
+++ b/api/resources/v2/tasks.py
@@ -38,6 +38,8 @@ class V2Tasks(ApiResource):
for t in tasks:
result = t['result']
t['result'] = jsonutils.loads(result) if result else None
+ params = t['params']
+ t['params'] = jsonutils.loads(params) if params else None
return result_handler(consts.API_SUCCESS, {'tasks': tasks})
@@ -94,6 +96,9 @@ class V2Task(ApiResource):
result = task_info['result']
task_info['result'] = jsonutils.loads(result) if result else None
+ params = task_info['params']
+ task_info['params'] = jsonutils.loads(params) if params else None
+
return result_handler(consts.API_SUCCESS, {'task': task_info})
def delete(self, task_id):
@@ -127,7 +132,6 @@ class V2Task(ApiResource):
return result_handler(consts.API_SUCCESS, {'task': task_id})
def put(self, task_id):
-
try:
uuid.UUID(task_id)
except ValueError:
@@ -166,6 +170,21 @@ class V2Task(ApiResource):
return result_handler(consts.API_SUCCESS, {'uuid': task_id})
+ def add_params(self, args):
+ task_id = args['task_id']
+ try:
+ params = args['params']
+ except KeyError:
+ return result_handler(consts.API_ERROR, 'params must be provided')
+
+ LOG.info('update params info in task')
+
+ task_handler = V2TaskHandler()
+ task_update_data = {'params': jsonutils.dumps(params)}
+ task_handler.update_attr(task_id, task_update_data)
+
+ return result_handler(consts.API_SUCCESS, {'uuid': task_id})
+
def add_case(self, args):
task_id = args['task_id']
try:
@@ -243,7 +262,8 @@ class V2Task(ApiResource):
data = {
'inputfile': ['/tmp/{}.yaml'.format(task.case_name)],
- 'task_id': task_id
+ 'task_id': task_id,
+ 'task-args': task.params
}
if task.suite:
data.update({'suite': True})
diff --git a/api/urls.py b/api/urls.py
index 4b8e39e8f..9f0abcade 100644
--- a/api/urls.py
+++ b/api/urls.py
@@ -26,6 +26,7 @@ urlpatterns = [
Url('/api/v2/yardstick/environments', 'v2_environments'),
Url('/api/v2/yardstick/environments/action', 'v2_environments'),
Url('/api/v2/yardstick/environments/<environment_id>', 'v2_environment'),
+ Url('/api/v2/yardstick/environments/<environment_id>/sut', 'v2_sut'),
Url('/api/v2/yardstick/openrcs', 'v2_openrcs'),
Url('/api/v2/yardstick/openrcs/action', 'v2_openrcs'),
diff --git a/dashboard/opnfv_yardstick_tc006.json b/dashboard/opnfv_yardstick_tc006.json
index e81e8cca4..b6649a7e4 100644
--- a/dashboard/opnfv_yardstick_tc006.json
+++ b/dashboard/opnfv_yardstick_tc006.json
@@ -49,7 +49,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -187,7 +187,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 2,
@@ -324,7 +324,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -493,4 +493,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc006",
"version": 3
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc019.json b/dashboard/opnfv_yardstick_tc019.json
index dfd454e9b..c4fddd817 100644
--- a/dashboard/opnfv_yardstick_tc019.json
+++ b/dashboard/opnfv_yardstick_tc019.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -162,7 +162,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -273,7 +273,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -403,4 +403,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc019",
"version": 3
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc045.json b/dashboard/opnfv_yardstick_tc045.json
index 8f00851d7..058cef4cc 100644
--- a/dashboard/opnfv_yardstick_tc045.json
+++ b/dashboard/opnfv_yardstick_tc045.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -162,7 +162,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -273,7 +273,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -403,4 +403,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc045",
"version": 5
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc046.json b/dashboard/opnfv_yardstick_tc046.json
index a869c2f21..76505146d 100644
--- a/dashboard/opnfv_yardstick_tc046.json
+++ b/dashboard/opnfv_yardstick_tc046.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -162,7 +162,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -273,7 +273,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -405,4 +405,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc046",
"version": 3
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc047.json b/dashboard/opnfv_yardstick_tc047.json
index 401df8634..4c696aa5c 100644
--- a/dashboard/opnfv_yardstick_tc047.json
+++ b/dashboard/opnfv_yardstick_tc047.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -162,7 +162,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -273,7 +273,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -405,4 +405,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc047",
"version": 2
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc048.json b/dashboard/opnfv_yardstick_tc048.json
index 5972c889f..cdafaceca 100644
--- a/dashboard/opnfv_yardstick_tc048.json
+++ b/dashboard/opnfv_yardstick_tc048.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -162,7 +162,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 3,
@@ -273,7 +273,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -405,4 +405,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc048",
"version": 2
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc051.json b/dashboard/opnfv_yardstick_tc051.json
index 012602ba1..455b2b819 100644
--- a/dashboard/opnfv_yardstick_tc051.json
+++ b/dashboard/opnfv_yardstick_tc051.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -235,7 +235,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -367,4 +367,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc051",
"version": 3
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc052.json b/dashboard/opnfv_yardstick_tc052.json
index b91c53bce..1a3e9ff6c 100644
--- a/dashboard/opnfv_yardstick_tc052.json
+++ b/dashboard/opnfv_yardstick_tc052.json
@@ -55,7 +55,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -166,7 +166,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"format": "none",
"gauge": {
"maxValue": 100,
@@ -298,4 +298,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc052",
"version": 2
-} \ No newline at end of file
+}
diff --git a/dashboard/opnfv_yardstick_tc056.json b/dashboard/opnfv_yardstick_tc056.json
new file mode 100644
index 000000000..5d7f2b013
--- /dev/null
+++ b/dashboard/opnfv_yardstick_tc056.json
@@ -0,0 +1,301 @@
+{
+ "__inputs": [
+ {
+ "name": "DS_YARDSTICK",
+ "label": "yardstick",
+ "description": "",
+ "type": "datasource",
+ "pluginId": "influxdb",
+ "pluginName": "InfluxDB"
+ }
+ ],
+ "__requires": [
+ {
+ "type": "grafana",
+ "id": "grafana",
+ "name": "Grafana",
+ "version": "4.4.3"
+ },
+ {
+ "type": "panel",
+ "id": "graph",
+ "name": "Graph",
+ "version": ""
+ },
+ {
+ "type": "datasource",
+ "id": "influxdb",
+ "name": "InfluxDB",
+ "version": "1.0.0"
+ },
+ {
+ "type": "panel",
+ "id": "singlestat",
+ "name": "Singlestat",
+ "version": ""
+ }
+ ],
+ "annotations": {
+ "list": []
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "hideControls": false,
+ "id": null,
+ "links": [],
+ "refresh": "1m",
+ "rows": [
+ {
+ "collapse": false,
+ "height": 340,
+ "panels": [
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "yardstick",
+ "description": "",
+ "fill": 1,
+ "id": 1,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "percentage": false,
+ "pointradius": 5,
+ "points": true,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "span": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "",
+ "dsType": "influxdb",
+ "groupBy": [],
+ "measurement": "opnfv_yardstick_tc056",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT \"openstack-user-list_outage_time\" FROM \"opnfv_yardstick_tc056\" WHERE $timeFilter",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "openstack-volume-list_outage_time"
+ ],
+ "type": "field"
+ }
+ ]
+ ],
+ "tags": []
+ }
+ ],
+ "thresholds": [
+ {
+ "colorMode": "critical",
+ "fill": true,
+ "line": true,
+ "op": "gt",
+ "value": 5
+ },
+ {
+ "colorMode": "ok",
+ "fill": true,
+ "line": true,
+ "op": "lt",
+ "value": 5
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "command monitor (outage time)",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "label": "",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ }
+ ]
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": true,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": "yardstick",
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 4,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "span": 2,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "alias": "",
+ "dsType": "influxdb",
+ "groupBy": [],
+ "measurement": "opnfv_yardstick_tc056",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc056\" WHERE $timeFilter",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "sla_pass"
+ ],
+ "type": "field"
+ }
+ ]
+ ],
+ "tags": []
+ }
+ ],
+ "thresholds": "0.5,1",
+ "title": "SLA PASS/FAIL",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "avg"
+ }
+ ],
+ "repeat": null,
+ "repeatIteration": null,
+ "repeatRowId": null,
+ "showTitle": false,
+ "title": "Dashboard Row",
+ "titleSize": "h6"
+ }
+ ],
+ "schemaVersion": 14,
+ "style": "dark",
+ "tags": [
+ "HA"
+ ],
+ "templating": {
+ "list": []
+ },
+ "time": {
+ "from": "now/d",
+ "to": "now/d"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "time_options": [
+ "5m",
+ "15m",
+ "1h",
+ "6h",
+ "12h",
+ "24h",
+ "2d",
+ "7d",
+ "30d"
+ ]
+ },
+ "timezone": "",
+ "title": "opnfv_yardstick_tc056",
+ "version": 2
+}
diff --git a/dashboard/opnfv_yardstick_tc058.json b/dashboard/opnfv_yardstick_tc058.json
new file mode 100644
index 000000000..55b5a5f33
--- /dev/null
+++ b/dashboard/opnfv_yardstick_tc058.json
@@ -0,0 +1,265 @@
+{
+ "annotations": {
+ "list": []
+ },
+ "editable": true,
+ "gnetId": null,
+ "graphTooltip": 0,
+ "hideControls": false,
+ "id": 33,
+ "links": [],
+ "refresh": "1m",
+ "rows": [
+ {
+ "collapse": false,
+ "height": 343,
+ "panels": [
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "yardstick",
+ "description": "",
+ "fill": 1,
+ "id": 1,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "nullPointMode": "null",
+ "percentage": false,
+ "pointradius": 5,
+ "points": true,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "span": 9,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
+ {
+ "alias": "",
+ "dsType": "influxdb",
+ "groupBy": [],
+ "measurement": "opnfv_yardstick_tc058",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT \"server-status_outage_time\" FROM \"opnfv_yardstick_tc058\" WHERE $timeFilter",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "server-status_outage_time"
+ ],
+ "type": "field"
+ }
+ ]
+ ],
+ "tags": []
+ }
+ ],
+ "thresholds": [
+ {
+ "colorMode": "critical",
+ "fill": true,
+ "line": true,
+ "op": "gt",
+ "value": 5
+ },
+ {
+ "colorMode": "ok",
+ "fill": true,
+ "line": true,
+ "op": "lt",
+ "value": 5
+ }
+ ],
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Server Status outage time",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "format": "s",
+ "label": "",
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ]
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": true,
+ "colorValue": false,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "datasource": "yardstick",
+ "format": "short",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "id": 4,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "span": 3,
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "alias": "",
+ "dsType": "influxdb",
+ "groupBy": [],
+ "measurement": "opnfv_yardstick_tc058",
+ "orderByTime": "ASC",
+ "policy": "default",
+ "query": "SELECT \"sla_pass\" FROM \"opnfv_yardstick_tc058\" WHERE $timeFilter",
+ "rawQuery": false,
+ "refId": "A",
+ "resultFormat": "time_series",
+ "select": [
+ [
+ {
+ "params": [
+ "sla_pass"
+ ],
+ "type": "field"
+ }
+ ]
+ ],
+ "tags": []
+ }
+ ],
+ "thresholds": "0.5,1",
+ "title": "SLA PASS/FAIL",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "avg"
+ }
+ ],
+ "repeat": null,
+ "repeatIteration": null,
+ "repeatRowId": null,
+ "showTitle": false,
+ "title": "Dashboard Row",
+ "titleSize": "h6"
+ }
+ ],
+ "schemaVersion": 14,
+ "style": "dark",
+ "tags": [
+ "HA"
+ ],
+ "templating": {
+ "list": []
+ },
+ "time": {
+ "from": "2018-03-26T09:00:00.000Z",
+ "to": "2018-03-28T08:59:59.998Z"
+ },
+ "timepicker": {
+ "refresh_intervals": [
+ "5s",
+ "10s",
+ "30s",
+ "1m",
+ "5m",
+ "15m",
+ "30m",
+ "1h",
+ "2h",
+ "1d"
+ ],
+ "time_options": [
+ "5m",
+ "15m",
+ "1h",
+ "6h",
+ "12h",
+ "24h",
+ "2d",
+ "7d",
+ "30d"
+ ]
+ },
+ "timezone": "",
+ "title": "opnfv_yardstick_tc058",
+ "version": 8
+}
diff --git a/dashboard/opnfv_yardstick_tc082.json b/dashboard/opnfv_yardstick_tc082.json
index 38d9d8f57..1fbaf1d6c 100644
--- a/dashboard/opnfv_yardstick_tc082.json
+++ b/dashboard/opnfv_yardstick_tc082.json
@@ -49,7 +49,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 7,
@@ -167,7 +167,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 9,
@@ -274,7 +274,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 1,
@@ -369,7 +369,7 @@
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "${DS_YARDSTICK}",
+ "datasource": "yardstick",
"description": "",
"fill": 1,
"id": 5,
@@ -508,4 +508,4 @@
"timezone": "",
"title": "opnfv_yardstick_tc082",
"version": 5
-} \ No newline at end of file
+}
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 959315c6b..62ea0d037 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -20,34 +20,41 @@ ENV REPOS_DIR="/home/opnfv/repos" \
# Set work directory
# Yardstick repo
-ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \
+ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \
+ RELENG_REPO_DIR="${REPOS_DIR}/releng" \
STORPERF_REPO_DIR="${REPOS_DIR}/storperf"
-RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean
+RUN apt-get update && apt-get install -y git python 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 python-openstackclient==3.11.0 python-heatclient==1.11.0
+RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 python-heatclient==1.11.0 ansible==2.4.2
RUN mkdir -p ${REPOS_DIR}
RUN git config --global http.sslVerify false
+#For developers: To test your changes you must comment out the git clone for ${YARDSTICK_REPO_DIR}.
+#You must also uncomment the RUN and COPY commands below.
+#You must run docker build from your yardstick directory on the host.
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
+#RUN mkdir ${YARDSTICK_REPO_DIR}
+#COPY ./ ${YARDSTICK_REPO_DIR}
+RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR}
-WORKDIR ${YARDSTICK_REPO_DIR}
-RUN ${YARDSTICK_REPO_DIR}/install.sh
+RUN ansible-playbook -c local -vvv -e INSTALLATION_MODE="container" ${YARDSTICK_REPO_DIR}/ansible/install.yaml
+
RUN ${YARDSTICK_REPO_DIR}/docker/supervisor.sh
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
-
-EXPOSE 5000
+# nginx=5000, rabbitmq=5672
+EXPOSE 5000 5672
ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
COPY ./exec_tests.sh /usr/local/bin/
-ENV NSB_DIR="/opt/nsb_bin" \
- PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl"
+ENV NSB_DIR="/opt/nsb_bin"
+ENV PYTHONPATH="${PYTHONPATH}:${NSB_DIR}/trex_client:${NSB_DIR}/trex_client/stl"
WORKDIR ${REPOS_DIR}
CMD ["/usr/bin/supervisord"]
diff --git a/docker/Dockerfile.aarch64.patch b/docker/Dockerfile.aarch64.patch
index 24e3952fb..6c7381284 100644
--- a/docker/Dockerfile.aarch64.patch
+++ b/docker/Dockerfile.aarch64.patch
@@ -1,24 +1,16 @@
-From: Cristina Pauna <cristina.pauna@enea.com>
-Date: Thu, 11 Jan 2018 19:06:26 +0200
-Subject: [PATCH] Patch for Yardstick AARCH64 Docker file
+From: ting wu <ting.wu@enea.com>
+Date: Tue, 8 May 2018 14:02:52 +0200
+Subject: [PATCH][PATCH] Patch for Yardstick AARCH64 Docker file
-Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
-Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
+Signed-off-by: ting wu <ting.wu@enea.com>
---
- docker/Dockerfile | 13 +++++++------
- 1 file changed, 7 insertions(+), 6 deletions(-)
+ docker/Dockerfile | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
-index 2ee5b4c..23e5ea5 100644
+index 62ea0d0..f2f41771 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
-@@ -1,5 +1,5 @@
- ##############################################################################
--# Copyright (c) 2015 Ericsson AB and others.
-+# Copyright (c) 2017 Enea AB and others.
- #
- # All rights reserved. This program and the accompanying materials
- # are made available under the terms of the Apache License, Version 2.0
@@ -7,9 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
@@ -31,19 +23,19 @@ index 2ee5b4c..23e5ea5 100644
ARG BRANCH=master
-@@ -24,7 +24,8 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \
+@@ -24,7 +24,8 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick/" \
RELENG_REPO_DIR="${REPOS_DIR}/releng" \
STORPERF_REPO_DIR="${REPOS_DIR}/storperf"
--RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean
-+RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && \
+-RUN apt-get update && apt-get install -y git python python-setuptools python-pip && apt-get -y autoremove && apt-get clean
++RUN apt-get update && apt-get install -y git python python-setuptools python-pip && apt-get -y autoremove && \
+ apt-get install -y libssl-dev && apt-get -y install libffi-dev && apt-get clean
RUN easy_install -U setuptools==30.0.0
- RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0
-
-@@ -43,8 +44,8 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
+ RUN pip install appdirs==1.4.0 pyopenssl==17.5.0 python-openstackclient==3.11.0 python-heatclient==1.11.0 ansible==2.4.2
- EXPOSE 5000
+@@ -48,8 +49,8 @@ RUN echo "daemon off;" >> /etc/nginx/nginx.conf
+ # nginx=5000, rabbitmq=5672
+ EXPOSE 5000 5672
-ADD http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img ${IMAGE_DIR}
-ADD http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img ${IMAGE_DIR}
@@ -52,3 +44,4 @@ index 2ee5b4c..23e5ea5 100644
COPY ./exec_tests.sh /usr/local/bin/
+
diff --git a/docker/supervisor.sh b/docker/supervisor.sh
index b67de2212..44e34fb38 100755
--- a/docker/supervisor.sh
+++ b/docker/supervisor.sh
@@ -11,7 +11,7 @@
# nginx service start when boot
supervisor_config='/etc/supervisor/conf.d/yardstick.conf'
-if [[ ! -e "${supervisor_config}" ]];then
+if [[ ! -e "${supervisor_config}" ]]; then
cat << EOF > "${supervisor_config}"
[supervisord]
nodaemon = true
@@ -22,5 +22,8 @@ command = service nginx restart
[program:yardstick_uwsgi]
directory = /etc/yardstick
command = uwsgi -i yardstick.ini
+
+[program:rabbitmq]
+command = service rabbitmq-server restart
EOF
fi
diff --git a/docs/release/release-notes/release-notes.rst b/docs/release/release-notes/release-notes.rst
index 4ebf0eceb..6598a2751 100644
--- a/docs/release/release-notes/release-notes.rst
+++ b/docs/release/release-notes/release-notes.rst
@@ -1,7 +1,8 @@
+=======
License
=======
-OPNFV Euphrates release note for Yardstick Docs
+OPNFV Fraser release note for Yardstick Docs
are licensed under a Creative Commons Attribution 4.0 International License.
You should have received a copy of the license along with this.
If not, see <http://creativecommons.org/licenses/by/4.0/>.
@@ -9,8 +10,9 @@ If not, see <http://creativecommons.org/licenses/by/4.0/>.
The *Yardstick framework*, the *Yardstick test cases* are open-source software,
licensed under the terms of the Apache License, Version 2.0.
-OPNFV Euphrates Release Note for Yardstick
-==========================================
+=======================================
+OPNFV Fraser Release Note for Yardstick
+=======================================
.. toctree::
:maxdepth: 2
@@ -23,50 +25,43 @@ OPNFV Euphrates Release Note for Yardstick
Abstract
---------
+========
This document describes the release note of Yardstick project.
Version History
----------------
+===============
+-------------------+-----------+---------------------------------+
| *Date* | *Version* | *Comment* |
| | | |
+-------------------+-----------+---------------------------------+
-| December 15, 2017 | 5.1.0 | Yardstick for Euphrates release |
-| | | |
-+-------------------+-----------+---------------------------------+
-| October 20, 2017 | 5.0.0 | Yardstick for Euphrates release |
+| April 27, 2018 | 6.0.0 | Yardstick for Fraser release |
| | | |
+-------------------+-----------+---------------------------------+
Important Notes
----------------
+===============
The software delivered in the OPNFV Yardstick_ Project, comprising the
-*Yardstick framework*, the *Yardstick test cases* and the experimental
-framework *Apex Lake* is a realization of the methodology in ETSI-ISG
-NFV-TST001_.
+*Yardstick framework*, and the *Yardstick test cases* is a realization of
+the methodology in ETSI-ISG NFV-TST001_.
The *Yardstick* framework is *installer*, *infrastructure* and *application*
independent.
-OPNFV Euphrates Release
------------------------
+OPNFV Fraser Release
+====================
-This Euphrates release provides *Yardstick* as a framework for NFVI testing
+This Fraser release provides *Yardstick* as a framework for NFVI testing
and OPNFV feature testing, automated in the OPNFV CI pipeline, including:
* Documentation generated with Sphinx
* User Guide
-
* Developer Guide
-
* Release notes (this document)
-
* Results
* Automated Yardstick test suite (daily, weekly)
@@ -84,39 +79,29 @@ and OPNFV feature testing, automated in the OPNFV CI pipeline, including:
* Yardstick plug-in configuration yaml files, plug-in install/remove scripts
-For Euphrates release, the *Yardstick framework* is used for the following
+For Fraser release, the *Yardstick framework* is used for the following
testing:
* OPNFV platform testing - generic test cases to measure the categories:
* Compute
-
* Network
-
* Storage
-* OPNFV platform network service benchmarking(NSB)
+* OPNFV platform network service benchmarking (NSB)
* NSB
* Test cases for the following OPNFV Projects:
* Container4NFV
-
* High Availability
-
* IPv6
-
* KVM
-
* Parser
-
* StorPerf
-
* VSperf
- * virtual Traffic Classifier
-
The *Yardstick framework* is developed in the OPNFV community, by the
Yardstick_ team.
@@ -126,49 +111,47 @@ Yardstick_ team.
Release Data
-------------
+============
+--------------------------------+-----------------------+
| **Project** | Yardstick |
| | |
+--------------------------------+-----------------------+
-| **Repo/tag** | yardstick/opnfv-5.1.0 |
+| **Repo/tag** | yardstick/opnfv-6.0.0 |
| | |
+--------------------------------+-----------------------+
-| **Yardstick Docker image tag** | opnfv-5.1.0 |
+| **Yardstick Docker image tag** | opnfv-6.0.0 |
| | |
+--------------------------------+-----------------------+
-| **Release designation** | Euphrates |
+| **Release designation** | Fraser |
| | |
+--------------------------------+-----------------------+
-| **Release date** | December 15, 2017 |
+| **Release date** | April 27, 2018 |
| | |
+--------------------------------+-----------------------+
-| **Purpose of the delivery** | OPNFV Euphrates 5.1.0 |
+| **Purpose of the delivery** | OPNFV Fraser 6.0.0 |
| | |
+--------------------------------+-----------------------+
Deliverables
-------------
+============
Documents
-^^^^^^^^^
+---------
- - User Guide: http://docs.opnfv.org/en/stable-euphrates/submodules/yardstick/docs/testing/user/userguide/index.html
+ - User Guide: http://docs.opnfv.org/en/stable-fraser/submodules/yardstick/docs/testing/user/userguide/index.html
- - Developer Guide: http://docs.opnfv.org/en/stable-euphrates/submodules/yardstick/docs/testing/developer/devguide/index.html
+ - Developer Guide: http://docs.opnfv.org/en/stable-fraser/submodules/yardstick/docs/testing/developer/devguide/index.html
Software Deliverables
-^^^^^^^^^^^^^^^^^^^^^
-
+---------------------
- - The Yardstick Docker image: https://hub.docker.com/r/opnfv/yardstick (tag: opnfv-5.1.0)
+ - The Yardstick Docker image: https://hub.docker.com/r/opnfv/yardstick (tag: opnfv-6.0.0)
-
-New Contexts
-############
+List of Contexts
+^^^^^^^^^^^^^^^^
+--------------+-------------------------------------------+
| **Context** | **Description** |
@@ -188,31 +171,40 @@ New Contexts
+--------------+-------------------------------------------+
-New Runners
-###########
-
-+--------------+-------------------------------------------------------+
-| **Runner** | **Description** |
-| | |
-+--------------+-------------------------------------------------------+
-| *Arithmetic* | Steps every run arithmetically according to specified |
-| | input value |
-| | |
-+--------------+-------------------------------------------------------+
-| *Duration* | Runs for a specified period of time |
-| | |
-+--------------+-------------------------------------------------------+
-| *Iteration* | Runs for a specified number of iterations |
-| | |
-+--------------+-------------------------------------------------------+
-| *Sequence* | Selects input value to a scenario from an input file |
-| | and runs all entries sequentially |
-| | |
-+--------------+-------------------------------------------------------+
-
-
-New Scenarios
-#############
+List of Runners
+^^^^^^^^^^^^^^^
+
+Note: Yardstick Fraser 6.0.0 add two new Runners, "Dynamictp" and "Search".
+
++---------------+-------------------------------------------------------+
+| **Runner** | **Description** |
+| | |
++---------------+-------------------------------------------------------+
+| *Arithmetic* | Steps every run arithmetically according to specified |
+| | input value |
+| | |
++---------------+-------------------------------------------------------+
+| *Duration* | Runs for a specified period of time |
+| | |
++---------------+-------------------------------------------------------+
+| *Iteration* | Runs for a specified number of iterations |
+| | |
++---------------+-------------------------------------------------------+
+| *Sequence* | Selects input value to a scenario from an input file |
+| | and runs all entries sequentially |
+| | |
++---------------+-------------------------------------------------------+
+| **Dynamictp** | A runner that searches for the max throughput with |
+| | binary search |
+| | |
++---------------+-------------------------------------------------------+
+| **Search** | A runner that runs a specific time before it returns |
+| | |
++---------------+-------------------------------------------------------+
+
+
+List of Scenarios
+^^^^^^^^^^^^^^^^^
+----------------+-----------------------------------------------------+
| **Category** | **Delivered** |
@@ -234,224 +226,138 @@ New Scenarios
| | |
+----------------+-----------------------------------------------------+
| *Compute* | * cpuload |
-| | |
| | * cyclictest |
-| | |
| | * lmbench |
-| | |
| | * lmbench_cache |
-| | |
| | * perf |
-| | |
| | * unixbench |
-| | |
| | * ramspeed |
-| | |
| | * cachestat |
-| | |
| | * memeoryload |
-| | |
| | * computecapacity |
-| | |
| | * SpecCPU2006 |
| | |
+----------------+-----------------------------------------------------+
| *Networking* | * iperf3 |
-| | |
| | * netperf |
-| | |
| | * netperf_node |
-| | |
| | * ping |
-| | |
| | * ping6 |
-| | |
| | * pktgen |
-| | |
| | * sfc |
-| | |
| | * sfc with tacker |
-| | |
-| | * vtc instantion validation |
-| | |
-| | * vtc instantion validation with noisy neighbors |
-| | |
-| | * vtc throughput |
-| | |
-| | * vtc throughput in the presence of noisy neighbors |
-| | |
| | * networkcapacity |
-| | |
| | * netutilization |
-| | |
| | * nstat |
-| | |
| | * pktgenDPDK |
| | |
+----------------+-----------------------------------------------------+
| *Parser* | Tosca2Heat |
| | |
+----------------+-----------------------------------------------------+
-| *Storage* | fio |
-| | |
-| | bonnie++ |
-| | |
-| | storagecapacity |
+| *Storage* | * fio |
+| | * bonnie++ |
+| | * storagecapacity |
| | |
+----------------+-----------------------------------------------------+
| *StorPerf* | storperf |
| | |
+----------------+-----------------------------------------------------+
-| *NSB* | vPE thoughput test case |
+| *NSB* | vFW thoughput test case |
| | |
+----------------+-----------------------------------------------------+
-
New Test cases
-^^^^^^^^^^^^^^
+--------------
* Generic NFVI test cases
- * OPNFV_YARDSTICK_TCO78 - SPEC CPU 2006
-
- * OPNFV_YARDSTICK_TCO79 - Bonnie++
-
-* Kubernetes Test cases
+ * OPNFV_YARDSTICK_TCO84 - SPEC CPU 2006 for VM
- * OPNFV_YARDSTICK_TCO80 - NETWORK LATENCY BETWEEN CONTAINER
+* HA Test cases
- * OPNFV_YARDSTICK_TCO81 - NETWORK LATENCY BETWEEN CONTAINER AND VM
+ * OPNFV_YARDSTICK_TC087 - SDN Controller resilience in non-HA configuration
+ * OPNFV_YARDSTICK_TC090 - Control node Openstack service down - database instance
+ * OPNFV_YARDSTICK_TC091 - Control node Openstack service down - heat-api
Version Change
---------------
+==============
Module Version Changes
-^^^^^^^^^^^^^^^^^^^^^^
+----------------------
-This is the fifth tracked release of Yardstick. It is based on following
+This is the sixth tracked release of Yardstick. It is based on following
upstream versions:
-- OpenStack Ocata
-
-- OpenDayLight Nitrogen
-
-- ONOS Junco
+- OpenStack Pike
+- OpenDayLight Oxygen
Document Version Changes
-^^^^^^^^^^^^^^^^^^^^^^^^
+------------------------
-This is the fifth tracked version of the Yardstick framework in OPNFV.
+This is the sixth tracked version of the Yardstick framework in OPNFV.
It includes the following documentation updates:
- Yardstick User Guide: add "network service benchmarking(NSB)" chapter;
add "Yardstick - NSB Testing -Installation" chapter; add "Yardstick API" chapter;
add "Yardstick user interface" chapter; Update Yardstick installation chapter;
-
- Yardstick Developer Guide
-
- Yardstick Release Notes for Yardstick: this document
Feature additions
-^^^^^^^^^^^^^^^^^
-
-- Yardstick RESTful API support
-
-- Network service benchmarking
-
-- Stress testing with Bottlenecks team
-
-- Yardstick framework improvement:
-
- - yardstick report CLI
-
- - Node context support OpenStack configuration via Ansible
-
- - Https support
+-----------------
- - Kubernetes context type
-
-- Yardstick container local GUI
-
-- Python 3 support
+- Plugin-based test cases support Heat context
+- SR-IOV support for the Heat context
+- Support using existing network in Heat context
+- Support running test cases with existing VNFs/without destroying VNF in Heat context
+- Add vFW scale-up template
+- Improvements of unit tests and gating
+- GUI improvement about passing parameters
Scenario Matrix
----------------
-
-For Euphrates 5.0.0, Yardstick was tested on the following scenarios:
-
-+--------------------------+------+---------+------+------+
-| Scenario | Apex | Compass | Fuel | Joid |
-+==========================+======+=========+======+======+
-| os-nosdn-nofeature-noha | | | X | X |
-+--------------------------+------+---------+------+------+
-| os-nosdn-nofeature-ha | X | X | X | X |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-nofeature-ha | | X | X | X |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-nofeature-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-odl_l3-nofeature-ha | X | X | X | |
-+--------------------------+------+---------+------+------+
-| os-odl_l3-nofeature-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-onos-sfc-ha | | | | |
-+--------------------------+------+---------+------+------+
-| os-onos-nofeature-ha | | X | | X |
-+--------------------------+------+---------+------+------+
-| os-onos-nofeature-noha | | | | |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-sfc-ha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-sfc-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-bgpvpn-ha | X | | X | |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-bgpvpn-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm-ha | X | | X | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-ovs-ha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-ovs-noha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-ocl-nofeature-ha | | X | | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-lxd-ha | | | | X |
-+--------------------------+------+---------+------+------+
-| os-nosdn-lxd-noha | | | | X |
-+--------------------------+------+---------+------+------+
-| os-nosdn-fdio-ha | X | | | |
-+--------------------------+------+---------+------+------+
-| os-odl_l2-fdio-noha | X | | | |
-+--------------------------+------+---------+------+------+
-| os-odl-gluon-noha | X | | | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-openo-ha | | X | | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm_ovs_dpdk | | | X | |
-| -noha | | | | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm_ovs_dpdk-ha | | | X | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm_ovs_dpdk | | | X | |
-| _bar-ha | | | | |
-+--------------------------+------+---------+------+------+
-| os-nosdn-kvm_ovs_dpdk | | | X | |
-| _bar-noha | | | | |
-+--------------------------+------+---------+------+------+
-| opnfv_os-ovn-nofeature- | X | | | |
-| noha_daily | | | | |
-+--------------------------+------+---------+------+------+
+===============
+
+For Fraser 6.0.0, Yardstick was tested on the following scenarios:
+
++-------------------------+------+---------+----------+------+------+-------+
+| Scenario | Apex | Compass | Fuel-arm | Fuel | Joid | Daisy |
++=========================+======+=========+==========+======+======+=======+
+| os-nosdn-nofeature-noha | X | X | | | X | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-nofeature-ha | X | X | X | X | X | X |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-bar-noha | X | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-bar-ha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-bgpvpn-ha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-calipso-noha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-kvm-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl_l3-nofeature-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-sfc-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-nofeature-ha | | | | X | | X |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-ovs-ha | | | | X | | |
++-------------------------+------+---------+----------+------+------+-------+
+| k8-nosdn-nofeature-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| k8-nosdn-stor4nfv-noha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+
Test results
-------------
+============
Test results are available in:
@@ -459,109 +365,107 @@ Test results are available in:
The reporting pages can be found at:
-+---------------+-------------------------------------------------------------------------------------+
-| apex | http://testresults.opnfv.org/reporting/euphrates/yardstick/status-apex.html |
-+---------------+-------------------------------------------------------------------------------------+
-| compass | http://testresults.opnfv.org/reporting/euphrates/yardstick/status-compass.html |
-+---------------+-------------------------------------------------------------------------------------+
-| fuel\@x86 | http://testresults.opnfv.org/reporting/euphrates/yardstick/status-fuel@x86.html |
-+---------------+-------------------------------------------------------------------------------------+
-| fuel\@aarch64 | http://testresults.opnfv.org/reporting/euphrates/yardstick/status-fuel@aarch64.html |
-+---------------+-------------------------------------------------------------------------------------+
-| joid | http://testresults.opnfv.org/reporting/euphrates/yardstick/status-joid.html |
-+---------------+-------------------------------------------------------------------------------------+
++---------------+----------------------------------------------------------------------------------+
+| apex | http://testresults.opnfv.org/reporting/fraser/yardstick/status-apex.html |
++---------------+----------------------------------------------------------------------------------+
+| compass | http://testresults.opnfv.org/reporting/fraser/yardstick/status-compass.html |
++---------------+----------------------------------------------------------------------------------+
+| fuel\@x86 | http://testresults.opnfv.org/reporting/fraser/yardstick/status-fuel@x86.html |
++---------------+----------------------------------------------------------------------------------+
+| fuel\@aarch64 | http://testresults.opnfv.org/reporting/fraser/yardstick/status-fuel@aarch64.html |
++---------------+----------------------------------------------------------------------------------+
+| joid | http://testresults.opnfv.org/reporting/fraser/yardstick/status-joid.html |
++---------------+----------------------------------------------------------------------------------+
Known Issues/Faults
-^^^^^^^^^^^^^^^^^^^
+-------------------
Corrected Faults
-^^^^^^^^^^^^^^^^
+----------------
+
+Fraser 6.0.0:
+
++--------------------+--------------------------------------------------------------------------+
+| **JIRA REFERENCE** | **DESCRIPTION** |
++====================+==========================================================================+
+| YARDSTICK-831 | tc053 kill haproxy wrong |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-842 | load image fails when there's cirros image exist |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-857 | tc006 failed due to volume attached to different location "/dev/vdc" |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-874 | Specify supported architecture for Ubuntu backports repository |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-875 | Check if multiverse repository is available in Ubuntu |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-893 | Fix proxy env handling and ansible multinode support |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-899 | Variable local_iface_name is read before it is set |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-900 | Section in "upload_yardstick_image.yml" invalid |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-911 | Remove 'inconsistent-return-statements' from Pylint checks |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-989 | Yardstick real-time influxdb KPI reporting regressions |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-994 | NSB set-up build script for baremetal broken |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-996 | Error in address input format in "_ip_range_action_partial" |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1003 | Prox vnf descriptor cleanup for tg and vnf |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1006 | Ansible destroy script will fail if vm has already been undefined |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1012 | constants: fix pylint warnings for OSError |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1014 | Remove unused args in |
+| | network_services.traffic_profile.ixia_rfc2544.IXIARFC2544Profile |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1016 | Allow vm to access outside world through default gateway |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1019 | For 'qemu-img version 2.10.1' unit 'MB' is not acceptable ansible script |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1021 | NSB: All Sample VNF test cases timeout after 1 hour of execution |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1036 | Prox: Addition of storage of extra counters for Grafana |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1038 | Missing file which is described in the operation_conf.yaml |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1047 | Error in string format in HeatTemplateError message |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1056 | yardstick report command print error when run test case |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1059 | Reduce the log level if TRex client is no connected |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1073 | Error when retrieving "options" section in "scenario" |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1080 | Running Test Case in Latest Yardstick Docker Image shows Error |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1082 | tc043,tc055, tc063, tc075, pass wrong node name in the ci scenario yaml |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1102 | Don't hide exception traceback from Task.start() |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1107 | bad exception traceback print due to atexit_handler |
++--------------------+--------------------------------------------------------------------------+
+| YARDSTICK-1120 | HA test case tc050 should start monitor before attack |
++--------------------+--------------------------------------------------------------------------+
+
+Fraser 6.0.0 known restrictions/issues
+======================================
-Euphrates 5.1.0:
-
-+---------------------+-------------------------------------------------------------------------+
-| **JIRA REFERENCE** | **DESCRIPTION** |
-| | |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-841 | Fix various NSB license issues |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-73 | How To Work with Test Cases |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-500 | VNF testing documentation |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-826 | Allow overriding Heat IP addresses to match traffic generator profile |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-828 | Refactor doc/testing/user/userguide "Yardstick Installation" |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-830 | build_yardstick_image Ansible mount module doesn't work on Ubuntu 14.04 |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-833 | ansible_common transform password into lower case |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-847 | tc006, tc079, tc082 miss grafana dashboard in local deployment |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-849 | kill process do not accurately kill the process like "nova-api" |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-850 | tc023 miss description and tc050-58 wrong description |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-852 | tc078 cpu2006 fails in some situation |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-854 | yardstick docker lack of trex_client |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-867 | testcase tc078 have no data stored or dashboard to show results |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-871 | Remove img_modify_playbook assignation in build_yardstick_image.yml |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-829 | "nsb_setup.sh" doesn't parse the controller IP correctly |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-839 | NSB Prox BM test cases to be fixed for incorporating scale-up |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-840 | NSB Prox test documentation of vPE and LW-AFTR test cases |
-+---------------------+-------------------------------------------------------------------------+
-| JIRA: YARDSTICK-848 | NSB "Prox" : Cleanup duplicated traffic profile |
-+---------------------+-------------------------------------------------------------------------+
-
-
-
-
-Euphrates 5.0.0:
-
-+---------------------+--------------------------------------------+
-| **JIRA REFERENCE** | **DESCRIPTION** |
-| | |
-+---------------------+--------------------------------------------+
-| JIRA: YARDSTICK-599 | Could not load EntryPoint.parse when using |
-| | 'openstack -h' |
-+---------------------+--------------------------------------------+
-| JIRA: YARDSTICK-602 | Don't rely on staic ip addresses as they |
-| | are dynamic |
-+---------------------+--------------------------------------------+
-
-
-Euphratess 5.0.0 known restrictions/issues
-------------------------------------------
+-----------+-----------+----------------------------------------------+
| Installer | Scenario | Issue |
+===========+===========+==============================================+
-| any | \*-bgpvpn | Floating ips not supported. Some Test cases |
-| | | related to floating ips are excluded. |
-+-----------+-----------+----------------------------------------------+
-| any | odl_l3-\* | Some test cases related to using floating IP |
-| | | addresses fail because of a known ODL bug. |
-| | | |
-+-----------+-----------+----------------------------------------------+
-| compass | odl_l2-\* | In some test cases, VM instance will failed |
-| | | raising network interfaces. |
| | | |
+-----------+-----------+----------------------------------------------+
-
Useful links
-------------
+============
- wiki project page: https://wiki.opnfv.org/display/yardstick/Yardstick
- - wiki Yardstick Euphrates release planing page: https://wiki.opnfv.org/display/yardstick/Yardstick+Euphrates+Release+Planning
+ - wiki Yardstick Fraser release planing page: https://wiki.opnfv.org/display/yardstick/Release+Fraser
- Yardstick repo: https://git.opnfv.org/cgit/yardstick
diff --git a/docs/release/results/euphrates_fraser_comparsion.rst b/docs/release/results/euphrates_fraser_comparsion.rst
new file mode 100644
index 000000000..222dc8bb0
--- /dev/null
+++ b/docs/release/results/euphrates_fraser_comparsion.rst
@@ -0,0 +1,8 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+=======================================================
+Test results analysis for Euphrates and Fraser releases
+=======================================================
+
diff --git a/docs/release/results/images/tc002_pod.png b/docs/release/results/images/tc002_pod.png
new file mode 100644
index 000000000..7f92c471d
--- /dev/null
+++ b/docs/release/results/images/tc002_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc002_scenario.png b/docs/release/results/images/tc002_scenario.png
new file mode 100644
index 000000000..0ea1ecec6
--- /dev/null
+++ b/docs/release/results/images/tc002_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc010_pod.png b/docs/release/results/images/tc010_pod.png
new file mode 100644
index 000000000..c7c623481
--- /dev/null
+++ b/docs/release/results/images/tc010_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc010_scenario.png b/docs/release/results/images/tc010_scenario.png
new file mode 100644
index 000000000..7c53a5fab
--- /dev/null
+++ b/docs/release/results/images/tc010_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc011_pod.png b/docs/release/results/images/tc011_pod.png
new file mode 100644
index 000000000..8fec72f5a
--- /dev/null
+++ b/docs/release/results/images/tc011_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc011_scenario.png b/docs/release/results/images/tc011_scenario.png
new file mode 100644
index 000000000..2d78ea372
--- /dev/null
+++ b/docs/release/results/images/tc011_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc012_pod.png b/docs/release/results/images/tc012_pod.png
new file mode 100644
index 000000000..0f2a00910
--- /dev/null
+++ b/docs/release/results/images/tc012_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc012_scenario.png b/docs/release/results/images/tc012_scenario.png
new file mode 100644
index 000000000..16257988d
--- /dev/null
+++ b/docs/release/results/images/tc012_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc014_pod.png b/docs/release/results/images/tc014_pod.png
new file mode 100644
index 000000000..63aead2e8
--- /dev/null
+++ b/docs/release/results/images/tc014_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc014_scenario.png b/docs/release/results/images/tc014_scenario.png
new file mode 100644
index 000000000..98f23ba1b
--- /dev/null
+++ b/docs/release/results/images/tc014_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc069_pod.png b/docs/release/results/images/tc069_pod.png
new file mode 100644
index 000000000..66b272cb4
--- /dev/null
+++ b/docs/release/results/images/tc069_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc069_scenario.png b/docs/release/results/images/tc069_scenario.png
new file mode 100644
index 000000000..caf12f8d5
--- /dev/null
+++ b/docs/release/results/images/tc069_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc082_pod.png b/docs/release/results/images/tc082_pod.png
new file mode 100644
index 000000000..89e01666b
--- /dev/null
+++ b/docs/release/results/images/tc082_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc082_scenario.png b/docs/release/results/images/tc082_scenario.png
new file mode 100644
index 000000000..637a739c3
--- /dev/null
+++ b/docs/release/results/images/tc082_scenario.png
Binary files differ
diff --git a/docs/release/results/images/tc083_pod.png b/docs/release/results/images/tc083_pod.png
new file mode 100644
index 000000000..f874191e4
--- /dev/null
+++ b/docs/release/results/images/tc083_pod.png
Binary files differ
diff --git a/docs/release/results/images/tc083_scenario.png b/docs/release/results/images/tc083_scenario.png
new file mode 100644
index 000000000..afd80aa02
--- /dev/null
+++ b/docs/release/results/images/tc083_scenario.png
Binary files differ
diff --git a/docs/release/results/index.rst b/docs/release/results/index.rst
index 0560152e0..3ec9e1cff 100644
--- a/docs/release/results/index.rst
+++ b/docs/release/results/index.rst
@@ -14,3 +14,4 @@ Yardstick test results
.. include:: ./overview.rst
.. include:: ./results.rst
+.. include:: ./euphrates_fraser_comparsion.rst
diff --git a/docs/release/results/os-nosdn-kvm-ha.rst b/docs/release/results/os-nosdn-kvm-ha.rst
deleted file mode 100644
index a8a56f80e..000000000
--- a/docs/release/results/os-nosdn-kvm-ha.rst
+++ /dev/null
@@ -1,270 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-================================
-Test Results for os-nosdn-kvm-ha
-================================
-
-.. toctree::
- :maxdepth: 2
-
-
-fuel
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD2: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test
-runs, each run on the Ericsson POD2_ or LF POD2_ between August 24 and 30 in
-2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.44 and 0.75 ms.
-A few runs start with a 0.65 - 0.68 ms RTT spike (This could be because of
-normal ARP handling). One test run has a greater RTT spike of 1.49 ms.
-To be able to draw conclusions more runs should be made. SLA set to 10 ms.
-The SLA value is used as a reference, it has not been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth looks similar between different dates, with an
-average between approx. 92 and 204 MB/s. Within each test run the results
-vary, with a minimum 2 MB/s and maximum 819 MB/s on the totality. Most runs
-have a minimum BW of 3 MB/s (one run at 2 MB/s). The maximum BW varies more in
-absolute numbers between the dates, between 238 and 819 MB/s.
-SLA set to 400 MB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC010
------
-The measurements for memory latency are similar between test dates and result
-in approx. 2.07 ns. The variations within each test run are similar, between
-1.41 and 3.53 ns.
-SLA set to 30 ns. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-TC011
------
-Packet delay variation between 2 VMs on different blades is measured using
-Iperf3. The reported packet delay variation varies between 0.0051 and 0.0243 ms,
-with an average delay variation between 0.0081 ms and 0.0195 ms.
-
-TC012
------
-Between test dates, the average measurements for memory bandwidth result in
-approx. 13.6 GB/s. Within each test run the results vary more, with a minimal
-BW of 6.09 GB/s and maximum of 16.47 GB/s on the totality.
-SLA set to 15 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC014
------
-The Unixbench processor test run results vary between scores 2316 and 3619,
-one result each date.
-No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-CPU utilization statistics are collected during UDP flows sent between the VMs
-using pktgen as packet generator tool. The average measurements for CPU
-utilization ratio vary between 1% to 2%. The peak of CPU utilization ratio
-appears around 7%.
-
-TC069
------
-Between test dates, the average measurements for memory bandwidth vary between
-22.6 and 29.1 GB/s. Within each test run the results vary more, with a minimal
-BW of 20.0 GB/s and maximum of 29.5 GB/s on the totality.
-SLA set to 6 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Memory utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for memory
-utilization vary between 225MB to 246MB. The peak of memory utilization appears
-around 340MB.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Cache utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for cache
-utilization vary between 205MB to 212MB.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. Total number of packets received per
-second was average on 200 kpps and total number of packets transmitted per
-second was average on 600 kpps.
-
-Detailed test results
----------------------
-The scenario was run on Ericsson POD2_ and LF POD2_ with:
-Fuel 9.0
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-Conclusions and recommendations
--------------------------------
-The pktgen test configuration has a relatively large base effect on RTT in
-TC037 compared to TC002, where there is no background load at all. Approx.
-15 ms compared to approx. 0.5 ms, which is more than a 3000 percentage
-difference in RTT results.
-Especially RTT and throughput come out with better results than for instance
-the *fuel-os-nosdn-nofeature-ha* scenario does. The reason for this should
-probably be further analyzed and understood. Also of interest could be
-to make further analyzes to find patterns and reasons for lost traffic.
-Also of interest could be to see if there are continuous variations where
-some test cases stand out with better or worse results than the general test
-case.
-
diff --git a/docs/release/results/os-nosdn-nofeature-ha.rst b/docs/release/results/os-nosdn-nofeature-ha.rst
deleted file mode 100644
index 9e52731d5..000000000
--- a/docs/release/results/os-nosdn-nofeature-ha.rst
+++ /dev/null
@@ -1,492 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-======================================
-Test Results for os-nosdn-nofeature-ha
-======================================
-
-.. toctree::
- :maxdepth: 2
-
-
-apex
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD1: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test
-runs, each run on the LF POD1_ between August 25 and 28 in
-2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.74 and 1.08 ms.
-A few runs start with a 0.99 - 1.07 ms RTT spike (This could be because of
-normal ARP handling). One test run has a greater RTT spike of 1.35 ms.
-To be able to draw conclusions more runs should be made. SLA set to 10 ms.
-The SLA value is used as a reference, it has not been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth looks similar between different dates, with an
-average between approx. 128 and 136 MB/s. Within each test run the results
-vary, with a minimum 5 MB/s and maximum 446 MB/s on the totality. Most runs
-have a minimum BW of 5 MB/s (one run at 6 MB/s). The maximum BW varies more in
-absolute numbers between the dates, between 416 and 446 MB/s.
-SLA set to 400 MB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC010
------
-The measurements for memory latency are similar between test dates and result
-in approx. 1.09 ns. The variations within each test run are similar, between
-1.0860 and 1.0880 ns.
-SLA set to 30 ns. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-TC011
------
-Packet delay variation between 2 VMs on different blades is measured using
-Iperf3. The reported packet delay variation varies between 0.0025 and 0.0148 ms,
-with an average delay variation between 0.0056 ms and 0.0157 ms.
-
-TC012
------
-Between test dates, the average measurements for memory bandwidth result in
-approx. 19.70 GB/s. Within each test run the results vary more, with a minimal
-BW of 18.16 GB/s and maximum of 20.13 GB/s on the totality.
-SLA set to 15 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC014
------
-The Unixbench processor test run results vary between scores 3224.4 and 3842.8,
-one result each date. The average score on the total is 3659.5.
-No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-CPU utilization statistics are collected during UDP flows sent between the VMs
-using pktgen as packet generator tool. The average measurements for CPU
-utilization ratio vary between 1% to 2%. The peak of CPU utilization ratio
-appears around 7%.
-
-TC069
------
-Between test dates, the average measurements for memory bandwidth vary between
-22.6 and 29.1 GB/s. Within each test run the results vary more, with a minimal
-BW of 20.0 GB/s and maximum of 29.5 GB/s on the totality.
-SLA set to 6 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Memory utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for memory
-utilization vary between 225MB to 246MB. The peak of memory utilization appears
-around 340MB.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Cache utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for cache
-utilization vary between 205MB to 212MB.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. Total number of packets received per
-second was average on 200 kpps and total number of packets transmitted per
-second was average on 600 kpps.
-
-Detailed test results
----------------------
-The scenario was run on LF POD1_ with:
-Apex
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-
-Joid
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD5: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Intel POD5_ between September 11 and 14 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 1.59 and 1.70 ms.
-Two test runs have reached the same greater RTT spike of 3.06 ms, which are
-1.66 and 1.70 ms average, but only one has the lower RTT of 1.35 ms. The other
-two runs have no similar spike at all. To be able to draw conclusions more runs
-should be made. SLA set to be 10 ms. The SLA value is used as a reference, it
-has not been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput and the
-greatest IO read bandwidth of the four runs is 173.3 MB/s. The IO read
-bandwidth of the four runs looks similar on different four days, with an
-average between 32.7 and 60.4 MB/s. One of the runs has a minimum BW of 429
-KM/s and other has a maximum BW of 173.3 MB/s. The SLA of read bandwidth sets
-to be 400 MB/s, which is used as a reference, and it has not been defined by
-OPNFV.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is 1.1 ns on average. The
-variations within each test run are different, some vary from a large range and
-others have a small change. For example, the largest change is on September 14,
-the memory read latency of which is ranging from 1.12 ns to 1.22 ns. However,
-the results on September 12 change very little, which range from 1.14 ns to
-1.17 ns. The SLA sets to be 30 ns. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC011
------
-Iperf3 is a tool for evaluating the pocket delay variation between 2 VMs on
-different blades. The reported pocket delay variations of the four test runs
-differ from each other. The results on September 13 within the date look
-similar and the values are between 0.0087 and 0.0190 ms, which is 0.0126 ms on
-average. However, on the fourth day, the pocket delay variation has a large
-wide change within the date, which ranges from 0.0032 ms to 0.0121 ms and has
-the minimum average value. The pocket delay variations of other two test runs
-look relatively similar, which are 0.0076 ms and 0.0152 ms on average. The SLA
-value sets to be 10 ms. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the four test runs, the memory
-bandwidth within the second day almost keep stable, which is 11.58 GB/s on
-average. And the memory bandwidth of the fourth day look similar as that of the
-second day, both of which remain stable. The other two test runs relatively
-change from a large wide range, in which the minimum memory bandwidth is 11.22
-GB/s and the maximum bandwidth is 16.65 GB/s with an average bandwidth of about
-12.20 GB/s. Here SLA set to be 15 GB/s. The SLA value is used as a reference,
-it has not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to measure processing speed, that is instructions per
-second. It can be seen from the dashboard that the processing test results
-vary from scores 3272 to 3444, and there is only one result one date. The
-overall average score is 3371. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the four test runs is 119.85, 128.02, 121.40 and
-126.08 kpps, of which the result of the second is the highest. The RTT results
-of all the test runs keep flat at approx. 37 ms. It is obvious that the PPS
-results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 184 kpps and the
-minimum throughput is 49 K respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar average vaue, that is 38 ms, of which the worest RTT is
-93 ms on Sep. 14th.
-
-CPU load of the four test runs have a large change, since the minimum value and
-the peak of CPU load is 0 percent and 51 percent respectively. And the best
-result is obtained on Sep. 14th.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 22.3 GB/s to 26.8 GB/s and then to 18.5 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is 8 kb and 16 kb, the memory write bandwidth
-look similar with a minimal BW of 22.5 GB/s and peak value of 28.7 GB/s. SLA
-sets to be 7 GB/s. The SLA value is used as a a reference, it has not been
-defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT can reach
-more than 80 ms and the average RTT is usually approx. 38 ms. On the whole, the
-average RTTs of the four runs keep flat.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 268 MiB on Sep
-14, which also has the largest minimum memory. Besides, the rest three test
-runs have the similar used memory. On the other hand, the free memory of the
-four runs have the same smallest minimum value, that is about 223 MiB, and the
-maximum free memory of three runs have the similar result, that is 337 MiB,
-except that on Sep. 14th, whose maximum free memory is 254 MiB. On the whole,
-all the test runs have similar average free memory.
-
-Network throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-network throughput of the four test runs seem quite different, ranging from
-119.85 kpps to 128.02 kpps. The average number of flows in these tests is
-24000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding packet throughput
-differ between 49.4k and 193.3k with an average packet throughput of approx.
-125k. On the whole, the PPS results seem consistent. Within each test run of
-the four runs, when number of flows becomes larger, the packet throughput seems
-not larger in the meantime.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT can reach
-more than 94 ms and the average RTT is usually approx. 35 ms. On the whole, the
-average RTTs of the four runs keep flat.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool.The largest
-cache size is 212 MiB in the four runs, and the smallest cache size is 75 MiB.
-On the whole, the average cache size of the four runs is approx. 208 MiB.
-Meanwhile, the tread of the buffer size looks similar with each other.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs seem quite different, ranging from 119.85 kpps to 128.02
-kpps. The average number of flows in these tests is 239.7k, and each run has a
-minimum number of flows of 2 and a maximum number of flows of 1.001 Mil. At the
-same time, the corresponding packet throughput differ between 49.4k and 193.3k
-with an average packet throughput of approx. 125k. On the whole, the PPS results
-seem consistent. Within each test run of the four runs, when number of flows
-becomes larger, the packet throughput seems not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 32 ms. The PPS results are not as consistent as the RTT results.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second differs from each other, in which the smallest number of
-packets transmitted per second is 6 pps on Sep. 12ed and the largest of that is
-210.8 kpps. Meanwhile, the largest total number of packets received per second
-differs from each other, in which the smallest number of packets received per
-second is 2 pps on Sep. 13rd and the largest of that is 250.2 kpps.
-
-In some test runs when running with less than approx. 90000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 1000000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Intel POD5_ with:
-Joid
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-
diff --git a/docs/release/results/os-nosdn-nofeature-noha.rst b/docs/release/results/os-nosdn-nofeature-noha.rst
deleted file mode 100644
index 8b7c184bb..000000000
--- a/docs/release/results/os-nosdn-nofeature-noha.rst
+++ /dev/null
@@ -1,259 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-========================================
-Test Results for os-nosdn-nofeature-noha
-========================================
-
-.. toctree::
- :maxdepth: 2
-
-
-Joid
-=====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD5: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Intel POD5_ between September 12 and 15 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 1.50 and 1.68 ms.
-Only one test run has reached greatest RTT spike of 2.92 ms, which has
-the smallest RTT of 1.06 ms. The other three runs have no similar spike at all,
-the minimum and average RTTs of which are approx. 1.50 ms and 1.68 ms. SLA set to
-be 10 ms. The SLA value is used as a reference, it has not been defined by
-OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 177.5
-MB/s. The IO read bandwidth of the four runs looks similar on different four
-days, with an average between 46.7 and 62.5 MB/s. One of the runs has a minimum
-BW of 680 KM/s and other has a maximum BW of 177.5 MB/s. The SLA of read
-bandwidth sets to be 400 MB/s, which is used as a reference, and it has not
-been defined by OPNFV.
-
-The results of storage IOPS for the four runs look similar with each other. The
-test runs all have an approx. 1.55 K/s for IO reading with an minimum value of
-less than 60 times per second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is between 1.134 ns and 1.227
-ns on average. The variations within each test run are quite different, some
-vary from a large range and others have a small change. For example, the
-largest change is on September 15, the memory read latency of which is ranging
-from 1.116 ns to 1.393 ns. However, the results on September 12 change very
-little, which mainly keep flat and range from 1.124 ns to 1.55 ns. The SLA sets
-to be 30 ns. The SLA value is used as a reference, it has not been defined by
-OPNFV.
-
-TC011
------
-Iperf3 is a tool for evaluating the pocket delay variation between 2 VMs on
-different blades. The reported pocket delay variations of the four test runs
-differ from each other. The results on September 13 within the date look
-similar and the values are between 0.0213 and 0.0225 ms, which is 0.0217 ms on
-average. However, on the third day, the packet delay variation has a large
-wide change within the date, which ranges from 0.008 ms to 0.0225 ms and has
-the minimum value. On Sep. 12, the packet delay is quite long, for the value is
-between 0.0236 and 0.0287 ms and it also has the maximum packet delay of 0.0287
-ms. The packet delay of the last test run is 0.0151 ms on average. The SLA
-value sets to be 10 ms. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the four test runs, the memory
-bandwidth of three test runs almost keep stable within each run, which is
-11.65, 11.57 and 11.64 GB/s on average. However, the memory read and write
-bandwidth on Sep. 14 has a large range, for it ranges from 11.36 GB/s to 16.68
-GB/s. Here SLA set to be 15 GB/s. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3222 to 3585, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the four test runs is 124.8, 160.1, 113.8 and
-137.3 kpps, of which the result of the second is the highest. The RTT results
-of all the test runs keep flat at approx. 37 ms. It is obvious that the PPS
-results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 243.1 kpps and the
-minimum throughput is 37.6 kpps respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar average vaue, that is between 32 ms and 41 ms, of which
-the worest RTT is 155 ms on Sep. 14th.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and 9 percent respectively. And the best result is obtained on Sep.
-15th, with an CPU load of nine percent.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 22.4 GB/s to 26.5 GB/s and then to 18.6 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is 8 kb and 16 kb, the memory write bandwidth
-look similar with a minimal BW of 22.5 GB/s and peak value of 28.7 GB/s. And
-then with the block size becoming larger, the memory write bandwidth tends to
-decrease. SLA sets to be 7 GB/s. The SLA value is used as a a reference, it has
-not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of three test runs look
-similar with each other, and Within these test runs, the maximum RTT can reach
-95 ms and the average RTT is usually approx. 36 ms. The network latency tested
-on Sep. 14 shows that it has a peak latency of 155 ms. But on the whole, the
-average RTTs of the four runs keep flat.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 270 MiB on Sep
-13, which also has the smallest minimum memory utilization. Besides, the rest
-three test runs have the similar used memory with an average memory usage of
-264 MiB. On the other hand, the free memory of the four runs have the same
-smallest minimum value, that is about 223 MiB, and the maximum free memory of
-three runs have the similar result, that is 226 MiB, except that on Sep. 13th,
-whose maximum free memory is 273 MiB. On the whole, all the test runs have
-similar average free memory.
-
-Network throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-network throughput of the four test runs seem quite different, ranging from
-119.85 kpps to 128.02 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding packet throughput
-differ between 38k and 243k with an average packet throughput of approx. 134k.
-On the whole, the PPS results seem consistent. Within each test run of the four
-runs, when number of flows becomes larger, the packet throughput seems not
-larger in the meantime.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT can reach
-79 ms and the average RTT is usually approx. 35 ms. On the whole, the average
-RTTs of the four runs keep flat.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool.The largest
-cache size is 214 MiB in the four runs, and the smallest cache size is 100 MiB.
-On the whole, the average cache size of the four runs is approx. 210 MiB.
-Meanwhile, the tread of the buffer size looks similar with each other. On the
-other hand, the mean buffer size of the four runs keep flat, since they have a
-minimum value of approx. 7 MiB and a maximum value of 8 MiB, with an average
-value of about 8 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs seem quite different, ranging from 113.8 kpps to 124.8 kpps.
-The average number of flows in these tests is 240k, and each run has a minimum
-number of flows of 2 and a maximum number of flows of 1.001 Mil. At the same
-time, the corresponding packet throughput differ between 47.6k and 243.1k with
-an average packet throughput between 113.8k and 160.1k. Within each test run of
-the four runs, when number of flows becomes larger, the packet throughput seems
-not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
-between 0 ms and 79 ms with an average leatency of approx. 35 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the four runs differ from 113.8 kpps to 124.8 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar on the first three runs with a minimum
-number of 10 pps and a maximum number of 97 kpps, except the one on Sep. 15th,
-in which the number of packets transmitted per second is 10 pps. Meanwhile, the
-largest total number of packets received per second differs from each other,
-in which the smallest number of packets received per second is 1 pps and the
-largest of that is 276 kpps.
-
-In some test runs when running with less than approx. 90000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 1000000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Intel POD5_ with:
-Joid
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
diff --git a/docs/release/results/os-odl_l2-bgpvpn-ha.rst b/docs/release/results/os-odl_l2-bgpvpn-ha.rst
deleted file mode 100644
index 2bd6dc35d..000000000
--- a/docs/release/results/os-odl_l2-bgpvpn-ha.rst
+++ /dev/null
@@ -1,53 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-====================================
-Test Results for os-odl_l2-bgpvpn-ha
-====================================
-
-.. toctree::
- :maxdepth: 2
-
-
-fuel
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD2: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Ericsson POD2_ between September 7 and 11 in 2016.
-
-TC043
------
-The round-trip-time (RTT) between 2 nodes is measured using
-ping. Most test run measurements result on average between 0.21 and 0.28 ms.
-A few runs start with a 0.32 - 0.35 ms RTT spike (This could be because of
-normal ARP handling). To be able to draw conclusions more runs should be made.
-SLA set to 10 ms. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-Detailed test results
----------------------
-The scenario was run on Ericsson POD2_ with:
-Fuel 9.0
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
diff --git a/docs/release/results/os-odl_l2-nofeature-ha.rst b/docs/release/results/os-odl_l2-nofeature-ha.rst
deleted file mode 100644
index ac0c5bb59..000000000
--- a/docs/release/results/os-odl_l2-nofeature-ha.rst
+++ /dev/null
@@ -1,743 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-=======================================
-Test Results for os-odl_l2-nofeature-ha
-=======================================
-
-.. toctree::
- :maxdepth: 2
-
-
-apex
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD1: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the LF POD1_ between September 14 and 17 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.49 ms and 0.60 ms.
-Only one test run has reached greatest RTT spike of 0.93 ms. Meanwhile, the
-smallest network latency is 0.33 ms, which is obtained on Sep. 14th.
-SLA set to be 10 ms. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 416
-MB/s. The IO read bandwidth of all four runs looks similar, with an average
-between 128 and 131 MB/s. One of the runs has a minimum BW of 497 KB/s. The SLA
-of read bandwidth sets to be 400 MB/s, which is used as a reference, and it has
-not been defined by OPNFV.
-
-The results of storage IOPS for the four runs look similar with each other. The
-IO read times per second of the four test runs have an average value at 1k per
-second, and meanwhile, the minimum result is only 45 times per second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is between 1.0859 ns and
-1.0869 ns on average. The variations within each test run are quite different,
-some vary from a large range and others have a small change. For example, the
-largest change is on September 14th, the memory read latency of which is ranging
-from 1.091 ns to 1.086 ns. However.
-The SLA sets to be 30 ns. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC011
------
-Packet delay variation between 2 VMs on different blades is measured using
-Iperf3. On the first two test runs the reported packet delay variation varies between
-0.0037 and 0.0740 ms, with an average delay variation between 0.0096 ms and 0.0321.
-On the second date the delay variation varies between 0.0063 and 0.0096 ms, with
-an average delay variation of 0.0124 - 0.0141 ms.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the four test runs, the trend of
-three memory bandwidth almost look similar, which all have a narrow range, and
-the average result is 19.88 GB/s. Here SLA set to be 15 GB/s. The SLA value is
-used as a reference, it has not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3754k to 3831k, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the four test runs is between 307.3 kpps and
-447.1 kpps, of which the result of the third run is the highest. The RTT
-results of all the test runs keep flat at approx. 15 ms. It is obvious that the
-PPS results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 418.1 kpps and the
-minimum throughput is 326.5 kpps respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar average vaue, that is approx. 15 ms.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and nine percent respectively. And the best result is obtained on Sep.
-1, with an CPU load of nine percent. But on the whole, the CPU load is very
-poor, since the average value is quite small.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 28.2 GB/s to 29.5 GB/s and then to 29.2 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is 2 kb or 16 kb, the memory write bandwidth
-look similar with a minimal BW of 25.8 GB/s and peak value of 28.3 GB/s. And
-then with the block size becoming larger, the memory write bandwidth tends to
-decrease. SLA sets to be 7 GB/s. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other, and within these test runs, the maximum RTT can
-reach 39 ms and the average RTT is usually approx. 15 ms. The network latency
-tested on Sep. 1 and Sep. 8 have a peak latency of 39 ms. But on the whole,
-the average RTTs of the five runs keep flat and the network latency is
-relatively short.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 267 MiB for the
-four runs. In general, the four test runs have very large memory utilization,
-which can reach 257 MiB on average. On the other hand, for the mean free memory,
-the four test runs have the similar trend with that of the mean used memory.
-In general, the mean free memory change from 233 MiB to 241 MiB.
-
-Packet throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-packet throughput of the four test runs seem quite different, ranging from
-305.3 kpps to 447.1 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding average packet
-throughput is between 354.4 kpps and 381.8 kpps. In summary, the PPS results
-seem consistent. Within each test run of the four runs, when number of flows
-becomes larger, the packet throughput seems not larger at the same time.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT is only 42
-ms and the average RTT is usually approx. 15 ms. On the whole, the average
-RTTs of the four runs keep stable and the network latency is relatively small.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool. The largest
-cache size is 212 MiB, which is same for the four runs, and the smallest cache
-size is 75 MiB. On the whole, the average cache size of the four runs look the
-same and is between 197 MiB and 211 MiB. Meanwhile, the tread of the buffer
-size keep flat, since they have a minimum value of 7 MiB and a maximum value of
-8 MiB, with an average value of about 7.9 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs differ from 354.4 kpps to 381.8 kpps. The average number of
-flows in these tests is 240k, and each run has a minimum number of flows of 2
-and a maximum number of flows of 1.001 Mil. At the same time, the corresponding
-packet throughput differ between 305.3 kpps to 447.1 kpps. Within each test run
-of the four runs, when number of flows becomes larger, the packet throughput
-seems not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
-between 0 ms and 42 ms with an average leatency of less than 15 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the four runs differ from 354.4 kpps to 381.8 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar for three test runs, whose values change a
-lot from 10 pps to 501 kpps. While results of the rest test run seem the same
-and keep stable with the average number of packets transmitted per second of 10
-pps. However, the total number of packets received per second of the four runs
-look similar, which have a large wide range of 2 pps to 815 kpps.
-
-In some test runs when running with less than approx. 251000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 251000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on LF POD1_ with:
-Apex
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-
-
-fuel
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD2: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Ericsson POD2_ or LF POD2_ between August 25 and 29 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.5 and 0.6 ms.
-A few runs start with a 1 - 1.5 ms RTT spike (This could be because of normal ARP
-handling). One test run has a greater RTT spike of 1.9 ms, which is the same
-one with the 0.7 ms average. The other runs have no similar spike at all.
-To be able to draw conclusions more runs should be made.
-SLA set to 10 ms. The SLA value is used as a reference, it has not
-been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth looks similar between different dates, with an
-average between approx. 170 and 200 MB/s. Within each test run the results
-vary, with a minimum 2 MB/s and maximum 838 MB/s on the totality. Most runs
-have a minimum BW of 3 MB/s (two runs at 2 MB/s). The maximum BW varies more in
-absolute numbers between the dates, between 617 and 838 MB/s.
-SLA set to 400 MB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC010
------
-The measurements for memory latency are similar between test dates and result
-in approx. 1.2 ns. The variations within each test run are similar, between
-1.215 and 1.219 ns. One exception is February 16, where the average is 1.222
-and varies between 1.22 and 1.28 ns.
-SLA set to 30 ns. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-TC011
------
-Packet delay variation between 2 VMs on different blades is measured using
-Iperf3. On the first date the reported packet delay variation varies between
-0.0025 and 0.011 ms, with an average delay variation of 0.0067 ms.
-On the second date the delay variation varies between 0.002 and 0.006 ms, with
-an average delay variation of 0.004 ms.
-
-TC012
------
-Between test dates, the average measurements for memory bandwidth vary between
-17.4 and 17.9 GB/s. Within each test run the results vary more, with a minimal
-BW of 16.4 GB/s and maximum of 18.2 GB/s on the totality.
-SLA set to 15 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC014
------
-The Unixbench processor test run results vary between scores 3080 and 3240,
-one result each date. The average score on the total is 3150.
-No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-CPU utilization statistics are collected during UDP flows sent between the VMs
-using pktgen as packet generator tool. The average measurements for CPU
-utilization ratio vary between 1% to 2%. The peak of CPU utilization ratio
-appears around 7%.
-
-TC069
------
-Between test dates, the average measurements for memory bandwidth vary between
-15.5 and 25.4 GB/s. Within each test run the results vary more, with a minimal
-BW of 9.7 GB/s and maximum of 29.5 GB/s on the totality.
-SLA set to 6 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Memory utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for memory
-utilization vary between 225MB to 246MB. The peak of memory utilization appears
-around 340MB.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Cache utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for cache
-utilization vary between 205MB to 212MB.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. Total number of packets received per
-second was average on 200 kpps and total number of packets transmitted per
-second was average on 600 kpps.
-
-Detailed test results
----------------------
-The scenario was run on Ericsson POD2_ and LF POD2_ with:
-Fuel 9.0
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-Conclusions and recommendations
--------------------------------
-The pktgen test configuration has a relatively large base effect on RTT in
-TC037 compared to TC002, where there is no background load at all. Approx.
-15 ms compared to approx. 0.5 ms, which is more than a 3000 percentage
-difference in RTT results.
-Especially RTT and throughput come out with better results than for instance
-the *fuel-os-nosdn-nofeature-ha* scenario does. The reason for this should
-probably be further analyzed and understood. Also of interest could be
-to make further analyzes to find patterns and reasons for lost traffic.
-Also of interest could be to see if there are continuous variations where
-some test cases stand out with better or worse results than the general test
-case.
-
-
-
-Joid
-=====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD6: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Intel POD6_ between September 1 and 8 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 1.01 ms and 1.88 ms.
-Only one test run has reached greatest RTT spike of 1.88 ms. Meanwhile, the
-smallest network latency is 1.01 ms, which is obtained on Sep. 1st. In general,
-the average of network latency of the four test runs are between 1.29 ms and
-1.34 ms. SLA set to be 10 ms. The SLA value is used as a reference, it has not
-been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 183.65
-MB/s. The IO read bandwidth of the three runs looks similar, with an average
-between 62.9 and 64.3 MB/s, except one on Sep. 1, for its maximum storage
-throughput is only 159.1 MB/s. One of the runs has a minimum BW of 685 KB/s and
-other has a maximum BW of 183.6 MB/s. The SLA of read bandwidth sets to be
-400 MB/s, which is used as a reference, and it has not been defined by OPNFV.
-
-The results of storage IOPS for the four runs look similar with each other. The
-IO read times per second of the four test runs have an average value between
-1.41k per second and 1.64k per second, and meanwhile, the minimum result is
-only 55 times per second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is between 1.152 ns and 1.179
-ns on average. The variations within each test run are quite different, some
-vary from a large range and others have a small change. For example, the
-largest change is on September 8, the memory read latency of which is ranging
-from 1.120 ns to 1.221 ns. However, the results on September 7 change very
-little. The SLA sets to be 30 ns. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC011
------
-Iperf3 is a tool for evaluating the packet delay variation between 2 VMs on
-different blades. The reported packet delay variations of the four test runs
-differ from each other. In general, the packet delay of the first two runs look
-similar, for they both stay stable within each run. And the mean packet delay
-of them are 0.0087 ms and 0.0127 ms respectively. Of the four runs, the fourth
-has the worst result, because the packet delay reaches 0.0187 ms. The SLA value
-sets to be 10 ms. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the four test runs, the trend of
-three memory bandwidth almost look similar, which all have a narrow range, and
-the average result is 11.78 GB/s. Here SLA set to be 15 GB/s. The SLA value is
-used as a reference, it has not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3260k to 3328k, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the four test runs is between 307.3 kpps and
-447.1 kpps, of which the result of the third run is the highest. The RTT
-results of all the test runs keep flat at approx. 15 ms. It is obvious that the
-PPS results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 418.1 kpps and the
-minimum throughput is 326.5 kpps respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar average vaue, that is approx. 15 ms.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and nine percent respectively. And the best result is obtained on Sep.
-1, with an CPU load of nine percent. But on the whole, the CPU load is very
-poor, since the average value is quite small.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 21.9 GB/s to 25.9 GB/s and then to 17.8 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is 2 kb or 16 kb, the memory write bandwidth
-look similar with a minimal BW of 24.8 GB/s and peak value of 27.8 GB/s. And
-then with the block size becoming larger, the memory write bandwidth tends to
-decrease. SLA sets to be 7 GB/s. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other, and within these test runs, the maximum RTT can
-reach 39 ms and the average RTT is usually approx. 15 ms. The network latency
-tested on Sep. 1 and Sep. 8 have a peak latency of 39 ms. But on the whole,
-the average RTTs of the five runs keep flat and the network latency is
-relatively short.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 267 MiB for the
-four runs. In general, the four test runs have very large memory utilization,
-which can reach 257 MiB on average. On the other hand, for the mean free memory,
-the four test runs have the similar trend with that of the mean used memory.
-In general, the mean free memory change from 233 MiB to 241 MiB.
-
-Packet throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-packet throughput of the four test runs seem quite different, ranging from
-305.3 kpps to 447.1 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding average packet
-throughput is between 354.4 kpps and 381.8 kpps. In summary, the PPS results
-seem consistent. Within each test run of the four runs, when number of flows
-becomes larger, the packet throughput seems not larger at the same time.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT is only 42
-ms and the average RTT is usually approx. 15 ms. On the whole, the average
-RTTs of the four runs keep stable and the network latency is relatively small.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool. The largest
-cache size is 212 MiB, which is same for the four runs, and the smallest cache
-size is 75 MiB. On the whole, the average cache size of the four runs look the
-same and is between 197 MiB and 211 MiB. Meanwhile, the tread of the buffer
-size keep flat, since they have a minimum value of 7 MiB and a maximum value of
-8 MiB, with an average value of about 7.9 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs differ from 354.4 kpps to 381.8 kpps. The average number of
-flows in these tests is 240k, and each run has a minimum number of flows of 2
-and a maximum number of flows of 1.001 Mil. At the same time, the corresponding
-packet throughput differ between 305.3 kpps to 447.1 kpps. Within each test run
-of the four runs, when number of flows becomes larger, the packet throughput
-seems not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
-between 0 ms and 42 ms with an average leatency of less than 15 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the four runs differ from 354.4 kpps to 381.8 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar for three test runs, whose values change a
-lot from 10 pps to 501 kpps. While results of the rest test run seem the same
-and keep stable with the average number of packets transmitted per second of 10
-pps. However, the total number of packets received per second of the four runs
-look similar, which have a large wide range of 2 pps to 815 kpps.
-
-In some test runs when running with less than approx. 251000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 251000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Intel POD6_ with:
-Joid
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
diff --git a/docs/release/results/os-odl_l2-sfc-ha.rst b/docs/release/results/os-odl_l2-sfc-ha.rst
deleted file mode 100644
index e27562cae..000000000
--- a/docs/release/results/os-odl_l2-sfc-ha.rst
+++ /dev/null
@@ -1,231 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-==================================
-Test Results for os-odl_l2-sfc-ha
-==================================
-
-.. toctree::
- :maxdepth: 2
-
-
-Fuel
-=====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD2: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the LF POD2_ or Ericsson POD2_ between September 16 and 20 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.32 ms and 1.42 ms.
-Only one test run on Sep. 20 has reached greatest RTT spike of 4.66 ms.
-Meanwhile, the smallest network latency is 0.16 ms, which is obtained on Sep.
-17th. To sum up, the curve of network latency has very small wave, which is
-less than 5 ms. SLA sets to be 10 ms. The SLA value is used as a reference, it
-has not been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 734
-MB/s. The IO read bandwidth of the first three runs looks similar, with an
-average of less than 100 KB/s, except one on Sep. 20, whose maximum storage
-throughput can reach 734 MB/s. The SLA of read bandwidth sets to be 400 MB/s,
-which is used as a reference, and it has not been defined by OPNFV.
-
-The results of storage IOPS for the four runs look similar with each other. The
-IO read times per second of the four test runs have an average value between
-1.8k per second and 3.27k per second, and meanwhile, the minimum result is
-only 60 times per second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is between 1.085 ns and 1.218
-ns on average. The variations within each test run are quite small. For
-Ericsson pod2, the average of memory latency is approx. 1.217 ms. While for LF
-pod2, the average value is about 1.085 ms. It can be seen that the performance
-of LF is better than Ericsson's. The SLA sets to be 30 ns. The SLA value is
-used as a reference, it has not been defined by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. The four test runs all have a narrow range
-of change with the average memory and write BW of 18.5 GB/s. Here SLA set to be
-15 GB/s. The SLA value is used as a reference, it has not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3209k to 3843k, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the three test runs is between 439 kpps and
-582 kpps, and the test run on Sep. 17th has the lowest average value of 371
-kpps. The RTT results of all the test runs keep flat at approx. 10 ms. It is
-obvious that the PPS results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved, since the largest packet throughput is 680 kpps and the
-minimum throughput is 319 kpps respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar trend of RTT with the average value of approx. 12 ms.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and ten percent respectively. And the best result is obtained on Sep.
-17th, with an CPU load of ten percent. But on the whole, the CPU load is very
-poor, since the average value is quite small.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the average memory write
-bandwidth tends to become larger first and then smaller within every run test
-for the two pods, which rangs from 25.1 GB/s to 29.4 GB/s and then to 19.2 GB/s
-on average. Since the test id is one, it is that only the INT memory write
-bandwidth is tested. On the whole, with the block size becoming larger, the
-memory write bandwidth tends to decrease. SLA sets to be 7 GB/s. The SLA value
-is used as a reference, it has not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other, and within these test runs, the maximum RTT can
-reach 27 ms and the average RTT is usually approx. 12 ms. The network latency
-tested on Sep. 27th has a peak latency of 27 ms. But on the whole, the average
-RTTs of the four runs keep flat.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 269 MiB for the
-four runs. In general, the four test runs have very large memory utilization,
-which can reach 251 MiB on average. On the other hand, for the mean free memory,
-the four test runs have the similar trend with that of the mean used memory.
-In general, the mean free memory change from 231 MiB to 248 MiB.
-
-Packet throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-packet throughput of the four test runs seem quite different, ranging from
-371 kpps to 582 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding average packet
-throughput is between 319 kpps and 680 kpps. In summary, the PPS results
-seem consistent. Within each test run of the four runs, when number of flows
-becomes larger, the packet throughput seems not larger at the same time.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT is only 24
-ms and the average RTT is usually approx. 12 ms. On the whole, the average
-RTTs of the four runs keep stable and the network latency is relatively small.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool. The largest
-cache size is 213 MiB, and the smallest cache size is 99 MiB, which is same for
-the four runs. On the whole, the average cache size of the four runs look the
-same and is between 184 MiB and 205 MiB. Meanwhile, the tread of the buffer
-size keep stable, since they have a minimum value of 7 MiB and a maximum value of
-8 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs differ from 371 kpps to 582 kpps. The average number of
-flows in these tests is 240k, and each run has a minimum number of flows of 2
-and a maximum number of flows of 1.001 Mil. At the same time, the corresponding
-packet throughput differ between 319 kpps to 680 kpps. Within each test run
-of the four runs, when number of flows becomes larger, the packet throughput
-seems not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
-between 0 ms and 24 ms with an average leatency of less than 13 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the four runs differ from 370 kpps to 582 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar for the four test runs, whose values change a
-lot from 10 pps to 697 kpps. However, the total number of packets received per
-second of three runs look similar, which have a large wide range of 2 pps to
-1.497 Mpps, while the results on Sep. 18th and 20th have very small maximum
-number of packets received per second of 817 kpps.
-
-In some test runs when running with less than approx. 251000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 251000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Ericsson POD2_ and LF POD2_ with:
-Fuel 9.0
-OpenStack Mitaka
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
diff --git a/docs/release/results/os-onos-nofeature-ha.rst b/docs/release/results/os-onos-nofeature-ha.rst
deleted file mode 100644
index d8b3ace5f..000000000
--- a/docs/release/results/os-onos-nofeature-ha.rst
+++ /dev/null
@@ -1,257 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-======================================
-Test Results for os-onos-nofeature-ha
-======================================
-
-.. toctree::
- :maxdepth: 2
-
-
-Joid
-=====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD6: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 5 scenario test runs, each run
-on the Intel POD6_ between September 13 and 16 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 1.50 and 1.68 ms.
-Only one test run has reached greatest RTT spike of 2.62 ms, which has
-the smallest RTT of 1.00 ms. The other four runs have no similar spike at all,
-the minimum and average RTTs of which are approx. 1.06 ms and 1.32 ms. SLA set
-to be 10 ms. The SLA value is used as a reference, it has not been defined by
-OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 175.4
-MB/s. The IO read bandwidth of the four runs looks similar on different four
-days, with an average between 58.1 and 62.0 MB/s, except one on Sep. 14, for
-its maximum storage throughput is only 133.0 MB/s. One of the runs has a
-minimum BW of 497 KM/s and other has a maximum BW of 177.4 MB/s. The SLA of read
-bandwidth sets to be 400 MB/s, which is used as a reference, and it has not
-been defined by OPNFV.
-
-The results of storage IOPS for the five runs look similar with each other. The
-IO read times per second of the five test runs have an average value between
-1.20 K/s and 1.61 K/s, and meanwhile, the minimum result is only 41 times per
-second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the five runs is between 1.146 ns and 1.172
-ns on average. The variations within each test run are quite different, some
-vary from a large range and others have a small change. For example, the
-largest change is on September 13, the memory read latency of which is ranging
-from 1.152 ns to 1.221 ns. However, the results on September 14 change very
-little. The SLA sets to be 30 ns. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC011
------
-Iperf3 is a tool for evaluating the packet delay variation between 2 VMs on
-different blades. The reported packet delay variations of the five test runs
-differ from each other. In general, the packet delay of the first two runs look
-similar, for they both stay stable within each run. And the mean packet delay of
-of them are 0.07714 ms and 0.07982 ms respectively. Of the five runs, the third
-has the worst result, because the packet delay reaches 0.08384 ms. The trend of
-therest two runs look the same, for the average packet delay are 0.07808 ms and
-0.07727 ms respectively. The SLA value sets to be 10 ms. The SLA value is used
-as a reference, it has not been defined by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the five test runs, the memory
-bandwidth of last three test runs almost keep stable within each run, which is
-11.64, 11.71 and 11.61 GB/s on average. However, the memory read and write
-bandwidth on Sep. 13 has a large range, for it ranges from 6.68 GB/s to 11.73
-GB/s. Here SLA set to be 15 GB/s. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3208 to 3314, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the five test runs is between 259.6 kpps and
-318.4 kpps, of which the result of the second run is the highest. The RTT
-results of all the test runs keep flat at approx. 20 ms. It is obvious that the
-PPS results are not as consistent as the RTT results.
-
-The No. flows of the five test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 398.9 kpps and the
-minimum throughput is 250.6 kpps respectively.
-
-There are no errors of packets received in the five runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the five
-runs have the similar average vaue, that is between 17 ms and 22 ms, of which
-the worest RTT is 53 ms on Sep. 14th.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and 10 percent respectively. And the best result is obtained on Sep.
-13rd, with an CPU load of 10 percent.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 21.6 GB/s to 26.8 GB/s and then to 18.4 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is 8 kb and 16 kb, the memory write bandwidth
-look similar with a minimal BW of 23.0 GB/s and peak value of 28.6 GB/s. And
-then with the block size becoming larger, the memory write bandwidth tends to
-decrease. SLA sets to be 7 GB/s. The SLA value is used as a a reference, it has
-not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the five test runs
-look similar with each other, and within these test runs, the maximum RTT can
-reach 53 ms and the average RTT is usually approx. 18 ms. The network latency
-tested on Sep. 14 shows that it has a peak latency of 53 ms. But on the whole,
-the average RTTs of the five runs keep flat and the network latency is
-relatively short.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 272 MiB on Sep
-14. In general, the mean used memory of the five test runs have the similar
-trend and the minimum memory used size is approx. 150 MiB, and the average
-used memory size is about 250 MiB. On the other hand, for the mean free memory,
-the five test runs have the similar trend, whose mean free memory change from
-218 MiB to 342 MiB, with an average value of approx. 38 MiB.
-
-Packet throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-packet throughput of the five test runs seem quite different, ranging from
-285.29 kpps to 297.76 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding packet throughput
-differ between 250.6k and 398.9k with an average packet throughput between
-277.2 K and 318.4 K. In summary, the PPS results seem consistent. Within each
-test run of the five runs, when number of flows becomes larger, the packet
-throughput seems not larger at the same time.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the five test runs
-look similar with each other. Within each test run, the maximum RTT is only 49
-ms and the average RTT is usually approx. 20 ms. On the whole, the average
-RTTs of the five runs keep stable and the network latency is relatively short.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool.The largest
-cache size is 215 MiB in the four runs, and the smallest cache size is 95 MiB.
-On the whole, the average cache size of the five runs change a little and is
-about 200 MiB, except the one on Sep. 14th, the mean cache size is very small,
-which keeps 102 MiB. Meanwhile, the tread of the buffer size keep flat, since
-they have a minimum value of 7 MiB and a maximum value of 8 MiB, with an
-average value of about 7.8 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs seem quite different, ranging from 285.29 kpps to 297.76
-kpps. The average number of flows in these tests is 239.7k, and each run has a
-minimum number of flows of 2 and a maximum number of flows of 1.001 Mil. At the
-same time, the corresponding packet throughput differ between 227.3k and 398.9k
-with an average packet throughput between 277.2k and 318.4k. Within each test
-run of the five runs, when number of flows becomes larger, the packet
-throughput seems not larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
- between 0 ms and 49 ms with an average leatency of less than 22 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the five runs differ from 250.6 kpps to 398.9 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar for four test runs, whose values change a
-lot from 10 pps to 399 kpps, except the one on Sep. 14th, whose total number
-of transmitted per second keep stable, that is 10 pps. Similarly, the total
-number of packets received per second look the same for four runs, except the
-one on Sep. 14th, whose value is only 10 pps.
-
-In some test runs when running with less than approx. 90000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 250000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Intel POD6_ with:
-Joid
-OpenStack Mitaka
-Onos Goldeneye
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
diff --git a/docs/release/results/os-onos-sfc-ha.rst b/docs/release/results/os-onos-sfc-ha.rst
deleted file mode 100644
index e52ae3d55..000000000
--- a/docs/release/results/os-onos-sfc-ha.rst
+++ /dev/null
@@ -1,517 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International
-.. License.
-.. http://creativecommons.org/licenses/by/4.0
-
-
-===============================
-Test Results for os-onos-sfc-ha
-===============================
-
-.. toctree::
- :maxdepth: 2
-
-
-fuel
-====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD2: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Ericsson POD2_ or LF POD2_ between September 5 and 10 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 0.5 and 0.6 ms.
-A few runs start with a 1 - 1.5 ms RTT spike (This could be because of normal ARP
-handling). One test run has a greater RTT spike of 1.9 ms, which is the same
-one with the 0.7 ms average. The other runs have no similar spike at all.
-To be able to draw conclusions more runs should be made.
-SLA set to 10 ms. The SLA value is used as a reference, it has not
-been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth looks similar between different dates, with an
-average between approx. 170 and 200 MB/s. Within each test run the results
-vary, with a minimum 2 MB/s and maximum 838 MB/s on the totality. Most runs
-have a minimum BW of 3 MB/s (two runs at 2 MB/s). The maximum BW varies more in
-absolute numbers between the dates, between 617 and 838 MB/s.
-SLA set to 400 MB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC010
------
-The measurements for memory latency are similar between test dates and result
-in approx. 1.2 ns. The variations within each test run are similar, between
-1.215 and 1.219 ns. One exception is February 16, where the average is 1.222
-and varies between 1.22 and 1.28 ns.
-SLA set to 30 ns. The SLA value is used as a reference, it has not been defined
-by OPNFV.
-
-TC011
------
-Packet delay variation between 2 VMs on different blades is measured using
-Iperf3. On the first date the reported packet delay variation varies between
-0.0025 and 0.011 ms, with an average delay variation of 0.0067 ms.
-On the second date the delay variation varies between 0.002 and 0.006 ms, with
-an average delay variation of 0.004 ms.
-
-TC012
------
-Between test dates, the average measurements for memory bandwidth vary between
-17.4 and 17.9 GB/s. Within each test run the results vary more, with a minimal
-BW of 16.4 GB/s and maximum of 18.2 GB/s on the totality.
-SLA set to 15 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC014
------
-The Unixbench processor test run results vary between scores 3080 and 3240,
-one result each date. The average score on the total is 3150.
-No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-CPU utilization statistics are collected during UDP flows sent between the VMs
-using pktgen as packet generator tool. The average measurements for CPU
-utilization ratio vary between 1% to 2%. The peak of CPU utilization ratio
-appears around 7%.
-
-TC069
------
-Between test dates, the average measurements for memory bandwidth vary between
-15.5 and 25.4 GB/s. Within each test run the results vary more, with a minimal
-BW of 9.7 GB/s and maximum of 29.5 GB/s on the totality.
-SLA set to 6 GB/s. The SLA value is used as a reference, it has not been
-defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Memory utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for memory
-utilization vary between 225MB to 246MB. The peak of memory utilization appears
-around 340MB.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Cache utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The average measurements for cache
-utilization vary between 205MB to 212MB.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs at
-approx. 15 ms. Some test runs show an increase with many flows, in the range
-towards 16 to 17 ms. One exception standing out is Feb. 15 where the average
-RTT is stable at approx. 13 ms. The PPS results are not as consistent as the
-RTT results.
-In some test runs when running with less than approx. 10000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. Around 20 percent decrease in the worst
-case. For the other test runs there is however no significant change to the PPS
-throughput when the number of flows are increased. In some test runs the PPS
-is also greater with 1000000 flows compared to other test runs where the PPS
-result is less with only 2 flows.
-
-The average PPS throughput in the different runs varies between 414000 and
-452000 PPS. The total amount of packets in each test run is approx. 7500000 to
-8200000 packets. One test run Feb. 15 sticks out with a PPS average of
-558000 and approx. 1100000 packets in total (same as the on mentioned earlier
-for RTT results).
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally range between 100 and 1000 per test run,
-but there are spikes in the range of 10000 lost packets as well, and even
-more in a rare cases.
-
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. Total number of packets received per
-second was average on 200 kpps and total number of packets transmitted per
-second was average on 600 kpps.
-
-Detailed test results
----------------------
-The scenario was run on Ericsson POD2_ and LF POD2_ with:
-Fuel 9.0
-OpenStack Mitaka
-Onos Goldeneye
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
-Conclusions and recommendations
--------------------------------
-The pktgen test configuration has a relatively large base effect on RTT in
-TC037 compared to TC002, where there is no background load at all. Approx.
-15 ms compared to approx. 0.5 ms, which is more than a 3000 percentage
-difference in RTT results.
-Especially RTT and throughput come out with better results than for instance
-the *fuel-os-nosdn-nofeature-ha* scenario does. The reason for this should
-probably be further analyzed and understood. Also of interest could be
-to make further analyzes to find patterns and reasons for lost traffic.
-Also of interest could be to see if there are continuous variations where
-some test cases stand out with better or worse results than the general test
-case.
-
-
-Joid
-=====
-
-.. _Grafana: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
-.. _POD6: https://wiki.opnfv.org/pharos?&#community_test_labs
-
-Overview of test results
-------------------------
-
-See Grafana_ for viewing test result metrics for each respective test case. It
-is possible to chose which specific scenarios to look at, and then to zoom in
-on the details of each run test scenario as well.
-
-All of the test case results below are based on 4 scenario test runs, each run
-on the Intel POD6_ between September 8 and 11 in 2016.
-
-TC002
------
-The round-trip-time (RTT) between 2 VMs on different blades is measured using
-ping. Most test run measurements result on average between 1.35 ms and 1.57 ms.
-Only one test run has reached greatest RTT spike of 2.58 ms. Meanwhile, the
-smallest network latency is 1.11 ms, which is obtained on Sep. 11st. In
-general, the average of network latency of the four test runs are between 1.35
-ms and 1.57 ms. SLA set to be 10 ms. The SLA value is used as a reference, it
-has not been defined by OPNFV.
-
-TC005
------
-The IO read bandwidth actually refers to the storage throughput, which is
-measured by fio and the greatest IO read bandwidth of the four runs is 175.4
-MB/s. The IO read bandwidth of the three runs looks similar, with an average
-between 43.7 and 56.3 MB/s, except one on Sep. 8, for its maximum storage
-throughput is only 107.9 MB/s. One of the runs has a minimum BW of 478 KM/s and
-other has a maximum BW of 168.6 MB/s. The SLA of read bandwidth sets to be
-400 MB/s, which is used as a reference, and it has not been defined by OPNFV.
-
-The results of storage IOPS for the four runs look similar with each other. The
-IO read times per second of the four test runs have an average value between
-978 per second and 1.20 K/s, and meanwhile, the minimum result is only 36 times
-per second.
-
-TC010
------
-The tool we use to measure memory read latency is lmbench, which is a series of
-micro benchmarks intended to measure basic operating system and hardware system
-metrics. The memory read latency of the four runs is between 1.164 ns and 1.244
-ns on average. The variations within each test run are quite different, some
-vary from a large range and others have a small change. For example, the
-largest change is on September 10, the memory read latency of which is ranging
-from 1.128 ns to 1.381 ns. However, the results on September 11 change very
-little. The SLA sets to be 30 ns. The SLA value is used as a reference, it has
-not been defined by OPNFV.
-
-TC011
------
-Iperf3 is a tool for evaluating the packet delay variation between 2 VMs on
-different blades. The reported packet delay variations of the four test runs
-differ from each other. In general, the packet delay of two runs look similar,
-for they both stay stable within each run. And the mean packet delay of them
-are 0.0772 ms and 0.0788 ms respectively. Of the four runs, the fourth has the
-worst result, because the packet delay reaches 0.0838 ms. The rest one has a
-large wide range from 0.0666 ms to 0.0798 ms. The SLA value sets to be 10 ms.
-The SLA value is used as a reference, it has not been defined by OPNFV.
-
-TC012
------
-Lmbench is also used to measure the memory read and write bandwidth, in which
-we use bw_mem to obtain the results. Among the four test runs, the trend of the
-memory bandwidth almost look similar, which all have a large wide range, and
-the minimum and maximum results are 9.02 GB/s and 18.14 GB/s. Here SLA set to
-be 15 GB/s. The SLA value is used as a reference, it has not been defined by
-OPNFV.
-
-TC014
------
-The Unixbench is used to evaluate the IaaS processing speed with regards to
-score of single cpu running and parallel running. It can be seen from the
-dashboard that the processing test results vary from scores 3395 to 3475, and
-there is only one result one date. No SLA set.
-
-TC037
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The mean packet throughput of the four test runs is between 362.1 kpps and
-363.5 kpps, of which the result of the third run is the highest. The RTT
-results of all the test runs keep flat at approx. 17 ms. It is obvious that the
-PPS results are not as consistent as the RTT results.
-
-The No. flows of the four test runs are 240 k on average and the PPS results
-look a little waved since the largest packet throughput is 418.1 kpps and the
-minimum throughput is 326.5 kpps respectively.
-
-There are no errors of packets received in the four runs, but there are still
-lost packets in all the test runs. The RTT values obtained by ping of the four
-runs have the similar average vaue, that is approx. 17 ms, of which the worst
-RTT is 39 ms on Sep. 11st.
-
-CPU load is measured by mpstat, and CPU load of the four test runs seem a
-little similar, since the minimum value and the peak of CPU load is between 0
-percent and nine percent respectively. And the best result is obtained on Sep.
-10, with an CPU load of nine percent.
-
-TC069
------
-With the block size changing from 1 kb to 512 kb, the memory write bandwidth
-tends to become larger first and then smaller within every run test, which
-rangs from 25.9 GB/s to 26.6 GB/s and then to 18.1 GB/s on average. Since the
-test id is one, it is that only the INT memory write bandwidth is tested. On
-the whole, when the block size is from 2 kb to 16 kb, the memory write
-bandwidth look similar with a minimal BW of 22.1 GB/s and peak value of 28.6
-GB/s. And then with the block size becoming larger, the memory write bandwidth
-tends to decrease. SLA sets to be 7 GB/s. The SLA value is used as a reference,
-it has not been defined by OPNFV.
-
-TC070
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other, and within these test runs, the maximum RTT can
-reach 39 ms and the average RTT is usually approx. 17 ms. The network latency
-tested on Sep. 11 shows that it has a peak latency of 39 ms. But on the whole,
-the average RTTs of the five runs keep flat and the network latency is
-relatively short.
-
-Memory utilization is measured by free, which can display amount of free and
-used memory in the system. The largest amount of used memory is 270 MiB on the
-first two runs. In general, the mean used memory of two test runs have very
-large memory utilization, which can reach 264 MiB on average. And the other two
-runs have a large wide range of memory usage with the minimum value of 150 MiB
-and the maximum value of 270 MiB. On the other hand, for the mean free memory,
-the four test runs have the similar trend with that of the mean used memory.
-In general, the mean free memory change from 220 MiB to 342 MiB.
-
-Packet throughput and packet loss can be measured by pktgen, which is a tool
-in the network for generating traffic loads for network experiments. The mean
-packet throughput of the four test runs seem quite different, ranging from
-326.5 kpps to 418.1 kpps. The average number of flows in these tests is
-240000, and each run has a minimum number of flows of 2 and a maximum number
-of flows of 1.001 Mil. At the same time, the corresponding packet throughput
-differ between 326.5 kpps and 418.1 kpps with an average packet throughput between
-361.7 kpps and 363.5 kpps. In summary, the PPS results seem consistent. Within each
-test run of the four runs, when number of flows becomes larger, the packet
-throughput seems not larger at the same time.
-
-TC071
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The network latency is measured by ping, and the results of the four test runs
-look similar with each other. Within each test run, the maximum RTT is only 47
-ms and the average RTT is usually approx. 15 ms. On the whole, the average
-RTTs of the four runs keep stable and the network latency is relatively small.
-
-Cache utilization is measured by cachestat, which can display size of cache and
-buffer in the system. Cache utilization statistics are collected during UDP
-flows sent between the VMs using pktgen as packet generator tool. The largest
-cache size is 214 MiB, which is same for the four runs, and the smallest cache
-size is 94 MiB. On the whole, the average cache size of the four runs look the
-same and is between 198 MiB and 207 MiB. Meanwhile, the tread of the buffer
-size keep flat, since they have a minimum value of 7 MiB and a maximum value of
-8 MiB, with an average value of about 7.9 MiB.
-
-Packet throughput can be measured by pktgen, which is a tool in the network for
-generating traffic loads for network experiments. The mean packet throughput of
-the four test runs seem quite the same, which is approx. 363 kpps. The average
-number of flows in these tests is 240k, and each run has a minimum number of
-flows of 2 and a maximum number of flows of 1.001 Mil. At the same time, the
-corresponding packet throughput differ between 327 kpps and 418 kpps with an
-average packet throughput of about 363 kpps. Within each test run of the four
-runs, when number of flows becomes larger, the packet throughput seems not
-larger in the meantime.
-
-TC072
------
-The amount of packets per second (PPS) and round trip times (RTT) between 2 VMs
-on different blades are measured when increasing the amount of UDP flows sent
-between the VMs using pktgen as packet generator tool.
-
-Round trip times and packet throughput between VMs can typically be affected by
-the amount of flows set up and result in higher RTT and less PPS throughput.
-
-The RTT results are similar throughout the different test dates and runs
-between 0 ms and 47 ms with an average leatency of less than 16 ms. The PPS
-results are not as consistent as the RTT results, for the mean packet
-throughput of the four runs differ from 361.7 kpps to 365.0 kpps.
-
-Network utilization is measured by sar, that is system activity reporter, which
-can display the average statistics for the time since the system was started.
-Network utilization statistics are collected during UDP flows sent between the
-VMs using pktgen as packet generator tool. The largest total number of packets
-transmitted per second look similar for two test runs, whose values change a
-lot from 10 pps to 432 kpps. While results of the other test runs seem the same
-and keep stable with the average number of packets transmitted per second of 10
-pps. However, the total number of packets received per second of the four runs
-look similar, which have a large wide range of 2 pps to 657 kpps.
-
-In some test runs when running with less than approx. 250000 flows the PPS
-throughput is normally flatter compared to when running with more flows, after
-which the PPS throughput decreases. For the other test runs there is however no
-significant change to the PPS throughput when the number of flows are
-increased. In some test runs the PPS is also greater with 250000 flows
-compared to other test runs where the PPS result is less with only 2 flows.
-
-There are lost packets reported in most of the test runs. There is no observed
-correlation between the amount of flows and the amount of lost packets.
-The lost amount of packets normally differs a lot per test run.
-
-Detailed test results
----------------------
-The scenario was run on Intel POD6_ with:
-Joid
-OpenStack Mitaka
-Onos Goldeneye
-OpenVirtualSwitch 2.5.90
-OpenDayLight Beryllium
-
-Rationale for decisions
------------------------
-Pass
-
-Conclusions and recommendations
--------------------------------
-Tests were successfully executed and metrics collected.
-No SLA was verified. To be decided on in next release of OPNFV.
-
diff --git a/docs/release/results/overview.rst b/docs/release/results/overview.rst
index b4a050545..9fd74797c 100644
--- a/docs/release/results/overview.rst
+++ b/docs/release/results/overview.rst
@@ -42,55 +42,31 @@ environment, features or test framework.
The list of scenarios supported by each installer can be described as follows:
-+-------------------------+---------+---------+---------+---------+
-| Scenario | Apex | Compass | Fuel | Joid |
-+=========================+=========+=========+=========+=========+
-| os-nosdn-nofeature-noha | | | X | X |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-nofeature-ha | X | X | X | X |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-nofeature-ha | X | X | X | X |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-nofeature-noha| | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l3-nofeature-ha | X | X | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l3-nofeature-noha| | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-onos-sfc-ha | X | X | X | X |
-+-------------------------+---------+---------+---------+---------+
-| os-onos-sfc-noha | | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-onos-nofeature-ha | X | X | X | X |
-+-------------------------+---------+---------+---------+---------+
-| os-onos-nofeature-noha | | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-sfc-ha | | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-sfc-noha | X | X | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-bgpvpn-ha | X | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-bgpvpn-noha | | X | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-kvm-ha | | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-kvm-noha | | X | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-ovs-ha | | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-ovs-noha | X | | X | |
-+-------------------------+---------+---------+---------+---------+
-| os-ocl-nofeature-ha | | | | |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-lxd-ha | | | | X |
-+-------------------------+---------+---------+---------+---------+
-| os-nosdn-lxd-noha | | | | X |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-fdio-noha | X | | | |
-+-------------------------+---------+---------+---------+---------+
-| os-odl_l2-moon-ha | | X | | |
-+-------------------------+---------+---------+---------+---------+
++-------------------------+------+---------+----------+------+------+-------+
+| Scenario | Apex | Compass | Fuel-arm | Fuel | Joid | Daisy |
++=========================+======+=========+==========+======+======+=======+
+| os-nosdn-nofeature-noha | X | | | | X | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-nofeature-ha | X | | X | X | X | X |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-bar-noha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-bar-ha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-bgpvpn-ha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-calipso-noha | X | | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-kvm-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl_l3-nofeature-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-sfc-ha | | X | | | | |
++-------------------------+------+---------+----------+------+------+-------+
+| os-odl-nofeature-ha | | | | X | | X |
++-------------------------+------+---------+----------+------+------+-------+
+| os-nosdn-ovs-ha | | | | X | | |
++-------------------------+------+---------+----------+------+------+-------+
To qualify for release, the scenarios must have deployed and been successfully
tested in four consecutive installations to establish stability of deployment
@@ -103,4 +79,4 @@ References
* IEEE Std 829-2008. "Standard for Software and System Test Documentation".
-* OPNFV Colorado release note for Yardstick.
+* OPNFV Fraser release note for Yardstick.
diff --git a/docs/release/results/results.rst b/docs/release/results/results.rst
index 04c6b9f87..c75f5ae94 100644
--- a/docs/release/results/results.rst
+++ b/docs/release/results/results.rst
@@ -2,13 +2,16 @@
.. License.
.. http://creativecommons.org/licenses/by/4.0
-Results listed by scenario
+Results listed by test cases
==========================
-The following sections describe the yardstick results as evaluated for the
-Colorado release scenario validation runs. Each section describes the
-determined state of the specific scenario as deployed in the Colorado
-release process.
+.. _TOM: https://wiki.opnfv.org/display/testing/R+post-processing+of+the+Yardstick+results
+
+
+The following sections describe the yardstick test case results as evaluated
+for the OPNFV Fraser release scenario validation runs. Each section describes
+the determined state of the specific test case as executed in the Fraser release
+process. All test date are analyzed using TOM_ tool.
Scenario Results
================
@@ -16,21 +19,22 @@ Scenario Results
.. _Dashboard: http://testresults.opnfv.org/grafana/dashboard/db/yardstick-main
.. _Jenkins: https://build.opnfv.org/ci/view/yardstick/
+
The following documents contain results of Yardstick test cases executed on
-OPNFV labs, triggered by OPNFV CI pipeline, documented per scenario.
+OPNFV labs, triggered by OPNFV CI pipeline, documented per test case.
.. toctree::
:maxdepth: 1
- os-nosdn-nofeature-ha.rst
- os-nosdn-nofeature-noha.rst
- os-odl_l2-nofeature-ha.rst
- os-odl_l2-bgpvpn-ha.rst
- os-odl_l2-sfc-ha.rst
- os-nosdn-kvm-ha.rst
- os-onos-nofeature-ha.rst
- os-onos-sfc-ha.rst
+ tc002-network-latency.rst
+ tc010-memory-read-latency.rst
+ tc011-packet-delay-variation.rst
+ tc012-memory-read-write-bandwidth.rst
+ tc014-cpu-processing-speed.rst
+ tc069-memory-write-bandwidth.rst
+ tc082-context-switches-under-load.rst
+ tc083-network-throughput-between-vm.rst
Test results of executed tests are avilable in Dashboard_ and logs in Jenkins_.
diff --git a/docs/release/results/tc002-network-latency.rst b/docs/release/results/tc002-network-latency.rst
new file mode 100644
index 000000000..722423473
--- /dev/null
+++ b/docs/release/results/tc002-network-latency.rst
@@ -0,0 +1,317 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+======================================
+Test results for TC002 network latency
+======================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC002 verifies that network latency is within acceptable boundaries when packets travel between hosts located on same or different compute blades.
+Ping packets (ICMP protocol's mandatory ECHO_REQUEST datagram) are sent from host VM to target VM(s) to elicit ICMP ECHO_RESPONSE.
+
+Metric: RTT (Round Trip Time)
+Unit: ms
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (lower is better):
+
+{
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [0.214],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [0.309],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [0.3145],
+
+ "os-nosdn-ovs-ha:lf-pod2:fuel": [0.3585],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [0.3765],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [0.403],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [0.413],
+
+ "os-nosdn-ovs-ha:ericsson-pod1:fuel": [0.494],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [0.5715],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [0.5785],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [0.617],
+
+ "os-odl-nofeature-ha:lf-pod1:apex": [0.62],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [0.632],
+
+ "os-odl-nofeature-noha:lf-pod1:apex": [0.635],
+
+ "os-odl-bgpvpn-ha:lf-pod1:apex": [0.658],
+
+ "os-odl-sfc-noha:lf-pod1:apex": [0.663],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [0.668],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [0.668],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [0.6815],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [0.7005],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [0.778],
+
+ "os-nosdn-ovs-noha:ericsson-virtual4:fuel": [0.7825],
+
+ "os-nosdn-ovs-noha:ericsson-virtual2:fuel": [0.7885],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [0.795],
+
+ "os-nosdn-ovs-noha:ericsson-virtual1:fuel": [0.8045],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [0.8335],
+
+ "os-nosdn-ovs-noha:ericsson-virtual3:fuel": [0.8755],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [0.8855],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [0.8895],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [0.901],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [0.956],
+
+ "os-nosdn-lxd-noha:intel-pod5:joid": [1.131],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [1.173],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [1.2015],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [1.204],
+
+ "os-nosdn-lxd-ha:intel-pod5:joid": [1.2245],
+
+ "os-odl-nofeature-ha:lf-pod2:fuel": [1.2285],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [1.3055],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [1.309],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [1.313],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [1.319],
+
+ "os-odl-nofeature-ha:ericsson-pod1:fuel": [1.3425],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [1.3475],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [1.348],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [1.432],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual9:compass": [1.442],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [1.4505],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [1.497],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [1.504],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [1.519],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [1.5415],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [1.5785],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [1.604],
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [1.61],
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [1.633],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [1.6485],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [1.7085],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [1.71],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [1.7955],
+
+ "os-odl-nofeature-ha:arm-pod6:fuel": [1.838],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [1.88],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [1.8975],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [1.923],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [1.944],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [1.968],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [1.986],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [2.0415],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [2.071],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [2.0855],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [2.1085],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [2.1135],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [2.234],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [2.294],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [2.304],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [2.378],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [2.397],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [2.472],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [2.603],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [2.635],
+
+ "os-odl-nofeature-noha:ericsson-virtual3:fuel": [2.9055],
+
+ "os-odl-nofeature-noha:ericsson-virtual2:fuel": [3.1295],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [3.337],
+
+ "os-odl-nofeature-noha:ericsson-virtual4:fuel": [3.634],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual1:fuel": [3.875],
+
+ "os-odl-nofeature-noha:ericsson-virtual1:fuel": [3.9655],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [3.9795]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc002_scenario.png
+ :width: 800px
+ :alt: TC002 influence of scenario
+
+{
+
+ "os-odl_l2-moon-ha": [0.3415],
+
+ "os-nosdn-ovs-ha": [0.3625],
+
+ "os-nosdn-ovs_dpdk-noha": [0.378],
+
+ "os-nosdn-ovs_dpdk-ha": [0.5265],
+
+ "os-nosdn-bar-noha": [0.632],
+
+ "os-odl-bgpvpn-ha": [0.658],
+
+ "os-ovn-nofeature-noha": [0.668],
+
+ "os-odl_l3-nofeature-ha": [0.8545],
+
+ "os-nosdn-ovs-noha": [0.8575],
+
+ "os-nosdn-bar-ha": [0.903],
+
+ "os-odl-sfc-ha": [1.127],
+
+ "os-nosdn-lxd-noha": [1.131],
+
+ "os-nosdn-nofeature-ha": [1.152],
+
+ "os-odl_l2-moon-noha": [1.1825],
+
+ "os-nosdn-lxd-ha": [1.2245],
+
+ "os-odl_l3-nofeature-noha": [1.337],
+
+ "os-odl-nofeature-ha": [1.352],
+
+ "os-odl-sfc-noha": [1.4255],
+
+ "os-nosdn-kvm-noha": [1.5045],
+
+ "os-nosdn-openbaton-ha": [1.5665],
+
+ "os-nosdn-nofeature-noha": [1.729],
+
+ "os-nosdn-kvm-ha": [1.7745],
+
+ "os-odl-nofeature-noha": [3.106]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc002_pod.png
+ :width: 800px
+ :alt: TC002 influence of the POD
+
+{
+
+ "huawei-pod2": [0.3925],
+
+ "lf-pod2": [0.5315],
+
+ "lf-pod1": [0.62],
+
+ "flex-pod2": [0.795],
+
+ "huawei-pod12": [0.87],
+
+ "intel-pod5": [1.25],
+
+ "ericsson-virtual3": [1.2655],
+
+ "ericsson-pod1": [1.372],
+
+ "arm-pod5": [1.518],
+
+ "huawei-virtual4": [1.5355],
+
+ "huawei-virtual3": [1.606],
+
+ "intel-pod18": [1.6575],
+
+ "huawei-virtual8": [1.709],
+
+ "huawei-virtual2": [1.872],
+
+ "arm-pod6": [1.895],
+
+ "huawei-virtual9": [2.0745],
+
+ "huawei-virtual1": [2.495],
+
+ "ericsson-virtual2": [2.7895],
+
+ "ericsson-virtual4": [3.768],
+
+ "ericsson-virtual1": [3.8035]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc010-memory-read-latency.rst b/docs/release/results/tc010-memory-read-latency.rst
new file mode 100644
index 000000000..9a296b7a0
--- /dev/null
+++ b/docs/release/results/tc010-memory-read-latency.rst
@@ -0,0 +1,299 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+==========================================
+Test results for TC010 memory read latency
+==========================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC010 measures the memory read latency for varying memory sizes and strides.
+The test results shown below are for memory size of 16MB.
+
+Metric: Memory read latency
+Unit: ns
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (lower is better):
+
+{
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [5.3165],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [5.908],
+
+ "os-nosdn-ovs-noha:ericsson-virtual1:fuel": [6.412],
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [6.545],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [6.592],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [6.5975],
+
+ "os-nosdn-ovs-ha:ericsson-pod1:fuel": [6.7675],
+
+ "os-odl-nofeature-ha:ericsson-pod1:fuel": [6.7675],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [6.7945],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [6.839],
+
+ "os-nosdn-ovs-noha:ericsson-virtual4:fuel": [6.9695],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [7.123],
+
+ "os-odl-nofeature-noha:ericsson-virtual4:fuel": [7.289],
+
+ "os-nosdn-ovs-noha:ericsson-virtual2:fuel": [7.4315],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [7.9],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [8.178],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [8.616],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [8.646],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [8.8615],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [8.87],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [8.877],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [8.892],
+
+ "os-nosdn-ovs-noha:ericsson-virtual3:fuel": [8.898],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [8.952],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [8.9745],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [9.0375],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [9.083],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [9.09],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [9.094],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [9.293],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [9.3525],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [9.477],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [9.5445],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [9.5575],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [9.6435],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [9.68],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [9.728],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [9.751],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [9.8645],
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [9.969],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [10.029],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [10.088],
+
+ "os-odl-nofeature-noha:ericsson-virtual2:fuel": [10.2985],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [10.318],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [10.3215],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [10.617],
+
+ "os-odl-nofeature-noha:ericsson-virtual3:fuel": [10.762],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [10.7715],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [10.866],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [10.871],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [11.1605],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [11.227],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [11.348],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [11.453],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [11.571],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [11.5925],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [11.689],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [11.8695],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [12.199],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [12.433],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [12.713],
+
+ "os-nosdn-ovs-ha:lf-pod2:fuel": [15.328],
+
+ "os-odl-nofeature-ha:lf-pod1:apex": [15.4265],
+
+ "os-odl-nofeature-noha:lf-pod1:apex": [15.428],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [15.545],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [15.55],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [15.6395],
+
+ "os-odl-sfc-noha:lf-pod1:apex": [15.696],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [15.774],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [16.6455],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [16.861],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [18.071],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [18.116],
+
+ "os-odl-nofeature-ha:lf-pod2:fuel": [18.8365],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [18.927],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [29.557],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [32.492],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [37.623],
+
+ "os-odl-nofeature-ha:arm-pod6:fuel": [41.345],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [42.3795],
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc010_scenario.png
+ :width: 800px
+ :alt: TC010 influence of scenario
+
+{
+
+ "os-nosdn-ovs-noha": [7.9],
+
+ "os-nosdn-ovs_dpdk-noha": [8.641],
+
+ "os-nosdn-ovs_dpdk-ha": [8.6815],
+
+ "os-nosdn-openbaton-ha": [8.882],
+
+ "os-odl_l2-moon-ha": [8.948],
+
+ "os-odl_l3-nofeature-ha": [8.992],
+
+ "os-nosdn-nofeature-ha": [9.118],
+
+ "os-nosdn-nofeature-noha": [9.174],
+
+ "os-odl_l2-moon-noha": [9.312],
+
+ "os-odl_l3-nofeature-noha": [9.5535],
+
+ "os-odl-nofeature-noha": [9.673],
+
+ "os-odl-sfc-noha": [9.8385],
+
+ "os-odl-sfc-ha": [9.98],
+
+ "os-nosdn-kvm-noha": [10.088],
+
+ "os-nosdn-kvm-ha": [11.1705],
+
+ "os-nosdn-bar-ha": [12.1395],
+
+ "os-nosdn-ovs-ha": [15.3195],
+
+ "os-ovn-nofeature-noha": [15.545],
+
+ "os-odl-nofeature-ha": [16.301],
+
+ "os-nosdn-bar-noha": [16.861]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc010_pod.png
+ :width: 800px
+ :alt: TC010 influence of the POD
+
+{
+
+ "ericsson-pod1": [5.7785],
+
+ "flex-pod2": [5.908],
+
+ "ericsson-virtual1": [6.412],
+
+ "intel-pod18": [6.5905],
+
+ "intel-pod5": [6.6975],
+
+ "ericsson-virtual4": [7.183],
+
+ "ericsson-virtual2": [8.4985],
+
+ "huawei-pod2": [8.877],
+
+ "huawei-pod12": [9.091],
+
+ "ericsson-virtual3": [9.719],
+
+ "huawei-virtual4": [10.1195],
+
+ "huawei-virtual3": [10.19],
+
+ "huawei-virtual1": [10.3045],
+
+ "huawei-virtual9": [10.318],
+
+ "huawei-virtual2": [11.274],
+
+ "lf-pod1": [15.7025],
+
+ "lf-pod2": [15.8495],
+
+ "arm-pod5": [18.092],
+
+ "huawei-virtual8": [33.999],
+
+ "arm-pod6": [41.5605]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc011-packet-delay-variation.rst b/docs/release/results/tc011-packet-delay-variation.rst
new file mode 100644
index 000000000..b07ea8980
--- /dev/null
+++ b/docs/release/results/tc011-packet-delay-variation.rst
@@ -0,0 +1,262 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+=============================================
+Test results for TC011 packet delay variation
+=============================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC011 measures the packet delay variation sending the packets from one VM to the other.
+
+Metric: packet delay variation (jitter)
+Unit: ms
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (lower is better):
+
+{
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [2996],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [2996],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [2996],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [2996],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [2997],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [2997],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [2997],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [2997],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [2997],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [2997.5],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [2998],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [2998],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [2999],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [2999.5],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [3000],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [3001],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [3002],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [3002],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [3002],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [3002],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [3003],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [3003.5],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [3004],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [3004],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [3004.5],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [3005],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [3006],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [3006.5],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [3009],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [3010],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [3010],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [3012],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [3017],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [3017],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [3017],
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [3018],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [3020],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [3021],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [3022],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [3022],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [3022],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [3022],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [3022],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [3022],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [3022],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [3022],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [3022],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [3022],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [3022],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [3022],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [3022],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [3022],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [3022],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [3022],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [3022],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [3022],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [3022],
+
+ "os-odl-sfc-noha:lf-pod1:apex": [3022],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [3022],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [3022],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [3022],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [3022],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [3022],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [3023],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [3023],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [3024]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc011_scenario.png
+ :width: 800px
+ :alt: TC011 influence of scenario
+
+{
+
+ "os-nosdn-ovs_dpdk-noha": [2996],
+
+ "os-odl_l3-nofeature-noha": [2997],
+
+ "os-nosdn-kvm-noha": [2999],
+
+ "os-nosdn-ovs_dpdk-ha": [3002],
+
+ "os-nosdn-kvm-ha": [3014.5],
+
+ "os-odl-sfc-noha": [3018],
+
+ "os-nosdn-nofeature-noha": [3020],
+
+ "os-nosdn-openbaton-ha": [3020],
+
+ "os-nosdn-bar-ha": [3022],
+
+ "os-nosdn-bar-noha": [3022],
+
+ "os-nosdn-nofeature-ha": [3022],
+
+ "os-odl-nofeature-ha": [3022],
+
+ "os-odl-sfc-ha": [3022],
+
+ "os-odl_l2-moon-ha": [3022],
+
+ "os-odl_l2-moon-noha": [3022],
+
+ "os-odl_l3-nofeature-ha": [3022],
+
+ "os-ovn-nofeature-noha": [3022]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc011_pod.png
+ :width: 800px
+ :alt: TC011 influence of the POD
+
+{
+
+ "huawei-virtual2": [2997],
+
+ "flex-pod2": [2997.5],
+
+ "huawei-virtual3": [2998],
+
+ "huawei-virtual9": [3000],
+
+ "huawei-virtual8": [3001],
+
+ "huawei-virtual4": [3002],
+
+ "ericsson-virtual3": [3006],
+
+ "huawei-virtual1": [3007],
+
+ "ericsson-virtual2": [3009],
+
+ "intel-pod18": [3010],
+
+ "ericsson-virtual4": [3017],
+
+ "lf-pod2": [3021],
+
+ "arm-pod5": [3022],
+
+ "arm-pod6": [3022],
+
+ "ericsson-pod1": [3022],
+
+ "huawei-pod12": [3022],
+
+ "huawei-pod2": [3022],
+
+ "intel-pod5": [3022],
+
+ "lf-pod1": [3022]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc012-memory-read-write-bandwidth.rst b/docs/release/results/tc012-memory-read-write-bandwidth.rst
new file mode 100644
index 000000000..c28eb1f3c
--- /dev/null
+++ b/docs/release/results/tc012-memory-read-write-bandwidth.rst
@@ -0,0 +1,299 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+==================================================
+Test results for TC012 memory read/write bandwidth
+==================================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC012 measures the rate at which data can be read from and written to the memory (this includes all levels of memory).
+In this test case, the bandwidth to read data from memory and then write data to the same memory location are measured.
+
+Metric: memory bandwidth
+Unit: MBps
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (higher is better):
+
+{
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [23126.325],
+
+ "os-odl-nofeature-noha:lf-pod1:apex": [23123.975],
+
+ "os-odl-nofeature-ha:lf-pod1:apex": [23068.965],
+
+ "os-odl-nofeature-ha:lf-pod2:fuel": [22972.46],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [22912.015],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [22911.35],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [22900.93],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [22767.56],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [22721.83],
+
+ "os-odl-sfc-noha:lf-pod1:apex": [22511.565],
+
+ "os-nosdn-ovs-ha:lf-pod2:fuel": [22071.235],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [21646.415],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [20229.99],
+
+ "os-nosdn-ovs-noha:ericsson-virtual4:fuel": [17491.18],
+
+ "os-nosdn-ovs-noha:ericsson-virtual1:fuel": [17474.965],
+
+ "os-nosdn-ovs-ha:ericsson-pod1:fuel": [17141.375],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [17134.99],
+
+ "os-odl-nofeature-ha:ericsson-pod1:fuel": [17124.27],
+
+ "os-nosdn-ovs-noha:ericsson-virtual2:fuel": [16599.325],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [16309.13],
+
+ "os-odl-nofeature-noha:ericsson-virtual4:fuel": [16137.48],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [15960.76],
+
+ "os-nosdn-ovs-noha:ericsson-virtual3:fuel": [15685.505],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [15536.65],
+
+ "os-odl-nofeature-noha:ericsson-virtual3:fuel": [15431.795],
+
+ "os-odl-nofeature-noha:ericsson-virtual2:fuel": [15129.27],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [15125.51],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [15030.65],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [15019.89],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [15005.11],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [14975.645],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [14968.97],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [14968.97],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [14741.425],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [14714.28],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [14674.38],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [14664.12],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [14587.62],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [14539.94],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [14534.54],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [14511.925],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [14496.875],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [14378.87],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [14366.69],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [14356.695],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [14341.605],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [14327.78],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [14313.81],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [14284.365],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [14157.99],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [14144.86],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [14138.9],
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [14117.7],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [14097.255],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [14085.675],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [14071.605],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [14059.51],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [14057.155],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [14051.945],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [14020.74],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [14017.915],
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [13954.27],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [13915.87],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [13874.59],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [13812.215],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [13777.59],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [13765.36],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [13559.905],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [13477.52],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [13255.17],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [13189.64],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [12718.545],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [12559.445],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [12409.66],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [8832.515],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [8823.955],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [4398.08],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [4375.75],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [4260.77],
+
+ "os-odl-nofeature-ha:arm-pod6:fuel": [4259.62]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc012_scenario.png
+ :width: 800px
+ :alt: TC012 influence of scenario
+
+{
+
+ "os-ovn-nofeature-noha": [22900.93],
+
+ "os-nosdn-bar-noha": [22721.83],
+
+ "os-nosdn-ovs-ha": [22063.67],
+
+ "os-odl-nofeature-ha": [17146.05],
+
+ "os-odl-nofeature-noha": [16017.41],
+
+ "os-nosdn-ovs-noha": [16005.74],
+
+ "os-nosdn-nofeature-noha": [15290.94],
+
+ "os-nosdn-nofeature-ha": [15038.74],
+
+ "os-nosdn-bar-ha": [14972.975],
+
+ "os-odl_l2-moon-ha": [14956.955],
+
+ "os-odl_l3-nofeature-ha": [14839.21],
+
+ "os-odl-sfc-ha": [14823.48],
+
+ "os-nosdn-ovs_dpdk-ha": [14822.17],
+
+ "os-nosdn-ovs_dpdk-noha": [14725.9],
+
+ "os-odl_l2-moon-noha": [14665.4],
+
+ "os-odl_l3-nofeature-noha": [14483.09],
+
+ "os-odl-sfc-noha": [14373.21],
+
+ "os-nosdn-openbaton-ha": [14135.325],
+
+ "os-nosdn-kvm-noha": [14020.26],
+
+ "os-nosdn-kvm-ha": [13996.02]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc012_pod.png
+ :width: 800px
+ :alt: TC012 influence of the POD
+
+{
+
+ "lf-pod1": [22912.39],
+
+ "lf-pod2": [22637.67],
+
+ "flex-pod2": [20229.99],
+
+ "ericsson-virtual1": [17474.965],
+
+ "ericsson-pod1": [17127.38],
+
+ "ericsson-virtual4": [16219.97],
+
+ "ericsson-virtual2": [15652.28],
+
+ "ericsson-virtual3": [15551.26],
+
+ "huawei-pod2": [15017.2],
+
+ "huawei-virtual4": [14266.34],
+
+ "huawei-virtual1": [14233.035],
+
+ "huawei-virtual3": [14227.63],
+
+ "huawei-pod12": [14147.245],
+
+ "intel-pod18": [14058.33],
+
+ "huawei-virtual2": [13862.85],
+
+ "intel-pod5": [13280.32],
+
+ "huawei-virtual9": [12559.445],
+
+ "huawei-virtual8": [8998.02],
+
+ "arm-pod5": [4388.875],
+
+ "arm-pod6": [4260.2]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc014-cpu-processing-speed.rst b/docs/release/results/tc014-cpu-processing-speed.rst
new file mode 100644
index 000000000..34d4ad0f9
--- /dev/null
+++ b/docs/release/results/tc014-cpu-processing-speed.rst
@@ -0,0 +1,298 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+===========================================
+Test results for TC014 cpu processing speed
+===========================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC014 measures score of single cpu running using UnixBench.
+
+Metric: score of single CPU running
+Unit: N/A
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (higher is better):
+
+{
+
+ "os-odl-sfc-noha:lf-pod1:apex": [3735.2],
+
+ "os-nosdn-ovs-ha:lf-pod2:fuel": [3725.5],
+
+ "os-odl-nofeature-ha:lf-pod2:fuel": [3711],
+
+ "os-odl-nofeature-ha:lf-pod1:apex": [3708.4],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [3705.7],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [3704],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [3703.2],
+
+ "os-odl-nofeature-noha:lf-pod1:apex": [3702.8],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [3698.7],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [3654.8],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [3635.55],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [3633.2],
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [3450.3],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [3406.4],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [3360.4],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [3340.65],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [3208.6],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [3134.8],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [3056.2],
+
+ "os-nosdn-ovs-noha:ericsson-virtual1:fuel": [2988.9],
+
+ "os-nosdn-ovs-ha:ericsson-pod1:fuel": [2773.7],
+
+ "os-nosdn-ovs-noha:ericsson-virtual4:fuel": [2645.85],
+
+ "os-nosdn-ovs-noha:ericsson-virtual2:fuel": [2625.3],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [2601.3],
+
+ "os-odl-nofeature-noha:ericsson-virtual4:fuel": [2590.4],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [2570.2],
+
+ "os-nosdn-ovs-noha:ericsson-virtual3:fuel": [2558.8],
+
+ "os-odl-nofeature-ha:ericsson-pod1:fuel": [2556.5],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [2554.6],
+
+ "os-odl-nofeature-noha:ericsson-virtual3:fuel": [2536.75],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [2533.55],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [2531.85],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [2531.7],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [2531.2],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [2531],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [2529.6],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [2520.5],
+
+ "os-odl-nofeature-noha:ericsson-virtual2:fuel": [2481.15],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [2474],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [2472.6],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [2471],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [2470.6],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [2464.15],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [2455.9],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [2455.3],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [2446.85],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [2444.75],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [2430.9],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [2421.3],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [2415.7],
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [2399.4],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [2391.85],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [2391.45],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [2380.7],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [2379.6],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [2371.9],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [2364.6],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [2363.4],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [2362],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [2358.5],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [2358.45],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [2336],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [2326.6],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [2324.95],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [2320.2],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [2318.5],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [2312.8],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [2311.7],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [2301.15],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [2297.7],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [2232.8],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [2232.1],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [2230],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [2154],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [2150.1],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [2004.3],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [1754.5],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [1754.15],
+
+ "os-odl-nofeature-ha:arm-pod6:fuel": [716.15],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [716.05]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc014_scenario.png
+ :width: 800px
+ :alt: TC014 influence of scenario
+
+{
+
+ "os-nosdn-ovs-ha": [3725.5],
+
+ "os-ovn-nofeature-noha": [3654.8],
+
+ "os-nosdn-bar-noha": [3633.2],
+
+ "os-odl-nofeature-ha": [3407.8],
+
+ "os-nosdn-ovs-noha": [2583.2],
+
+ "os-odl-nofeature-noha": [2578.9],
+
+ "os-nosdn-nofeature-noha": [2553.2],
+
+ "os-nosdn-nofeature-ha": [2532.8],
+
+ "os-odl_l2-moon-ha": [2530.5],
+
+ "os-nosdn-bar-ha": [2527],
+
+ "os-odl_l3-nofeature-ha": [2501.5],
+
+ "os-nosdn-ovs_dpdk-noha": [2473.65],
+
+ "os-odl-sfc-ha": [2472.9],
+
+ "os-odl_l2-moon-noha": [2470.8],
+
+ "os-nosdn-ovs_dpdk-ha": [2461.9],
+
+ "os-odl_l3-nofeature-noha": [2442.8],
+
+ "os-nosdn-kvm-noha": [2392.9],
+
+ "os-odl-sfc-noha": [2370.5],
+
+ "os-nosdn-kvm-ha": [2358.5],
+
+ "os-nosdn-openbaton-ha": [2231.8]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc014_pod.png
+ :width: 800px
+ :alt: TC014 influence of the POD
+
+{
+
+ "lf-pod2": [3723.95],
+
+ "lf-pod1": [3669],
+
+ "intel-pod5": [3388.6],
+
+ "intel-pod18": [3298.4],
+
+ "flex-pod2": [3208.6],
+
+ "ericsson-virtual1": [2988.9],
+
+ "ericsson-pod1": [2669.1],
+
+ "ericsson-virtual4": [2598.5],
+
+ "ericsson-virtual3": [2553.15],
+
+ "huawei-pod2": [2531.2],
+
+ "ericsson-virtual2": [2526.9],
+
+ "huawei-virtual4": [2407.4],
+
+ "huawei-virtual3": [2374.6],
+
+ "huawei-virtual2": [2326.4],
+
+ "huawei-virtual9": [2324.95],
+
+ "huawei-virtual1": [2302.6],
+
+ "huawei-pod12": [2232.2],
+
+ "huawei-virtual8": [2085.3],
+
+ "arm-pod5": [1754.4],
+
+ "arm-pod6": [716.15]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc069-memory-write-bandwidth.rst b/docs/release/results/tc069-memory-write-bandwidth.rst
new file mode 100644
index 000000000..06e2ec922
--- /dev/null
+++ b/docs/release/results/tc069-memory-write-bandwidth.rst
@@ -0,0 +1,300 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+=============================================
+Test results for TC069 memory write bandwidth
+=============================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC069 measures the maximum possible cache and memory performance while reading and writing certain
+blocks of data (starting from 1Kb and further in power of 2) continuously through ALU and FPU
+respectively. Measure different aspects of memory performance via synthetic simulations.
+Each simulation consists of four performances (Copy, Scale, Add, Triad).
+The test results shown below are for writing 32MB integer block size.
+
+Metric: memory write bandwidth
+Unit: MBps
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (higher is better):
+
+{
+
+ "os-nosdn-nofeature-noha:intel-pod18:joid": [20113.395],
+
+ "os-nosdn-openbaton-ha:intel-pod18:joid": [19183.58],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [17851.35],
+
+ "os-nosdn-nofeature-noha:intel-pod5:joid": [16312.37],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [15633.245],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [13332.065],
+
+ "os-odl-nofeature-ha:arm-pod6:fuel": [13327.02],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [9462.74],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [9384.585],
+
+ "os-odl-nofeature-ha:ericsson-pod1:fuel": [9235.98],
+
+ "os-nosdn-nofeature-noha:huawei-pod12:joid": [9213.6],
+
+ "os-nosdn-openbaton-ha:huawei-pod12:joid": [9152.18],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [9079.45],
+
+ "os-odl_l2-moon-ha:huawei-pod2:compass": [9071.13],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [9068.06],
+
+ "os-odl-sfc-ha:huawei-pod2:compass": [9031.24],
+
+ "os-odl_l3-nofeature-ha:huawei-pod2:compass": [9019.53],
+
+ "os-nosdn-bar-ha:huawei-pod2:compass": [8977.3],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-pod2:compass": [8960.635],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [8825.805],
+
+ "os-nosdn-kvm-ha:huawei-pod2:compass": [8282.75],
+
+ "os-odl_l2-moon-noha:huawei-virtual4:compass": [8116.33],
+
+ "os-nosdn-ovs-noha:ericsson-virtual4:fuel": [8083.97],
+
+ "os-odl_l2-moon-noha:huawei-virtual3:compass": [8083.52],
+
+ "os-nosdn-nofeature-noha:huawei-virtual3:compass": [7799.145],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual3:compass": [7776.12],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual3:compass": [7680.37],
+
+ "os-nosdn-ovs-noha:ericsson-virtual1:fuel": [7615.97],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual4:fuel": [7612.62],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual2:fuel": [7518.62],
+
+ "os-nosdn-nofeature-noha:huawei-virtual2:compass": [7489.67],
+
+ "os-nosdn-ovs-noha:ericsson-virtual2:fuel": [7478.57],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual4:compass": [7465.82],
+
+ "os-nosdn-kvm-noha:huawei-virtual3:compass": [7443.16],
+
+ "os-odl-nofeature-noha:ericsson-virtual4:fuel": [7442.855],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [7440.65],
+
+ "os-odl-sfc-noha:huawei-virtual4:compass": [7401.16],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [7389.505],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [7385.76],
+
+ "os-nosdn-nofeature-noha:huawei-virtual1:compass": [7382.345],
+
+ "os-odl_l2-moon-ha:huawei-virtual3:compass": [7286.385],
+
+ "os-odl_l3-nofeature-noha:huawei-virtual4:compass": [7272.06],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual4:compass": [7261.73],
+
+ "os-nosdn-nofeature-noha:ericsson-virtual3:fuel": [7253.64],
+
+ "os-odl-sfc-noha:huawei-virtual3:compass": [7247.89],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual2:compass": [7214.01],
+
+ "os-nosdn-ovs_dpdk-ha:huawei-virtual3:compass": [7207.39],
+
+ "os-nosdn-ovs_dpdk-noha:huawei-virtual4:compass": [7205.565],
+
+ "os-nosdn-ovs-noha:ericsson-virtual3:fuel": [7201.005],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [7132.835],
+
+ "os-odl-nofeature-noha:ericsson-virtual3:fuel": [7117.05],
+
+ "os-odl_l3-nofeature-ha:huawei-virtual3:compass": [7064.18],
+
+ "os-odl_l2-moon-ha:huawei-virtual4:compass": [6997.295],
+
+ "os-odl-nofeature-ha:lf-pod1:apex": [6992.21],
+
+ "os-odl-sfc-ha:huawei-virtual4:compass": [6975.63],
+
+ "os-odl-nofeature-noha:lf-pod1:apex": [6972.63],
+
+ "os-nosdn-nofeature-noha:lf-pod1:apex": [6955],
+
+ "os-ovn-nofeature-noha:lf-pod1:apex": [6954.5],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [6953.35],
+
+ "os-odl-sfc-noha:lf-pod1:apex": [6951.89],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [6932.29],
+
+ "os-nosdn-nofeature-noha:huawei-virtual4:compass": [6929.54],
+
+ "os-nosdn-kvm-noha:huawei-virtual4:compass": [6921.6],
+
+ "os-nosdn-ovs-ha:lf-pod2:fuel": [6913.355],
+
+ "os-odl-nofeature-ha:lf-pod2:fuel": [6848.58],
+
+ "os-odl-sfc-ha:lf-pod1:apex": [6818.74],
+
+ "os-nosdn-bar-noha:lf-pod1:apex": [6812.16],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [6808.18],
+
+ "os-odl-nofeature-noha:ericsson-virtual2:fuel": [6807.565],
+
+ "os-nosdn-bar-ha:lf-pod1:apex": [6774.76],
+
+ "os-nosdn-bar-ha:huawei-virtual4:compass": [6759.4],
+
+ "os-nosdn-nofeature-noha:huawei-virtual8:compass": [6756.9],
+
+ "os-nosdn-bar-ha:huawei-virtual3:compass": [6543.46],
+
+ "os-nosdn-kvm-ha:huawei-virtual3:compass": [6504.34],
+
+ "os-odl-sfc-ha:huawei-virtual3:compass": [6481.005],
+
+ "os-nosdn-kvm-ha:huawei-virtual4:compass": [6461.5],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [6152.375],
+
+ "os-odl-sfc-ha:huawei-virtual8:compass": [5941.7],
+
+ "os-nosdn-kvm-noha:huawei-virtual8:compass": [4564.515]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc069_scenario.png
+ :width: 800px
+ :alt: TC069 influence of scenario
+
+{
+
+ "os-nosdn-openbaton-ha": [9187.16],
+
+ "os-odl_l2-moon-ha": [9010.57],
+
+ "os-nosdn-nofeature-ha": [8886.75],
+
+ "os-odl_l3-nofeature-ha": [8779.67],
+
+ "os-odl_l2-moon-noha": [8114.995],
+
+ "os-nosdn-ovs_dpdk-ha": [7864.07],
+
+ "os-odl_l3-nofeature-noha": [7632.11],
+
+ "os-odl-sfc-ha": [7624.67],
+
+ "os-nosdn-nofeature-noha": [7470.66],
+
+ "os-odl-nofeature-ha": [7372.23],
+
+ "os-nosdn-ovs_dpdk-noha": [7311.54],
+
+ "os-odl-sfc-noha": [7300.56],
+
+ "os-nosdn-ovs-noha": [7280.005],
+
+ "os-odl-nofeature-noha": [7162.67],
+
+ "os-nosdn-kvm-ha": [7130.775],
+
+ "os-nosdn-kvm-noha": [7041.13],
+
+ "os-ovn-nofeature-noha": [6954.5],
+
+ "os-nosdn-ovs-ha": [6913.355],
+
+ "os-nosdn-bar-ha": [6829.17],
+
+ "os-nosdn-bar-noha": [6812.16]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc069_pod.png
+ :width: 800px
+ :alt: TC069 influence of the POD
+
+{
+
+ "intel-pod18": [18871.79],
+
+ "intel-pod5": [16055.79],
+
+ "arm-pod6": [13327.02],
+
+ "flex-pod2": [9384.585],
+
+ "ericsson-pod1": [9331.535],
+
+ "huawei-pod12": [9164.88],
+
+ "huawei-pod2": [9026.52],
+
+ "huawei-virtual9": [8825.805],
+
+ "ericsson-virtual1": [7615.97],
+
+ "ericsson-virtual4": [7539.23],
+
+ "arm-pod5": [7403.38],
+
+ "huawei-virtual3": [7247.89],
+
+ "huawei-virtual2": [7205.35],
+
+ "huawei-virtual1": [7196.405],
+
+ "ericsson-virtual3": [7173.72],
+
+ "huawei-virtual4": [7131.47],
+
+ "ericsson-virtual2": [7129.08],
+
+ "lf-pod1": [6928.18],
+
+ "lf-pod2": [6875.88],
+
+ "huawei-virtual8": [5729.705]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc082-context-switches-under-load.rst b/docs/release/results/tc082-context-switches-under-load.rst
new file mode 100644
index 000000000..d8a9f5493
--- /dev/null
+++ b/docs/release/results/tc082-context-switches-under-load.rst
@@ -0,0 +1,129 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+==================================================
+Test results for TC082 context switches under load
+==================================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC082 measures various software performance events using perf.
+The test results shown below are for context-switches.
+
+Metric: context switches
+Unit: N/A
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (lower is better):
+
+{
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [316],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [340],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [357.5],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [384],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [394.5],
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [435],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [476],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [518],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [863],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [871],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [1002],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [1174],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [1239],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [1430],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [1489],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [1883.5]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc082_scenario.png
+ :width: 800px
+ :alt: TC082 influence of scenario
+
+the influence of the scenario
+
+{
+
+ "os-nosdn-nofeature-ha": [505],
+
+ "os-odl-nofeature-ha": [863]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc082_pod.png
+ :width: 800px
+ :alt: TC082 influence of the POD
+
+the influence of the POD
+
+{
+
+ "huawei-pod12": [316],
+
+ "intel-pod18": [340],
+
+ "intel-pod5": [357.5],
+
+ "ericsson-pod1": [384],
+
+ "lf-pod2": [394.5],
+
+ "lf-pod1": [435],
+
+ "flex-pod2": [476],
+
+ "huawei-pod2": [518],
+
+ "arm-pod5": [869.5],
+
+ "huawei-virtual9": [1002],
+
+ "huawei-virtual4": [1174],
+
+ "huawei-virtual3": [1239],
+
+ "huawei-virtual2": [1430],
+
+ "huawei-virtual1": [1489],
+
+ "arm-pod6": [1883.5]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/release/results/tc083-network-throughput-between-vm.rst b/docs/release/results/tc083-network-throughput-between-vm.rst
new file mode 100644
index 000000000..f846571a5
--- /dev/null
+++ b/docs/release/results/tc083-network-throughput-between-vm.rst
@@ -0,0 +1,129 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+
+
+=====================================================
+Test results for TC083 network throughput between VMs
+=====================================================
+
+.. toctree::
+ :maxdepth: 2
+
+
+Overview of test case
+=====================
+
+TC083 measures network latency and throughput between VMs using netperf.
+The test results shown below are for UDP throughout.
+
+Metric: UDP stream throughput
+Unit: 10^6bits/s
+
+
+Euphrates release
+-----------------
+
+Test results per scenario and pod (higher is better):
+
+{
+
+ "os-nosdn-nofeature-ha:lf-pod1:apex": [2204.42],
+
+ "os-nosdn-nofeature-ha:intel-pod18:joid": [1835.55],
+
+ "os-nosdn-nofeature-ha:lf-pod2:fuel": [1676.705],
+
+ "os-nosdn-nofeature-ha:intel-pod5:joid": [1612.555],
+
+ "os-nosdn-nofeature-ha:flex-pod2:apex": [1370.23],
+
+ "os-nosdn-nofeature-ha:huawei-pod12:joid": [1300.12],
+
+ "os-nosdn-nofeature-ha:huawei-pod2:compass": [1070.455],
+
+ "os-nosdn-nofeature-ha:ericsson-pod1:fuel": [1004.32],
+
+ "os-nosdn-nofeature-ha:huawei-virtual9:compass": [753.46],
+
+ "os-nosdn-nofeature-ha:huawei-virtual4:compass": [735.07],
+
+ "os-odl-nofeature-ha:arm-pod5:fuel": [531.63],
+
+ "os-nosdn-nofeature-ha:huawei-virtual3:compass": [493.985],
+
+ "os-nosdn-nofeature-ha:arm-pod5:fuel": [448.82],
+
+ "os-nosdn-nofeature-ha:arm-pod6:fuel": [193.43],
+
+ "os-nosdn-nofeature-ha:huawei-virtual1:compass": [189.99],
+
+ "os-nosdn-nofeature-ha:huawei-virtual2:compass": [80.15]
+
+}
+
+
+The influence of the scenario
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc083_scenario.png
+ :width: 800px
+ :alt: TC083 influence of scenario
+
+the influence of the scenario
+
+{
+
+ "os-nosdn-nofeature-ha": [1109.12],
+
+ "os-odl-nofeature-ha": [531.63]
+
+}
+
+
+The influence of the POD
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. image:: images/tc083_pod.png
+ :width: 800px
+ :alt: TC083 influence of the POD
+
+the influence of the POD
+
+{
+
+ "lf-pod1": [2204.42],
+
+ "intel-pod18": [1835.55],
+
+ "lf-pod2": [1676.705],
+
+ "intel-pod5": [1612.555],
+
+ "flex-pod2": [1370.23],
+
+ "huawei-pod12": [1300.12],
+
+ "huawei-pod2": [1070.455],
+
+ "ericsson-pod1": [1004.32],
+
+ "huawei-virtual9": [753.46],
+
+ "huawei-virtual4": [735.07],
+
+ "huawei-virtual3": [493.985],
+
+ "arm-pod5": [451.38],
+
+ "arm-pod6": [193.43],
+
+ "huawei-virtual1": [189.99],
+
+ "huawei-virtual2": [80.15]
+
+}
+
+
+Fraser release
+--------------
diff --git a/docs/testing/developer/devguide/devguide.rst b/docs/testing/developer/devguide/devguide.rst
index dade49b75..04d5350be 100755
--- a/docs/testing/developer/devguide/devguide.rst
+++ b/docs/testing/developer/devguide/devguide.rst
@@ -432,7 +432,8 @@ Yardstick committers and contributors to review your codes.
:width: 800px
:alt: Gerrit for code review
-You can find Yardstick people info `here <https://wiki.opnfv.org/display/yardstick/People>`_.
+You can find a list Yardstick people `here <https://wiki.opnfv.org/display/yardstick/People>`_,
+or use the ``yardstick-reviewers`` and ``yardstick-committers`` groups in gerrit.
Modify the code under review in Gerrit
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/testing/developer/devguide/devguide_nsb_prox.rst b/docs/testing/developer/devguide/devguide_nsb_prox.rst
index fc533b2cf..22628413b 100755
--- a/docs/testing/developer/devguide/devguide_nsb_prox.rst
+++ b/docs/testing/developer/devguide/devguide_nsb_prox.rst
@@ -251,9 +251,11 @@ Now let's examine the components of the file in detail
In this case it is ``handle_l2fwd-2.cfg``
A number of additional parameters can be added. This example
- is taken from VPE::
+ is for VPE::
options:
+ interface_speed_gbps: 10
+
vnf__0:
prox_path: /opt/nsb_bin/prox
prox_config: ``configs/handle_vpe-4.cfg``
@@ -267,6 +269,12 @@ Now let's examine the components of the file in detail
``configs/vpe_rules.lua`` : ````
prox_generate_parameter: True
+ ``interface_speed_gbps`` - this specifies the speed of the interface
+ in Gigabits Per Second. This is used to calculate pps(packets per second).
+ If the interfaces are of different speeds, then this specifies the speed
+ of the slowest interface. This parameter is optional. If omitted the
+ interface speed defaults to 10Gbps.
+
``prox_files`` - this specified that a number of addition files
need to be provided for the test to run correctly. This files
could provide routing information,hashing information or a
diff --git a/docs/testing/user/userguide/01-introduction.rst b/docs/testing/user/userguide/01-introduction.rst
index c1d5def98..d846e759c 100755
--- a/docs/testing/user/userguide/01-introduction.rst
+++ b/docs/testing/user/userguide/01-introduction.rst
@@ -42,43 +42,47 @@ This document consists of the following chapters:
* Chapter :doc:`02-methodology` describes the methodology implemented by the
*Yardstick* Project for :term:`NFVI` verification.
-* Chapter :doc:`03-architecture` provides information on the software architecture
- of *Yardstick*.
+* Chapter :doc:`03-architecture` provides information on the software
+ architecture of *Yardstick*.
* Chapter :doc:`04-installation` provides instructions to install *Yardstick*.
-* Chapter :doc:`05-yardstick_plugin` provides information on how to integrate
+* Chapter :doc:`05-operation` provides information on how to use *Yardstick*
+ to run and create testcases.
+
+* Chapter :doc:`06-yardstick-plugin` provides information on how to integrate
other OPNFV testing projects into *Yardstick*.
-* Chapter :doc:`06-result-store-InfluxDB` provides inforamtion on how to run
+* Chapter :doc:`07-result-store-InfluxDB` provides inforamtion on how to run
plug-in test cases and store test results into community's InfluxDB.
-* Chapter :doc:`07-grafana` provides inforamtion on *Yardstick* grafana dashboard
- and how to add a dashboard into *Yardstick* grafana dashboard.
+* Chapter :doc:`08-grafana` provides inforamtion on *Yardstick* grafana
+ dashboard and how to add a dashboard into *Yardstick* grafana dashboard.
-* Chapter :doc:`08-api` provides inforamtion on *Yardstick* ReST API and how to
+* Chapter :doc:`09-api` provides inforamtion on *Yardstick* ReST API and how to
use *Yardstick* API.
-* Chapter :doc:`09-yardstick_user_interface` provides inforamtion on how to use
+* Chapter :doc:`10-yardstick-user-interface` provides inforamtion on how to use
yardstick report CLI to view the test result in table format and also values
pinned on to a graph
-* Chapter :doc:`10-vtc-overview` provides information on the :term:`VTC`.
+* Chapter :doc:`11-vtc-overview` provides information on the :term:`VTC`.
-* Chapter :doc:`13-nsb-overview` describes the methodology implemented by the
+* Chapter :doc:`12-nsb-overview` describes the methodology implemented by the
Yardstick - Network service benchmarking to test real world usecase for a
given VNF.
-* Chapter :doc:`14-nsb_installation` provides instructions to install
- *Yardstick - Network service benchmarking testing*.
+* Chapter :doc:`13-nsb_installation` provides instructions to install
+ *Yardstick - Network Service Benchmarking (NSB) testing*.
+
+* Chapter :doc:`14-nsb-operation` provides information on running *NSB*
* Chapter :doc:`15-list-of-tcs` includes a list of available *Yardstick* test
cases.
-
Contact Yardstick
=================
Feedback? `Contact us`_
-.. _Contact us: opnfv-users@lists.opnfv.org
+.. _Contact us: mailto:opnfv-users@lists.opnfv.org&subject="[yardstick]"
diff --git a/docs/testing/user/userguide/03-architecture.rst b/docs/testing/user/userguide/03-architecture.rst
index 8336b609d..622002ee4 100755
--- a/docs/testing/user/userguide/03-architecture.rst
+++ b/docs/testing/user/userguide/03-architecture.rst
@@ -9,8 +9,9 @@ Architecture
Abstract
========
-This chapter describes the yardstick framework software architecture. we will introduce it from Use-Case View,
-Logical View, Process View and Deployment View. More technical details will be introduced in this chapter.
+This chapter describes the yardstick framework software architecture. We will
+introduce it from Use-Case View, Logical View, Process View and Deployment
+View. More technical details will be introduced in this chapter.
Overview
========
@@ -23,8 +24,8 @@ files. Yardstick is inspired by Rally. Yardstick is intended to run on a
computer with access and credentials to a cloud. The test case is described
in a configuration file given as an argument.
-How it works: the benchmark task configuration file is parsed and converted into
-an internal model. The context part of the model is converted into a Heat
+How it works: the benchmark task configuration file is parsed and converted
+into an internal model. The context part of the model is converted into a Heat
template and deployed into a stack. Each scenario is run using a runner, either
serially or in parallel. Each runner runs in its own subprocess executing
commands in a VM using SSH. The output of each scenario is written as json
@@ -43,13 +44,15 @@ names, image names, affinity rules and network configurations. A context is
converted into a simplified Heat template, which is used to deploy onto the
Openstack environment.
-**Data** - Output produced by running a benchmark, written to a file in json format
+**Data** - Output produced by running a benchmark, written to a file in json
+format
**Runner** - Logic that determines how a test scenario is run and reported, for
example the number of test iterations, input value stepping and test duration.
Predefined runner types exist for re-usage, see `Runner types`_.
-**Scenario** - Type/class of measurement for example Ping, Pktgen, (Iperf, LmBench, ...)
+**Scenario** - Type/class of measurement for example Ping, Pktgen, (Iperf,
+LmBench, ...)
**SLA** - Relates to what result boundary a test case must meet to pass. For
example a latency limit, amount or ratio of lost packets and so on. Action
@@ -128,8 +131,8 @@ Snippet of an Iteration runner configuration:
Use-Case View
=============
Yardstick Use-Case View shows two kinds of users. One is the Tester who will
-do testing in cloud, the other is the User who is more concerned with test result
-and result analyses.
+do testing in cloud, the other is the User who is more concerned with test
+result and result analyses.
For testers, they will run a single test case or test case suite to verify
infrastructure compliance or bencnmark their own infrastructure performance.
@@ -254,7 +257,8 @@ Yardstick Directory structure
*tools/* - Currently contains tools to build image for VMs which are deployed
by Heat. Currently contains how to build the yardstick-trusty-server
- image with the different tools that are needed from within the image.
+ image with the different tools that are needed from within the
+ image.
*plugin/* - Plug-in configuration files are stored here.
diff --git a/docs/testing/user/userguide/04-installation.rst b/docs/testing/user/userguide/04-installation.rst
index cac814667..a4846230e 100644
--- a/docs/testing/user/userguide/04-installation.rst
+++ b/docs/testing/user/userguide/04-installation.rst
@@ -39,18 +39,18 @@ Several prerequisites are needed for Yardstick:
4. Connectivity from the Jumphost to the SUT public/external network
.. note:: *Jumphost* refers to any server which meets the previous
-requirements. Normally it is the same server from where the OPNFV
-deployment has been triggered.
+ requirements. Normally it is the same server from where the OPNFV
+ deployment has been triggered.
.. warning:: Connectivity from Jumphost is essential and it is of paramount
-importance to make sure it is working before even considering to install
-and run Yardstick. Make also sure you understand how your networking is
-designed to work.
+ importance to make sure it is working before even considering to install
+ and run Yardstick. Make also sure you understand how your networking is
+ designed to work.
.. note:: If your Jumphost is operating behind a company http proxy and/or
-Firewall, please first consult `Proxy Support`_ section which is towards the
-end of this document. That section details some tips/tricks which *may* be of
-help in a proxified environment.
+ Firewall, please first consult `Proxy Support`_ section which is towards
+ the end of this document. That section details some tips/tricks which *may*
+ be of help in a proxified environment.
Install Yardstick using Docker (first option) (**recommended**)
@@ -85,27 +85,30 @@ Run the Docker image to get a Yardstick container::
docker run -itd --privileged -v /var/run/docker.sock:/var/run/docker.sock \
-p 8888:5000 --name yardstick opnfv/yardstick:stable
-.. table:: Description of the parameters used with ``docker run`` command
-
- ======================= ====================================================
- Parameters Detail
- ======================= ====================================================
- -itd -i: interactive, Keep STDIN open even if not
- attached
- -t: allocate a pseudo-TTY detached mode, in the
- background
- ======================= ====================================================
- --privileged If you want to build ``yardstick-image`` in
- Yardstick container, this parameter is needed
- ======================= ====================================================
- -p 8888:5000 Redirect the a host port (8888) to a container port
- (5000)
- ======================= ====================================================
- -v /var/run/docker.sock If you want to use yardstick env grafana/influxdb to
- :/var/run/docker.sock create a grafana/influxdb container out of Yardstick
- container
- ======================= ====================================================
- --name yardstick The name for this container
+Description of the parameters used with ``docker run`` command
+
+ +------------------------+--------------------------------------------------+
+ | Parameters | Detail |
+ +========================+==================================================+
+ | -itd | -i: interactive, Keep STDIN open even if not |
+ | | attached |
+ | +--------------------------------------------------+
+ | | -t: allocate a pseudo-TTY detached mode, in the |
+ | | background |
+ +------------------------+--------------------------------------------------+
+ | --privileged | If you want to build ``yardstick-image`` in |
+ | | Yardstick container, this parameter is needed |
+ +------------------------+--------------------------------------------------+
+ | -p 8888:5000 | Redirect the a host port (8888) to a container |
+ | | port (5000) |
+ +------------------------+--------------------------------------------------+
+ | -v /var/run/docker.sock| If you want to use yardstick env |
+ | :/var/run/docker.sock | grafana/influxdb to create a grafana/influxdb |
+ | | container out of Yardstick container |
+ +------------------------+--------------------------------------------------+
+ | --name yardstick | The name for this container |
+ +------------------------+--------------------------------------------------+
+
If the host is restarted
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -135,18 +138,18 @@ automatically::
yardstick env prepare
.. note:: Since Euphrates release, the above command will not be able to
-automatically configure the ``/etc/yardstick/openstack.creds`` file. So before
-running the above command, it is necessary to create the
-``/etc/yardstick/openstack.creds`` file and save OpenStack environment
-variables into it manually. If you have the openstack credential file saved
-outside the Yardstick Docker container, you can do this easily by mapping the
-credential file into Yardstick container using::
+ automatically configure the ``/etc/yardstick/openstack.creds`` file. So before
+ running the above command, it is necessary to create the
+ ``/etc/yardstick/openstack.creds`` file and save OpenStack environment
+ variables into it manually. If you have the openstack credential file saved
+ outside the Yardstick Docker container, you can do this easily by mapping the
+ credential file into Yardstick container using::
- '-v /path/to/credential_file:/etc/yardstick/openstack.creds'
+ '-v /path/to/credential_file:/etc/yardstick/openstack.creds'
-when running the Yardstick container. For details of the required OpenStack
-environment variables please refer to section `Export OpenStack environment
-variables`_.
+ when running the Yardstick container. For details of the required OpenStack
+ environment variables please refer to section `Export OpenStack environment
+ variables`_.
The ``env prepare`` command may take up to 6-8 minutes to finish building
yardstick-image and other environment preparation. Meanwhile if you wish to
@@ -222,8 +225,8 @@ Yardstick is installed::
sudo -EH tools/yardstick-img-modify tools/ubuntu-server-cloudimg-modify.sh
.. warning:: Before building the guest image inside the Yardstick container,
-make sure the container is granted with privilege. The script will create files
-by default in ``/tmp/workspace/yardstick`` and the files will be owned by root.
+ make sure the container is granted with privilege. The script will create files
+ by default in ``/tmp/workspace/yardstick`` and the files will be owned by root.
The created image can be added to OpenStack using the OpenStack client or via
the OpenStack Dashboard::
@@ -270,7 +273,7 @@ For usage of Yardstick GUI, please watch our demo video at
`Yardstick GUI demo`_.
.. note:: The Yardstick GUI is still in development, the GUI layout and
-features may change.
+ features may change.
Delete the Yardstick container
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -433,7 +436,7 @@ of Yardstick ``help`` command and ``ping.py`` test sample::
yardstick task start samples/ping.yaml
.. note:: The above commands could be run in both the Yardstick container and
-the Ubuntu directly.
+ the Ubuntu directly.
Each testing tool supported by Yardstick has a sample configuration file.
These configuration files can be found in the ``samples`` directory.
@@ -468,10 +471,10 @@ Then you can run a test case and visit http://host_ip:1948
(``admin``/``admin``) to see the results.
.. note:: Executing ``yardstick env`` command to deploy InfluxDB and Grafana
-requires Jumphost's docker API version => 1.24. Run the following command to
-check the docker API version on the Jumphost::
+ requires Jumphost's docker API version => 1.24. Run the following command to
+ check the docker API version on the Jumphost::
- docker version
+ docker version
Manual deployment of InfluxDB and Grafana containers
@@ -537,200 +540,6 @@ Deploy InfluxDB and Grafana directly in Ubuntu (**Todo**)
---------------------------------------------------------
-Yardstick common CLI
---------------------
-
-List test cases
-^^^^^^^^^^^^^^^
-
-``yardstick testcase list``: This command line would list all test cases in
-Yardstick. It would show like below::
-
- +---------------------------------------------------------------------------------------
- | Testcase Name | Description
- +---------------------------------------------------------------------------------------
- | opnfv_yardstick_tc001 | Measure network throughput using pktgen
- | opnfv_yardstick_tc002 | measure network latency using ping
- | opnfv_yardstick_tc005 | Measure Storage IOPS, throughput and latency using fio.
- ...
- +---------------------------------------------------------------------------------------
-
-
-Show a test case config file
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Take opnfv_yardstick_tc002 for an example. This test case measure network
-latency. You just need to type in ``yardstick testcase show
-opnfv_yardstick_tc002``, and the console would show the config yaml of this
-test case::
-
- ---
-
- schema: "yardstick:task:0.1"
- description: >
- Yardstick TC002 config file;
- measure network latency using ping;
-
- {% set image = image or "cirros-0.3.5" %}
-
- {% set provider = provider or none %}
- {% set physical_network = physical_network or 'physnet1' %}
- {% set segmentation_id = segmentation_id or none %}
- {% set packetsize = packetsize or 100 %}
-
- scenarios:
- {% for i in range(2) %}
- -
- type: Ping
- options:
- packetsize: {{packetsize}}
- host: athena.demo
- target: ares.demo
-
- runner:
- type: Duration
- duration: 60
- interval: 10
-
- sla:
- max_rtt: 10
- action: monitor
- {% endfor %}
-
- context:
- name: demo
- image: {{image}}
- flavor: yardstick-flavor
- user: cirros
-
- placement_groups:
- pgrp1:
- policy: "availability"
-
- servers:
- athena:
- floating_ip: true
- placement: "pgrp1"
- ares:
- placement: "pgrp1"
-
- networks:
- test:
- cidr: '10.0.1.0/24'
- {% if provider == "vlan" %}
- provider: {{provider}}
- physical_network: {{physical_network}}å
- {% if segmentation_id %}
- segmentation_id: {{segmentation_id}}
- {% endif %}
- {% endif %}
-
-
-Start a task to run yardstick test case
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If you want run a test case, then you need to use ``yardstick task start
-<test_case_path>`` this command support some parameters as below::
-
- +---------------------+--------------------------------------------------+
- | Parameters | Detail |
- +=====================+==================================================+
- | -d | show debug log of yardstick running |
- | | |
- +---------------------+--------------------------------------------------+
- | --task-args | If you want to customize test case parameters, |
- | | use "--task-args" to pass the value. The format |
- | | is a json string with parameter key-value pair. |
- | | |
- +---------------------+--------------------------------------------------+
- | --task-args-file | If you want to use yardstick |
- | | env prepare command(or |
- | | related API) to load the |
- +---------------------+--------------------------------------------------+
- | --parse-only | |
- | | |
- | | |
- +---------------------+--------------------------------------------------+
- | --output-file \ | Specify where to output the log. if not pass, |
- | OUTPUT_FILE_PATH | the default value is |
- | | "/tmp/yardstick/yardstick.log" |
- | | |
- +---------------------+--------------------------------------------------+
- | --suite \ | run a test suite, TEST_SUITE_PATH specify where |
- | TEST_SUITE_PATH | the test suite locates |
- | | |
- +---------------------+--------------------------------------------------+
-
-
-Run Yardstick in a local environment
-------------------------------------
-
-We also have a guide about how to run Yardstick in a local environment.
-This work is contributed by Tapio Tallgren.
-You can find this guide at `How to run Yardstick in a local environment`_.
-
-
-Create a test suite for Yardstick
-------------------------------------
-
-A test suite in yardstick is a yaml file which include one or more test cases.
-Yardstick is able to support running test suite task, so you can customize your
-own test suite and run it in one task.
-
-``tests/opnfv/test_suites`` is the folder where Yardstick puts CI test suite.
-A typical test suite is like below (the ``fuel_test_suite.yaml`` example)::
-
- ---
- # Fuel integration test task suite
-
- schema: "yardstick:suite:0.1"
-
- name: "fuel_test_suite"
- test_cases_dir: "samples/"
- test_cases:
- -
- file_name: ping.yaml
- -
- file_name: iperf3.yaml
-
-As you can see, there are two test cases in the ``fuel_test_suite.yaml``. The
-``schema`` and the ``name`` must be specified. The test cases should be listed
-via the tag ``test_cases`` and their relative path is also marked via the tag
-``test_cases_dir``.
-
-Yardstick test suite also supports constraints and task args for each test
-case. Here is another sample (the ``os-nosdn-nofeature-ha.yaml`` example) to
-show this, which is digested from one big test suite::
-
- ---
-
- schema: "yardstick:suite:0.1"
-
- name: "os-nosdn-nofeature-ha"
- test_cases_dir: "tests/opnfv/test_cases/"
- test_cases:
- -
- file_name: opnfv_yardstick_tc002.yaml
- -
- file_name: opnfv_yardstick_tc005.yaml
- -
- file_name: opnfv_yardstick_tc043.yaml
- constraint:
- installer: compass
- pod: huawei-pod1
- task_args:
- huawei-pod1: '{"pod_info": "etc/yardstick/.../pod.yaml",
- "host": "node4.LF","target": "node5.LF"}'
-
-As you can see in test case ``opnfv_yardstick_tc043.yaml``, there are two
-tags, ``constraint`` and ``task_args``. ``constraint`` is to specify which
-installer or pod it can be run in the CI environment. ``task_args`` is to
-specify the task arguments for each pod.
-
-All in all, to create a test suite in Yardstick, you just need to create a
-yaml file and add test cases, constraint or task arguments if necessary.
-
-
Proxy Support
-------------
@@ -790,7 +599,7 @@ stop and delete the container::
sudo docker rm yardstick
.. warning:: Be careful, the above ``rm`` command will delete the container
-completely. Everything on this container will be lost.
+ completely. Everything on this container will be lost.
Then follow the previous instructions `Prepare the Yardstick container`_ to
rebuild the Yardstick container.
@@ -804,4 +613,3 @@ References
.. _`Cirros 0.3.5`: http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
.. _`Ubuntu 16.04`: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
.. _`Yardstick GUI demo`: https://www.youtube.com/watch?v=M3qbJDp6QBk
-.. _`How to run Yardstick in a local environment`: https://wiki.opnfv.org/display/yardstick/How+to+run+Yardstick+in+a+local+environment
diff --git a/docs/testing/user/userguide/05-operation.rst b/docs/testing/user/userguide/05-operation.rst
new file mode 100644
index 000000000..f390d1643
--- /dev/null
+++ b/docs/testing/user/userguide/05-operation.rst
@@ -0,0 +1,296 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Intel, Ericsson AB, Huawei Technologies Co. Ltd and others.
+
+..
+ Convention for heading levels in Yardstick:
+ ======= Heading 0 (reserved for the title in a document)
+ ------- Heading 1
+ ^^^^^^^ Heading 2
+ +++++++ Heading 3
+ ''''''' Heading 4
+ Avoid deeper levels because they do not render well.
+
+===============
+Yardstick Usage
+===============
+
+Once you have yardstick installed, you can start using it to run testcases
+immediately, through the CLI. You can also define and run new testcases and
+test suites. This chapter details basic usage (running testcases), as well as
+more advanced usage (creating your own testcases).
+
+Yardstick common CLI
+--------------------
+
+List test cases
+^^^^^^^^^^^^^^^
+
+``yardstick testcase list``: This command line would list all test cases in
+Yardstick. It would show like below::
+
+ +---------------------------------------------------------------------------------------
+ | Testcase Name | Description
+ +---------------------------------------------------------------------------------------
+ | opnfv_yardstick_tc001 | Measure network throughput using pktgen
+ | opnfv_yardstick_tc002 | measure network latency using ping
+ | opnfv_yardstick_tc005 | Measure Storage IOPS, throughput and latency using fio.
+ ...
+ +---------------------------------------------------------------------------------------
+
+
+Show a test case config file
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Take opnfv_yardstick_tc002 for an example. This test case measure network
+latency. You just need to type in ``yardstick testcase show
+opnfv_yardstick_tc002``, and the console would show the config yaml of this
+test case:
+
+.. literalinclude::
+ ../../../../tests/opnfv/test_cases/opnfv_yardstick_tc002.yaml
+ :lines: 9-
+
+Run a Yardstick test case
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you want run a test case, then you need to use ``yardstick task start
+<test_case_path>`` this command support some parameters as below:
+
+ +---------------------+--------------------------------------------------+
+ | Parameters | Detail |
+ +=====================+==================================================+
+ | -d | show debug log of yardstick running |
+ | | |
+ +---------------------+--------------------------------------------------+
+ | --task-args | If you want to customize test case parameters, |
+ | | use "--task-args" to pass the value. The format |
+ | | is a json string with parameter key-value pair. |
+ | | |
+ +---------------------+--------------------------------------------------+
+ | --task-args-file | If you want to use yardstick |
+ | | env prepare command(or |
+ | | related API) to load the |
+ +---------------------+--------------------------------------------------+
+ | --parse-only | |
+ | | |
+ | | |
+ +---------------------+--------------------------------------------------+
+ | --output-file \ | Specify where to output the log. if not pass, |
+ | OUTPUT_FILE_PATH | the default value is |
+ | | "/tmp/yardstick/yardstick.log" |
+ | | |
+ +---------------------+--------------------------------------------------+
+ | --suite \ | run a test suite, TEST_SUITE_PATH specify where |
+ | TEST_SUITE_PATH | the test suite locates |
+ | | |
+ +---------------------+--------------------------------------------------+
+
+
+Run Yardstick in a local environment
+------------------------------------
+
+We also have a guide about `How to run Yardstick in a local environment`_.
+This work is contributed by Tapio Tallgren.
+
+Create a new testcase for Yardstick
+-----------------------------------
+
+As a user, you may want to define a new testcase in addition to the ones
+already available in Yardstick. This section will show you how to do this.
+
+Each testcase consists of two sections:
+
+* ``scenarios`` describes what will be done by the test
+* ``context`` describes the environment in which the test will be run.
+
+Defining the testcase scenarios
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+TODO
+
+Defining the testcase context(s)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Each testcase consists of one or more contexts, which describe the environment
+in which the testcase will be run.
+Current available contexts are:
+
+* ``Dummy``: this is a no-op context, and is used when there is no environment
+ to set up e.g. when testing whether OpenStack services are available
+* ``Node``: this context is used to perform operations on baremetal servers
+* ``Heat``: uses OpenStack to provision the required hosts, networks, etc.
+* ``Kubernetes``: uses Kubernetes to provision the resources required for the
+ test.
+
+Regardless of the context type, the ``context`` section of the testcase will
+consist of the following::
+
+ context:
+ name: demo
+ type: Dummy|Node|Heat|Kubernetes
+
+The content of the ``context`` section will vary based on the context type.
+
+Dummy Context
++++++++++++++
+
+No additional information is required for the Dummy context::
+
+ context:
+ name: my_context
+ type: Dummy
+
+Node Context
+++++++++++++
+
+TODO
+
+Heat Context
+++++++++++++
+
+In addition to ``name`` and ``type``, a Heat context requires the following
+arguments:
+
+* ``image``: the image to be used to boot VMs
+* ``flavor``: the flavor to be used for VMs in the context
+* ``user``: the username for connecting into the VMs
+* ``networks``: The networks to be created, networks are identified by name
+
+ * ``name``: network name (required)
+ * (TODO) Any optional attributes
+
+* ``servers``: The servers to be created
+
+ * ``name``: server name
+ * (TODO) Any optional attributes
+
+In addition to the required arguments, the following optional arguments can be
+passed to the Heat context:
+
+* ``placement_groups``:
+
+ * ``name``: the name of the placement group to be created
+ * ``policy``: either ``affinity`` or ``availability``
+* ``server_groups``:
+
+ * ``name``: the name of the server group
+ * ``policy``: either ``affinity`` or ``anti-affinity``
+
+Combining these elements together, a sample Heat context config looks like:
+
+.. literalinclude::
+ ../../../../yardstick/tests/integration/dummy-scenario-heat-context.yaml
+ :start-after: ---
+ :empahsise-lines: 14-
+
+Using exisiting HOT Templates
+'''''''''''''''''''''''''''''
+
+TODO
+
+Kubernetes Context
+++++++++++++++++++
+
+TODO
+
+Using multiple contexts in a testcase
++++++++++++++++++++++++++++++++++++++
+
+When using multiple contexts in a testcase, the ``context`` section is replaced
+by a ``contexts`` section, and each context is separated with a ``-`` line::
+
+ contexts:
+ -
+ name: context1
+ type: Heat
+ ...
+ -
+ name: context2
+ type: Node
+ ...
+
+
+Reusing a context
++++++++++++++++++
+
+Typically, a context is torn down after a testcase is run, however, the user
+may wish to keep an context intact after a testcase is complete.
+
+.. note::
+ This feature has been implemented for the Heat context only
+
+To keep or reuse a context, the ``flags`` option must be specified:
+
+* ``no_setup``: skip the deploy stage, and fetch the details of a deployed
+ context/Heat stack.
+* ``no_teardown``: skip the undeploy stage, thus keeping the stack intact for
+ the next test
+
+If either of these ``flags`` are ``True``, the context information must still
+be given. By default, these flags are disabled::
+
+ context:
+ name: mycontext
+ type: Heat
+ flags:
+ no_setup: True
+ no_teardown: True
+ ...
+
+Create a test suite for Yardstick
+---------------------------------
+
+A test suite in Yardstick is a .yaml file which includes one or more test
+cases. Yardstick is able to support running test suite task, so you can
+customize your own test suite and run it in one task.
+
+``tests/opnfv/test_suites`` is the folder where Yardstick puts CI test suite.
+A typical test suite is like below (the ``fuel_test_suite.yaml`` example):
+
+.. literalinclude::
+ ../../../../tests/opnfv/test_suites/fuel_test_suite.yaml
+ :lines: 9-
+
+As you can see, there are two test cases in the ``fuel_test_suite.yaml``. The
+``schema`` and the ``name`` must be specified. The test cases should be listed
+via the tag ``test_cases`` and their relative path is also marked via the tag
+``test_cases_dir``.
+
+Yardstick test suite also supports constraints and task args for each test
+case. Here is another sample (the ``os-nosdn-nofeature-ha.yaml`` example) to
+show this, which is digested from one big test suite::
+
+ ---
+
+ schema: "yardstick:suite:0.1"
+
+ name: "os-nosdn-nofeature-ha"
+ test_cases_dir: "tests/opnfv/test_cases/"
+ test_cases:
+ -
+ file_name: opnfv_yardstick_tc002.yaml
+ -
+ file_name: opnfv_yardstick_tc005.yaml
+ -
+ file_name: opnfv_yardstick_tc043.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"pod_info": "etc/yardstick/.../pod.yaml",
+ "host": "node4.LF","target": "node5.LF"}'
+
+As you can see in test case ``opnfv_yardstick_tc043.yaml``, there are two
+tags, ``constraint`` and ``task_args``. ``constraint`` is to specify which
+installer or pod it can be run in the CI environment. ``task_args`` is to
+specify the task arguments for each pod.
+
+All in all, to create a test suite in Yardstick, you just need to create a
+yaml file and add test cases, constraint or task arguments if necessary.
+
+References
+----------
+
+.. _`How to run Yardstick in a local environment`: https://wiki.opnfv.org/display/yardstick/How+to+run+Yardstick+in+a+local+environment
diff --git a/docs/testing/user/userguide/05-yardstick_plugin.rst b/docs/testing/user/userguide/06-yardstick-plugin.rst
index 679ce7900..bc35e239d 100644
--- a/docs/testing/user/userguide/05-yardstick_plugin.rst
+++ b/docs/testing/user/userguide/06-yardstick-plugin.rst
@@ -31,7 +31,7 @@ In this introduction we will install Storperf on Jump Host.
Step 0: Environment preparation
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+-------------------------------
Running Storperf on Jump Host
Requirements:
@@ -47,24 +47,26 @@ environment and other dependencies:
1. Make sure docker is installed.
2. Make sure Keystone, Nova, Neutron, Glance, Heat are installed correctly.
3. Make sure Jump Host have access to the OpenStack Controller API.
-4. Make sure Jump Host must have internet connectivity for downloading docker image.
-5. You need to know where to get basic openstack Keystone authorization info, such as
- OS_PASSWORD, OS_PROJECT_NAME, OS_AUTH_URL, OS_USERNAME.
-6. To run a Storperf container, you need to have OpenStack Controller environment
- variables defined and passed to Storperf container. The best way to do this is to
- put environment variables in a "storperf_admin-rc" file. The storperf_admin-rc
- should include credential environment variables at least:
-
-* OS_AUTH_URL
-* OS_USERNAME
-* OS_PASSWORD
-* OS_PROJECT_NAME
-* OS_PROJECT_ID
-* OS_USER_DOMAIN_ID
-
-*Yardstick* has a "prepare_storperf_admin-rc.sh" script which can be used to
-generate the "storperf_admin-rc" file, this script is located at
-test/ci/prepare_storperf_admin-rc.sh
+4. Make sure Jump Host must have internet connectivity for downloading docker
+ image.
+5. You need to know where to get basic openstack Keystone authorization info,
+ such as OS_PASSWORD, OS_PROJECT_NAME, OS_AUTH_URL, OS_USERNAME.
+6. To run a Storperf container, you need to have OpenStack Controller
+ environment variables defined and passed to Storperf container. The best way
+ to do this is to put environment variables in a "storperf_admin-rc" file.
+ The storperf_admin-rc should include credential environment variables at
+ least:
+
+ * OS_AUTH_URL
+ * OS_USERNAME
+ * OS_PASSWORD
+ * OS_PROJECT_NAME
+ * OS_PROJECT_ID
+ * OS_USER_DOMAIN_ID
+
+*Yardstick* has a ``prepare_storperf_admin-rc.sh`` script which can be used to
+generate the ``storperf_admin-rc`` file, this script is located at
+``test/ci/prepare_storperf_admin-rc.sh``
::
@@ -92,18 +94,18 @@ test/ci/prepare_storperf_admin-rc.sh
echo "OS_USER_DOMAIN_ID="$USER_DOMAIN_ID >> ~/storperf_admin-rc
-The generated "storperf_admin-rc" file will be stored in the root directory. If
-you installed *Yardstick* using Docker, this file will be located in the
+The generated ``storperf_admin-rc`` file will be stored in the root directory.
+If you installed *Yardstick* using Docker, this file will be located in the
container. You may need to copy it to the root directory of the Storperf
deployed host.
Step 1: Plug-in configuration file preparation
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+----------------------------------------------
To install a plug-in, first you need to prepare a plug-in configuration file in
-YAML format and store it in the "plugin" directory. The plugin configration file
-work as the input of yardstick "plugin" command. Below is the Storperf plug-in
-configuration file sample:
+YAML format and store it in the "plugin" directory. The plugin configration
+file work as the input of yardstick "plugin" command. Below is the Storperf
+plug-in configuration file sample:
::
---
@@ -123,28 +125,28 @@ Here the Storperf will be installed on IP 192.168.23.2 which is the Jump Host
in my local environment.
Step 2: Plug-in install/remove scripts preparation
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+--------------------------------------------------
-In "yardstick/resource/scripts" directory, there are two folders: a "install"
-folder and a "remove" folder. You need to store the plug-in install/remove
-scripts in these two folders respectively.
+In ``yardstick/resource/scripts`` directory, there are two folders: an
+``install`` folder and a ``remove`` folder. You need to store the plug-in
+install/remove scripts in these two folders respectively.
The detailed installation or remove operation should de defined in these two
scripts. The name of both install and remove scripts should match the plugin-in
name that you specified in the plug-in configuration file.
-For example, the install and remove scripts for Storperf are both named to
-"storperf.bash".
+For example, the install and remove scripts for Storperf are both named
+``storperf.bash``.
Step 3: Install and remove Storperf
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+-----------------------------------
To install Storperf, simply execute the following command::
# Install Storperf
yardstick plugin install plugin/storperf.yaml
-removing Storperf from yardstick
+Removing Storperf from yardstick
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To remove Storperf, simply execute the following command::
diff --git a/docs/testing/user/userguide/06-result-store-InfluxDB.rst b/docs/testing/user/userguide/07-result-store-InfluxDB.rst
index 747927889..cde931376 100644
--- a/docs/testing/user/userguide/06-result-store-InfluxDB.rst
+++ b/docs/testing/user/userguide/07-result-store-InfluxDB.rst
@@ -24,7 +24,7 @@ Store Storperf Test Results into Community's InfluxDB
=====================================================
.. _Influxdb: https://git.opnfv.org/cgit/yardstick/tree/yardstick/dispatcher/influxdb.py
-.. _Mingjiang: limingjiang@huawei.com
+.. _Mingjiang: mailto:limingjiang@huawei.com
.. _Visual: https://wiki.opnfv.org/download/attachments/6827660/tc074.PNG?version=1&modificationDate=1470298075000&api=v2
.. _Login: http://testresults.opnfv.org/grafana/login
@@ -40,12 +40,13 @@ into community's InfluxDB:
will be supported in the future.
Our plan is to support rest-api in D release so that other testing projects can
-call the rest-api to use yardstick dispatcher service to push data to yardstick's
-influxdb database.
+call the rest-api to use yardstick dispatcher service to push data to
+Yardstick's InfluxDB database.
-For now, influxdb only support line protocol, and the json protocol is deprecated.
+For now, InfluxDB only supports line protocol, and the json protocol is
+deprecated.
-Take ping test case for example, the raw_result is json format like this:
+Take ping test case for example, the ``raw_result`` is json format like this:
::
"benchmark": {
@@ -61,23 +62,24 @@ Take ping test case for example, the raw_result is json format like this:
"runner_id": 2625
}
-With the help of "influxdb_line_protocol", the json is transform to like below as a line string:
-::
+With the help of "influxdb_line_protocol", the json is transform to like below
+as a line string::
'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown,pod_name=unknown,
runner_id=2625,scenarios=Ping,target=ares.demo,task_id=77755f38-1f6a-4667-a7f3-
301c99963656,version=unknown rtt.ares=1.125 1470315409868094976'
-So, for data output of json format, you just need to transform json into line format and call
-influxdb api to post the data into the database. All this function has been implemented in Influxdb_.
-If you need support on this, please contact Mingjiang_.
+So, for data output of json format, you just need to transform json into line
+format and call influxdb api to post the data into the database. All this
+function has been implemented in Influxdb_. If you need support on this, please
+contact Mingjiang_.
::
curl -i -XPOST 'http://104.197.68.199:8086/write?db=yardstick' --
data-binary 'ping,deploy_scenario=unknown,host=athena.demo,installer=unknown, ...'
-Grafana will be used for visualizing the collected test data, which is shown in Visual_. Grafana
-can be accessed by Login_.
+Grafana will be used for visualizing the collected test data, which is shown in
+Visual_. Grafana can be accessed by Login_.
.. image:: images/results_visualization.png
diff --git a/docs/testing/user/userguide/07-grafana.rst b/docs/testing/user/userguide/08-grafana.rst
index 416857b71..29bc23a08 100644
--- a/docs/testing/user/userguide/07-grafana.rst
+++ b/docs/testing/user/userguide/08-grafana.rst
@@ -108,8 +108,10 @@ There are 6 steps to go.
5. When finished with all Grafana configuration changes in this temporary
dashboard then chose "export" of the updated dashboard copy into a JSON file
- and put it up for review in Gerrit, in file /yardstick/dashboard/Yardstick-TCxxx-yyyyyyyyyyyyy.
- For instance a typical default name of the file would be "Yardstick-TC001 Copy-1234567891234".
+ and put it up for review in Gerrit, in file
+ ``/yardstick/dashboard/Yardstick-TCxxx-yyyyyyyyyyyyy``.
+ For instance a typical default name of the file would be
+ ``Yardstick-TC001 Copy-1234567891234``.
6. Once you finish your dashboard, the next step is exporting the configuration
file and propose a patch into Yardstick. Yardstick team will review and
diff --git a/docs/testing/user/userguide/08-api.rst b/docs/testing/user/userguide/09-api.rst
index 92fa408c8..f0ae3980b 100644
--- a/docs/testing/user/userguide/08-api.rst
+++ b/docs/testing/user/userguide/09-api.rst
@@ -3,25 +3,29 @@
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, Huawei Technologies Co.,Ltd and others.
+=====================
Yardstick Restful API
-======================
+=====================
Abstract
---------
+========
Yardstick support restful API since Danube.
Available API
--------------
+=============
/yardstick/env/action
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+---------------------
-Description: This API is used to prepare Yardstick test environment. For Euphrates, it supports:
+Description: This API is used to prepare Yardstick test environment.
+For Euphrates, it supports:
-1. Prepare yardstick test environment, including set external network environment variable, load Yardstick VM images and create flavors;
+1. Prepare yardstick test environment, including setting the
+ ``EXTERNAL_NETWORK`` environment variable, load Yardstick VM images and
+ create flavors;
2. Start an InfluxDB Docker container and config Yardstick output to InfluxDB;
3. Start a Grafana Docker container and config it with the InfluxDB.
@@ -35,34 +39,37 @@ Prepare Yardstick test environment
Example::
{
- 'action': 'prepareYardstickEnv'
+ 'action': 'prepare_env'
}
-This is an asynchronous API. You need to call /yardstick/asynctask API to get the task result.
+This is an asynchronous API. You need to call ``/yardstick/asynctask`` API to
+get the task result.
Start and config an InfluxDB docker container
Example::
{
- 'action': 'createInfluxDBContainer'
+ 'action': 'create_influxdb'
}
-This is an asynchronous API. You need to call /yardstick/asynctask API to get the task result.
+This is an asynchronous API. You need to call ``/yardstick/asynctask`` API to
+get the task result.
Start and config a Grafana docker container
Example::
{
- 'action': 'createGrafanaContainer'
+ 'action': 'create_grafana'
}
-This is an asynchronous API. You need to call /yardstick/asynctask API to get the task result.
+This is an asynchronous API. You need to call ``/yardstick/asynctask`` API to
+get the task result.
/yardstick/asynctask
-^^^^^^^^^^^^^^^^^^^^
+--------------------
Description: This API is used to get the status of asynchronous tasks
@@ -73,13 +80,18 @@ Method: GET
Get the status of asynchronous tasks
Example::
- http://localhost:8888/yardstick/asynctask?task_id=3f3f5e03-972a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/yardstick/asynctask?task_id=3f3f5e03-972a-4847-a5f8-154f1b31db8c
The returned status will be 0(running), 1(finished) and 2(failed).
+NOTE::
+
+ <SERVER IP>: The ip of the host where you start your yardstick container
+ <PORT>: The outside port of port mapping which set when you start start yardstick container
+
/yardstick/testcases
-^^^^^^^^^^^^^^^^^^^^
+--------------------
Description: This API is used to list all released Yardstick test cases.
@@ -90,11 +102,11 @@ Method: GET
Get a list of released test cases
Example::
- http://localhost:8888/yardstick/testcases
+ http://<SERVER IP>:<PORT>/yardstick/testcases
/yardstick/testcases/release/action
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------
Description: This API is used to run a Yardstick released test case.
@@ -106,18 +118,19 @@ Run a released test case
Example::
{
- 'action': 'runTestCase',
+ 'action': 'run_test_case',
'args': {
'opts': {},
- 'testcase': 'tc002'
+ 'testcase': 'opnfv_yardstick_tc002'
}
}
-This is an asynchronous API. You need to call /yardstick/results to get the result.
+This is an asynchronous API. You need to call ``/yardstick/results`` to get the
+result.
/yardstick/testcases/samples/action
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------
Description: This API is used to run a Yardstick sample test case.
@@ -129,20 +142,22 @@ Run a sample test case
Example::
{
- 'action': 'runTestCase',
+ 'action': 'run_test_case',
'args': {
'opts': {},
'testcase': 'ping'
}
}
-This is an asynchronous API. You need to call /yardstick/results to get the result.
+This is an asynchronous API. You need to call ``/yardstick/results`` to get
+the result.
/yardstick/testcases/<testcase_name>/docs
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------------
-Description: This API is used to the documentation of a certain released test case.
+Description: This API is used to the documentation of a certain released test
+case.
Method: GET
@@ -151,11 +166,11 @@ Method: GET
Get the documentation of a certain test case
Example::
- http://localhost:8888/yardstick/taskcases/opnfv_yardstick_tc002/docs
+ http://<SERVER IP>:<PORT>/yardstick/taskcases/opnfv_yardstick_tc002/docs
/yardstick/testsuites/action
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------------
Description: This API is used to run a Yardstick test suite.
@@ -167,17 +182,19 @@ Run a test suite
Example::
{
- 'action': 'runTestSuite',
+ 'action': 'run_test_suite',
'args': {
'opts': {},
- 'testcase': 'smoke'
+ 'testsuite': 'opnfv_smoke'
}
}
-This is an asynchronous API. You need to call /yardstick/results to get the result.
+This is an asynchronous API. You need to call /yardstick/results to get the
+result.
/yardstick/tasks/<task_id>/log
+------------------------------
Description: This API is used to get the real time log of test case execution.
@@ -188,13 +205,15 @@ Method: GET
Get real time of test case execution
Example::
- http://localhost:8888/yardstick/tasks/14795be8-f144-4f54-81ce-43f4e3eab33f/log?index=0
+ http://<SERVER IP>:<PORT>/yardstick/tasks/14795be8-f144-4f54-81ce-43f4e3eab33f/log?index=0
/yardstick/results
-^^^^^^^^^^^^^^^^^^
+------------------
-Description: This API is used to get the test results of tasks. If you call /yardstick/testcases/samples/action API, it will return a task id. You can use the returned task id to get the results by using this API.
+Description: This API is used to get the test results of tasks. If you call
+/yardstick/testcases/samples/action API, it will return a task id. You can use
+the returned task id to get the results by using this API.
Method: GET
@@ -203,17 +222,19 @@ Method: GET
Get test results of one task
Example::
- http://localhost:8888/yardstick/results?task_id=3f3f5e03-972a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/yardstick/results?task_id=3f3f5e03-972a-4847-a5f8-154f1b31db8c
This API will return a list of test case result
-/api/v2/yardstick/openrcs/action
+/api/v2/yardstick/openrcs
+-------------------------
-Description: This API provides functionality of handling OpenStack credential file (openrc). For Euphrates, it supports:
+Description: This API provides functionality of handling OpenStack credential
+file (openrc). For Euphrates, it supports:
1. Upload an openrc file for an OpenStack environment;
-2. Update an openrc file;
+2. Update an openrc;
3. Get openrc file information;
4. Delete an openrc file.
@@ -260,12 +281,21 @@ Example::
}
+/api/v2/yardstick/openrcs/<openrc_id>
+-------------------------------------
+
+Description: This API provides functionality of handling OpenStack credential file (openrc). For Euphrates, it supports:
+
+1. Get openrc file information;
+2. Delete an openrc file.
+
+
METHOD: GET
Get openrc file information
Example::
- http://localhost:8888/api/v2/yardstick/openrcs/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/openrcs/5g6g3e02-155a-4847-a5f8-154f1b31db8c
METHOD: DELETE
@@ -274,16 +304,16 @@ METHOD: DELETE
Delete openrc file
Example::
- http://localhost:8888/api/v2/yardstick/openrcs/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/openrcs/5g6g3e02-155a-4847-a5f8-154f1b31db8c
-/api/v2/yardstick/pods/action
+/api/v2/yardstick/pods
+----------------------
-Description: This API provides functionality of handling Yardstick pod file (pod.yaml). For Euphrates, it supports:
+Description: This API provides functionality of handling Yardstick pod file
+(pod.yaml). For Euphrates, it supports:
1. Upload a pod file;
-2. Get pod file information;
-3. Delete an openrc file.
Which API to call will depend on the parameters.
@@ -303,12 +333,20 @@ Example::
}
+/api/v2/yardstick/pods/<pod_id>
+-------------------------------
+
+Description: This API provides functionality of handling Yardstick pod file (pod.yaml). For Euphrates, it supports:
+
+1. Get pod file information;
+2. Delete an openrc file.
+
METHOD: GET
Get pod file information
Example::
- http://localhost:8888/api/v2/yardstick/pods/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/pods/5g6g3e02-155a-4847-a5f8-154f1b31db8c
METHOD: DELETE
@@ -316,16 +354,16 @@ METHOD: DELETE
Delete openrc file
Example::
- http://localhost:8888/api/v2/yardstick/pods/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/pods/5g6g3e02-155a-4847-a5f8-154f1b31db8c
-/api/v2/yardstick/images/action
+/api/v2/yardstick/images
+------------------------
-Description: This API is used to do some work related to Yardstick VM images. For Euphrates, it supports:
+Description: This API is used to do some work related to Yardstick VM images.
+For Euphrates, it supports:
1. Load Yardstick VM images;
-2. Get image's information;
-3. Delete images.
Which API to call will depend on the parameters.
@@ -337,16 +375,27 @@ Load VM images
Example::
{
- 'action': 'load_images'
+ 'action': 'load_image',
+ 'args': {
+ 'name': 'yardstick-image'
+ }
}
+/api/v2/yardstick/images/<image_id>
+-----------------------------------
+
+Description: This API is used to do some work related to Yardstick VM images. For Euphrates, it supports:
+
+1. Get image's information;
+2. Delete images
+
METHOD: GET
Get image information
Example::
- http://localhost:8888/api/v2/yardstick/images/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/images/5g6g3e02-155a-4847-a5f8-154f1b31db8c
METHOD: DELETE
@@ -354,19 +403,16 @@ METHOD: DELETE
Delete images
Example::
- http://localhost:8888/api/v2/yardstick/images/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/images/5g6g3e02-155a-4847-a5f8-154f1b31db8c
-/api/v2/yardstick/tasks/action
+/api/v2/yardstick/tasks
+-----------------------
-Description: This API is used to do some work related to yardstick tasks. For Euphrates, it supports:
+Description: This API is used to do some work related to yardstick tasks. For
+Euphrates, it supports:
1. Create a Yardstick task;
-2. run a Yardstick task;
-3. Add a test case to a task;
-4. Add a test suite to a task;
-5. Get a tasks' information;
-6. Delete a task.
Which API to call will depend on the parameters.
@@ -386,20 +432,35 @@ Example::
}
+/api/v2/yardstick/tasks/<task_id>
+--------------------------------
+
+Description: This API is used to do some work related to yardstick tasks. For Euphrates, it supports:
+
+1. Add a environment to a task
+2. Add a test case to a task;
+3. Add a test suite to a task;
+4. run a Yardstick task;
+5. Get a tasks' information;
+6. Delete a task.
+
+
METHOD: PUT
+Add a environment to a task
-Run a task
Example::
{
- 'action': 'run'
+ 'action': 'add_environment',
+ 'args': {
+ 'environment_id': 'e3cadbbb-0419-4fed-96f1-a232daa0422a'
+ }
}
METHOD: PUT
-
Add a test case to a task
Example::
@@ -412,8 +473,8 @@ Example::
}
-METHOD: PUT
+METHOD: PUT
Add a test suite to a task
Example::
@@ -427,29 +488,43 @@ Example::
}
+METHOD: PUT
+
+Run a task
+
+Example::
+
+ {
+ 'action': 'run'
+ }
+
+
+
METHOD: GET
Get a task's information
Example::
- http://localhost:8888/api/v2/yardstick/tasks/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/tasks/5g6g3e02-155a-4847-a5f8-154f1b31db8c
METHOD: DELETE
Delete a task
+
Example::
- http://localhost:8888/api/v2/yardstick/tasks/5g6g3e02-155a-4847-a5f8-154f1b31db8c
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/tasks/5g6g3e02-155a-4847-a5f8-154f1b31db8c
-/api/v2/yardstick/testcases/action
-Description: This API is used to do some work related to yardstick testcases. For Euphrates, it supports:
+/api/v2/yardstick/testcases
+---------------------------
+
+Description: This API is used to do some work related to Yardstick testcases.
+For Euphrates, it supports:
1. Upload a test case;
2. Get all released test cases' information;
-3. Get a certain released test case's information;
-4. Delete a test case.
Which API to call will depend on the parameters.
@@ -474,16 +549,24 @@ METHOD: GET
Get all released test cases' information
Example::
- http://localhost:8888/api/v2/yardstick/testcases
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testcases
+
+/api/v2/yardstick/testcases/<case_name>
+---------------------------------------
+
+Description: This API is used to do some work related to yardstick testcases. For Euphrates, it supports:
+
+1. Get certain released test case's information;
+2. Delete a test case.
METHOD: GET
-Get a certain released test case's information
+Get certain released test case's information
Example::
- http://localhost:8888/api/v2/yardstick/testcases/opnfv_yardstick_tc002
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testcases/opnfv_yardstick_tc002
METHOD: DELETE
@@ -491,17 +574,18 @@ METHOD: DELETE
Delete a certain test case
Example::
- http://localhost:8888/api/v2/yardstick/testcases/opnfv_yardstick_tc002
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testcases/opnfv_yardstick_tc002
-/api/v2/yardstick/testsuites/action
-Description: This API is used to do some work related to yardstick test suites. For Euphrates, it supports:
+/api/v2/yardstick/testsuites
+----------------------------
+
+Description: This API is used to do some work related to yardstick test suites.
+For Euphrates, it supports:
1. Create a test suite;
-2. Get a certain test suite's information;
-3. Get all test suites;
-4. Delete a test case.
+2. Get all test suites;
Which API to call will depend on the parameters.
@@ -513,7 +597,7 @@ Create a test suite
Example::
{
- 'action': 'create_sutie',
+ 'action': 'create_suite',
'args': {
'name': <suite_name>,
'testcases': [
@@ -526,19 +610,27 @@ Example::
METHOD: GET
-Get a certain test suite's information
+Get all test suite
Example::
- http://localhost:8888/api/v2/yardstick/testsuites/<suite_name>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testsuites
+
+
+/api/v2/yardstick/testsuites
+----------------------------
+
+Description: This API is used to do some work related to yardstick test suites. For Euphrates, it supports:
+1. Get certain test suite's information;
+2. Delete a test case.
METHOD: GET
-Get all test suite
+Get certain test suite's information
Example::
- http://localhost:8888/api/v2/yardstick/testsuites
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testsuites/<suite_name>
METHOD: DELETE
@@ -547,17 +639,17 @@ METHOD: DELETE
Delete a certain test suite
Example::
- http://localhost:8888/api/v2/yardstick/testsuites/<suite_name>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/testsuites/<suite_name>
-/api/v2/yardstick/projects/action
+/api/v2/yardstick/projects
+--------------------------
-Description: This API is used to do some work related to yardstick test projects. For Euphrates, it supports:
+Description: This API is used to do some work related to Yardstick test
+projects. For Euphrates, it supports:
1. Create a Yardstick project;
-2. Get a certain project's information;
-3. Get all projects;
-4. Delete a project.
+2. Get all projects;
Which API to call will depend on the parameters.
@@ -579,19 +671,27 @@ Example::
METHOD: GET
-Get a certain project's information
+Get all projects' information
Example::
- http://localhost:8888/api/v2/yardstick/projects/<project_id>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/projects
+
+/api/v2/yardstick/projects
+--------------------------
+
+Description: This API is used to do some work related to yardstick test projects. For Euphrates, it supports:
+
+1. Get certain project's information;
+2. Delete a project.
METHOD: GET
-Get all projects' information
+Get certain project's information
Example::
- http://localhost:8888/api/v2/yardstick/projects
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/projects/<project_id>
METHOD: DELETE
@@ -600,17 +700,17 @@ METHOD: DELETE
Delete a certain project
Example::
- http://localhost:8888/api/v2/yardstick/projects/<project_id>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/projects/<project_id>
-/api/v2/yardstick/containers/action
+/api/v2/yardstick/containers
+----------------------------
-Description: This API is used to do some work related to Docker containers. For Euphrates, it supports:
+Description: This API is used to do some work related to Docker containers.
+For Euphrates, it supports:
1. Create a Grafana Docker container;
2. Create an InfluxDB Docker container;
-3. Get a certain container's information;
-4. Delete a container.
Which API to call will depend on the parameters.
@@ -643,13 +743,21 @@ Example::
}
+/api/v2/yardstick/containers/<container_id>
+-------------------------------------------
+
+Description: This API is used to do some work related to Docker containers. For Euphrates, it supports:
+
+1. Get certain container's information;
+2. Delete a container.
+
METHOD: GET
-Get a certain container's information
+Get certain container's information
Example::
- http://localhost:8888/api/v2/yardstick/containers/<container_id>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/containers/<container_id>
METHOD: DELETE
@@ -658,4 +766,4 @@ METHOD: DELETE
Delete a certain container
Example::
- http://localhost:8888/api/v2/yardstick/containers/<container_id>
+ http://<SERVER IP>:<PORT>/api/v2/yardstick/containers/<container_id>
diff --git a/docs/testing/user/userguide/09-yardstick_user_interface.rst b/docs/testing/user/userguide/10-yardstick-user-interface.rst
index 9058dd46d..cadec78ef 100644
--- a/docs/testing/user/userguide/09-yardstick_user_interface.rst
+++ b/docs/testing/user/userguide/10-yardstick-user-interface.rst
@@ -1,3 +1,4 @@
+========================
Yardstick User Interface
========================
@@ -6,14 +7,14 @@ in table format and also values pinned on to a graph.
Command
--------
+=======
::
yardstick report generate <task-ID> <testcase-filename>
Description
------------
+===========
1. When the command is triggered using the task-id and the testcase
name provided the respective values are retrieved from the
diff --git a/docs/testing/user/userguide/10-vtc-overview.rst b/docs/testing/user/userguide/11-vtc-overview.rst
index 8ed17873d..47582358c 100644
--- a/docs/testing/user/userguide/10-vtc-overview.rst
+++ b/docs/testing/user/userguide/11-vtc-overview.rst
@@ -29,10 +29,10 @@ to run the :term:`VNF`. The exploitation of Deep Packet Inspection
assumptions:
* third parties unaffiliated with either source or recipient are able to
-inspect each IP packet’s payload
+ inspect each IP packet's payload
-* the classifier knows the relevant syntax of each application’s packet
-payloads (protocol signatures, data patterns, etc.).
+* the classifier knows the relevant syntax of each application's packet
+ payloads (protocol signatures, data patterns, etc.).
The proposed :term:`DPI` based approach will only use an indicative, small
number of the initial packets from each flow in order to identify the content
@@ -47,14 +47,14 @@ Concepts
========
* *Traffic Inspection*: The process of packet analysis and application
-identification of network traffic that passes through the :term:`VTC`.
+ identification of network traffic that passes through the :term:`VTC`.
* *Traffic Forwarding*: The process of packet forwarding from an incoming
-network interface to a pre-defined outgoing network interface.
+ network interface to a pre-defined outgoing network interface.
* *Traffic Rule Application*: The process of packet tagging, based on a
-predefined set of rules. Packet tagging may include e.g. Type of Service
-(:term:`ToS`) field modification.
+ predefined set of rules. Packet tagging may include e.g. Type of Service
+ (:term:`ToS`) field modification.
Architecture
============
diff --git a/docs/testing/user/userguide/11-nsb-overview.rst b/docs/testing/user/userguide/12-nsb-overview.rst
index 8ce90f65d..71a5c1130 100644
--- a/docs/testing/user/userguide/11-nsb-overview.rst
+++ b/docs/testing/user/userguide/12-nsb-overview.rst
@@ -3,11 +3,12 @@
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, 2016-2017 Intel Corporation.
+===================================
Network Services Benchmarking (NSB)
===================================
Abstract
---------
+========
.. _Yardstick: https://wiki.opnfv.org/yardstick
@@ -15,10 +16,10 @@ This chapter provides an overview of the NSB, a contribution to OPNFV
Yardstick_ from Intel.
Overview
---------
+========
-The goal of NSB is to Extend Yardstick to perform real world VNFs and NFVi Characterization and
-benchmarking with repeatable and deterministic methods.
+The goal of NSB is to Extend Yardstick to perform real world VNFs and NFVi
+Characterization and benchmarking with repeatable and deterministic methods.
The Network Service Benchmarking (NSB) extends the yardstick framework to do
VNF characterization and benchmarking in three different execution
@@ -70,17 +71,17 @@ NSB extension includes:
- VNF KPIs, e.g., packet_in, packet_drop, packet_fwd etc
Architecture
-------------
+============
The Network Service (NS) defines a set of Virtual Network Functions (VNF)
connected together using NFV infrastructure.
The Yardstick NSB extension can support multiple VNFs created by different
vendors including traffic generators. Every VNF being tested has its
-own data model. The Network service defines a VNF modelling on base of performed
-network functionality. The part of the data model is a set of the configuration
-parameters, number of connection points used and flavor including core and
-memory amount.
+own data model. The Network service defines a VNF modelling on base of
+performed network functionality. The part of the data model is a set of the
+configuration parameters, number of connection points used and flavor including
+core and memory amount.
The ETSI defines a Network Service as a set of configurable VNFs working in
some NFV Infrastructure connecting each other using Virtual Links available
@@ -112,7 +113,7 @@ Network Service framework performs the necessary test steps. It may involve
- Read the KPI's provided by particular VNF
Components of Network Service
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------
* *Models for Network Service benchmarking*: The Network Service benchmarking
requires the proper modelling approach. The NSB provides models using Python
@@ -132,9 +133,9 @@ Components of Network Service
same way as other VNFs being a part of benchmarked network service.
Same as other VNFs the traffic generator are instantiated and terminated.
- Every traffic generator has own configuration defined as a traffic profile and
- a set of KPIs supported. The python models for TG is extended by specific calls
- to listen and generate traffic.
+ Every traffic generator has own configuration defined as a traffic profile
+ and a set of KPIs supported. The python models for TG is extended by
+ specific calls to listen and generate traffic.
* *The stateless TREX traffic generator*: The main traffic generator used as
Network Service stimulus is open source TREX tool.
@@ -165,7 +166,7 @@ Components of Network Service
- RFC2544 throughput for various loss rate defined (1% is a default)
Graphical Overview
-------------------
+==================
NSB Testing with yardstick framework facilitate performance testing of various
VNFs provided.
@@ -192,12 +193,14 @@ VNFs provided.
Figure 1: Network Service - 2 server configuration
VNFs supported for chracterization:
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-----------------------------------
1. CGNAPT - Carrier Grade Network Address and port Translation
2. vFW - Virtual Firewall
3. vACL - Access Control List
-5. Prox - Packet pROcessing eXecution engine:
- - VNF can act as Drop, Basic Forwarding (no touch), L2 Forwarding (change MAC), GRE encap/decap, Load balance based on packet fields, Symmetric load balancing,
+4. Prox - Packet pROcessing eXecution engine:
+ - VNF can act as Drop, Basic Forwarding (no touch),
+ L2 Forwarding (change MAC), GRE encap/decap, Load balance based on
+ packet fields, Symmetric load balancing
- QinQ encap/decap IPv4/IPv6, ARP, QoS, Routing, Unmpls, Policing, ACL
-6. UDP_Replay
+5. UDP_Replay
diff --git a/docs/testing/user/userguide/12-nsb_installation.rst b/docs/testing/user/userguide/13-nsb-installation.rst
index a584ca231..3e0ed0bfb 100644
--- a/docs/testing/user/userguide/12-nsb_installation.rst
+++ b/docs/testing/user/userguide/13-nsb-installation.rst
@@ -3,11 +3,12 @@
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, 2016-2017 Intel Corporation.
+=====================================
Yardstick - NSB Testing -Installation
=====================================
Abstract
---------
+========
The Network Service Benchmarking (NSB) extends the yardstick framework to do
VNF characterization and benchmarking in three different execution
@@ -26,79 +27,65 @@ The steps needed to run Yardstick with NSB testing are:
Prerequisites
--------------
+=============
Refer chapter Yardstick Installation for more information on yardstick
prerequisites
-Several prerequisites are needed for Yardstick(VNF testing):
-
- - Python Modules: pyzmq, pika.
-
- - flex
-
- - bison
-
- - build-essential
-
- - automake
-
- - libtool
+Several prerequisites are needed for Yardstick (VNF testing):
- - librabbitmq-dev
-
- - rabbitmq-server
-
- - collectd
-
- - intel-cmt-cat
+ * Python Modules: pyzmq, pika.
+ * flex
+ * bison
+ * build-essential
+ * automake
+ * libtool
+ * librabbitmq-dev
+ * rabbitmq-server
+ * collectd
+ * intel-cmt-cat
Hardware & Software Ingredients
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+-------------------------------
SUT requirements:
- +-----------+--------------------+
- | Item | Description |
- +-----------+--------------------+
- | Memory | Min 20GB |
- +-----------+--------------------+
- | NICs | 2 x 10G |
- +-----------+--------------------+
- | OS | Ubuntu 16.04.3 LTS |
- +-----------+--------------------+
- | kernel | 4.4.0-34-generic |
- +-----------+--------------------+
- | DPDK | 17.02 |
- +-----------+--------------------+
+ ======= ===================
+ Item Description
+ ======= ===================
+ Memory Min 20GB
+ NICs 2 x 10G
+ OS Ubuntu 16.04.3 LTS
+ kernel 4.4.0-34-generic
+ DPDK 17.02
+ ======= ===================
Boot and BIOS settings:
- +------------------+---------------------------------------------------+
- | Boot settings | default_hugepagesz=1G hugepagesz=1G hugepages=16 |
- | | hugepagesz=2M hugepages=2048 isolcpus=1-11,22-33 |
- | | nohz_full=1-11,22-33 rcu_nocbs=1-11,22-33 |
- | | iommu=on iommu=pt intel_iommu=on |
- | | Note: nohz_full and rcu_nocbs is to disable Linux |
- | | kernel interrupts |
- +------------------+---------------------------------------------------+
- |BIOS | CPU Power and Performance Policy <Performance> |
- | | CPU C-state Disabled |
- | | CPU P-state Disabled |
- | | Enhanced Intel® Speedstep® Tech Disabled |
- | | Hyper-Threading Technology (If supported) Enabled |
- | | Virtualization Techology Enabled |
- | | Intel(R) VT for Direct I/O Enabled |
- | | Coherency Enabled |
- | | Turbo Boost Disabled |
- +------------------+---------------------------------------------------+
+ ============= =================================================
+ Boot settings default_hugepagesz=1G hugepagesz=1G hugepages=16
+ hugepagesz=2M hugepages=2048 isolcpus=1-11,22-33
+ nohz_full=1-11,22-33 rcu_nocbs=1-11,22-33
+ iommu=on iommu=pt intel_iommu=on
+ Note: nohz_full and rcu_nocbs is to disable Linux
+ kernel interrupts
+ BIOS CPU Power and Performance Policy <Performance>
+ CPU C-state Disabled
+ CPU P-state Disabled
+ Enhanced Intel® Speedstep® Tech Disabl
+ Hyper-Threading Technology (If supported) Enabled
+ Virtualization Techology Enabled
+ Intel(R) VT for Direct I/O Enabled
+ Coherency Enabled
+ Turbo Boost Disabled
+ ============= =================================================
Install Yardstick (NSB Testing)
--------------------------------
+===============================
Download the source code and install Yardstick from it
@@ -116,11 +103,13 @@ Configure the network proxy, either using the environment variables or setting
the global environment file:
.. code-block:: ini
+
cat /etc/environment
http_proxy='http://proxy.company.com:port'
https_proxy='http://proxy.company.com:port'
.. code-block:: console
+
export http_proxy='http://proxy.company.com:port'
export https_proxy='http://proxy.company.com:port'
@@ -128,6 +117,7 @@ The last step is to modify the Yardstick installation inventory, used by
Ansible:
.. code-block:: ini
+
cat ./ansible/yardstick-install-inventory.ini
[jumphost]
localhost ansible_connection=local
@@ -145,6 +135,15 @@ Ansible:
ansible_user=root
ansible_pass=root
+.. note::
+
+ SSH access without password needs to be configured for all your nodes defined in
+ ``yardstick-install-inventory.ini`` file.
+ If you want to use password authentication you need to install sshpass
+
+ .. code-block:: console
+
+ sudo -EH apt-get install sshpass
To execute an installation for a Bare-Metal or a Standalone context:
@@ -165,11 +164,12 @@ Above command setup docker with latest yardstick code. To execute
docker exec -it yardstick bash
-It will also automatically download all the packages needed for NSB Testing setup.
-Refer chapter :doc:`04-installation` for more on docker **Install Yardstick using Docker (recommended)**
+It will also automatically download all the packages needed for NSB Testing
+setup. Refer chapter :doc:`04-installation` for more on docker
+**Install Yardstick using Docker (recommended)**
System Topology:
-----------------
+================
.. code-block:: console
@@ -184,13 +184,15 @@ System Topology:
Environment parameters and credentials
---------------------------------------
+======================================
Config yardstick conf
-^^^^^^^^^^^^^^^^^^^^^
+---------------------
-If user did not run 'yardstick env influxdb' inside the container, which will generate
-correct yardstick.conf, then create the config file manually (run inside the container):
+If user did not run 'yardstick env influxdb' inside the container, which will
+generate correct ``yardstick.conf``, then create the config file manually (run
+inside the container):
+::
cp ./etc/yardstick/yardstick.conf.sample /etc/yardstick/yardstick.conf
vi /etc/yardstick/yardstick.conf
@@ -216,11 +218,11 @@ Add trex_path, trex_client_lib and bin_path in 'nsb' section.
trex_client_lib=/opt/nsb_bin/trex_client/stl
Run Yardstick - Network Service Testcases
------------------------------------------
+=========================================
NS testing - using yardstick CLI
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+--------------------------------
See :doc:`04-installation`
@@ -233,13 +235,13 @@ NS testing - using yardstick CLI
yardstick --debug task start yardstick/samples/vnf_samples/nsut/<vnf>/<test case>
Network Service Benchmarking - Bare-Metal
------------------------------------------
+=========================================
Bare-Metal Config pod.yaml describing Topology
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+----------------------------------------------
-Bare-Metal 2-Node setup:
-########################
+Bare-Metal 2-Node setup
+^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
+----------+ +----------+
@@ -251,8 +253,8 @@ Bare-Metal 2-Node setup:
+----------+ +----------+
trafficgen_1 vnf
-Bare-Metal 3-Node setup - Correlated Traffic:
-#############################################
+Bare-Metal 3-Node setup - Correlated Traffic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
+----------+ +----------+ +------------+
@@ -267,7 +269,7 @@ Bare-Metal 3-Node setup - Correlated Traffic:
Bare-Metal Config pod.yaml
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+--------------------------
Before executing Yardstick test cases, make sure that pod.yaml reflects the
topology and update all the required fields.::
@@ -342,13 +344,13 @@ topology and update all the required fields.::
Network Service Benchmarking - Standalone Virtualization
---------------------------------------------------------
+========================================================
-SR-IOV:
-^^^^^^^
+SR-IOV
+------
SR-IOV Pre-requisites
-#####################
+^^^^^^^^^^^^^^^^^^^^^
On Host:
a) Create a bridge for VM to connect to external network
@@ -384,10 +386,10 @@ On Host:
SR-IOV Config pod.yaml describing Topology
-##########################################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SR-IOV 2-Node setup:
-####################
+^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
+--------------------+
@@ -415,7 +417,7 @@ SR-IOV 2-Node setup:
SR-IOV 3-Node setup - Correlated Traffic
-########################################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
+--------------------+
@@ -451,7 +453,7 @@ topology and update all the required fields.
.. note:: Update all the required fields like ip, user, password, pcis, etc...
SR-IOV Config pod_trex.yaml
-###########################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: YAML
@@ -480,7 +482,7 @@ SR-IOV Config pod_trex.yaml
local_mac: "00:00.00:00:00:02"
SR-IOV Config host_sriov.yaml
-#############################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: YAML
@@ -492,7 +494,8 @@ SR-IOV Config host_sriov.yaml
user: ""
password: ""
-SR-IOV testcase update: ``<yardstick>/samples/vnf_samples/nsut/vfw/tc_sriov_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
+SR-IOV testcase update:
+``<yardstick>/samples/vnf_samples/nsut/vfw/tc_sriov_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
Update "contexts" section
"""""""""""""""""""""""""
@@ -539,11 +542,11 @@ Update "contexts" section
-OVS-DPDK:
-^^^^^^^^^
+OVS-DPDK
+--------
OVS-DPDK Pre-requisites
-#######################
+^^^^^^^^^^^^^^^^^^^^^^^
On Host:
a) Create a bridge for VM to connect to external network
@@ -582,10 +585,10 @@ On Host:
OVS-DPDK Config pod.yaml describing Topology
-############################################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-OVS-DPDK 2-Node setup:
-######################
+OVS-DPDK 2-Node setup
+^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
@@ -616,7 +619,7 @@ OVS-DPDK 2-Node setup:
OVS-DPDK 3-Node setup - Correlated Traffic
-##########################################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
@@ -656,7 +659,7 @@ topology and update all the required fields.
.. note:: Update all the required fields like ip, user, password, pcis, etc...
OVS-DPDK Config pod_trex.yaml
-#############################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: YAML
@@ -684,7 +687,7 @@ OVS-DPDK Config pod_trex.yaml
local_mac: "00:00.00:00:00:02"
OVS-DPDK Config host_ovs.yaml
-#############################
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: YAML
@@ -696,7 +699,8 @@ OVS-DPDK Config host_ovs.yaml
user: ""
password: ""
-ovs_dpdk testcase update: ``<yardstick>/samples/vnf_samples/nsut/vfw/tc_ovs_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
+ovs_dpdk testcase update:
+``<yardstick>/samples/vnf_samples/nsut/vfw/tc_ovs_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``
Update "contexts" section
"""""""""""""""""""""""""
@@ -753,62 +757,309 @@ Update "contexts" section
gateway_ip: '152.16.100.20'
+Network Service Benchmarking - OpenStack with SR-IOV support
+============================================================
+
+This section describes how to run a Sample VNF test case, using Heat context,
+with SR-IOV. It also covers how to install OpenStack in Ubuntu 16.04, using
+DevStack, with SR-IOV support.
+
+
+Single node OpenStack setup with external TG
+--------------------------------------------
+
+.. code-block:: console
+
+ +----------------------------+
+ |OpenStack(DevStack) |
+ | |
+ | +--------------------+ |
+ | |sample-VNF VM | |
+ | | | |
+ | | DUT | |
+ | | (VNF) | |
+ | | | |
+ | +--------+ +--------+ |
+ | | VF NIC | | VF NIC | |
+ | +-----+--+--+----+---+ |
+ | ^ ^ |
+ | | | |
+ +----------+ +---------+----------+-------+
+ | | | VF0 VF1 |
+ | | | ^ ^ |
+ | | | | SUT | |
+ | TG | (PF0)<----->(PF0) +---------+ | |
+ | | | | |
+ | | (PF1)<----->(PF1) +--------------------+ |
+ | | | |
+ +----------+ +----------------------------+
+ trafficgen_1 host
+
+
+Host pre-configuration
+^^^^^^^^^^^^^^^^^^^^^^
+
+.. warning:: The following configuration requires sudo access to the system. Make
+ sure that your user have the access.
+
+Enable the Intel VT-d or AMD-Vi extension in the BIOS. Some system manufacturers
+disable this extension by default.
+
+Activate the Intel VT-d or AMD-Vi extension in the kernel by modifying the GRUB
+config file ``/etc/default/grub``.
+
+For the Intel platform:
+
+.. code:: bash
+
+ ...
+ GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"
+ ...
+
+For the AMD platform:
+
+.. code:: bash
+
+ ...
+ GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on"
+ ...
+
+Update the grub configuration file and restart the system:
+
+.. warning:: The following command will reboot the system.
+
+.. code:: bash
+
+ sudo update-grub
+ sudo reboot
+
+Make sure the extension has been enabled:
+
+.. code:: bash
+
+ sudo journalctl -b 0 | grep -e IOMMU -e DMAR
+
+ Feb 06 14:50:14 hostname kernel: ACPI: DMAR 0x000000006C406000 0001E0 (v01 INTEL S2600WF 00000001 INTL 20091013)
+ Feb 06 14:50:14 hostname kernel: DMAR: IOMMU enabled
+ Feb 06 14:50:14 hostname kernel: DMAR: Host address width 46
+ Feb 06 14:50:14 hostname kernel: DMAR: DRHD base: 0x000000d37fc000 flags: 0x0
+ Feb 06 14:50:14 hostname kernel: DMAR: dmar0: reg_base_addr d37fc000 ver 1:0 cap 8d2078c106f0466 ecap f020de
+ Feb 06 14:50:14 hostname kernel: DMAR: DRHD base: 0x000000e0ffc000 flags: 0x0
+ Feb 06 14:50:14 hostname kernel: DMAR: dmar1: reg_base_addr e0ffc000 ver 1:0 cap 8d2078c106f0466 ecap f020de
+ Feb 06 14:50:14 hostname kernel: DMAR: DRHD base: 0x000000ee7fc000 flags: 0x0
+
+Setup system proxy (if needed). Add the following configuration into the
+``/etc/environment`` file:
+
+.. note:: The proxy server name/port and IPs should be changed according to
+ actuall/current proxy configuration in the lab.
+
+.. code:: bash
+
+ export http_proxy=http://proxy.company.com:port
+ export https_proxy=http://proxy.company.com:port
+ export ftp_proxy=http://proxy.company.com:port
+ export no_proxy=localhost,127.0.0.1,company.com,<IP-OF-HOST1>,<IP-OF-HOST2>,...
+ export NO_PROXY=localhost,127.0.0.1,company.com,<IP-OF-HOST1>,<IP-OF-HOST2>,...
+
+Upgrade the system:
+
+.. code:: bash
+
+ sudo -EH apt-get update
+ sudo -EH apt-get upgrade
+ sudo -EH apt-get dist-upgrade
+
+Install dependencies needed for the DevStack
+
+.. code:: bash
+
+ sudo -EH apt-get install python
+ sudo -EH apt-get install python-dev
+ sudo -EH apt-get install python-pip
+
+Setup SR-IOV ports on the host:
+
+.. note:: The ``enp24s0f0``, ``enp24s0f0`` are physical function (PF) interfaces
+ on a host and ``enp24s0f3`` is a public interface used in OpenStack, so the
+ interface names should be changed according to the HW environment used for
+ testing.
+
+.. code:: bash
+
+ sudo ip link set dev enp24s0f0 up
+ sudo ip link set dev enp24s0f1 up
+ sudo ip link set dev enp24s0f3 up
+
+ # Create VFs on PF
+ echo 2 | sudo tee /sys/class/net/enp24s0f0/device/sriov_numvfs
+ echo 2 | sudo tee /sys/class/net/enp24s0f1/device/sriov_numvfs
+
+
+DevStack installation
+^^^^^^^^^^^^^^^^^^^^^
+
+Use official `Devstack <https://docs.openstack.org/devstack/pike/>`_
+documentation to install OpenStack on a host. Please note, that stable
+``pike`` branch of devstack repo should be used during the installation.
+The required `local.conf`` configuration file are described below.
+
+DevStack configuration file:
+
+.. note:: Update the devstack configuration file by replacing angluar brackets
+ with a short description inside.
+
+.. note:: Use ``lspci | grep Ether`` & ``lspci -n | grep <PCI ADDRESS>``
+ commands to get device and vendor id of the virtual function (VF).
+
+.. literalinclude:: code/single-devstack-local.conf
+ :language: console
+
+Start the devstack installation on a host.
+
+
+TG host configuration
+^^^^^^^^^^^^^^^^^^^^^
+
+Yardstick automatically install and configure Trex traffic generator on TG
+host based on provided POD file (see below). Anyway, it's recommended to check
+the compatibility of the installed NIC on the TG server with software Trex using
+the manual at https://trex-tgn.cisco.com/trex/doc/trex_manual.html.
+
+
+Run the Sample VNF test case
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+There is an example of Sample VNF test case ready to be executed in an
+OpenStack environment with SR-IOV support: ``samples/vnf_samples/nsut/vfw/
+tc_heat_sriov_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``.
+
+Install yardstick using `Install Yardstick (NSB Testing)`_ steps for OpenStack
+context.
+
+Create pod file for TG in the yardstick repo folder located in the yardstick
+container:
+
+.. note:: The ``ip``, ``user``, ``password`` and ``vpci`` fields show be changed
+ according to HW environment used for the testing. Use ``lshw -c network -businfo``
+ command to get the PF PCI address for ``vpci`` field.
+
+.. literalinclude:: code/single-yardstick-pod.conf
+ :language: console
+
+Run the Sample vFW RFC2544 SR-IOV TC (``samples/vnf_samples/nsut/vfw/
+tc_heat_sriov_external_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``) in the heat
+context using steps described in `NS testing - using yardstick CLI`_ section.
+
+
+Multi node OpenStack TG and VNF setup (two nodes)
+-------------------------------------------------
+
+.. code-block:: console
+
+ +----------------------------+ +----------------------------+
+ |OpenStack(DevStack) | |OpenStack(DevStack) |
+ | | | |
+ | +--------------------+ | | +--------------------+ |
+ | |sample-VNF VM | | | |sample-VNF VM | |
+ | | | | | | | |
+ | | TG | | | | DUT | |
+ | | trafficgen_1 | | | | (VNF) | |
+ | | | | | | | |
+ | +--------+ +--------+ | | +--------+ +--------+ |
+ | | VF NIC | | VF NIC | | | | VF NIC | | VF NIC | |
+ | +----+---+--+----+---+ | | +-----+--+--+----+---+ |
+ | ^ ^ | | ^ ^ |
+ | | | | | | | |
+ +--------+-----------+-------+ +---------+----------+-------+
+ | VF0 VF1 | | VF0 VF1 |
+ | ^ ^ | | ^ ^ |
+ | | SUT2 | | | | SUT1 | |
+ | | +-------+ (PF0)<----->(PF0) +---------+ | |
+ | | | | | |
+ | +-------------------+ (PF1)<----->(PF1) +--------------------+ |
+ | | | |
+ +----------------------------+ +----------------------------+
+ host2 (compute) host1 (controller)
+
+
+Controller/Compute pre-configuration
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Pre-configuration of the controller and compute hosts are the same as
+described in `Host pre-configuration`_ section. Follow the steps in the section.
+
+
+DevStack configuration
+^^^^^^^^^^^^^^^^^^^^^^
+
+Use official `Devstack <https://docs.openstack.org/devstack/pike/>`_
+documentation to install OpenStack on a host. Please note, that stable
+``pike`` branch of devstack repo should be used during the installation.
+The required `local.conf`` configuration file are described below.
+
+.. note:: Update the devstack configuration files by replacing angluar brackets
+ with a short description inside.
+
+.. note:: Use ``lspci | grep Ether`` & ``lspci -n | grep <PCI ADDRESS>``
+ commands to get device and vendor id of the virtual function (VF).
+
+DevStack configuration file for controller host:
+
+.. literalinclude:: code/multi-devstack-controller-local.conf
+ :language: console
+
+DevStack configuration file for compute host:
+
+.. literalinclude:: code/multi-devstack-compute-local.conf
+ :language: console
+
+Start the devstack installation on the controller and compute hosts.
+
+
+Run the sample vFW TC
+^^^^^^^^^^^^^^^^^^^^^
+
+Install yardstick using `Install Yardstick (NSB Testing)`_ steps for OpenStack
+context.
+
+Run sample vFW RFC2544 SR-IOV TC (``samples/vnf_samples/nsut/vfw/
+tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml``) in the heat
+context using steps described in `NS testing - using yardstick CLI`_ section
+and the following yardtick command line arguments:
+
+.. code:: bash
+
+ yardstick -d task start --task-args='{"provider": "sriov"}' \
+ samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml
+
+
Enabling other Traffic generator
---------------------------------
+================================
-IxLoad:
-^^^^^^^
+IxLoad
+^^^^^^
-1. Software needed: IxLoadAPI ``<IxLoadTclApi verson>Linux64.bin.tgz and <IxOS version>Linux64.bin.tar.gz`` (Download from ixia support site)
- Install - ``<IxLoadTclApi verson>Linux64.bin.tgz & <IxOS version>Linux64.bin.tar.gz``
- If the installation was not done inside the container, after installing the IXIA client,
- check /opt/ixia/ixload/<ver>/bin/ixloadpython and make sure you can run this cmd
- inside the yardstick container. Usually user is required to copy or link /opt/ixia/python/<ver>/bin/ixiapython
- to /usr/bin/ixiapython<ver> inside the container.
+1. Software needed: IxLoadAPI ``<IxLoadTclApi verson>Linux64.bin.tgz`` and
+ ``<IxOS version>Linux64.bin.tar.gz`` (Download from ixia support site)
+ Install - ``<IxLoadTclApi verson>Linux64.bin.tgz`` and
+ ``<IxOS version>Linux64.bin.tar.gz``
+ If the installation was not done inside the container, after installing
+ the IXIA client, check ``/opt/ixia/ixload/<ver>/bin/ixloadpython`` and make
+ sure you can run this cmd inside the yardstick container. Usually user is
+ required to copy or link ``/opt/ixia/python/<ver>/bin/ixiapython`` to
+ ``/usr/bin/ixiapython<ver>`` inside the container.
-2. Update pod_ixia.yaml file with ixia details.
+2. Update ``pod_ixia.yaml`` file with ixia details.
.. code-block:: console
cp <repo>/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia etc/yardstick/nodes/pod_ixia.yaml
- Config pod_ixia.yaml
+ Config ``pod_ixia.yaml``
- .. code-block:: yaml
-
-
- nodes:
- -
- name: trafficgen_1
- role: IxNet
- ip: 1.2.1.1 #ixia machine ip
- user: user
- password: r00t
- key_filename: /root/.ssh/id_rsa
- tg_config:
- ixchassis: "1.2.1.7" #ixia chassis ip
- tcl_port: "8009" # tcl server port
- lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
- root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
- py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
- dut_result_dir: "/mnt/ixia"
- version: 8.1
- interfaces:
- xe0: # logical name from topology.yaml and vnfd.yaml
- vpci: "2:5" # Card:port
- driver: "none"
- dpdk_port_num: 0
- local_ip: "152.16.100.20"
- netmask: "255.255.0.0"
- local_mac: "00:98:10:64:14:00"
- xe1: # logical name from topology.yaml and vnfd.yaml
- vpci: "2:6" # [(Card, port)]
- driver: "none"
- dpdk_port_num: 1
- local_ip: "152.40.40.20"
- netmask: "255.255.0.0"
- local_mac: "00:98:28:28:14:00"
+ .. literalinclude:: code/pod_ixia.yaml
+ :language: console
for sriov/ovs_dpdk pod files, please refer to above Standalone Virtualization for ovs-dpdk/sriov configuration
@@ -816,23 +1067,24 @@ IxLoad:
You will also need to configure the IxLoad machine to start the IXIA
IxosTclServer. This can be started like so:
- - Connect to the IxLoad machine using RDP
- - Go to:
- ``Start->Programs->Ixia->IxOS->IxOS 8.01-GA-Patch1->Ixia Tcl Server IxOS 8.01-GA-Patch1``
+ * Connect to the IxLoad machine using RDP
+ * Go to:
+ ``Start->Programs->Ixia->IxOS->IxOS 8.01-GA-Patch1->Ixia Tcl Server IxOS 8.01-GA-Patch1``
or
- ``"C:\Program Files (x86)\Ixia\IxOS\8.01-GA-Patch1\ixTclServer.exe"``
+ ``"C:\Program Files (x86)\Ixia\IxOS\8.01-GA-Patch1\ixTclServer.exe"``
+
+4. Create a folder ``Results`` in c:\ and share the folder on the network.
-4. Create a folder "Results" in c:\ and share the folder on the network.
+5. Execute testcase in samplevnf folder e.g.
+ ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml``
-5. execute testcase in samplevnf folder.
- eg ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_http_ixload_1b_Requests-65000_Concurrency.yaml``
+IxNetwork
+---------
-IxNetwork:
-^^^^^^^^^^
+IxNetwork testcases use IxNetwork API Python Bindings module, which is
+installed as part of the requirements of the project.
-1. Software needed: ``IxNetworkAPI<ixnetwork verson>Linux64.bin.tgz`` (Download from ixia support site)
- Install - ``IxNetworkAPI<ixnetwork verson>Linux64.bin.tgz``
-2. Update pod_ixia.yaml file with ixia details.
+1. Update ``pod_ixia.yaml`` file with ixia details.
.. code-block:: console
@@ -840,50 +1092,19 @@ IxNetwork:
Config pod_ixia.yaml
- .. code-block:: yaml
-
- nodes:
- -
- name: trafficgen_1
- role: IxNet
- ip: 1.2.1.1 #ixia machine ip
- user: user
- password: r00t
- key_filename: /root/.ssh/id_rsa
- tg_config:
- ixchassis: "1.2.1.7" #ixia chassis ip
- tcl_port: "8009" # tcl server port
- lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
- root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
- py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
- dut_result_dir: "/mnt/ixia"
- version: 8.1
- interfaces:
- xe0: # logical name from topology.yaml and vnfd.yaml
- vpci: "2:5" # Card:port
- driver: "none"
- dpdk_port_num: 0
- local_ip: "152.16.100.20"
- netmask: "255.255.0.0"
- local_mac: "00:98:10:64:14:00"
- xe1: # logical name from topology.yaml and vnfd.yaml
- vpci: "2:6" # [(Card, port)]
- driver: "none"
- dpdk_port_num: 1
- local_ip: "152.40.40.20"
- netmask: "255.255.0.0"
- local_mac: "00:98:28:28:14:00"
+ .. literalinclude:: code/pod_ixia.yaml
+ :language: console
for sriov/ovs_dpdk pod files, please refer to above Standalone Virtualization for ovs-dpdk/sriov configuration
-3. Start IxNetwork TCL Server
+2. Start IxNetwork TCL Server
You will also need to configure the IxNetwork machine to start the IXIA
IxNetworkTclServer. This can be started like so:
- - Connect to the IxNetwork machine using RDP
- - Go to: ``Start->Programs->Ixia->IxNetwork->IxNetwork 7.21.893.14 GA->IxNetworkTclServer`` (or ``IxNetworkApiServer``)
-
-4. execute testcase in samplevnf folder.
- eg ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml``
+ * Connect to the IxNetwork machine using RDP
+ * Go to:
+ ``Start->Programs->Ixia->IxNetwork->IxNetwork 7.21.893.14 GA->IxNetworkTclServer``
+ (or ``IxNetworkApiServer``)
+3. Execute testcase in samplevnf folder e.g.
+ ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_ixia.yaml``
diff --git a/docs/testing/user/userguide/13-nsb_operation.rst b/docs/testing/user/userguide/14-nsb-operation.rst
index 8c477fa3f..2e741822e 100644
--- a/docs/testing/user/userguide/13-nsb_operation.rst
+++ b/docs/testing/user/userguide/14-nsb-operation.rst
@@ -23,13 +23,14 @@ provider/external networks.
Provider networks
^^^^^^^^^^^^^^^^^
-The VNFs require a clear L2 connect to the external network in order to generate
-realistic traffic from multiple address ranges and port
+The VNFs require a clear L2 connect to the external network in order to
+generate realistic traffic from multiple address ranges and ports.
-In order to prevent Neutron from filtering traffic we have to disable Neutron Port Security.
-We also disable DHCP on the data ports because we are binding the ports to DPDK and do not need
-DHCP addresses. We also disable gateways because multiple default gateways can prevent SSH access
-to the VNF from the floating IP. We only want a gateway on the mgmt network
+In order to prevent Neutron from filtering traffic we have to disable Neutron
+Port Security. We also disable DHCP on the data ports because we are binding
+the ports to DPDK and do not need DHCP addresses. We also disable gateways
+because multiple default gateways can prevent SSH access to the VNF from the
+floating IP. We only want a gateway on the mgmt network
.. code-block:: yaml
@@ -42,8 +43,9 @@ to the VNF from the floating IP. We only want a gateway on the mgmt network
Heat Topologies
^^^^^^^^^^^^^^^
-By default Heat will attach every node to every Neutron network that is created.
-For scale-out tests we do not want to attach every node to every network.
+By default Heat will attach every node to every Neutron network that is
+created. For scale-out tests we do not want to attach every node to every
+network.
For each node you can specify which ports are on which network using the
network_ports dictionary.
@@ -85,11 +87,11 @@ In this example we have ``TRex xe0 <-> xe0 VNF xe1 <-> xe0 UDP_Replay``
Collectd KPIs
-------------
-NSB can collect KPIs from collected. We have support for various plugins enabled by the
-Barometer project.
+NSB can collect KPIs from collected. We have support for various plugins
+enabled by the Barometer project.
-The default yardstick-samplevnf has collectd installed. This allows for collecting KPIs
-from the VNF.
+The default yardstick-samplevnf has collectd installed. This allows for
+collecting KPIs from the VNF.
Collecting KPIs from the NFVi is more complicated and requires manual setup.
We assume that collectd is not installed on the compute nodes.
@@ -126,40 +128,80 @@ To collectd KPIs from the NFVi compute nodes:
Scale-Up
-------------------
+--------
VNFs performance data with scale-up
- * Helps to figure out optimal number of cores specification in the Virtual Machine template creation or VNF
+ * Helps to figure out optimal number of cores specification in the Virtual
+ Machine template creation or VNF
* Helps in comparison between different VNF vendor offerings
- * Better the scale-up index, indicates the performance scalability of a particular solution
+ * Better the scale-up index, indicates the performance scalability of a
+ particular solution
Heat
^^^^
-
-For VNF scale-up tests we increase the number for VNF worker threads. In the case of VNFs
-we also need to increase the number of VCPUs and memory allocated to the VNF.
+For VNF scale-up tests we increase the number for VNF worker threads. In the
+case of VNFs we also need to increase the number of VCPUs and memory allocated
+to the VNF.
An example scale-up Heat testcase is:
+.. literalinclude:: /submodules/yardstick/samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_scale-up.yaml
+ :language: yaml
+
+This testcase template requires specifying the number of VCPUs, Memory and Ports.
+We set the VCPUs and memory using the ``--task-args`` options
+
.. code-block:: console
- <repo>/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml
+ yardstick task start --task-args='{"mem": 10480, "vcpus": 4, "ports": 2}' \
+ samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_scale-up.yaml
-This testcase template requires specifying the number of VCPUs and Memory.
-We set the VCPUs and memory using the --task-args options
+In order to support ports scale-up, traffic and topology templates need to be used in testcase.
-.. code-block:: console
+A example topology template is:
+
+.. literalinclude:: /submodules/yardstick/samples/vnf_samples/nsut/vfw/vfw-tg-topology-scale-up.yaml
+ :language: yaml
+
+This template has ``vports`` as an argument. To pass this argument it needs to
+be configured in ``extra_args`` scenario definition. Please note that more
+argument can be defined in that section. All of them will be passed to topology
+and traffic profile templates
+
+For example:
+
+.. code-block:: yaml
- yardstick --debug task start --task-args='{"mem": 20480, "vcpus": 10}' samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml
+ schema: yardstick:task:0.1
+ scenarios:
+ - type: NSPerf
+ traffic_profile: ../../traffic_profiles/ipv4_throughput-scale-up.yaml
+ extra_args:
+ vports: {{ vports }}
+ topology: vfw-tg-topology-scale-up.yaml
+
+A example traffic profile template is:
+
+.. literalinclude:: /submodules/yardstick/samples/vnf_samples/traffic_profiles/ipv4_throughput-scale-up.yaml
+ :language: yaml
+
+There is an option to provide predefined config for SampleVNFs. Path to config
+file may by specified in ``vnf_config`` scenario section.
+
+.. code-block:: yaml
+
+ vnf__0:
+ rules: acl_1rule.yaml
+ vnf_config: {lb_config: 'SW', file: vfw_vnf_pipeline_cores_4_ports_2_lb_1_sw.conf }
Baremetal
^^^^^^^^^
1. Follow above traffic generator section to setup.
- 2. edit num of threads in ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml``
-
- e.g, 6 Threads for given VNF
+ 2. Edit num of threads in
+ ``<repo>/samples/vnf_samples/nsut/vfw/tc_baremetal_rfc2544_ipv4_1rule_1flow_64B_trex_scale_up.yaml``
+ e.g, 6 Threads for given VNF
.. code-block:: yaml
@@ -202,11 +244,12 @@ Baremetal
Scale-Out
--------------------
-VNFs performance data with scale-out
+VNFs performance data with scale-out helps
- * Helps in capacity planning to meet the given network node requirements
- * Helps in comparison between different VNF vendor offerings
- * Better the scale-out index, provides the flexibility in meeting future capacity requirements
+ * in capacity planning to meet the given network node requirements
+ * in comparison between different VNF vendor offerings
+ * better the scale-out index, provides the flexibility in meeting future
+ capacity requirements
Standalone
@@ -236,7 +279,8 @@ Scale-out not supported on Baremetal.
Heat
^^^^
-There are sample scale-out all-VM Heat tests. These tests only use VMs and don't use external traffic.
+There are sample scale-out all-VM Heat tests. These tests only use VMs and
+don't use external traffic.
The tests use UDP_Replay and correlated traffic.
@@ -250,11 +294,14 @@ To run the test you need to increase OpenStack CPU, Memory and Port quotas.
Traffic Generator tuning
------------------------
-The TRex traffic generator can be setup to use multiple threads per core, this is for multiqueue testing.
+The TRex traffic generator can be setup to use multiple threads per core, this
+is for multiqueue testing.
-TRex does not automatically enable multiple threads because we currently cannot detect the number of queues on a device.
+TRex does not automatically enable multiple threads because we currently cannot
+detect the number of queues on a device.
-To enable multiple queue set the queues_per_port value in the TG VNF options section.
+To enable multiple queue set the ``queues_per_port`` value in the TG VNF
+options section.
.. code-block:: yaml
@@ -266,5 +313,3 @@ To enable multiple queue set the queues_per_port value in the TG VNF options sec
options:
tg_0:
queues_per_port: 2
-
-
diff --git a/docs/testing/user/userguide/15-list-of-tcs.rst b/docs/testing/user/userguide/15-list-of-tcs.rst
index 47526cdda..678f0f9a9 100644
--- a/docs/testing/user/userguide/15-list-of-tcs.rst
+++ b/docs/testing/user/userguide/15-list-of-tcs.rst
@@ -14,11 +14,11 @@ This chapter lists available Yardstick test cases.
Yardstick test cases are divided in two main categories:
* *Generic NFVI Test Cases* - Test Cases developed to realize the methodology
-described in :doc:`02-methodology`
+ described in :doc:`02-methodology`
* *OPNFV Feature Test Cases* - Test Cases developed to verify one or more
-aspect of a feature delivered by an OPNFV Project, including the test cases
-developed for the :term:`VTC`.
+ aspect of a feature delivered by an OPNFV Project, including the test cases
+ developed for the :term:`VTC`.
Generic NFVI Test Case Descriptions
===================================
@@ -83,6 +83,7 @@ H A
opnfv_yardstick_tc056.rst
opnfv_yardstick_tc057.rst
opnfv_yardstick_tc058.rst
+ opnfv_yardstick_tc087.rst
IPv6
----
@@ -108,8 +109,8 @@ Parser
opnfv_yardstick_tc040.rst
- StorPerf
------------
+StorPerf
+--------
.. toctree::
:maxdepth: 1
diff --git a/docs/testing/user/userguide/code/multi-devstack-compute-local.conf b/docs/testing/user/userguide/code/multi-devstack-compute-local.conf
new file mode 100644
index 000000000..b0b3cc5d4
--- /dev/null
+++ b/docs/testing/user/userguide/code/multi-devstack-compute-local.conf
@@ -0,0 +1,53 @@
+[[local|localrc]]
+HOST_IP=<HOST_IP_ADDRESS>
+MYSQL_PASSWORD=password
+DATABASE_PASSWORD=password
+RABBIT_PASSWORD=password
+ADMIN_PASSWORD=password
+SERVICE_PASSWORD=password
+HORIZON_PASSWORD=password
+# Controller node
+SERVICE_HOST=<CONTROLLER_IP_ADDRESS>
+MYSQL_HOST=$SERVICE_HOST
+RABBIT_HOST=$SERVICE_HOST
+GLANCE_HOSTPORT=$SERVICE_HOST:9292
+
+# Internet access.
+RECLONE=False
+PIP_UPGRADE=True
+IP_VERSION=4
+
+# Neutron
+enable_plugin neutron https://git.openstack.org/openstack/neutron.git stable/pike
+
+# Services
+ENABLED_SERVICES=n-cpu,rabbit,q-agt,placement-api,q-sriov-agt
+
+# Neutron Options
+PUBLIC_INTERFACE=<PUBLIC INTERFACE>
+
+# ML2 Configuration
+Q_PLUGIN=ml2
+Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,sriovnicswitch
+Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,flat,local,vxlan,gre,geneve
+
+# Open vSwitch provider networking configuration
+PHYSICAL_DEVICE_MAPPINGS=physnet1:<PF0_IFNAME>,physnet2:<PF1_IFNAME>
+
+
+[[post-config|$NOVA_CONF]]
+[DEFAULT]
+scheduler_default_filters=RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter
+# Whitelist PCI devices
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF0_IFNAME>\\", \\"physical_network\\": \\"physnet1\\" }
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF1_IFNAME>\\", \\"physical_network\\": \\"physnet2\\" }
+
+[libvirt]
+cpu_mode = host-model
+
+
+# ML2 plugin bits for SR-IOV enablement of Intel Corporation XL710/X710 Virtual Function
+[[post-config|/$Q_PLUGIN_CONF_FILE]]
+[ml2_sriov]
+agent_required = True
+supported_pci_vendor_devs = <VF_DEV_ID:VF_VEN_ID>
diff --git a/docs/testing/user/userguide/code/multi-devstack-controller-local.conf b/docs/testing/user/userguide/code/multi-devstack-controller-local.conf
new file mode 100644
index 000000000..fb61cdcbd
--- /dev/null
+++ b/docs/testing/user/userguide/code/multi-devstack-controller-local.conf
@@ -0,0 +1,64 @@
+[[local|localrc]]
+HOST_IP=<HOST_IP_ADDRESS>
+ADMIN_PASSWORD=password
+MYSQL_PASSWORD=$ADMIN_PASSWORD
+DATABASE_PASSWORD=$ADMIN_PASSWORD
+RABBIT_PASSWORD=$ADMIN_PASSWORD
+SERVICE_PASSWORD=$ADMIN_PASSWORD
+HORIZON_PASSWORD=$ADMIN_PASSWORD
+# Controller node
+SERVICE_HOST=$HOST_IP
+MYSQL_HOST=$SERVICE_HOST
+RABBIT_HOST=$SERVICE_HOST
+GLANCE_HOSTPORT=$SERVICE_HOST:9292
+
+# Internet access.
+RECLONE=False
+PIP_UPGRADE=True
+IP_VERSION=4
+
+# Services
+disable_service n-net
+ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-sriov-agt
+
+# Heat
+enable_plugin heat https://git.openstack.org/openstack/heat stable/pike
+
+# Neutron
+enable_plugin neutron https://git.openstack.org/openstack/neutron.git stable/pike
+
+# Neutron Options
+FLOATING_RANGE=<RANGE_IN_THE_PUBLIC_INTERFACE_NETWORK>
+Q_FLOATING_ALLOCATION_POOL=start=<START_IP_ADDRESS>,end=<END_IP_ADDRESS>
+PUBLIC_NETWORK_GATEWAY=<PUBLIC_NETWORK_GATEWAY>
+PUBLIC_INTERFACE=<PUBLIC INTERFACE>
+
+# ML2 Configuration
+Q_PLUGIN=ml2
+Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,sriovnicswitch
+Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,flat,local,vxlan,gre,geneve
+
+# Open vSwitch provider networking configuration
+Q_USE_PROVIDERNET_FOR_PUBLIC=True
+OVS_PHYSICAL_BRIDGE=br-ex
+OVS_BRIDGE_MAPPINGS=public:br-ex
+PHYSICAL_DEVICE_MAPPINGS=physnet1:<PF0_IFNAME>,physnet2:<PF1_IFNAME>
+PHYSICAL_NETWORK=physnet1,physnet2
+
+
+[[post-config|$NOVA_CONF]]
+[DEFAULT]
+scheduler_default_filters=RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter
+# Whitelist PCI devices
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF0_IFNAME>\\", \\"physical_network\\": \\"physnet1\\" }
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF1_IFNAME>\\", \\"physical_network\\": \\"physnet2\\" }
+
+[libvirt]
+cpu_mode = host-model
+
+
+# ML2 plugin bits for SR-IOV enablement of Intel Corporation XL710/X710 Virtual Function
+[[post-config|/$Q_PLUGIN_CONF_FILE]]
+[ml2_sriov]
+agent_required = True
+supported_pci_vendor_devs = <VF_DEV_ID:VF_VEN_ID>
diff --git a/docs/testing/user/userguide/code/pod_ixia.yaml b/docs/testing/user/userguide/code/pod_ixia.yaml
new file mode 100644
index 000000000..4ab56fe4e
--- /dev/null
+++ b/docs/testing/user/userguide/code/pod_ixia.yaml
@@ -0,0 +1,31 @@
+nodes:
+-
+ name: trafficgen_1
+ role: IxNet
+ ip: 1.2.1.1 #ixia machine ip
+ user: user
+ password: r00t
+ key_filename: /root/.ssh/id_rsa
+ tg_config:
+ ixchassis: "1.2.1.7" #ixia chassis ip
+ tcl_port: "8009" # tcl server port
+ lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
+ root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
+ py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
+ dut_result_dir: "/mnt/ixia"
+ version: 8.1
+ interfaces:
+ xe0: # logical name from topology.yaml and vnfd.yaml
+ vpci: "2:5" # Card:port
+ driver: "none"
+ dpdk_port_num: 0
+ local_ip: "152.16.100.20"
+ netmask: "255.255.0.0"
+ local_mac: "00:98:10:64:14:00"
+ xe1: # logical name from topology.yaml and vnfd.yaml
+ vpci: "2:6" # [(Card, port)]
+ driver: "none"
+ dpdk_port_num: 1
+ local_ip: "152.40.40.20"
+ netmask: "255.255.0.0"
+ local_mac: "00:98:28:28:14:00"
diff --git a/docs/testing/user/userguide/code/single-devstack-local.conf b/docs/testing/user/userguide/code/single-devstack-local.conf
new file mode 100644
index 000000000..4c44f729d
--- /dev/null
+++ b/docs/testing/user/userguide/code/single-devstack-local.conf
@@ -0,0 +1,62 @@
+[[local|localrc]]
+HOST_IP=<HOST_IP_ADDRESS>
+ADMIN_PASSWORD=password
+MYSQL_PASSWORD=$ADMIN_PASSWORD
+DATABASE_PASSWORD=$ADMIN_PASSWORD
+RABBIT_PASSWORD=$ADMIN_PASSWORD
+SERVICE_PASSWORD=$ADMIN_PASSWORD
+HORIZON_PASSWORD=$ADMIN_PASSWORD
+
+# Internet access.
+RECLONE=False
+PIP_UPGRADE=True
+IP_VERSION=4
+
+# Services
+disable_service n-net
+ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt,q-sriov-agt
+
+# Heat
+enable_plugin heat https://git.openstack.org/openstack/heat stable/pike
+
+# Neutron
+enable_plugin neutron https://git.openstack.org/openstack/neutron.git stable/pike
+
+# Neutron Options
+FLOATING_RANGE=<RANGE_IN_THE_PUBLIC_INTERFACE_NETWORK>
+Q_FLOATING_ALLOCATION_POOL=start=<START_IP_ADDRESS>,end=<END_IP_ADDRESS>
+PUBLIC_NETWORK_GATEWAY=<PUBLIC_NETWORK_GATEWAY>
+PUBLIC_INTERFACE=<PUBLIC INTERFACE>
+
+# ML2 Configuration
+Q_PLUGIN=ml2
+Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,sriovnicswitch
+Q_ML2_PLUGIN_TYPE_DRIVERS=vlan,flat,local,vxlan,gre,geneve
+
+# Open vSwitch provider networking configuration
+Q_USE_PROVIDERNET_FOR_PUBLIC=True
+OVS_PHYSICAL_BRIDGE=br-ex
+OVS_BRIDGE_MAPPINGS=public:br-ex
+PHYSICAL_DEVICE_MAPPINGS=physnet1:<PF0_IFNAME>,physnet2:<PF1_IFNAME>
+PHYSICAL_NETWORK=physnet1,physnet2
+
+
+[[post-config|$NOVA_CONF]]
+[DEFAULT]
+scheduler_default_filters=RamFilter,ComputeFilter,AvailabilityZoneFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,PciPassthroughFilter
+# Whitelist PCI devices
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF0_IFNAME>\\", \\"physical_network\\": \\"physnet1\\" }
+pci_passthrough_whitelist = {\\"devname\\": \\"<PF1_IFNAME>\\", \\"physical_network\\": \\"physnet2\\" }
+
+[filter_scheduler]
+enabled_filters = RetryFilter,AvailabilityZoneFilter,RamFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter
+
+[libvirt]
+cpu_mode = host-model
+
+
+# ML2 plugin bits for SR-IOV enablement of Intel Corporation XL710/X710 Virtual Function
+[[post-config|/$Q_PLUGIN_CONF_FILE]]
+[ml2_sriov]
+agent_required = True
+supported_pci_vendor_devs = <VF_DEV_ID:VF_VEN_ID>
diff --git a/docs/testing/user/userguide/code/single-yardstick-pod.conf b/docs/testing/user/userguide/code/single-yardstick-pod.conf
new file mode 100644
index 000000000..421246d60
--- /dev/null
+++ b/docs/testing/user/userguide/code/single-yardstick-pod.conf
@@ -0,0 +1,22 @@
+nodes:
+-
+ name: trafficgen_1
+ role: tg__0
+ ip: <TG-HOST-IP>
+ user: <TG-USER>
+ password: <TG-PASS>
+ interfaces:
+ xe0: # logical name from topology.yaml and vnfd.yaml
+ vpci: "0000:18:00.0"
+ driver: i40e # default kernel driver
+ dpdk_port_num: 0
+ local_ip: "10.1.1.150"
+ netmask: "255.255.255.0"
+ local_mac: "00:00:00:00:00:01"
+ xe1: # logical name from topology.yaml and vnfd.yaml
+ vpci: "0000:18:00.1"
+ driver: i40e # default kernel driver
+ dpdk_port_num: 1
+ local_ip: "10.1.1.151"
+ netmask: "255.255.255.0"
+ local_mac: "00:00:00:00:00:02"
diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst
index 61e157e52..b936e723d 100644
--- a/docs/testing/user/userguide/index.rst
+++ b/docs/testing/user/userguide/index.rst
@@ -17,15 +17,16 @@ Yardstick User Guide
02-methodology
03-architecture
04-installation
- 05-yardstick_plugin
- 06-result-store-InfluxDB
- 07-grafana
- 08-api
- 09-yardstick_user_interface
- 10-vtc-overview
- 11-nsb-overview
- 12-nsb_installation
- 13-nsb_operation
+ 05-operation
+ 06-yardstick-plugin
+ 07-result-store-InfluxDB
+ 08-grafana
+ 09-api
+ 10-yardstick-user-interface
+ 11-vtc-overview
+ 12-nsb-overview
+ 13-nsb-installation
+ 14-nsb-operation
15-list-of-tcs
nsb/nsb-list-of-tcs
glossary
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc019.rst b/docs/testing/user/userguide/opnfv_yardstick_tc019.rst
index 57e8ddf79..8d79e011a 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc019.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc019.rst
@@ -125,7 +125,12 @@ Yardstick Test Case Description TC019
+--------------+--------------------------------------------------------------+
|post-action | It is the action when the test cases exist. It will check |
| | the status of the specified process on the host, and restart |
-| | the process if it is not running for next test cases |
+| | the process if it is not running for next test cases. |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc045.rst b/docs/testing/user/userguide/opnfv_yardstick_tc045.rst
index 0b0993c34..378176090 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc045.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc045.rst
@@ -128,9 +128,14 @@ Yardstick Test Case Description TC045
| | Result: The test case is passed or not. |
| | |
+--------------+--------------------------------------------------------------+
-|post-action | It is the action when the test cases exist. It will check the|
-| | status of the specified process on the host, and restart the |
-| | process if it is not running for next test cases |
+|post-action | It is the action when the test cases exist. It will check |
+| | the status of the specified process on the host, and restart |
+| | the process if it is not running for next test cases. |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc046.rst b/docs/testing/user/userguide/opnfv_yardstick_tc046.rst
index cce6c6884..5308c8e7b 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc046.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc046.rst
@@ -127,9 +127,14 @@ Yardstick Test Case Description TC046
| | Result: The test case is passed or not. |
| | |
+--------------+--------------------------------------------------------------+
-|post-action | It is the action when the test cases exist. It will check the|
-| | status of the specified process on the host, and restart the |
-| | process if it is not running for next test cases |
+|post-action | It is the action when the test cases exist. It will check |
+| | the status of the specified process on the host, and restart |
+| | the process if it is not running for next test cases. |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc047.rst b/docs/testing/user/userguide/opnfv_yardstick_tc047.rst
index 95158cfd6..bb8ffc6ab 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc047.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc047.rst
@@ -128,9 +128,14 @@ Yardstick Test Case Description TC047
| | Result: The test case is passed or not. |
| | |
+--------------+--------------------------------------------------------------+
-|post-action | It is the action when the test cases exist. It will check the|
-| | status of the specified process on the host, and restart the |
-| | process if it is not running for next test cases |
+|post-action | It is the action when the test cases exist. It will check |
+| | the status of the specified process on the host, and restart |
+| | the process if it is not running for next test cases. |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc048.rst b/docs/testing/user/userguide/opnfv_yardstick_tc048.rst
index 21c00d1fe..1bf627282 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc048.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc048.rst
@@ -128,9 +128,14 @@ Yardstick Test Case Description TC048
| | Result: The test case is passed or not. |
| | |
+--------------+--------------------------------------------------------------+
-|post-action | It is the action when the test cases exist. It will check the|
-| | status of the specified process on the host, and restart the |
-| | process if it is not running for next test cases |
+|post-action | It is the action when the test cases exist. It will check |
+| | the status of the specified process on the host, and restart |
+| | the process if it is not running for next test case |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc049.rst b/docs/testing/user/userguide/opnfv_yardstick_tc049.rst
index f58bb9989..12ed94b7d 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc049.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc049.rst
@@ -128,9 +128,14 @@ Yardstick Test Case Description TC049
| | Result: The test case is passed or not. |
| | |
+--------------+--------------------------------------------------------------+
-|post-action | It is the action when the test cases exist. It will check the|
-| | status of the specified process on the host, and restart the |
-| | process if it is not running for next test cases |
+|post-action | It is the action when the test cases exist. It will check |
+| | the status of the specified process on the host, and restart |
+| | the process if it is not running for next test cases. |
+| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc050.rst b/docs/testing/user/userguide/opnfv_yardstick_tc050.rst
index 8890c9d53..82a491b72 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc050.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc050.rst
@@ -34,23 +34,20 @@ Yardstick Test Case Description TC050
| | 2) host: which is the name of a control node being attacked. |
| | 3) interface: the network interface to be turned off. |
| | |
-| | There are four instance of the "close-interface" monitor: |
-| | attacker1(for public netork): |
-| | -fault_type: "close-interface" |
-| | -host: node1 |
-| | -interface: "br-ex" |
-| | attacker2(for management netork): |
-| | -fault_type: "close-interface" |
-| | -host: node1 |
-| | -interface: "br-mgmt" |
-| | attacker3(for storage netork): |
-| | -fault_type: "close-interface" |
-| | -host: node1 |
-| | -interface: "br-storage" |
-| | attacker4(for private netork): |
-| | -fault_type: "close-interface" |
-| | -host: node1 |
-| | -interface: "br-mesh" |
+| | The interface to be closed by the attacker can be set by the |
+| | variable of "{{ interface_name }}" |
+| | |
+| | attackers: |
+| | - |
+| | fault_type: "general-attacker" |
+| | host: {{ attack_host }} |
+| | key: "close-br-public" |
+| | attack_key: "close-interface" |
+| | action_parameter: |
+| | interface: {{ interface_name }} |
+| | rollback_parameter: |
+| | interface: {{ interface_name }} |
+| | |
+--------------+--------------------------------------------------------------+
|monitors | In this test case, the monitor named "openstack-cmd" is |
| | needed. The monitor needs needs two parameters: |
@@ -61,17 +58,17 @@ Yardstick Test Case Description TC050
| | |
| | There are four instance of the "openstack-cmd" monitor: |
| | monitor1: |
-| | -monitor_type: "openstack-cmd" |
-| | -command_name: "nova image-list" |
+| | - monitor_type: "openstack-cmd" |
+| | - command_name: "nova image-list" |
| | monitor2: |
-| | -monitor_type: "openstack-cmd" |
-| | -command_name: "neutron router-list" |
+| | - monitor_type: "openstack-cmd" |
+| | - command_name: "neutron router-list" |
| | monitor3: |
-| | -monitor_type: "openstack-cmd" |
-| | -command_name: "heat stack-list" |
+| | - monitor_type: "openstack-cmd" |
+| | - command_name: "heat stack-list" |
| | monitor4: |
-| | -monitor_type: "openstack-cmd" |
-| | -command_name: "cinder list" |
+| | - monitor_type: "openstack-cmd" |
+| | - command_name: "cinder list" |
+--------------+--------------------------------------------------------------+
|metrics | In this test case, there is one metric: |
| | 1)service_outage_time: which indicates the maximum outage |
@@ -109,9 +106,9 @@ Yardstick Test Case Description TC050
+--------------+--------------------------------------------------------------+
|step 2 | do attacker: connect the host through SSH, and then execute |
| | the turnoff network interface script with param value |
-| | specified by "interface". |
+| | specified by "{{ interface_name }}". |
| | |
-| | Result: Network interfaces will be turned down. |
+| | Result: The specified network interface will be down. |
| | |
+--------------+--------------------------------------------------------------+
|step 3 | stop monitors after a period of time specified by |
@@ -133,3 +130,4 @@ Yardstick Test Case Description TC050
| | execution problem. |
| | |
+--------------+--------------------------------------------------------------+
+
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc053.rst b/docs/testing/user/userguide/opnfv_yardstick_tc053.rst
index 3c6bbc628..7308babb8 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc053.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc053.rst
@@ -135,6 +135,11 @@ Yardstick Test Case Description TC053
| | the status of the specified process on the host, and restart |
| | the process if it is not running for next test cases. |
| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
+| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
| | execution problem. |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc056.rst b/docs/testing/user/userguide/opnfv_yardstick_tc056.rst
index 09b866c34..cd8cc2f20 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc056.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc056.rst
@@ -142,6 +142,11 @@ Yardstick Test Case Description TC056
| | the status of the specified process on the host, and restart |
| | the process if it is not running for next test cases. |
| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
+| | |
+--------------+--------------------------------------------------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
| | execution problem. |
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc057.rst b/docs/testing/user/userguide/opnfv_yardstick_tc057.rst
index bb42b2aae..1bb43c9e7 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc057.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc057.rst
@@ -162,8 +162,14 @@ Yardstick Test Case Description TC057
|post-action | It is the action when the test cases exist. It will check |
| | the status of the cluster messaging process(corosync) on the |
| | host, and restart the process if it is not running for next |
-| | test cases |
+| | test cases. |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
+| | |
+--------------+------+----------------------------------+--------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
| | execution problem. |
+| | |
+--------------+--------------------------------------------------------------+
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc058.rst b/docs/testing/user/userguide/opnfv_yardstick_tc058.rst
index 7c323e913..9e8427b50 100644
--- a/docs/testing/user/userguide/opnfv_yardstick_tc058.rst
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc058.rst
@@ -109,8 +109,9 @@ Yardstick Test Case Description TC058
|conditions | with cachestat included in the image. |
| | |
+--------------+--------------------------------------------------------------+
-|step 1 | Two host VMs are booted, these two hosts are in two different|
-| | networks, the networks are connected by a virtual router |
+|step 1 | Two host VMs are booted, these two hosts are in two |
+| | different networks, the networks are connected by a virtual |
+| | router. |
| | |
+--------------+--------------------------------------------------------------+
|step 1 | start monitors: |
@@ -143,7 +144,13 @@ Yardstick Test Case Description TC058
| | Virtual machines and network created in the test case will |
| | be destoryed. |
| | |
+| | Notice: This post-action uses 'lsb_release' command to check |
+| | the host linux distribution and determine the OpenStack |
+| | service name to restart the process. Lack of 'lsb_release' |
+| | on the host may cause failure to restart the process. |
+| | |
+--------------+------+----------------------------------+--------------------+
|test verdict | Fails only if SLA is not passed, or if there is a test case |
| | execution problem. |
+| | |
+--------------+--------------------------------------------------------------+
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc087.rst b/docs/testing/user/userguide/opnfv_yardstick_tc087.rst
new file mode 100644
index 000000000..99bfeebfc
--- /dev/null
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc087.rst
@@ -0,0 +1,182 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Ericsson and others.
+
+*************************************
+Yardstick Test Case Description TC087
+*************************************
+
++-----------------------------------------------------------------------------+
+|SDN Controller resilience in non-HA configuration |
+| |
++--------------+--------------------------------------------------------------+
+|test case id | OPNFV_YARDSTICK_TC087: SDN controller resilience in |
+| | non-HA configuration |
+| | |
++--------------+--------------------------------------------------------------+
+|test purpose | This test validates that network data plane services are |
+| | highly available in the event of an SDN Controller failure, |
+| | even if the SDN controller is deployed in a non-HA |
+| | configuration. Specifically, the test verifies that |
+| | existing data plane connectivity is not impacted, i.e. all |
+| | configured network services such as DHCP, ARP, L2, |
+| | L3 Security Groups should continue to operate |
+| | between the existing VMs while the SDN controller is |
+| | offline or rebooting. |
+| | |
+| | The test also validates that new network service operations |
+| | (creating a new VM in the existing L2/L3 network or in a new |
+| | network, etc.) are operational after the SDN controller |
+| | has recovered from a failure. |
+| | |
++--------------+--------------------------------------------------------------+
+|test method | This test case fails the SDN controller service running |
+| | on the OpenStack controller node, then checks if already |
+| | configured DHCP/ARP/L2/L3/SNAT connectivity is not |
+| | impacted between VMs and the system is able to execute |
+| | new virtual network operations once the SDN controller |
+| | is restarted and has fully recovered |
+| | |
++--------------+--------------------------------------------------------------+
+|attackers | In this test case, an attacker called “kill-process” is |
+| | needed. This attacker includes three parameters: |
+| | 1. fault_type: which is used for finding the attacker's |
+| | scripts. It should be set to 'kill-process' in this test |
+| | |
+| | 2. process_name: should be set to the name of the SDN |
+| | controller process |
+| | |
+| | 3. host: which is the name of a control node where the |
+| | SDN controller process is running |
+| | |
+| | e.g. -fault_type: "kill-process" |
+| | -process_name: "opendaylight" |
+| | -host: node1 |
+| | |
++--------------+--------------------------------------------------------------+
+|monitors | This test case utilizes two monitors of type "ip-status" |
+| | and one monitor of type "process" to track the following |
+| | conditions: |
+| | 1. "ping_same_network_l2": monitor ICMP traffic between |
+| | VMs in the same Neutron network |
+| | |
+| | 2. "ping_external_snat": monitor ICMP traffic from VMs to |
+| | an external host on the Internet to verify SNAT |
+| | functionality. |
+| | |
+| | 3. "SDN controller process monitor": a monitor checking the |
+| | state of a specified SDN controller process. It measures |
+| | the recovery time of the given process. |
+| | |
+| | Monitors of type "ip-status" use the "ping" utility to |
+| | verify reachability of a given target IP. |
+| | |
++--------------+--------------------------------------------------------------+
+|operations | In this test case, the following operations are needed: |
+| | 1. "nova-create-instance-in_network": create a VM instance |
+| | in one of the existing Neutron network. |
+| | |
++--------------+--------------------------------------------------------------+
+|metrics | In this test case, there are two metrics: |
+| | 1. process_recover_time: which indicates the maximun |
+| | time (seconds) from the process being killed to |
+| | recovered |
+| | |
+| | 2. packet_drop: measure the packets that have been dropped |
+| | by the monitors using pktgen. |
+| | |
++--------------+--------------------------------------------------------------+
+|test tool | Developed by the project. Please see folder: |
+| | "yardstick/benchmark/scenarios/availability/ha_tools" |
+| | |
++--------------+--------------------------------------------------------------+
+|references | none |
+| | |
++--------------+--------------------------------------------------------------+
+|configuration | This test case needs two configuration files: |
+| | 1. test case file: opnfv_yardstick_tc087.yaml |
+| | - Attackers: see above “attackers” discription |
+| | - waiting_time: which is the time (seconds) from the |
+| | process being killed to stoping monitors the monitors |
+| | - Monitors: see above “monitors” discription |
+| | - SLA: see above “metrics” discription |
+| | |
+| | 2. POD file: pod.yaml The POD configuration should record |
+| | on pod.yaml first. the “host” item in this test case |
+| | will use the node name in the pod.yaml. |
+| | |
++--------------+--------------------------------------------------------------+
+|test sequence | Description and expected result |
+| | |
++--------------+--------------------------------------------------------------+
+|pre-action | 1. The OpenStack cluster is set up with a single SDN |
+| | controller in a non-HA configuration. |
+| | |
+| | 2. One or more Neutron networks are created with two or |
+| | more VMs attached to each of the Neutron networks. |
+| | |
+| | 3. The Neutron networks are attached to a Neutron router |
+| | which is attached to an external network towards the |
+| | DCGW. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 1 | Start IP connectivity monitors: |
+| | 1. Check the L2 connectivity between the VMs in the same |
+| | Neutron network. |
+| | |
+| | 2. Check connectivity from one VM to an external host on |
+| | the Internet to verify SNAT functionality.
+| | |
+| | Result: The monitor info will be collected. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 2 | Start attacker: |
+| | SSH connect to the VIM node and kill the SDN controller |
+| | process |
+| | |
+| | Result: the SDN controller service will be shutdown |
+| | |
++--------------+--------------------------------------------------------------+
+|step 3 | Verify the results of the IP connectivity monitors. |
+| | |
+| | Result: The outage_time metric reported by the monitors |
+| | is zero. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 4 | Restart the SDN controller. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 5 | Create a new VM in the existing Neutron network |
+| | |
++--------------+--------------------------------------------------------------+
+|step 6 | Verify connectivity between VMs as follows: |
+| | 1. Check the L2 connectivity between the previously |
+| | existing VM and the newly created VM on the same |
+| | Neutron network by sending ICMP messages |
+| | |
++--------------+--------------------------------------------------------------+
+|step 7 | Stop IP connectivity monitors after a period of time |
+| | specified by “waiting_time” |
+| | |
+| | Result: The monitor info will be aggregated |
+| | |
++--------------+--------------------------------------------------------------+
+|step 8 | Verify the IP connectivity monitor results |
+| | |
+| | Result: IP connectivity monitor should not have any packet |
+| | drop failures reported |
+| | |
++--------------+--------------------------------------------------------------+
+|test verdict | This test fails if the SLAs are not met or if there is a |
+| | test case execution problem. The SLAs are define as follows |
+| | for this test: |
+| | * SDN Controller recovery |
+| | * process_recover_time <= 30 sec |
+| | |
+| | * no impact on data plane connectivity during SDN |
+| | controller failure and recovery. |
+| | * packet_drop == 0 |
+| | |
++--------------+--------------------------------------------------------------+
+
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc090.rst b/docs/testing/user/userguide/opnfv_yardstick_tc090.rst
new file mode 100644
index 000000000..1f8747b2b
--- /dev/null
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc090.rst
@@ -0,0 +1,151 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Yin Kanglin and others.
+.. 14_ykl@tongji.edu.cn
+
+*************************************
+Yardstick Test Case Description TC090
+*************************************
+
++-----------------------------------------------------------------------------+
+|Control Node OpenStack Service High Availability - Database Instances |
+| |
++--------------+--------------------------------------------------------------+
+|test case id | OPNFV_YARDSTICK_TC090: Control node OpenStack service down - |
+| | database instances |
++--------------+--------------------------------------------------------------+
+|test purpose | This test case will verify the high availability of the |
+| | data base instances used by OpenStack (mysql) on control |
+| | node. |
+| | |
++--------------+--------------------------------------------------------------+
+|test method | This test case kills the processes of database service on a |
+| | selected control node, then checks whether the request of |
+| | the related OpenStack command is OK and the killed processes |
+| | are recovered. |
+| | |
++--------------+--------------------------------------------------------------+
+|attackers | In this test case, an attacker called "kill-process" is |
+| | needed. This attacker includes three parameters: |
+| | 1) fault_type: which is used for finding the attacker's |
+| | scripts. It should be always set to "kill-process" in this |
+| | test case. |
+| | 2) process_name: which is the process name of the specified |
+| | OpenStack service. If there are multiple processes use the |
+| | same name on the host, all of them are killed by this |
+| | attacker. |
+| | In this case. This parameter should always set to the name |
+| | of the database service of OpenStack. |
+| | 3) host: which is the name of a control node being attacked. |
+| | |
+| | e.g. |
+| | -fault_type: "kill-process" |
+| | -process_name: "mysql" |
+| | -host: node1 |
+| | |
++--------------+--------------------------------------------------------------+
+|monitors | In this test case, two kinds of monitor are needed: |
+| | 1. the "openstack-cmd" monitor constantly request a specific |
+| | Openstack command, which needs two parameters: |
+| | 1) monitor_type: which is used for finding the monitor class |
+| | and related scritps. It should be always set to |
+| | "openstack-cmd" for this monitor. |
+| | 2) command_name: which is the command name used for request. |
+| | In this case, the command name should be neutron related |
+| | commands. |
+| | |
+| | 2. the "process" monitor check whether a process is running |
+| | on a specific node, which needs three parameters: |
+| | 1) monitor_type: which used for finding the monitor class and|
+| | related scripts. It should be always set to "process" |
+| | for this monitor. |
+| | 2) process_name: which is the process name for monitor |
+| | 3) host: which is the name of the node running the process |
+| | |
+| | The examples of monitors show as follows, there are four |
+| | instance of the "openstack-cmd" monitor, in order to check |
+| | the database connection of different OpenStack components. |
+| | |
+| | monitor1: |
+| | -monitor_type: "openstack-cmd" |
+| | -api_name: "openstack image list" |
+| | monitor2: |
+| | -monitor_type: "openstack-cmd" |
+| | -api_name: "openstack router list" |
+| | monitor3: |
+| | -monitor_type: "openstack-cmd" |
+| | -api_name: "openstack stack list" |
+| | monitor4: |
+| | -monitor_type: "openstack-cmd" |
+| | -api_name: "openstack volume list" |
+| | monitor5: |
+| | -monitor_type: "process" |
+| | -process_name: "mysql" |
+| | -host: node1 |
+| | |
++--------------+--------------------------------------------------------------+
+|metrics | In this test case, there are two metrics: |
+| | 1)service_outage_time: which indicates the maximum outage |
+| | time (seconds) of the specified OpenStack command request. |
+| | 2)process_recover_time: which indicates the maximum time |
+| | (seconds) from the process being killed to recovered |
+| | |
++--------------+--------------------------------------------------------------+
+|test tool | Developed by the project. Please see folder: |
+| | "yardstick/benchmark/scenarios/availability/ha_tools" |
+| | |
++--------------+--------------------------------------------------------------+
+|references | ETSI NFV REL001 |
+| | |
++--------------+--------------------------------------------------------------+
+|configuration | This test case needs two configuration files: |
+| | 1) test case file: opnfv_yardstick_tc090.yaml |
+| | -Attackers: see above "attackers" description |
+| | -waiting_time: which is the time (seconds) from the process |
+| | being killed to stopping monitors the monitors |
+| | -Monitors: see above "monitors" description |
+| | -SLA: see above "metrics" description |
+| | |
+| | 2)POD file: pod.yaml |
+| | The POD configuration should record on pod.yaml first. |
+| | the "host" item in this test case will use the node name in |
+| | the pod.yaml. |
+| | |
++--------------+--------------------------------------------------------------+
+|test sequence | description and expected result |
+| | |
++--------------+--------------------------------------------------------------+
+|step 1 | start monitors: |
+| | each monitor will run with independently process |
+| | |
+| | Result: The monitor info will be collected. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 2 | do attacker: connect the host through SSH, and then execute |
+| | the kill process script with param value specified by |
+| | "process_name" |
+| | |
+| | Result: Process will be killed. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 3 | stop monitors after a period of time specified by |
+| | "waiting_time" |
+| | |
+| | Result: The monitor info will be aggregated. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 4 | verify the SLA |
+| | |
+| | Result: The test case is passed or not. |
+| | |
++--------------+--------------------------------------------------------------+
+|post-action | It is the action when the test cases exist. It will check the|
+| | status of the specified process on the host, and restart the |
+| | process if it is not running for next test cases |
+| | |
++--------------+--------------------------------------------------------------+
+|test verdict | Fails only if SLA is not passed, or if there is a test case |
+| | execution problem. |
+| | |
++--------------+--------------------------------------------------------------+
diff --git a/docs/testing/user/userguide/opnfv_yardstick_tc091.rst b/docs/testing/user/userguide/opnfv_yardstick_tc091.rst
new file mode 100644
index 000000000..8e89b6425
--- /dev/null
+++ b/docs/testing/user/userguide/opnfv_yardstick_tc091.rst
@@ -0,0 +1,138 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) OPNFV, Yin Kanglin and others.
+.. 14_ykl@tongji.edu.cn
+
+*************************************
+Yardstick Test Case Description TC091
+*************************************
+
++-----------------------------------------------------------------------------+
+|Control Node Openstack Service High Availability - Heat Api |
+| |
++--------------+--------------------------------------------------------------+
+|test case id | OPNFV_YARDSTICK_TC091: Control node OpenStack service down - |
+| | heat api |
++--------------+--------------------------------------------------------------+
+|test purpose | This test case will verify the high availability of the |
+| | orchestration service provided by OpenStack (heat-api) on |
+| | control node. |
+| | |
++--------------+--------------------------------------------------------------+
+|test method | This test case kills the processes of heat-api service on a |
+| | selected control node, then checks whether the request of |
+| | the related OpenStack command is OK and the killed processes |
+| | are recovered. |
+| | |
++--------------+--------------------------------------------------------------+
+|attackers | In this test case, an attacker called "kill-process" is |
+| | needed. This attacker includes three parameters: |
+| | 1) fault_type: which is used for finding the attacker's |
+| | scripts. It should be always set to "kill-process" in this |
+| | test case. |
+| | 2) process_name: which is the process name of the specified |
+| | OpenStack service. If there are multiple processes use the |
+| | same name on the host, all of them are killed by this |
+| | attacker. |
+| | In this case. This parameter should always set to "heat-api".|
+| | 3) host: which is the name of a control node being attacked. |
+| | |
+| | e.g. |
+| | -fault_type: "kill-process" |
+| | -process_name: "heat-api" |
+| | -host: node1 |
+| | |
++--------------+--------------------------------------------------------------+
+|monitors | In this test case, two kinds of monitor are needed: |
+| | 1. the "openstack-cmd" monitor constantly request a specific |
+| | OpenStack command, which needs two parameters: |
+| | 1) monitor_type: which is used for finding the monitor class |
+| | and related scripts. It should be always set to |
+| | "openstack-cmd" for this monitor. |
+| | 2) command_name: which is the command name used for request. |
+| | In this case, the command name should be neutron related |
+| | commands. |
+| | |
+| | 2. the "process" monitor check whether a process is running |
+| | on a specific node, which needs three parameters: |
+| | 1) monitor_type: which used for finding the monitor class and|
+| | related scripts. It should be always set to "process" |
+| | for this monitor. |
+| | 2) process_name: which is the process name for monitor |
+| | 3) host: which is the name of the node running the process |
+| | |
+| | e.g. |
+| | monitor1: |
+| | -monitor_type: "openstack-cmd" |
+| | -command_name: "heat stack list" |
+| | monitor2: |
+| | -monitor_type: "process" |
+| | -process_name: "heat-api" |
+| | -host: node1 |
+| | |
++--------------+--------------------------------------------------------------+
+|metrics | In this test case, there are two metrics: |
+| | 1)service_outage_time: which indicates the maximum outage |
+| | time (seconds) of the specified OpenStack command request. |
+| | 2)process_recover_time: which indicates the maximum time |
+| | (seconds) from the process being killed to recovered |
+| | |
++--------------+--------------------------------------------------------------+
+|test tool | Developed by the project. Please see folder: |
+| | "yardstick/benchmark/scenarios/availability/ha_tools" |
+| | |
++--------------+--------------------------------------------------------------+
+|references | ETSI NFV REL001 |
+| | |
++--------------+--------------------------------------------------------------+
+|configuration | This test case needs two configuration files: |
+| | 1) test case file: opnfv_yardstick_tc091.yaml |
+| | -Attackers: see above "attackers" description |
+| | -waiting_time: which is the time (seconds) from the process |
+| | being killed to the monitor stopped |
+| | -Monitors: see above "monitors" description |
+| | -SLA: see above "metrics" description |
+| | |
+| | 2)POD file: pod.yaml |
+| | The POD configuration should record on pod.yaml first. |
+| | the "host" item in this test case will use the node name in |
+| | the pod.yaml. |
+| | |
++--------------+--------------------------------------------------------------+
+|test sequence | description and expected result |
+| | |
++--------------+--------------------------------------------------------------+
+|step 1 | start monitors: |
+| | each monitor will run with independently process |
+| | |
+| | Result: The monitor info will be collected. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 2 | do attacker: connect the host through SSH, and then execute |
+| | the kill process script with param value specified by |
+| | "process_name" |
+| | |
+| | Result: Process will be killed. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 3 | stop monitors after a period of time specified by |
+| | "waiting_time" |
+| | |
+| | Result: The monitor info will be aggregated. |
+| | |
++--------------+--------------------------------------------------------------+
+|step 4 | verify the SLA |
+| | |
+| | Result: The test case is passed or not. |
+| | |
++--------------+--------------------------------------------------------------+
+|post-action | It is the action when the test cases exist. It will check the|
+| | status of the specified process on the host, and restart the |
+| | process if it is not running for next test cases |
+| | |
++--------------+--------------------------------------------------------------+
+|test verdict | Fails only if SLA is not passed, or if there is a test case |
+| | execution problem. |
+| | |
++--------------+--------------------------------------------------------------+
diff --git a/etc/infra/infra_deploy.yaml.sample b/etc/infra/infra_deploy.yaml.sample
deleted file mode 100644
index bf07a01bc..000000000
--- a/etc/infra/infra_deploy.yaml.sample
+++ /dev/null
@@ -1,35 +0,0 @@
-nodes:
- - name: Yardstick VM
- hostname: yardstickvm
- interfaces:
- - network: management
- ip: 192.168.1.10
- netmask: 255.255.255.0
- user: ubuntu
- password: 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
- password: password
- image: /tmp/image_2.qcow
- disk: 40000
- ram: 32768
- vcpus: 4
-
-networks:
- - name: management
- host_ip: 192.168.1.1
- netmask: 255.255.255.0
diff --git a/etc/infra/infra_deploy_multi.yaml.sample b/etc/infra/infra_deploy_multi.yaml.sample
new file mode 100644
index 000000000..aa27b735a
--- /dev/null
+++ b/etc/infra/infra_deploy_multi.yaml.sample
@@ -0,0 +1,97 @@
+nodes:
+ - name: Deployment and Controller node number 1 VM
+ openstack_node: controller
+ hostname: control-01
+ interfaces:
+ - network: management
+ ip: 192.168.1.10
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.10
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_cntrl_1.img
+ disk: 13000
+ ram: 9000
+ vcpus: 4
+
+ - name: Controller node number 2 VM
+ openstack_node: controller
+ hostname: control-02
+ interfaces:
+ - network: management
+ ip: 192.168.1.11
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.11
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_cntrl_2.img
+ disk: 11000
+ ram: 6000
+ vcpus: 2
+
+ - name: Compute node number 1 VM
+ openstack_node: compute
+ hostname: compute-01
+ interfaces:
+ - network: management
+ ip: 192.168.1.12
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.12
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_comp_1.img
+ disk: 30000
+ ram: 16000
+ vcpus: 12
+
+ - name: Compute node number 2 VM
+ openstack_node: compute
+ hostname: compute-02
+ interfaces:
+ - network: management
+ ip: 192.168.1.13
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.13
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_comp_2.img
+ disk: 12000
+ ram: 6000
+ vcpus: 4
+
+ - name: Jump host
+ hostname: yardstickvm
+ interfaces:
+ - network: management
+ ip: 192.168.1.14
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.14
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_yardstick.img
+ disk: 28000
+ ram: 12000
+ vcpus: 4
+
+networks:
+ - name: management
+ default_gateway: True
+ host_ip: 192.168.1.1
+ netmask: 255.255.255.0
+
+ - name: traffic
+ default_gateway: False # This parameter is not mandatory, default value: False
+ host_ip: 192.20.1.1
+ netmask: 255.255.255.0
+ dhcp_ip_start: 192.20.1.200
+ dhcp_ip_stop: 192.20.1.250
diff --git a/etc/infra/infra_deploy_one.yaml.sample b/etc/infra/infra_deploy_one.yaml.sample
new file mode 100644
index 000000000..f8759d42e
--- /dev/null
+++ b/etc/infra/infra_deploy_one.yaml.sample
@@ -0,0 +1,46 @@
+nodes:
+ - name: Deployment, Controller and Compute single VM
+ openstack_node: controller # if no compute nodes are defined means a standalone deployment
+ hostname: allinone
+ interfaces:
+ - network: management
+ ip: 192.168.1.21
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.21
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_one.img
+ disk: 22000
+ ram: 14000
+ vcpus: 12
+
+ - name: Jump host
+ hostname: yardstickvm
+ interfaces:
+ - network: management
+ ip: 192.168.1.22
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.22
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_yardstick.img
+ disk: 22000
+ ram: 10000
+ vcpus: 4
+
+networks:
+ - name: management
+ default_gateway: True
+ host_ip: 192.168.1.1
+ netmask: 255.255.255.0
+
+ - name: traffic
+ default_gateway: False # This parameter is not mandatory, default value: False
+ host_ip: 192.20.1.1
+ netmask: 255.255.255.0
+ dhcp_ip_start: 192.20.1.200
+ dhcp_ip_stop: 192.20.1.250
diff --git a/etc/infra/infra_deploy_two.yaml.sample b/etc/infra/infra_deploy_two.yaml.sample
new file mode 100644
index 000000000..a29f75453
--- /dev/null
+++ b/etc/infra/infra_deploy_two.yaml.sample
@@ -0,0 +1,63 @@
+nodes:
+ - name: Deployment and Controller node number 1 VM
+ openstack_node: controller
+ hostname: control-01
+ interfaces:
+ - network: management
+ ip: 192.168.1.118
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.118
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_cntrl_1.img
+ disk: 12000
+ ram: 10000
+ vcpus: 6
+
+ - name: Compute node number 1 VM
+ openstack_node: compute
+ hostname: compute-01
+ interfaces:
+ - network: management
+ ip: 192.168.1.119
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.119
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_comp_1.img
+ disk: 44000
+ ram: 30000
+ vcpus: 14
+
+ - name: Jump host
+ hostname: yardstickvm
+ interfaces:
+ - network: management
+ ip: 192.168.1.120
+ netmask: 255.255.255.0
+ - network: traffic
+ ip: 192.20.1.120
+ netmask: 255.255.255.0
+ user: ubuntu
+ password: password
+ image: /tmp/image_yardstick.img
+ disk: 22000
+ ram: 10000
+ vcpus: 4
+
+networks:
+ - name: management
+ default_gateway: True
+ host_ip: 192.168.1.1
+ netmask: 255.255.255.0
+
+ - name: traffic
+ default_gateway: False # This parameter is not mandatory, default value: False
+ host_ip: 192.20.1.1
+ netmask: 255.255.255.0
+ dhcp_ip_start: 192.20.1.200
+ dhcp_ip_stop: 192.20.1.250
diff --git a/etc/yardstick/nodes/apex_baremetal/pod.yaml b/etc/yardstick/nodes/apex_baremetal/pod.yaml
new file mode 100644
index 000000000..4b058c499
--- /dev/null
+++ b/etc/yardstick/nodes/apex_baremetal/pod.yaml
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+nodes:
+-
+ name: node1
+ role: Controller
+ ip: ip1
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node2
+ role: Controller
+ ip: ip2
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node3
+ role: Controller
+ ip: ip3
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node4
+ role: Compute
+ ip: ip4
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node5
+ role: Compute
+ ip: ip5
+ user: heat-admin
+ key_filename: node_keyfile
+-
+ name: node6
+ role: Opendaylight-Cluster-Leader
+ ip: ip6
+ user: heat-admin
+ key_filename: node_keyfile
diff --git a/etc/yardstick/nodes/apex_virtual/pod.yaml b/etc/yardstick/nodes/apex_virtual/pod.yaml
new file mode 100644
index 000000000..59b51d224
--- /dev/null
+++ b/etc/yardstick/nodes/apex_virtual/pod.yaml
@@ -0,0 +1,40 @@
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+nodes:
+-
+ name: node1
+ role: Controller
+ ip: 192.0.2.15
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node2
+ role: Controller
+ ip: 192.0.2.4
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node3
+ role: Controller
+ ip: 192.0.2.6
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node4
+ role: Compute
+ ip: 192.0.2.10
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
+-
+ name: node5
+ role: Compute
+ ip: 192.0.2.14
+ user: heat-admin
+ key_filename: /root/.ssh/id_rsa
diff --git a/etc/yardstick/nodes/fuel_baremetal/pod.yaml b/etc/yardstick/nodes/fuel_baremetal/pod.yaml
index 5ce555293..301433d50 100644
--- a/etc/yardstick/nodes/fuel_baremetal/pod.yaml
+++ b/etc/yardstick/nodes/fuel_baremetal/pod.yaml
@@ -49,3 +49,16 @@ nodes:
ip: ip5
user: node_username
key_filename: node_keyfile
+-
+ name: node6
+ role: Opendaylight
+ ip: ip6
+ user: node_username
+ key_filename: node_keyfile
+-
+ name: node7
+ role: Gateway
+ ip: ip7
+ user: node_username
+ key_filename: node_keyfile
+
diff --git a/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia b/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia
index 57a83058e..1f755dc4e 100644
--- a/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia
+++ b/etc/yardstick/nodes/pod.yaml.nsb.sample.ixia
@@ -26,7 +26,6 @@ nodes:
lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0"
root_dir: "/opt/ixia/ixos-api/8.01.0.2/"
py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/"
- py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi"
dut_result_dir: "/mnt/ixia"
version: 8.1
interfaces:
diff --git a/etc/yardstick/nodes/standalone/ixia_correlated_template.yaml b/etc/yardstick/nodes/standalone/ixia_correlated_template.yaml
index 7250c4ce3..ef63ea04c 100644
--- a/etc/yardstick/nodes/standalone/ixia_correlated_template.yaml
+++ b/etc/yardstick/nodes/standalone/ixia_correlated_template.yaml
@@ -26,13 +26,12 @@ nodes:
user: {{gen.user}}
password: {{gen.password}}
key_filename: {{gen.key_filename}}
- tg_config:
+ tg_config:
ixchassis: "{{gen.tg_config.ixchassis}}" #ixia chassis ip
tcl_port: "{{gen.tg_config.tcl_port}}" # tcl server port
lib_path: "{{gen.tg_config.lib_path}}"
root_dir: "{{gen.tg_config.root_dir}}"
py_bin_path: "{{gen.tg_config.py_bin_path}}"
- py_lib_path: "{{gen.tg_config.py_lib_path}}"
dut_result_dir: "{{gen.tg_config.dut_result_dir}}"
version: "{{gen.tg_config.version}}"
interfaces:
diff --git a/etc/yardstick/nodes/standalone/ixia_template.yaml b/etc/yardstick/nodes/standalone/ixia_template.yaml
index 617a65162..98ed8c5c2 100644
--- a/etc/yardstick/nodes/standalone/ixia_template.yaml
+++ b/etc/yardstick/nodes/standalone/ixia_template.yaml
@@ -32,7 +32,6 @@ nodes:
lib_path: "{{gen.tg_config.lib_path}}"
root_dir: "{{gen.tg_config.root_dir}}"
py_bin_path: "{{gen.tg_config.py_bin_path}}"
- py_lib_path: "{{gen.tg_config.py_lib_path}}"
dut_result_dir: "{{gen.tg_config.dut_result_dir}}"
version: "{{gen.tg_config.version}}"
interfaces:
diff --git a/gui/app/index.html b/gui/app/index.html
index d959b14d2..2ea1cabe7 100644
--- a/gui/app/index.html
+++ b/gui/app/index.html
@@ -93,6 +93,7 @@
<script src="scripts/controllers/detail.controller.js"></script>
<script src="scripts/controllers/image.controller.js"></script>
<script src="scripts/controllers/pod.controller.js"></script>
+ <script src="scripts/controllers/sut.controller.js"></script>
<script src="scripts/controllers/container.controller.js"></script>
<script src="scripts/controllers/testcase.controller.js"></script>
<script src="scripts/controllers/testcasedetail.controller.js"></script>
diff --git a/gui/app/scripts/controllers/container.controller.js b/gui/app/scripts/controllers/container.controller.js
index 3ad200a91..a7d5f0309 100644
--- a/gui/app/scripts/controllers/container.controller.js
+++ b/gui/app/scripts/controllers/container.controller.js
@@ -127,10 +127,15 @@ angular.module('yardStickGui2App')
function chooseResult(name) {
$scope.selectContainer = name;
}
+
$scope.goBack = function goBack() {
$state.go('app.projectList');
}
+ $scope.goNext = function goNext() {
+ $state.go('app.sut', {uuid: $scope.uuid});
+ }
+
$scope.openDeleteEnv = function openDeleteEnv(id, name) {
$scope.deleteName = name;
$scope.deleteId = id;
diff --git a/gui/app/scripts/controllers/content.controller.js b/gui/app/scripts/controllers/content.controller.js
index 0288fa540..90a3f1433 100644
--- a/gui/app/scripts/controllers/content.controller.js
+++ b/gui/app/scripts/controllers/content.controller.js
@@ -49,6 +49,7 @@ angular.module('yardStickGui2App')
$scope.gotoOpenrcPage = gotoOpenrcPage;
$scope.gotoPodPage = gotoPodPage;
$scope.gotoContainerPage = gotoContainerPage;
+ $scope.gotoSUTPage = gotoSUTPage;
$scope.gotoTestcase = gotoTestcase;
$scope.gotoEnviron = gotoEnviron;
$scope.gotoSuite = gotoSuite;
@@ -95,6 +96,12 @@ angular.module('yardStickGui2App')
$state.go('app.container', { uuid: $scope.uuid });
}
+ function gotoSUTPage() {
+ $scope.path = $location.path();
+ $scope.uuid = $scope.path.split('/').pop();
+ $state.go('app.sut', { uuid: $scope.uuid });
+ }
+
function gotoTestcase() {
$state.go('app.testcase');
}
diff --git a/gui/app/scripts/controllers/projectDetail.controller.js b/gui/app/scripts/controllers/projectDetail.controller.js
index e8468045d..353e02bcf 100644
--- a/gui/app/scripts/controllers/projectDetail.controller.js
+++ b/gui/app/scripts/controllers/projectDetail.controller.js
@@ -439,15 +439,36 @@ angular.module('yardStickGui2App')
$scope.displayTable = false;
$scope.contentInfo = response.result.testcase;
+ $scope.optionalParams = response.result.args;
}
}, function(error) {
- toaster.pop({
- type: 'error',
- title: 'fail',
- body: 'unknow error',
- timeout: 3000
- });
+ mainFactory.errorHandler2(error);
+ })
+ }
+
+
+ function addParamsToTask(){
+ var params = {}
+ angular.forEach($scope.optionalParams, function(value, name){
+ if(value.value){
+ params[name] = value.value;
+ }
+ });
+
+ mainFactory.taskAddParams().put({
+ 'taskId': $scope.newUUID,
+ 'action': 'add_params',
+ 'args': {
+ 'params': params
+ }
+ }).$promise.then(function(resp) {
+ if (resp.status == 1) {
+ } else {
+ mainFactory.errorHandler1(resp);
+ }
+ }, function(error) {
+ mainFactory.errorHandler2(error);
})
}
@@ -530,6 +551,7 @@ angular.module('yardStickGui2App')
function confirmAddCaseOrSuite(content) {
if ($scope.selectType.name == "Test Case") {
addCasetoTask(content);
+ addParamsToTask();
} else {
addSuitetoTask(content);
}
diff --git a/gui/app/scripts/controllers/sut.controller.js b/gui/app/scripts/controllers/sut.controller.js
new file mode 100644
index 000000000..092aabc41
--- /dev/null
+++ b/gui/app/scripts/controllers/sut.controller.js
@@ -0,0 +1,58 @@
+'use strict';
+
+angular.module('yardStickGui2App')
+ .controller('SUTController', ['$scope', '$state', '$stateParams', 'mainFactory', 'Upload', 'toaster', '$location', 'ngDialog',
+ function($scope, $state, $stateParams, mainFactory, Upload, toaster, $location, ngDialog) {
+
+
+ init();
+ $scope.showloading = false;
+ $scope.loadingOPENrc = false;
+
+ function init() {
+
+
+ $scope.uuid = $stateParams.uuid;
+ $scope.sutInfo = {};
+ getItemIdDetail();
+ getSUTDetail();
+
+ }
+
+ function getItemIdDetail() {
+ mainFactory.ItemDetail().get({
+ 'envId': $scope.uuid
+ }).$promise.then(function(response) {
+ if (response.status == 1) {
+ $scope.envName = response.result.environment.name;
+ }else{
+ mainFactory.errorHandler1(response);
+ }
+ }, function(error) {
+ mainFactory.errorHandler2(error);
+ })
+ }
+
+ function getSUTDetail(){
+ mainFactory.SUTDetail().get({
+ 'envId': $scope.uuid
+ }).$promise.then(function(resp){
+ $scope.sutInfo = resp.result.sut;
+ console.log($scope.sutInfo);
+ }, function(error){
+ })
+ }
+
+ $scope.goBack = function goBack() {
+ $state.go('app.projectList');
+ }
+
+
+ $scope.goNext = function goNext() {
+ $scope.path = $location.path();
+ $scope.uuid = $scope.path.split('/').pop();
+ $state.go('app.container', { uuid: $scope.uuid });
+ }
+
+ }
+ ]);
diff --git a/gui/app/scripts/controllers/taskModify.controller.js b/gui/app/scripts/controllers/taskModify.controller.js
index 757d65866..c9672fea8 100644
--- a/gui/app/scripts/controllers/taskModify.controller.js
+++ b/gui/app/scripts/controllers/taskModify.controller.js
@@ -20,6 +20,7 @@ angular.module('yardStickGui2App')
$scope.constructTestSuit = constructTestSuit;
$scope.constructTestCase = constructTestCase;
$scope.getTestDeatil = getTestDeatil;
+ $scope.getTestcaseArgs = getTestcaseArgs;
$scope.confirmToServer = confirmToServer;
$scope.addEnvToTask = addEnvToTask;
}
@@ -46,6 +47,8 @@ angular.module('yardStickGui2App')
getItemIdDetail($scope.taskDetailData.environment_id);
}
+ getTestcaseArgs();
+
}
}, function(error) {
toaster.pop({
@@ -277,7 +280,6 @@ angular.module('yardStickGui2App')
function getTestDeatil() {
-
if ($scope.selectType.name == 'Test Case') {
getTestcaseDetail();
} else {
@@ -307,6 +309,29 @@ angular.module('yardStickGui2App')
}
+ function getTestcaseArgs(){
+ mainFactory.getTestcaseDetail().get({
+ 'testcasename': $scope.taskDetailData.case_name
+ }).$promise.then(function(resp){
+ if(resp.status == 1){
+ $scope.optionalParams = resp.result.args;
+ var params = $scope.taskDetailData.params;
+ if(params){
+ angular.forEach($scope.optionalParams, function(value, name){
+ if(name in params){
+ value.value = params[name];
+ }
+ });
+ }
+ }else{
+ mainFactory.errorHandler1(resp);
+ }
+ }, function(error){
+ mainFactory.errorHandler2(error);
+ });
+ }
+
+
function getTestcaseDetail() {
mainFactory.getTestcaseDetail().get({
'testcasename': $scope.selectCase
@@ -316,15 +341,13 @@ angular.module('yardStickGui2App')
$scope.displayTable = false;
$scope.contentInfo = response.result.testcase;
+ $scope.optionalParams = response.result.args;
+ }else{
+ mainFactory.errorHandler1(response);
}
}, function(error) {
- toaster.pop({
- type: 'error',
- title: 'fail',
- body: 'unknow error',
- timeout: 3000
- });
+ mainFactory.errorHandler2(error);
})
}
@@ -426,12 +449,38 @@ angular.module('yardStickGui2App')
if ($scope.selectCase == 'Test Case' || $scope.taskDetailData.suite == false) {
addCasetoTask(content);
+ addParamsToTask();
} else {
addSuitetoTask(content);
}
}
+ function addParamsToTask(){
+ var params = {}
+ angular.forEach($scope.optionalParams, function(value, name){
+ if(value.value){
+ params[name] = value.value;
+ }
+ });
+
+ mainFactory.taskAddParams().put({
+ 'taskId': $stateParams.taskId,
+ 'action': 'add_params',
+ 'args': {
+ 'params': params
+ }
+ }).$promise.then(function(resp) {
+ if (resp.status == 1) {
+ } else {
+ mainFactory.errorHandler1(resp);
+ }
+ }, function(error) {
+ mainFactory.errorHandler2(error);
+ })
+ }
+
+
function addEnvToTask() {
mainFactory.taskAddEnv().put({
diff --git a/gui/app/scripts/factory/main.factory.js b/gui/app/scripts/factory/main.factory.js
index 7637a9ff3..f75369336 100644
--- a/gui/app/scripts/factory/main.factory.js
+++ b/gui/app/scripts/factory/main.factory.js
@@ -58,6 +58,13 @@ angular.module('yardStickGui2App')
}
})
},
+ SUTDetail: function() {
+ return $resource(Base_URL + '/api/v2/yardstick/environments/:envId/sut', { envId: "@envId" }, {
+ 'get': {
+ method: 'GET'
+ }
+ })
+ },
ImageDetail: function() {
return $resource(Base_URL + '/api/v2/yardstick/images/:image_id', { image_id: "@image_id" }, {
'get': {
@@ -214,6 +221,14 @@ angular.module('yardStickGui2App')
}
})
},
+
+ taskAddParams: function() {
+ return $resource(Base_URL + '/api/v2/yardstick/tasks/:taskId', { taskId: "@taskId" }, {
+ 'put': {
+ method: 'PUT'
+ }
+ })
+ },
//delete operate
deleteEnv: function() {
return $resource(Base_URL + '/api/v2/yardstick/environments/:env_id', { env_id: '@env_id' }, {
diff --git a/gui/app/scripts/router.config.js b/gui/app/scripts/router.config.js
index da2eb086b..75d5372fb 100644
--- a/gui/app/scripts/router.config.js
+++ b/gui/app/scripts/router.config.js
@@ -116,6 +116,15 @@ angular.module('yardStickGui2App')
label: 'Container Manage'
}
})
+ .state('app.sut', {
+ url: '/envsut/:uuid',
+ templateUrl: 'views/sut.html',
+ controller: 'SUTController',
+ params: { uuid: null },
+ ncyBreadcrumb: {
+ label: 'SUT Manage'
+ }
+ })
.state('app.projectList', {
url: '/project',
templateUrl: 'views/projectList.html',
diff --git a/gui/app/views/container.html b/gui/app/views/container.html
index b3d78bfb1..ea5902996 100644
--- a/gui/app/views/container.html
+++ b/gui/app/views/container.html
@@ -5,7 +5,7 @@
<div style="width:750px;">
<h3>{{envName}} -- Container
- <!--<button class="btn btn-default" style="float:right">Go Next</button>-->
+ <button class="btn btn-default" ng-click="goNext()" style="float:right">Next</button>
</h3>
<!--<p>In this process, you can input your define openrc config or upload a openrc file</p>-->
diff --git a/gui/app/views/layout/sideNav.html b/gui/app/views/layout/sideNav.html
index 6c4426307..2333d22d5 100644
--- a/gui/app/views/layout/sideNav.html
+++ b/gui/app/views/layout/sideNav.html
@@ -42,6 +42,9 @@
<div class="panel-body " style="border:none;text-align: right;cursor:pointer" ng-click="gotoContainerPage()" ng-class="{active:$state.includes('app.container')}">
Container
</div>
+ <div class="panel-body " style="border:none;text-align: right;cursor:pointer" ng-click="gotoSUTPage()" ng-class="{active:$state.includes('app.sut')}">
+ SUT
+ </div>
<div class="panel-body " style="border:none;text-align: right;">
Others
</div>
@@ -151,4 +154,4 @@
.active.panel-body {
background-color: #dfe3e4;
}
-</style> \ No newline at end of file
+</style>
diff --git a/gui/app/views/modal/taskCreate.html b/gui/app/views/modal/taskCreate.html
index 2d7f1dc3b..ab6ff0ca1 100644
--- a/gui/app/views/modal/taskCreate.html
+++ b/gui/app/views/modal/taskCreate.html
@@ -80,13 +80,20 @@
</div>
</div>
- <div ng-show="displayTable==false">
- <textarea ng-model="contentInfo" spellcheck="false">
-
-
- </textarea>
-
+ <div ng-show="displayTable==false" style="display:flex;flex-direction:row;justify-content:space-between;margin-top:10px;">
+ <textarea class="col-md-8" ng-model="contentInfo" style="margin-top:5px;" spellcheck="false"></textarea>
+ <div class="col-md-4" style="border:1px solid #e8e8e8;margin-top:5px;margin-left:10px;padding-top:30px;">
+ <h4>Optional Paramters:</h4>
+ <form class="form-horizontal col-md-offset-2" style="margin-top:20px">
+ <div ng-repeat="(name, value) in optionalParams" class="form-group">
+ <label for="param{{$index}}" class="col-md-5" style="font-weight:normal;">{{ name }}:</label>
+ <div class="col-md-5">
+ <input type="text" ng-model="value.value" class="form-control" id="param{{$index}}">
+ </div>
+ </div>
+ </form>
+ </div>
</div>
diff --git a/gui/app/views/sut.html b/gui/app/views/sut.html
new file mode 100644
index 000000000..8cf1fcd6c
--- /dev/null
+++ b/gui/app/views/sut.html
@@ -0,0 +1,33 @@
+<!--sut management-->
+
+<div class="content">
+ <div style="display:flex;flex-direction:row;">
+ <div style="width:750px;">
+
+ <h3>{{envName}} -- SUT
+ <!--<button class="btn btn-default" style="float:right">Go Next</button>-->
+
+ </h3>
+
+ <h2>Hosts</h2>
+ <div ng-repeat="(host, info) in sutInfo">
+ <hr/>
+ <div class="results-table" style="margin-top:30px;">
+ <table class="table table-striped table-hover">
+ <tbody style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
+ <tr ng-repeat="record in info">
+ <td>{{ record[0] }}</td>
+ <td>{{ record[1] }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </div>
+
+</div>
+<toaster-container></toaster-container>
+
+<style>
+</style>
diff --git a/gui/app/views/taskmodify.html b/gui/app/views/taskmodify.html
index d12df4ba2..24b3d945f 100644
--- a/gui/app/views/taskmodify.html
+++ b/gui/app/views/taskmodify.html
@@ -42,11 +42,20 @@
<button class="btn btn-default" style="float:right" ng-disabled="sourceShow==null" ng-click="confirmToServer(contentInfo,taskDetailData.content)">Confirm</button>
</div>
-
- <textarea ng-model="taskDetailData.content" ng-show="sourceShow==false" style="margin-top:5px;" spellcheck="false">
-
-
- </textarea>
+ <div ng-show="sourceShow==false" style="display:flex;flex-direction:row;justify-content:space-between;margin-top:10px;">
+ <textarea class="col-md-8" ng-model="taskDetailData.content" style="margin-top:5px;" spellcheck="false"></textarea>
+ <div class="col-md-4" style="border:1px solid #e8e8e8;margin-top:5px;margin-left:10px;padding-top:30px;">
+ <h4>Optional Paramters:</h4>
+ <form class="form-horizontal col-md-offset-2" style="margin-top:20px">
+ <div ng-repeat="(name, value) in optionalParams" class="form-group">
+ <label for="param{{$index}}" class="col-md-5" style="font-weight:normal;">{{ name }}:</label>
+ <div class="col-md-5">
+ <input type="text" ng-model="value.value" class="form-control" id="param{{$index}}">
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
<div ng-show="sourceShow==true">
<div style="display:flex;flex-direction:row">
@@ -102,9 +111,7 @@
<div ng-show="displayTable==false">
<textarea ng-model="contentInfo" spellcheck="false">
- </textarea>
-
-
+ </textarea>
</div>
</div>
diff --git a/install.sh b/install.sh
index 5cd83677b..74929345d 100755
--- a/install.sh
+++ b/install.sh
@@ -84,7 +84,8 @@ apt-get update && apt-get install -y \
libxft-dev \
libxss-dev \
sudo \
- iputils-ping
+ iputils-ping \
+ rabbitmq-server
if [[ "${DOCKER_ARCH}" != "aarch64" ]]; then
apt-get install -y libc6:arm64
@@ -94,9 +95,14 @@ apt-get -y autoremove && apt-get clean
git config --global http.sslVerify false
+# Start and configure RabbitMQ
+service rabbitmq-server restart
+rabbitmqctl start_app
+rabbitmqctl add_user yardstick yardstick
+rabbitmqctl set_permissions yardstick ".*" ".*" ".*"
# install yardstick + dependencies
-easy_install -U pip
+easy_install -U pip==9.0.1
pip install -r requirements.txt
pip install -e .
@@ -113,4 +119,4 @@ tar xvf ${NSB_DIR}/trex_client.tar.gz -C ${NSB_DIR}
rm -f ${NSB_DIR}/trex_client.tar.gz
service nginx restart
-uwsgi -i /etc/yardstick/yardstick.ini
+uwsgi -i /etc/yardstick/yardstick.ini \ No newline at end of file
diff --git a/nsb_setup.sh b/nsb_setup.sh
index 50fc017d1..86796c4d4 100755
--- a/nsb_setup.sh
+++ b/nsb_setup.sh
@@ -67,8 +67,16 @@ pip install ansible==2.4.2 shade==1.22.2 docker-py==1.10.6
ANSIBLE_SCRIPTS="ansible"
+if [[ -n ${1} ]]; then
+ yardstick_docker_image="-e yardstick_docker_image=${1}"
+else
+ yardstick_docker_image=""
+fi
+
+# no quotes for yardstick_docker_image so when empty it is removed as whitespace
cd ${ANSIBLE_SCRIPTS} &&\
ansible-playbook \
-e img_property="nsb" \
+ ${yardstick_docker_image} \
-e YARD_IMG_ARCH='amd64' ${extra_args}\
-i yardstick-install-inventory.ini nsb_setup.yml
diff --git a/requirements.txt b/requirements.txt
index d45e4b149..4679bc8fb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -26,6 +26,7 @@ flask==0.11.1 # BSD; OSI Approved BSD License
functools32==3.2.3.post2; python_version <= "2.7" # PSF license
futures==3.1.1;python_version=='2.7' # BSD; OSI Approved BSD License
influxdb==4.1.1 # MIT License; OSI Approved MIT License
+IxNetwork==8.40.1124.9 # MIT License; OSI Approved MIT License
jinja2schema==0.1.4 # OSI Approved BSD License
keystoneauth1==3.1.0 # OSI Approved Apache Software License
kubernetes==3.0.0a1 # OSI Approved Apache Software License
@@ -37,13 +38,14 @@ os-client-config==1.28.0 # OSI Approved Apache Software License
osc-lib==1.7.0 # OSI Approved Apache Software License
oslo.config==4.11.1 # OSI Approved Apache Software License
oslo.i18n==3.17.0 # OSI Approved Apache Software License
+oslo.messaging===5.30.2 # OSI Approved Apache Software License
oslo.privsep===1.22.1 # OSI Approved Apache Software License
oslo.serialization==2.20.1 # OSI Approved Apache Software License
oslo.utils==3.28.0 # OSI Approved Apache Software License
paramiko==2.2.1 # LGPL; OSI Approved GNU Library or Lesser General Public License (LGPL)
pbr==3.1.1 # OSI Approved Apache Software License; Apache License, Version 2.0
pika==0.10.0 # BSD; OSI Approved BSD License
-pip==9.0.1;python_version=='2.7' # MIT
+pip==9.0.1 # MIT
positional==1.1.2 # OSI Approved Apache Software License
pycrypto==2.6.1 # Public Domain
pyparsing==2.2.0 # MIT License; OSI Approved MIT License
@@ -55,7 +57,7 @@ python-keystoneclient==3.13.0 # OSI Approved Apache Software License
python-neutronclient==6.5.0 # OSI Approved Apache Software License
python-novaclient==9.1.1 # OSI Approved Apache Software License
pyzmq==16.0.2 # LGPL+BSD; OSI Approved GNU Library or Lesser General Public License (LGPL); OSI Approved BSD License
-requests==2.18.2 # Apache 2.0; OSI Approved Apache Software License
+requests==2.11.1 # Apache 2.0; OSI Approved Apache Software License
requestsexceptions==1.3.0 # OSI Approved Apache Software License
scp==0.10.2 # LGPL
shade==1.22.2 # OSI Approved Apache Software License
diff --git a/samples/dummy-no-context.yaml b/samples/dummy-no-context.yaml
index 7667e5a16..e4ace44c2 100644
--- a/samples/dummy-no-context.yaml
+++ b/samples/dummy-no-context.yaml
@@ -14,7 +14,7 @@ schema: "yardstick:task:0.1"
scenarios:
-
type: Dummy
-
+ name: Dummy
runner:
type: Duration
duration: 5
diff --git a/samples/dummy.yaml b/samples/dummy.yaml
index fde2907cd..2921f5d3f 100644
--- a/samples/dummy.yaml
+++ b/samples/dummy.yaml
@@ -22,4 +22,5 @@ scenarios:
context:
type: Dummy
+ name: Dummy
diff --git a/samples/netperf_soak.yaml b/samples/netperf_soak.yaml
new file mode 100644
index 000000000..a7344dae2
--- /dev/null
+++ b/samples/netperf_soak.yaml
@@ -0,0 +1,71 @@
+##############################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# Bottlenecks long duration test need Yardstick to create VM pairs and use netperf sending messages
+# This yaml file for the above operations based on Netperf mode similiar as netperf.yaml
+# UDP_STREAM is used and out_opt is customized
+
+schema: "yardstick:task:0.1"
+
+{% set tx_msg_size = tx_msg_size or "8K" %}
+{% set rx_msg_size = rx_msg_size or "8K" %}
+{% set test_time = test_time or "10" %}
+{% set out_opt = out_opt or "THROUGHPUT,THROUGHPUT_UNITS,MEAN_LATENCY,LOCAL_CPU_UTIL,REMOTE_CPU_UTIL,LOCAL_BYTES_SENT,REMOTE_BYTES_RECVD" %}
+{% set image_name = image_name or "yardstick-image" %}
+{% set cpu_num = cpu_num or 1 %}
+{% set ram_num = ram_num or 512 %}
+{% set disk_num = disk_num or 7 %}
+
+scenarios:
+-
+ type: Netperf
+ options:
+ testname: 'UDP_STREAM'
+ send_msg_size: {{tx_msg_size}}
+ recv_msg_size: {{rx_msg_size}}
+ duration: {{test_time}}
+ output_opt: {{out_opt}}
+
+ host: netperf-host.demo
+ target: netperf-target.demo
+
+ runner:
+ type: Iteration
+ iterations: 1
+ interval: 1
+ run_step: 'setup,run'
+
+ sla:
+ mean_latency: 100
+ action: monitor
+
+context:
+ name: demo
+ image: {{image_name}}
+ flavor:
+ vcpus: {{cpu_num}}
+ ram: {{ram_num}}
+ disk: {{disk_num}}
+ user: ubuntu
+
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+
+ servers:
+ netperf-host:
+ floating_ip: true
+ placement: "pgrp1"
+ netperf-target:
+ floating_ip: false
+ placement: "pgrp1"
+
+ networks:
+ test:
+ cidr: '10.0.1.0/24'
diff --git a/samples/parser.yaml b/samples/parser.yaml
index e2e4b66ce..682c11329 100644
--- a/samples/parser.yaml
+++ b/samples/parser.yaml
@@ -27,3 +27,4 @@ scenarios:
context:
type: Dummy
+ name: Dummy
diff --git a/samples/ping_bottlenecks.yaml b/samples/ping_bottlenecks.yaml
index e6fef4259..625d4501a 100644
--- a/samples/ping_bottlenecks.yaml
+++ b/samples/ping_bottlenecks.yaml
@@ -15,6 +15,10 @@ description: >
measure VMs latency using ping;
run_in_parallel: true
{% set stack_num = stack_num or 1 %}
+{% set image_name = image_name or "yardstick-image" %}
+{% set cpu_num = cpu_num or 1 %}
+{% set ram_num = ram_num or 512 %}
+{% set disk_num = disk_num or 7 %}
scenarios:
{% for num in range(stack_num) %}
@@ -34,8 +38,11 @@ contexts:
{% for num in range(stack_num) %}
-
name: demo{{num}}
- image: yardstick-image
- flavor: yardstick-flavor
+ image: {{image_name}}
+ flavor:
+ vcpus: {{cpu_num}}
+ ram: {{ram_num}}
+ disk: {{disk_num}}
user: ubuntu
placement_groups:
diff --git a/samples/storage_bottlenecks.yaml b/samples/storage_bottlenecks.yaml
index 1aa0d7e35..971a307da 100644
--- a/samples/storage_bottlenecks.yaml
+++ b/samples/storage_bottlenecks.yaml
@@ -31,6 +31,11 @@ run_in_parallel: true
{% set numjobs = numjobs or "1" %}
{% set direct = direct or "1" %}
{% set volume_size = volume_size or 50 %}
+{% set image_name = image_name or "yardstick-image" %}
+{% set cpu_num = cpu_num or 1 %}
+{% set ram_num = ram_num or 512 %}
+{% set disk_num = disk_num or 7 %}
+{% set run_time = run_time or 3000 %}
scenarios:
{% for num in range(stack_num) %}
@@ -51,7 +56,7 @@ scenarios:
runner:
type: Duration
- duration: 60
+ duration: {{ run_time }}
interval: 1
{% endfor %}
@@ -59,8 +64,11 @@ contexts:
{% for context_num in range(stack_num) %}
-
name: storage_bottlenecks-{{context_num}}-{{volume_num}}
- image: yardstick-image
- flavor: yardstick-flavor
+ image: {{image_name}}
+ flavor:
+ vcpus: {{cpu_num}}
+ ram: {{ram_num}}
+ disk: {{disk_num}}
user: ubuntu
servers:
@@ -74,4 +82,4 @@ contexts:
test:
cidr: "10.0.1.0/24"
port_security_enabled: true
-{% endfor %} \ No newline at end of file
+{% endfor %}
diff --git a/samples/storperf.yaml b/samples/storperf.yaml
index 2ea022173..00f74c1fe 100644
--- a/samples/storperf.yaml
+++ b/samples/storperf.yaml
@@ -38,3 +38,4 @@ scenarios:
context:
type: Dummy
+ name: Dummy
diff --git a/samples/test_suite.yaml b/samples/test_suite.yaml
index 9a766b06a..6f5f53b46 100644
--- a/samples/test_suite.yaml
+++ b/samples/test_suite.yaml
@@ -20,7 +20,8 @@ test_cases:
file_name: ping.yaml
-
file_name: ping-template.yaml
- task_args: '{"packetsize": "200"}'
+ task_args:
+ default: '{"packetsize": "200"}'
-
file_name: ping-template.yaml
task_args_file: "/tmp/test-args-file.json"
diff --git a/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_bottlenecks_scale_out.yaml b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_bottlenecks_scale_out.yaml
new file mode 100644
index 000000000..fe3595b14
--- /dev/null
+++ b/samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_bottlenecks_scale_out.yaml
@@ -0,0 +1,123 @@
+# 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
+
+{% set num_vnfs = num_vnfs or 2 %}
+{% set image_name = image_name or "yardstick-samplevnfs" %}
+{% set cpu_num = cpu_num or 10 %}
+{% set ram_num = ram_num or 10240 %}
+{% set disk_num = disk_num or 7 %}
+
+scenarios:
+ - type: NSPerf
+ traffic_profile: ../../traffic_profiles/ipv4_throughput-{{ num_vnfs }}.yaml
+ topology: acl-tg-topology-3node-{{ num_vnfs }}.yaml
+ nodes:
+ tg__0: tg_0.yardstick
+ tg__1: tg_1.yardstick
+{% for vnf_num in range(num_vnfs|int) %}
+ vnf__{{ vnf_num }}: vnf_{{ vnf_num }}.yardstick
+{% endfor %}
+ options:
+ framesize:
+ uplink: {64B: 100}
+ downlink: {64B: 100}
+ flow:
+ src_ip:
+{% for vnf_num in range(num_vnfs|int) %}
+ - {'tg__0': 'xe{{ vnf_num }}'}
+{% endfor %}
+ dst_ip:
+{% for vnf_num in range(num_vnfs|int) %}
+ - {'tg__1': 'xe{{ vnf_num }}'}
+{% endfor %}
+ count: 1
+ traffic_type: 4
+ rfc2544:
+ allowed_drop_rate: 0.0001 - 0.0001
+ correlated_traffic: true
+{% for vnf_num in range(num_vnfs|int) %}
+ vnf__{{ vnf_num }}:
+ rules: acl_1rule.yaml
+ vnf_config: {lb_config: 'SW', lb_count: 1, worker_config: '1C/1T', worker_threads: 1}
+{% endfor %}
+ runner:
+ type: Iteration
+ iterations: 10
+ interval: 35
+context:
+ name: yardstick
+ image: {{ image_name }}
+ flavor:
+ vcpus: {{ cpu_num }}
+ ram: {{ ram_num }}
+ disk: {{ disk_num }}
+ extra_specs:
+ hw:cpu_sockets: 1
+ hw:cpu_cores: {{ cpu_num }}
+ hw:cpu_threads: 1
+ user: ubuntu
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ tg_0:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ mgmt:
+ - mgmt
+{% for vnf_num in range(num_vnfs|int) %}
+ uplink_{{ vnf_num }}:
+ - xe{{ vnf_num }}
+{% endfor %}
+ tg_1:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ mgmt:
+ - mgmt
+{% for vnf_num in range(num_vnfs|int) %}
+ downlink_{{ vnf_num }}:
+ - xe{{ vnf_num }}
+{% endfor %}
+{% for vnf_num in range(num_vnfs|int) %}
+ vnf_{{ vnf_num }}:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ mgmt:
+ - mgmt
+ uplink_{{ vnf_num }}:
+ - xe0
+ downlink_{{ vnf_num }}:
+ - xe1
+{% endfor %}
+ networks:
+ mgmt:
+ cidr: '10.0.1.0/24'
+{% for vnf_num in range(num_vnfs|int) %}
+ uplink_{{ vnf_num }}:
+ cidr: '10.{{ vnf_num + 1 }}.0.0/24'
+ gateway_ip: 'null'
+ port_security_enabled: False
+ enable_dhcp: 'false'
+ downlink_{{ vnf_num }}:
+ cidr: '10.{{ vnf_num + 1 }}.1.0/24'
+ gateway_ip: 'null'
+ port_security_enabled: False
+ enable_dhcp: 'false'
+{% endfor %}
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-2.cfg
index 192f2f89a..ba0055321 100644
--- a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-2.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-2.cfg
@@ -49,7 +49,7 @@ mode=gen
tx port=p0
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac0} 3c fd fe 9f a3 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac0} 3c fd fe 9f a3 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 2]
@@ -59,7 +59,7 @@ mode=gen
tx port=p1
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac1} 3c fd fe 9f a3 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac1} 3c fd fe 9f a3 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 3]
@@ -67,12 +67,10 @@ name=rec 0
task=0
mode=lat
rx port=p0
-lat pos=38
[core 4]
name=rec 0
task=0
mode=lat
rx port=p1
-lat pos=38
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-4.cfg
index 0db21b681..41c31bf82 100644
--- a/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-4.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/gen_l2fwd-4.cfg
@@ -61,7 +61,7 @@ mode=gen
tx port=p0
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac0} 3c fd fe 9f a3 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac0} 3c fd fe 9f a3 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 2]
@@ -71,7 +71,7 @@ mode=gen
tx port=p1
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac1} 3c fd fe 9f a3 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac1} 3c fd fe 9f a3 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 3]
@@ -81,7 +81,7 @@ mode=gen
tx port=p2
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac2} 3c fd fe 9f a5 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac2} 3c fd fe 9f a5 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 4]
@@ -91,7 +91,7 @@ mode=gen
tx port=p3
bps=1250000000
; Ethernet + IP + UDP
-pkt inline=${sut_mac3} 3c fd fe 9f a5 08 08 00 45 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
+pkt inline=${sut_mac3} 3c fd fe 9f a5 08 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 c0 a8 01 01 13 88 13 88 00 08 55 7b
lat pos=38
[core 5]
@@ -99,25 +99,22 @@ name=rec 0
task=0
mode=lat
rx port=p0
-lat pos=38
[core 6]
name=rec 1
task=0
mode=lat
rx port=p1
-lat pos=38
[core 7]
name=rec 2
task=0
mode=lat
rx port=p2
-lat pos=38
[core 8]
name=rec 3
task=0
mode=lat
rx port=p3
-lat pos=38 \ No newline at end of file
+
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg
index efdc3ef17..61c13a0df 100644
--- a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-2.cfg
@@ -31,6 +31,8 @@ mempool size=4K
[variables]
$sut_mac0=@@dst_mac0
$sut_mac1=@@dst_mac1
+$tester_mac0=@@src_mac0
+$tester_mac1=@@src_mac1
[global]
start time=5
@@ -45,8 +47,8 @@ task=0
mode=gen
tx port=p0
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac0} ${tester_mac0} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
[core 2]
@@ -55,19 +57,18 @@ task=0
mode=gen
tx port=p1
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac1} ${tester_mac1} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
[core 3]
+name=REC_P0
task=0
mode=lat
rx port=p0
-lat pos=42
[core 4]
+name=REC_P1
task=0
mode=lat
rx port=p1
-lat pos=42
-
diff --git a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg
index bf226f822..087962647 100644
--- a/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/gen_l3fwd-4.cfg
@@ -39,7 +39,10 @@ $sut_mac0=@@dst_mac0
$sut_mac1=@@dst_mac1
$sut_mac2=@@dst_mac2
$sut_mac3=@@dst_mac3
-
+$tester_mac0=@@src_mac0
+$tester_mac1=@@src_mac1
+$tester_mac2=@@src_mac2
+$tester_mac3=@@src_mac3
[global]
start time=5
name=Routing Gen
@@ -53,8 +56,8 @@ task=0
mode=gen
tx port=p0
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac0} ${tester_mac0} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
[core 2]
@@ -63,8 +66,8 @@ task=0
mode=gen
tx port=p1
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac1} ${tester_mac1} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
[core 3]
@@ -73,8 +76,8 @@ task=0
mode=gen
tx port=p2
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac2} ${tester_mac2} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
[core 4]
@@ -83,32 +86,30 @@ task=0
mode=gen
tx port=p3
bps=1250000000
-pkt inline=00 00 01 00 00 01 00 00 02 00 00 02 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
-random=0000101XXXXXXXXXXXXX0000XXXXXXXX
+pkt inline=${sut_mac3} ${tester_mac3} 08 00 45 00 00 1c 00 01 00 00 40 11 f7 7d c0 a8 01 01 0a 00 00 00 13 88 13 88 00 08 55 7b
+random=0000101XXXXXXXXXXXXX0000XXXXXXX1
rand_offset=30
-
[core 5]
+name=REC_P0
task=0
mode=lat
rx port=p0
-lat pos=42
[core 6]
+name=REC_P1
task=0
mode=lat
rx port=p1
-lat pos=42
-
[core 7]
+name=REC_P2
task=0
mode=lat
rx port=p2
-lat pos=42
[core 8]
+name=REC_P3
task=0
mode=lat
rx port=p3
-lat pos=42 \ No newline at end of file
diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg
index 17384940d..80b29f349 100644
--- a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-2.cfg
@@ -14,8 +14,6 @@
#
#;
-[lua]
-lpm4 = dofile("ipv4.lua")
[eal options]
-n=4 ; force number of memory channels
@@ -31,6 +29,9 @@ mac=hardware
[defaults]
mempool size=4K
+[lua]
+lpm4 = dofile("ipv4-2port.lua")
+
[global]
start time=5
name=Routing (2x)
@@ -54,4 +55,4 @@ mode=routing
route table=lpm4
rx port=if1
tx port=if0,if1
-drop=no \ No newline at end of file
+drop=no
diff --git a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg
index d5822225f..09adbbe55 100644
--- a/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg
+++ b/samples/vnf_samples/nsut/prox/configs/handle_l3fwd-4.cfg
@@ -14,8 +14,6 @@
#
#;
-[lua]
-lpm4 = dofile("ipv4.lua")
[eal options]
-n=4 ; force number of memory channels
@@ -37,6 +35,9 @@ mac=hardware
[defaults]
mempool size=4K
+[lua]
+lpm4 = dofile("ipv4.lua")
+
[global]
start time=5
name=Routing (4x)
diff --git a/samples/vnf_samples/nsut/prox/configs/ipv4-2port.lua b/samples/vnf_samples/nsut/prox/configs/ipv4-2port.lua
new file mode 100644
index 000000000..efeb3aa93
--- /dev/null
+++ b/samples/vnf_samples/nsut/prox/configs/ipv4-2port.lua
@@ -0,0 +1,100 @@
+--
+-- Copyright (c) 2010-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.
+--
+
+require("parameters")
+
+local lpm4 = {}
+lpm4.next_hops = {
+ {id = 0, port_id = 0, ip = ip("1.1.1.1"), mac = mac(tester_mac0), mpls = 0x112},
+ {id = 1, port_id = 1, ip = ip("2.1.1.1"), mac = mac(tester_mac1), mpls = 0x212},
+ {id = 2, port_id = 0, ip = ip("3.1.1.1"), mac = mac(tester_mac0), mpls = 0x312},
+ {id = 3, port_id = 1, ip = ip("4.1.1.1"), mac = mac(tester_mac1), mpls = 0x412},
+ {id = 4, port_id = 0, ip = ip("5.1.1.1"), mac = mac(tester_mac0), mpls = 0x512},
+ {id = 5, port_id = 1, ip = ip("6.1.1.1"), mac = mac(tester_mac1), mpls = 0x612},
+ {id = 6, port_id = 0, ip = ip("7.1.1.1"), mac = mac(tester_mac0), mpls = 0x712},
+ {id = 7, port_id = 1, ip = ip("8.1.1.1"), mac = mac(tester_mac1), mpls = 0x812},
+ {id = 8, port_id = 0, ip = ip("9.1.1.1"), mac = mac(tester_mac0), mpls = 0x912},
+ {id = 9, port_id = 1, ip = ip("10.1.1.1"), mac = mac(tester_mac1), mpls = 0x1012},
+ {id = 10, port_id = 0, ip = ip("11.1.1.1"), mac = mac(tester_mac0), mpls = 0x1112},
+ {id = 11, port_id = 1, ip = ip("12.1.1.1"), mac = mac(tester_mac1), mpls = 0x1212},
+ {id = 12, port_id = 0, ip = ip("13.1.1.1"), mac = mac(tester_mac0), mpls = 0x1312},
+ {id = 13, port_id = 1, ip = ip("14.1.1.1"), mac = mac(tester_mac1), mpls = 0x1412},
+ {id = 14, port_id = 0, ip = ip("15.1.1.1"), mac = mac(tester_mac0), mpls = 0x1512},
+ {id = 15, port_id = 1, ip = ip("16.1.1.1"), mac = mac(tester_mac1), mpls = 0x1612},
+ {id = 16, port_id = 0, ip = ip("17.1.1.1"), mac = mac(tester_mac0), mpls = 0x1712},
+ {id = 17, port_id = 1, ip = ip("18.1.1.1"), mac = mac(tester_mac1), mpls = 0x1812},
+ {id = 18, port_id = 0, ip = ip("19.1.1.1"), mac = mac(tester_mac0), mpls = 0x1912},
+ {id = 19, port_id = 1, ip = ip("20.1.1.1"), mac = mac(tester_mac1), mpls = 0x2012},
+ {id = 20, port_id = 0, ip = ip("21.1.1.1"), mac = mac(tester_mac0), mpls = 0x2112},
+ {id = 21, port_id = 1, ip = ip("22.1.1.1"), mac = mac(tester_mac1), mpls = 0x2212},
+ {id = 22, port_id = 0, ip = ip("23.1.1.1"), mac = mac(tester_mac0), mpls = 0x2312},
+ {id = 23, port_id = 1, ip = ip("24.1.1.1"), mac = mac(tester_mac1), mpls = 0x2412},
+ {id = 24, port_id = 0, ip = ip("25.1.1.1"), mac = mac(tester_mac0), mpls = 0x2512},
+ {id = 25, port_id = 1, ip = ip("26.1.1.1"), mac = mac(tester_mac1), mpls = 0x2612},
+ {id = 26, port_id = 0, ip = ip("27.1.1.1"), mac = mac(tester_mac0), mpls = 0x2712},
+ {id = 27, port_id = 1, ip = ip("28.1.1.1"), mac = mac(tester_mac1), mpls = 0x2812},
+ {id = 28, port_id = 0, ip = ip("29.1.1.1"), mac = mac(tester_mac0), mpls = 0x2912},
+ {id = 29, port_id = 1, ip = ip("30.1.1.1"), mac = mac(tester_mac1), mpls = 0x3012},
+ {id = 30, port_id = 0, ip = ip("31.1.1.1"), mac = mac(tester_mac0), mpls = 0x3112},
+ {id = 31, port_id = 1, ip = ip("32.1.1.1"), mac = mac(tester_mac1), mpls = 0x3212},
+ {id = 32, port_id = 0, ip = ip("33.1.1.1"), mac = mac(tester_mac0), mpls = 0x3312},
+ {id = 33, port_id = 1, ip = ip("34.1.1.1"), mac = mac(tester_mac1), mpls = 0x3412},
+ {id = 34, port_id = 0, ip = ip("35.1.1.1"), mac = mac(tester_mac0), mpls = 0x3512},
+ {id = 35, port_id = 1, ip = ip("36.1.1.1"), mac = mac(tester_mac1), mpls = 0x3612},
+ {id = 36, port_id = 0, ip = ip("37.1.1.1"), mac = mac(tester_mac0), mpls = 0x3712},
+ {id = 37, port_id = 1, ip = ip("38.1.1.1"), mac = mac(tester_mac1), mpls = 0x3812},
+ {id = 38, port_id = 0, ip = ip("39.1.1.1"), mac = mac(tester_mac0), mpls = 0x3912},
+ {id = 39, port_id = 1, ip = ip("40.1.1.1"), mac = mac(tester_mac1), mpls = 0x4012},
+ {id = 40, port_id = 0, ip = ip("41.1.1.1"), mac = mac(tester_mac0), mpls = 0x4112},
+ {id = 41, port_id = 1, ip = ip("42.1.1.1"), mac = mac(tester_mac1), mpls = 0x4212},
+ {id = 42, port_id = 0, ip = ip("43.1.1.1"), mac = mac(tester_mac0), mpls = 0x4312},
+ {id = 43, port_id = 1, ip = ip("44.1.1.1"), mac = mac(tester_mac1), mpls = 0x4412},
+ {id = 44, port_id = 0, ip = ip("45.1.1.1"), mac = mac(tester_mac0), mpls = 0x4512},
+ {id = 45, port_id = 1, ip = ip("46.1.1.1"), mac = mac(tester_mac1), mpls = 0x4612},
+ {id = 46, port_id = 0, ip = ip("47.1.1.1"), mac = mac(tester_mac0), mpls = 0x4712},
+ {id = 47, port_id = 1, ip = ip("48.1.1.1"), mac = mac(tester_mac1), mpls = 0x4812},
+ {id = 48, port_id = 0, ip = ip("49.1.1.1"), mac = mac(tester_mac0), mpls = 0x4912},
+ {id = 49, port_id = 1, ip = ip("50.1.1.1"), mac = mac(tester_mac1), mpls = 0x5012},
+ {id = 50, port_id = 0, ip = ip("51.1.1.1"), mac = mac(tester_mac0), mpls = 0x5112},
+ {id = 51, port_id = 1, ip = ip("52.1.1.1"), mac = mac(tester_mac1), mpls = 0x5212},
+ {id = 52, port_id = 0, ip = ip("53.1.1.1"), mac = mac(tester_mac0), mpls = 0x5312},
+ {id = 53, port_id = 1, ip = ip("54.1.1.1"), mac = mac(tester_mac1), mpls = 0x5412},
+ {id = 54, port_id = 0, ip = ip("55.1.1.1"), mac = mac(tester_mac0), mpls = 0x5512},
+ {id = 55, port_id = 1, ip = ip("56.1.1.1"), mac = mac(tester_mac1), mpls = 0x5612},
+ {id = 56, port_id = 0, ip = ip("57.1.1.1"), mac = mac(tester_mac0), mpls = 0x5712},
+ {id = 57, port_id = 1, ip = ip("58.1.1.1"), mac = mac(tester_mac1), mpls = 0x5812},
+ {id = 58, port_id = 0, ip = ip("59.1.1.1"), mac = mac(tester_mac0), mpls = 0x5912},
+ {id = 59, port_id = 1, ip = ip("60.1.1.1"), mac = mac(tester_mac1), mpls = 0x6012},
+ {id = 60, port_id = 0, ip = ip("61.1.1.1"), mac = mac(tester_mac0), mpls = 0x6112},
+ {id = 61, port_id = 1, ip = ip("62.1.1.1"), mac = mac(tester_mac1), mpls = 0x6212},
+ {id = 62, port_id = 0, ip = ip("63.1.1.1"), mac = mac(tester_mac0), mpls = 0x6312},
+ {id = 63, port_id = 1, ip = ip("64.1.1.1"), mac = mac(tester_mac1), mpls = 0x6412},
+}
+
+lpm4.routes = {};
+
+base_ip = 10 * 2^24;
+
+for i = 1,2^13 do
+ res = ip(base_ip + (1 * 2^12) * (i - 1));
+
+ lpm4.routes[i] = {
+ cidr = {ip = res, depth = 24},
+ next_hop_id = (i - 1) % 64,
+ }
+end
+
+return lpm4
diff --git a/samples/vnf_samples/nsut/prox/configs/ipv4.lua b/samples/vnf_samples/nsut/prox/configs/ipv4.lua
index 6a8fbe183..df471d737 100644
--- a/samples/vnf_samples/nsut/prox/configs/ipv4.lua
+++ b/samples/vnf_samples/nsut/prox/configs/ipv4.lua
@@ -13,72 +13,74 @@
-- limitations under the License.
--
+require("parameters")
+
local lpm4 = {}
lpm4.next_hops = {
- {id = 0, port_id = 0, ip = ip("1.1.1.1"), mac = mac("00:00:00:00:00:01"), mpls = 0x112},
- {id = 1, port_id = 1, ip = ip("2.1.1.1"), mac = mac("00:00:00:00:00:02"), mpls = 0x212},
- {id = 2, port_id = 0, ip = ip("3.1.1.1"), mac = mac("00:00:00:00:00:03"), mpls = 0x312},
- {id = 3, port_id = 1, ip = ip("4.1.1.1"), mac = mac("00:00:00:00:00:04"), mpls = 0x412},
- {id = 4, port_id = 0, ip = ip("5.1.1.1"), mac = mac("00:00:00:00:00:05"), mpls = 0x512},
- {id = 5, port_id = 1, ip = ip("6.1.1.1"), mac = mac("00:00:00:00:00:06"), mpls = 0x612},
- {id = 6, port_id = 0, ip = ip("7.1.1.1"), mac = mac("00:00:00:00:00:07"), mpls = 0x712},
- {id = 7, port_id = 1, ip = ip("8.1.1.1"), mac = mac("00:00:00:00:00:08"), mpls = 0x812},
- {id = 8, port_id = 0, ip = ip("9.1.1.1"), mac = mac("00:00:00:00:00:09"), mpls = 0x912},
- {id = 9, port_id = 1, ip = ip("10.1.1.1"), mac = mac("00:00:00:00:00:10"), mpls = 0x1012},
- {id = 10, port_id = 0, ip = ip("11.1.1.1"), mac = mac("00:00:00:00:00:11"), mpls = 0x1112},
- {id = 11, port_id = 1, ip = ip("12.1.1.1"), mac = mac("00:00:00:00:00:12"), mpls = 0x1212},
- {id = 12, port_id = 0, ip = ip("13.1.1.1"), mac = mac("00:00:00:00:00:13"), mpls = 0x1312},
- {id = 13, port_id = 1, ip = ip("14.1.1.1"), mac = mac("00:00:00:00:00:14"), mpls = 0x1412},
- {id = 14, port_id = 0, ip = ip("15.1.1.1"), mac = mac("00:00:00:00:00:15"), mpls = 0x1512},
- {id = 15, port_id = 1, ip = ip("16.1.1.1"), mac = mac("00:00:00:00:00:16"), mpls = 0x1612},
- {id = 16, port_id = 0, ip = ip("17.1.1.1"), mac = mac("00:00:00:00:00:17"), mpls = 0x1712},
- {id = 17, port_id = 1, ip = ip("18.1.1.1"), mac = mac("00:00:00:00:00:18"), mpls = 0x1812},
- {id = 18, port_id = 0, ip = ip("19.1.1.1"), mac = mac("00:00:00:00:00:19"), mpls = 0x1912},
- {id = 19, port_id = 1, ip = ip("20.1.1.1"), mac = mac("00:00:00:00:00:20"), mpls = 0x2012},
- {id = 20, port_id = 0, ip = ip("21.1.1.1"), mac = mac("00:00:00:00:00:21"), mpls = 0x2112},
- {id = 21, port_id = 1, ip = ip("22.1.1.1"), mac = mac("00:00:00:00:00:22"), mpls = 0x2212},
- {id = 22, port_id = 0, ip = ip("23.1.1.1"), mac = mac("00:00:00:00:00:23"), mpls = 0x2312},
- {id = 23, port_id = 1, ip = ip("24.1.1.1"), mac = mac("00:00:00:00:00:24"), mpls = 0x2412},
- {id = 24, port_id = 0, ip = ip("25.1.1.1"), mac = mac("00:00:00:00:00:25"), mpls = 0x2512},
- {id = 25, port_id = 1, ip = ip("26.1.1.1"), mac = mac("00:00:00:00:00:26"), mpls = 0x2612},
- {id = 26, port_id = 0, ip = ip("27.1.1.1"), mac = mac("00:00:00:00:00:27"), mpls = 0x2712},
- {id = 27, port_id = 1, ip = ip("28.1.1.1"), mac = mac("00:00:00:00:00:28"), mpls = 0x2812},
- {id = 28, port_id = 0, ip = ip("29.1.1.1"), mac = mac("00:00:00:00:00:29"), mpls = 0x2912},
- {id = 29, port_id = 1, ip = ip("30.1.1.1"), mac = mac("00:00:00:00:00:30"), mpls = 0x3012},
- {id = 30, port_id = 0, ip = ip("31.1.1.1"), mac = mac("00:00:00:00:00:31"), mpls = 0x3112},
- {id = 31, port_id = 1, ip = ip("32.1.1.1"), mac = mac("00:00:00:00:00:32"), mpls = 0x3212},
- {id = 32, port_id = 0, ip = ip("33.1.1.1"), mac = mac("00:00:00:00:00:33"), mpls = 0x3312},
- {id = 33, port_id = 1, ip = ip("34.1.1.1"), mac = mac("00:00:00:00:00:34"), mpls = 0x3412},
- {id = 34, port_id = 0, ip = ip("35.1.1.1"), mac = mac("00:00:00:00:00:35"), mpls = 0x3512},
- {id = 35, port_id = 1, ip = ip("36.1.1.1"), mac = mac("00:00:00:00:00:36"), mpls = 0x3612},
- {id = 36, port_id = 0, ip = ip("37.1.1.1"), mac = mac("00:00:00:00:00:37"), mpls = 0x3712},
- {id = 37, port_id = 1, ip = ip("38.1.1.1"), mac = mac("00:00:00:00:00:38"), mpls = 0x3812},
- {id = 38, port_id = 0, ip = ip("39.1.1.1"), mac = mac("00:00:00:00:00:39"), mpls = 0x3912},
- {id = 39, port_id = 1, ip = ip("40.1.1.1"), mac = mac("00:00:00:00:00:40"), mpls = 0x4012},
- {id = 40, port_id = 0, ip = ip("41.1.1.1"), mac = mac("00:00:00:00:00:41"), mpls = 0x4112},
- {id = 41, port_id = 1, ip = ip("42.1.1.1"), mac = mac("00:00:00:00:00:42"), mpls = 0x4212},
- {id = 42, port_id = 0, ip = ip("43.1.1.1"), mac = mac("00:00:00:00:00:43"), mpls = 0x4312},
- {id = 43, port_id = 1, ip = ip("44.1.1.1"), mac = mac("00:00:00:00:00:44"), mpls = 0x4412},
- {id = 44, port_id = 0, ip = ip("45.1.1.1"), mac = mac("00:00:00:00:00:45"), mpls = 0x4512},
- {id = 45, port_id = 1, ip = ip("46.1.1.1"), mac = mac("00:00:00:00:00:46"), mpls = 0x4612},
- {id = 46, port_id = 0, ip = ip("47.1.1.1"), mac = mac("00:00:00:00:00:47"), mpls = 0x4712},
- {id = 47, port_id = 1, ip = ip("48.1.1.1"), mac = mac("00:00:00:00:00:48"), mpls = 0x4812},
- {id = 48, port_id = 0, ip = ip("49.1.1.1"), mac = mac("00:00:00:00:00:49"), mpls = 0x4912},
- {id = 49, port_id = 1, ip = ip("50.1.1.1"), mac = mac("00:00:00:00:00:50"), mpls = 0x5012},
- {id = 50, port_id = 0, ip = ip("51.1.1.1"), mac = mac("00:00:00:00:00:51"), mpls = 0x5112},
- {id = 51, port_id = 1, ip = ip("52.1.1.1"), mac = mac("00:00:00:00:00:52"), mpls = 0x5212},
- {id = 52, port_id = 0, ip = ip("53.1.1.1"), mac = mac("00:00:00:00:00:53"), mpls = 0x5312},
- {id = 53, port_id = 1, ip = ip("54.1.1.1"), mac = mac("00:00:00:00:00:54"), mpls = 0x5412},
- {id = 54, port_id = 0, ip = ip("55.1.1.1"), mac = mac("00:00:00:00:00:55"), mpls = 0x5512},
- {id = 55, port_id = 1, ip = ip("56.1.1.1"), mac = mac("00:00:00:00:00:56"), mpls = 0x5612},
- {id = 56, port_id = 0, ip = ip("57.1.1.1"), mac = mac("00:00:00:00:00:57"), mpls = 0x5712},
- {id = 57, port_id = 1, ip = ip("58.1.1.1"), mac = mac("00:00:00:00:00:58"), mpls = 0x5812},
- {id = 58, port_id = 0, ip = ip("59.1.1.1"), mac = mac("00:00:00:00:00:59"), mpls = 0x5912},
- {id = 59, port_id = 1, ip = ip("60.1.1.1"), mac = mac("00:00:00:00:00:60"), mpls = 0x6012},
- {id = 60, port_id = 0, ip = ip("61.1.1.1"), mac = mac("00:00:00:00:00:61"), mpls = 0x6112},
- {id = 61, port_id = 1, ip = ip("62.1.1.1"), mac = mac("00:00:00:00:00:62"), mpls = 0x6212},
- {id = 62, port_id = 0, ip = ip("63.1.1.1"), mac = mac("00:00:00:00:00:63"), mpls = 0x6312},
- {id = 63, port_id = 1, ip = ip("64.1.1.1"), mac = mac("00:00:00:00:00:64"), mpls = 0x6412},
+ {id = 0, port_id = 0, ip = ip("1.1.1.1"), mac = mac(tester_mac0), mpls = 0x112},
+ {id = 1, port_id = 1, ip = ip("2.1.1.1"), mac = mac(tester_mac1), mpls = 0x212},
+ {id = 2, port_id = 0, ip = ip("3.1.1.1"), mac = mac(tester_mac2), mpls = 0x312},
+ {id = 3, port_id = 1, ip = ip("4.1.1.1"), mac = mac(tester_mac3), mpls = 0x412},
+ {id = 4, port_id = 0, ip = ip("5.1.1.1"), mac = mac(tester_mac0), mpls = 0x512},
+ {id = 5, port_id = 1, ip = ip("6.1.1.1"), mac = mac(tester_mac1), mpls = 0x612},
+ {id = 6, port_id = 0, ip = ip("7.1.1.1"), mac = mac(tester_mac2), mpls = 0x712},
+ {id = 7, port_id = 1, ip = ip("8.1.1.1"), mac = mac(tester_mac3), mpls = 0x812},
+ {id = 8, port_id = 0, ip = ip("9.1.1.1"), mac = mac(tester_mac0), mpls = 0x912},
+ {id = 9, port_id = 1, ip = ip("10.1.1.1"), mac = mac(tester_mac1), mpls = 0x1012},
+ {id = 10, port_id = 0, ip = ip("11.1.1.1"), mac = mac(tester_mac2), mpls = 0x1112},
+ {id = 11, port_id = 1, ip = ip("12.1.1.1"), mac = mac(tester_mac3), mpls = 0x1212},
+ {id = 12, port_id = 0, ip = ip("13.1.1.1"), mac = mac(tester_mac0), mpls = 0x1312},
+ {id = 13, port_id = 1, ip = ip("14.1.1.1"), mac = mac(tester_mac1), mpls = 0x1412},
+ {id = 14, port_id = 0, ip = ip("15.1.1.1"), mac = mac(tester_mac2), mpls = 0x1512},
+ {id = 15, port_id = 1, ip = ip("16.1.1.1"), mac = mac(tester_mac3), mpls = 0x1612},
+ {id = 16, port_id = 0, ip = ip("17.1.1.1"), mac = mac(tester_mac0), mpls = 0x1712},
+ {id = 17, port_id = 1, ip = ip("18.1.1.1"), mac = mac(tester_mac1), mpls = 0x1812},
+ {id = 18, port_id = 0, ip = ip("19.1.1.1"), mac = mac(tester_mac2), mpls = 0x1912},
+ {id = 19, port_id = 1, ip = ip("20.1.1.1"), mac = mac(tester_mac3), mpls = 0x2012},
+ {id = 20, port_id = 0, ip = ip("21.1.1.1"), mac = mac(tester_mac0), mpls = 0x2112},
+ {id = 21, port_id = 1, ip = ip("22.1.1.1"), mac = mac(tester_mac1), mpls = 0x2212},
+ {id = 22, port_id = 0, ip = ip("23.1.1.1"), mac = mac(tester_mac2), mpls = 0x2312},
+ {id = 23, port_id = 1, ip = ip("24.1.1.1"), mac = mac(tester_mac3), mpls = 0x2412},
+ {id = 24, port_id = 0, ip = ip("25.1.1.1"), mac = mac(tester_mac0), mpls = 0x2512},
+ {id = 25, port_id = 1, ip = ip("26.1.1.1"), mac = mac(tester_mac1), mpls = 0x2612},
+ {id = 26, port_id = 0, ip = ip("27.1.1.1"), mac = mac(tester_mac2), mpls = 0x2712},
+ {id = 27, port_id = 1, ip = ip("28.1.1.1"), mac = mac(tester_mac3), mpls = 0x2812},
+ {id = 28, port_id = 0, ip = ip("29.1.1.1"), mac = mac(tester_mac0), mpls = 0x2912},
+ {id = 29, port_id = 1, ip = ip("30.1.1.1"), mac = mac(tester_mac1), mpls = 0x3012},
+ {id = 30, port_id = 0, ip = ip("31.1.1.1"), mac = mac(tester_mac2), mpls = 0x3112},
+ {id = 31, port_id = 1, ip = ip("32.1.1.1"), mac = mac(tester_mac3), mpls = 0x3212},
+ {id = 32, port_id = 0, ip = ip("33.1.1.1"), mac = mac(tester_mac0), mpls = 0x3312},
+ {id = 33, port_id = 1, ip = ip("34.1.1.1"), mac = mac(tester_mac1), mpls = 0x3412},
+ {id = 34, port_id = 0, ip = ip("35.1.1.1"), mac = mac(tester_mac2), mpls = 0x3512},
+ {id = 35, port_id = 1, ip = ip("36.1.1.1"), mac = mac(tester_mac3), mpls = 0x3612},
+ {id = 36, port_id = 0, ip = ip("37.1.1.1"), mac = mac(tester_mac0), mpls = 0x3712},
+ {id = 37, port_id = 1, ip = ip("38.1.1.1"), mac = mac(tester_mac1), mpls = 0x3812},
+ {id = 38, port_id = 0, ip = ip("39.1.1.1"), mac = mac(tester_mac2), mpls = 0x3912},
+ {id = 39, port_id = 1, ip = ip("40.1.1.1"), mac = mac(tester_mac3), mpls = 0x4012},
+ {id = 40, port_id = 0, ip = ip("41.1.1.1"), mac = mac(tester_mac0), mpls = 0x4112},
+ {id = 41, port_id = 1, ip = ip("42.1.1.1"), mac = mac(tester_mac1), mpls = 0x4212},
+ {id = 42, port_id = 0, ip = ip("43.1.1.1"), mac = mac(tester_mac2), mpls = 0x4312},
+ {id = 43, port_id = 1, ip = ip("44.1.1.1"), mac = mac(tester_mac3), mpls = 0x4412},
+ {id = 44, port_id = 0, ip = ip("45.1.1.1"), mac = mac(tester_mac0), mpls = 0x4512},
+ {id = 45, port_id = 1, ip = ip("46.1.1.1"), mac = mac(tester_mac1), mpls = 0x4612},
+ {id = 46, port_id = 0, ip = ip("47.1.1.1"), mac = mac(tester_mac2), mpls = 0x4712},
+ {id = 47, port_id = 1, ip = ip("48.1.1.1"), mac = mac(tester_mac3), mpls = 0x4812},
+ {id = 48, port_id = 0, ip = ip("49.1.1.1"), mac = mac(tester_mac0), mpls = 0x4912},
+ {id = 49, port_id = 1, ip = ip("50.1.1.1"), mac = mac(tester_mac1), mpls = 0x5012},
+ {id = 50, port_id = 0, ip = ip("51.1.1.1"), mac = mac(tester_mac2), mpls = 0x5112},
+ {id = 51, port_id = 1, ip = ip("52.1.1.1"), mac = mac(tester_mac3), mpls = 0x5212},
+ {id = 52, port_id = 0, ip = ip("53.1.1.1"), mac = mac(tester_mac0), mpls = 0x5312},
+ {id = 53, port_id = 1, ip = ip("54.1.1.1"), mac = mac(tester_mac1), mpls = 0x5412},
+ {id = 54, port_id = 0, ip = ip("55.1.1.1"), mac = mac(tester_mac2), mpls = 0x5512},
+ {id = 55, port_id = 1, ip = ip("56.1.1.1"), mac = mac(tester_mac3), mpls = 0x5612},
+ {id = 56, port_id = 0, ip = ip("57.1.1.1"), mac = mac(tester_mac0), mpls = 0x5712},
+ {id = 57, port_id = 1, ip = ip("58.1.1.1"), mac = mac(tester_mac1), mpls = 0x5812},
+ {id = 58, port_id = 0, ip = ip("59.1.1.1"), mac = mac(tester_mac2), mpls = 0x5912},
+ {id = 59, port_id = 1, ip = ip("60.1.1.1"), mac = mac(tester_mac3), mpls = 0x6012},
+ {id = 60, port_id = 0, ip = ip("61.1.1.1"), mac = mac(tester_mac0), mpls = 0x6112},
+ {id = 61, port_id = 1, ip = ip("62.1.1.1"), mac = mac(tester_mac1), mpls = 0x6212},
+ {id = 62, port_id = 0, ip = ip("63.1.1.1"), mac = mac(tester_mac2), mpls = 0x6312},
+ {id = 63, port_id = 1, ip = ip("64.1.1.1"), mac = mac(tester_mac3), mpls = 0x6412},
}
lpm4.routes = {};
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
index b1fef6d45..69778ed8c 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-2.yaml
@@ -26,6 +26,8 @@ scenarios:
vnf__0: vnf_0.yardstick
options:
+ interface_speed_gbps: 10
+
vnf__0:
prox_path: /opt/nsb_bin/prox
prox_config: "configs/handle_l2fwd-2.cfg"
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
index e17c5c2a1..ab067a836 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l2fwd-4.yaml
@@ -26,6 +26,8 @@ scenarios:
vnf__0: vnf_0.yardstick
options:
+ interface_speed_gbps: 10
+
vnf__0:
prox_path: /opt/nsb_bin/prox
prox_config: "configs/handle_l2fwd-4.cfg"
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
index 843073343..8d116bbde 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-2.yaml
@@ -32,7 +32,8 @@ scenarios:
prox_args:
"-t": ""
prox_files:
- "configs/ipv4.lua" : ""
+ "configs/ipv4-2port.lua" : ""
+ prox_generate_parameter: True
tg__0:
prox_path: /opt/nsb_bin/prox
@@ -44,7 +45,7 @@ scenarios:
runner:
type: Duration
# we kill after duration, independent of test duration, so set this high
- duration: 300
+ duration: 1800
context:
type: Node
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
index bfc1eead2..af69ab518 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_baremetal_l3fwd-4.yaml
@@ -33,6 +33,7 @@ scenarios:
"-t": ""
prox_files:
"configs/ipv4.lua" : ""
+ prox_generate_parameter: True
tg__0:
prox_path: /opt/nsb_bin/prox
@@ -44,7 +45,7 @@ scenarios:
runner:
type: Duration
# we kill after duration, independent of test duration, so set this high
- duration: 300
+ duration: 1800
context:
type: Node
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml
index d82bfb215..5003ef66c 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-2.yaml
@@ -32,7 +32,8 @@ scenarios:
prox_args:
"-t": ""
prox_files:
- "configs/ipv4.lua" : ""
+ "configs/ipv4-2port.lua" : ""
+ prox_generate_parameter: True
tg__0:
prox_path: /opt/nsb_bin/prox
@@ -44,7 +45,7 @@ scenarios:
runner:
type: Duration
# we kill after duration, independent of test duration, so set this high
- duration: 300
+ duration: 1800
context:
name: yardstick
diff --git a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml
index d4b2be03d..db18949fc 100644
--- a/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml
+++ b/samples/vnf_samples/nsut/prox/tc_prox_heat_context_l3fwd-4.yaml
@@ -33,6 +33,7 @@ scenarios:
"-t": ""
prox_files:
"configs/ipv4.lua" : ""
+ prox_generate_parameter: True
tg__0:
prox_path: /opt/nsb_bin/prox
@@ -44,7 +45,7 @@ scenarios:
runner:
type: Duration
# we kill after duration, independent of test duration, so set this high
- duration: 300
+ duration: 1800
context:
name: yardstick
diff --git a/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml b/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml
index 9b2a152f3..aca7c2102 100644
--- a/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml
+++ b/samples/vnf_samples/vnf_descriptors/ixia_rfc2544_tpl.yaml
@@ -29,7 +29,6 @@ vnfd:vnfd-catalog:
tcl_port: '{{tg_config.tcl_port}}' # tcl server port
lib_path: '{{tg_config.lib_path}}'
root_dir: '{{tg_config.root_dir}}'
- py_lib_path: '{{tg_config.py_lib_path}}'
py_bin_path: '{{tg_config.py_bin_path}}'
dut_result_dir: '{{tg_config.dut_result_dir}}'
version: '{{tg_config.version}}'
diff --git a/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml b/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml
index ad4953fce..0324bb8fd 100644
--- a/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml
+++ b/samples/vnf_samples/vnf_descriptors/tg_ixload.yaml
@@ -29,7 +29,6 @@ vnfd:vnfd-catalog:
tcl_port: '{{tg_config.tcl_port}}' # tcl server port
lib_path: '{{tg_config.lib_path}}'
root_dir: '{{tg_config.root_dir}}'
- py_lib_path: '{{tg_config.py_lib_path}}'
py_bin_path: '{{tg_config.py_bin_path}}'
dut_result_dir: '{{tg_config.dut_result_dir}}'
version: '{{tg_config.version}}'
diff --git a/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml b/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml
index ffbfbdec0..def8cdcef 100644
--- a/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml
+++ b/samples/vnf_samples/vnf_descriptors/tg_ixload_4port.yaml
@@ -28,7 +28,6 @@ vnfd:vnfd-catalog:
tcl_port: '{{tg_config.tcl_port}}' # tcl server port
lib_path: '{{tg_config.lib_path}}'
root_dir: '{{tg_config.root_dir}}'
- py_lib_path: '{{tg_config.py_lib_path}}'
dut_result_dir: '{{tg_config.dut_result_dir}}'
version: '{{tg_config.version}}'
vdu:
diff --git a/tests/ci/load_images.sh b/tests/ci/load_images.sh
index caaba9e8b..1e1591ce3 100755
--- a/tests/ci/load_images.sh
+++ b/tests/ci/load_images.sh
@@ -43,6 +43,12 @@ if [ "${YARD_IMG_ARCH}" == "arm64" ]; then
fi
fi
+cleanup_loopbacks() {
+ # try again to cleanup loopbacks in case of error
+ losetup -a
+ losetup -O NAME,BACK-FILE | awk '/yardstick/ { print $1 }' | xargs -l1 losetup -v -d || true
+}
+
build_yardstick_image()
{
echo
@@ -56,6 +62,7 @@ build_yardstick_image()
# Build the image. Retry once if the build fails
$cmd || $cmd
+ cleanup_loopbacks
if [ ! -f "${RAW_IMAGE}" ]; then
echo "Failed building RAW image"
exit 1
@@ -67,13 +74,28 @@ build_yardstick_image()
cd ${ANSIBLE_SCRIPTS} &&\
ansible-playbook \
-e img_property="normal" \
+ -e YARD_IMG_ARCH=${YARD_IMG_ARCH} \
-vvv -i inventory.ini build_yardstick_image.yml
+ cleanup_loopbacks
if [ ! -f "${QCOW_IMAGE}" ]; then
echo "Failed building QCOW image"
exit 1
fi
fi
+ # DPDK compile is not enabled for arm64 yet so disable for now
+ # JIRA: YARSTICK-1124
+ if [[ ! -f "${QCOW_NSB_IMAGE}" && ${DEPLOY_SCENARIO} == *[_-]ovs_dpdk[_-]* && "${YARD_IMG_ARCH}" != "arm64" ]]; then
+ ansible-playbook \
+ -e img_property="nsb" \
+ -e YARD_IMG_ARCH=${YARD_IMG_ARCH} \
+ -vvv -i inventory.ini build_yardstick_image.yml
+ cleanup_loopbacks
+ if [ ! -f "${QCOW_NSB_IMAGE}" ]; then
+ echo "Failed building QCOW NSB image"
+ exit 1
+ fi
+ fi
fi
}
@@ -111,6 +133,18 @@ load_yardstick_image()
${EXTRA_PARAMS} \
--file ${QCOW_IMAGE} \
yardstick-image)
+ # DPDK compile is not enabled for arm64 yet so disable NSB images for now
+ # JIRA: YARSTICK-1124
+ if [[ $DEPLOY_SCENARIO == *[_-]ovs_dpdk[_-]* && "${YARD_IMG_ARCH}" != "arm64" ]]; then
+ nsb_output=$(eval openstack ${SECURE} image create \
+ --public \
+ --disk-format qcow2 \
+ --container-format bare \
+ ${EXTRA_PARAMS} \
+ --file ${QCOW_NSB_IMAGE} \
+ yardstick-samplevnfs)
+ echo "$nsb_output"
+ fi
fi
echo "$output"
@@ -231,6 +265,7 @@ create_nova_flavor()
main()
{
QCOW_IMAGE="/tmp/workspace/yardstick/yardstick-image.img"
+ QCOW_NSB_IMAGE="/tmp/workspace/yardstick/yardstick-nsb-image.img"
RAW_IMAGE="/tmp/workspace/yardstick/yardstick-image.tar.gz"
if [ -f /home/opnfv/images/yardstick-image.img ];then
@@ -250,7 +285,7 @@ main()
load_yardstick_image
if [ "${YARD_IMG_ARCH}" == "arm64" ]; then
#We have overlapping IP with the real network
- for filename in tests/opnfv/test_cases/*; do
+ for filename in ${YARDSTICK_REPO_DIR}/tests/opnfv/test_cases/*; do
sed -i "s/cidr: '10.0.1.0\/24'/cidr: '10.3.1.0\/24'/g" "${filename}"
done
else
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh
index 886e50e21..8b9f887b2 100755
--- a/tests/ci/prepare_env.sh
+++ b/tests/ci/prepare_env.sh
@@ -16,6 +16,7 @@
: ${EXTERNAL_NETWORK:='admin_floating_net'}
: ${USER_NAME:='ubuntu'}
: ${SSH_KEY:='/root/.ssh/id_rsa'}
+: ${DEPLOY_SCENARIO:='unknown'}
# 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'
@@ -62,7 +63,73 @@ verify_connectivity() {
}
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+if [ "$INSTALLER_TYPE" == "apex" ]; then
+ # check the connection
+ verify_connectivity "${INSTALLER_IP}"
+
+ pod_yaml="$YARDSTICK_REPO_DIR/etc/yardstick/nodes/apex_baremetal/pod.yaml"
+
+ # update "ip" according to the CI env
+ ssh -l root "${INSTALLER_IP}" -i ${SSH_KEY} ${ssh_options} \
+ "source /home/stack/stackrc && openstack server list -f yaml" > node_info
+
+ controller_ips=($(awk '/control/{getline; {print $2}}' < node_info | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'))
+ compute_ips=($(awk '/compute/{getline; {print $2}}' < node_info | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'))
+ odl_ip=""
+ # Get ODL's cluster default module-shard Leader IP in HA scenario
+ if [[ ${DEPLOY_SCENARIO} == os-odl-*-ha ]]; then
+ for ip in "${controller_ips[@]}";
+ do
+ if [[ "$odl_ip" ]]; then
+ break
+ fi
+ for ((i=0; i<${#controller_ips[@]}; i++));
+ do
+ ODL_STATE=$(curl -s -u admin:admin -H "Accept: application/json" -H "Content-Type: application/json" \
+ "http://"${ip}":8081/jolokia/read/org.opendaylight.controller:Category=Shards,name=member-"${i}"-shard-default-operational,type=DistributedOperationalDatastore" \
+ | grep -o \"RaftState\"\:\"Leader\" | tr ":" "\n" | sed -n '2p' | sed 's/\"//g');
+
+ if [[ ${ODL_STATE} == "Leader" ]]; then
+ odl_ip=${ip}
+ break
+ fi
+ done;
+ done
+
+ if [[ -z "$odl_ip" ]]; then
+ echo "ERROR: Opendaylight Leader IP is emtpy"
+ exit 1
+ fi
+
+ elif [[ ${DEPLOY_SCENARIO} == *"odl"* ]]; then
+ odl_ip=${controller_ips[0]}
+ fi
+
+ if [[ ${controller_ips[0]} ]]; then
+ sed -i "s|ip1|${controller_ips[0]}|" "${pod_yaml}"
+ fi
+ if [[ ${controller_ips[1]} ]]; then
+ sed -i "s|ip2|${controller_ips[1]}|" "${pod_yaml}"
+ fi
+ if [[ ${controller_ips[2]} ]]; then
+ sed -i "s|ip3|${controller_ips[2]}|" "${pod_yaml}"
+ fi
+ if [[ ${compute_ips[0]} ]]; then
+ sed -i "s|ip4|${compute_ips[0]}|" "${pod_yaml}"
+ fi
+ if [[ ${compute_ips[1]} ]]; then
+ sed -i "s|ip5|${compute_ips[1]}|" "${pod_yaml}"
+ fi
+ if [[ ${odl_ip} ]]; then
+ sed -i "s|ip6|${odl_ip}|" "${pod_yaml}"
+ fi
+
+
+ # update 'key_filename' according to the CI env
+ sed -i "s|node_keyfile|${SSH_KEY}|" "${pod_yaml}"
+
+fi
if [ "$INSTALLER_TYPE" == "fuel" ]; then
# check the connection
@@ -72,10 +139,12 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
# update "ip" according to the CI env
ssh -l ubuntu "${INSTALLER_IP}" -i ${SSH_KEY} ${ssh_options} \
- "sudo salt -C 'ctl* or cmp*' grains.get fqdn_ip4 --out yaml">node_info
+ "sudo salt -C 'ctl* or cmp* or odl01* or gtw*' grains.get fqdn_ip4 --out yaml">node_info
- controller_ips=($(awk '/ctl/{getline; print $2} < node_info'))
- compute_ips=($(awk '/cmp/{getline; print $2} < node_info'))
+ controller_ips=($(awk '/ctl/{getline; print $2}' < node_info))
+ compute_ips=($(awk '/cmp/{getline; print $2}' < node_info))
+ odl_ip=($(awk '/odl01/{getline; print $2}' < node_info))
+ gateway_ip=($(awk '/gtw/{getline; print $2}' < node_info))
if [[ ${controller_ips[0]} ]]; then
sed -i "s|ip1|${controller_ips[0]}|" "${pod_yaml}"
@@ -92,6 +161,12 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
if [[ ${compute_ips[1]} ]]; then
sed -i "s|ip5|${compute_ips[1]}|" "${pod_yaml}"
fi
+ if [[ ${odl_ip[0]} ]]; then
+ sed -i "s|ip6|${odl_ip[0]}|" "${pod_yaml}"
+ fi
+ if [[ ${gateway_ip[0]} ]]; then
+ sed -i "s|ip7|${gateway_ip[0]}|" "${pod_yaml}"
+ fi
# update 'user' and 'key_filename' according to the CI env
sed -i "s|node_username|${USER_NAME}|;s|node_keyfile|${SSH_KEY}|" "${pod_yaml}"
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index d1174825f..34423ff2f 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -106,7 +106,7 @@ install_storperf()
echo
echo "========== Installing storperf =========="
- if ! yardstick -d plugin install plugin/CI/storperf.yaml; then
+ if ! yardstick -d plugin install ${YARDSTICK_REPO_DIR}/plugin/CI/storperf.yaml; then
echo "Install storperf plugin FAILED";
exit 1
fi
@@ -121,7 +121,7 @@ remove_storperf()
echo
echo "========== Removing storperf =========="
- if ! yardstick -d plugin remove plugin/CI/storperf.yaml; then
+ if ! yardstick -d plugin remove ${YARDSTICK_REPO_DIR}/plugin/CI/storperf.yaml; then
echo "Remove storperf plugin FAILED";
exit 1
fi
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml
index 7d3f36984..591ce0356 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc040.yaml
@@ -28,4 +28,4 @@ scenarios:
context:
type: Dummy
-
+ name: Dummy
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc042.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc042.yaml
index f46eb8473..ab41912e3 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc042.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc042.yaml
@@ -19,6 +19,8 @@ scenarios:
options:
packetsize: 64
rate: 100
+ eth1: ens4
+ eth2: ens5
host: demeter.yardstick-TC042
target: poseidon.yardstick-TC042
@@ -34,8 +36,13 @@ scenarios:
context:
name: yardstick-TC042
- image: yardstick-image-pktgen-ready
- flavor: yardstick-pktgen-dpdk.flavor
+ image: yardstick-samplevnfs
+ flavor:
+ vcpus: 4
+ ram: 4096
+ disk: 7
+ extra_specs:
+ hw:mem_page_size: "large"
user: ubuntu
placement_groups:
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc050.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc050.yaml
index dde3a1077..faddfab28 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc050.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc050.yaml
@@ -13,12 +13,9 @@ description: >
Yardstick TC050 config file;
HA test case: OpenStack Controller Node Network High Availability.
-{% set file = file or '/etc/yardstick/pod.yaml' %}
{% set attack_host = attack_host or "node1" %}
-{% set external_net = external_net or 'br-ex' %}
-{% set management_net = management_net or 'br-mgmt' %}
-{% set storage_net = storage_net or 'br-storage' %}
-{% set internal_net = internal_net or 'br-mesh' %}
+{% set interface_name = interface_name or 'br-mgmt' %}
+{% set file = file or '/etc/yardstick/pod.yaml' %}
scenarios:
-
@@ -27,43 +24,13 @@ scenarios:
attackers:
-
fault_type: "general-attacker"
- host: {{attack_host}}
+ host: {{ attack_host }}
key: "close-br-public"
attack_key: "close-interface"
action_parameter:
- interface: {{external_net}}
- rollback_parameter:
- interface: {{external_net}}
-
- -
- fault_type: "general-attacker"
- host: {{attack_host}}
- key: "close-br-mgmt"
- attack_key: "close-interface"
- action_parameter:
- interface: {{management_net}}
- rollback_parameter:
- interface: {{management_net}}
-
- -
- fault_type: "general-attacker"
- host: {{attack_host}}
- key: "close-br-storage"
- attack_key: "close-interface"
- action_parameter:
- interface: {{storage_net}}
- rollback_parameter:
- interface: {{storage_net}}
-
- -
- fault_type: "general-attacker"
- host: {{attack_host}}
- key: "close-br-private"
- attack_key: "close-interface"
- action_parameter:
- interface: {{internal_net}}
+ interface: {{ interface_name }}
rollback_parameter:
- interface: {{internal_net}}
+ interface: {{ interface_name }}
monitors:
-
@@ -105,48 +72,34 @@ scenarios:
steps:
-
- actionKey: "close-br-public"
- actionType: "attacker"
- index: 1
-
- -
- actionKey: "close-br-mgmt"
- actionType: "attacker"
- index: 2
-
- -
- actionKey: "close-br-storage"
- actionType: "attacker"
- index: 3
-
- -
- actionKey: "close-br-private"
- actionType: "attacker"
- index: 4
-
- -
actionKey: "nova-image-list"
actionType: "monitor"
- index: 5
+ index: 1
-
actionKey: "neutron-router-list"
actionType: "monitor"
- index: 6
+ index: 2
-
actionKey: "heat-stack-list"
actionType: "monitor"
- index: 7
+ index: 3
-
actionKey: "cinder-list"
actionType: "monitor"
- index: 8
+ index: 4
+
+ -
+ actionKey: "close-br-public"
+ actionType: "attacker"
+ index: 5
+
nodes:
- {{attack_host}}: {{attack_host}}.LF
+ {{ attack_host }}: {{ attack_host }}.LF
runner:
type: Duration
duration: 1
@@ -157,4 +110,4 @@ scenarios:
context:
type: Node
name: LF
- file: {{file}}
+ file: {{ file }}
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
index ef4f02c9e..fe8423d25 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
@@ -36,3 +36,4 @@ scenarios:
context:
type: Dummy
+ name: Dummy
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc087.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc087.yaml
new file mode 100644
index 000000000..d7441836d
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc087.yaml
@@ -0,0 +1,278 @@
+##############################################################################
+## Copyright (c) 2018 Intracom Telecom and others.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC087 config file;
+ SDN Controller resilience in non-HA configuration
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host = attack_host or 'node6' %}
+
+scenarios:
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+ steps:
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+-
+ type: "GeneralHA"
+ options:
+ attackers:
+ -
+ fault_type: "kill-process"
+ process_name: "opendaylight"
+ key: "kill-process"
+ host: {{attack_host}}
+
+ monitors:
+ - monitor_type: "process"
+ process_name: "opendaylight"
+ host: {{attack_host}}
+ key: "monitor-recovery"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "start-service"
+ host: {{attack_host}}
+ operation_key: "start-service"
+ action_parameter:
+ service: "opendaylight"
+ rollback_parameter:
+ service: "opendaylight"
+
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+
+ steps:
+
+ - actionKey: "monitor-recovery"
+ actionType: "monitor"
+ index: 1
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 3
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 4
+
+ - actionKey: "kill-process"
+ actionType: "attacker"
+ index: 5
+
+ - actionKey: "start-service"
+ actionType: "operation"
+ index: 6
+
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 80
+ host: athena
+ sla:
+ max_outage_time: 40
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "hermes"
+ return_parameter:
+ all: "@private_ip"
+
+ - operation_type: "general-operation"
+ key: "nova-create-instance"
+ operation_key: "nova-create-instance"
+ action_parameter:
+ serverconfig: "hermes yardstick-image yardstick-flavor test_one"
+ rollback_parameter:
+ serverconfig: "hermes"
+
+ - operation_type: "general-operation"
+ key: "add-server-to-secgroup"
+ operation_key: "add-server-to-secgroup"
+ action_parameter:
+ serverconfig: "hermes ODLnoHA1"
+ rollback_parameter:
+ serverconfig: "hermes ODLnoHA1"
+
+
+ steps:
+ - actionKey: "nova-create-instance"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "add-server-to-secgroup"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 3
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 4
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+contexts:
+ -
+ type: Node
+ name: LF
+ file: {{file}}
+ -
+ name: ODLnoHA1
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+ host: athena
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ athena:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ ares:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ networks:
+ test_one:
+ cidr: '10.0.1.0/24'
+ router: 'test_router'
+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc090.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc090.yaml
new file mode 100644
index 000000000..41372045d
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc090.yaml
@@ -0,0 +1,78 @@
+##############################################################################
+# Copyright (c) 2017 14_ykl@tongji.edu.cn and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC090 config file;
+ HA test case: Control node Openstack service down - database instance.
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host = attack_host or "node1" %}
+{% set attack_process = attack_process or "mysql" %}
+{% set monitor_time = monitor_time or 30 %}
+
+scenarios:
+-
+ type: ServiceHA
+ options:
+ attackers:
+ - fault_type: "kill-process"
+ process_name: "{{ attack_process }}"
+ host: {{attack_host}}
+
+ monitors:
+ - monitor_type: "openstack-cmd"
+ command_name: "openstack image list"
+ monitor_time: {{monitor_time}}
+ monitor_number: 3
+ sla:
+ max_outage_time: 5
+ - monitor_type: "openstack-cmd"
+ command_name: "openstack router list"
+ monitor_time: {{monitor_time}}
+ monitor_number: 3
+ sla:
+ max_outage_time: 5
+ - monitor_type: "openstack-cmd"
+ command_name: "openstack stack list"
+ monitor_time: {{monitor_time}}
+ monitor_number: 3
+ sla:
+ max_outage_time: 5
+ - monitor_type: "openstack-cmd"
+ command_name: "openstack volume list"
+ monitor_time: {{monitor_time}}
+ monitor_number: 3
+ sla:
+ max_outage_time: 5
+ - monitor_type: "process"
+ process_name: "{{ attack_process }}"
+ host: {{attack_host}}
+ monitor_time: {{monitor_time}}
+ monitor_number: 3
+ sla:
+ max_recover_time: 30
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ outage_time: 5
+ action: monitor
+
+
+context:
+ type: Node
+ name: LF
+ file: {{file}}
+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc091.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc091.yaml
new file mode 100644
index 000000000..d952464a1
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc091.yaml
@@ -0,0 +1,59 @@
+##############################################################################
+# Copyright (c) 2017 14_ykl@tongji.edu.cn and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC091 config file;
+ HA test case: Control node Openstack service down - heat-api.
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host = attack_host or "node1" %}
+{% set attack_process = attack_process or "heat-api" %}
+
+scenarios:
+-
+ type: ServiceHA
+ options:
+ attackers:
+ - fault_type: "kill-process"
+ process_name: "{{ attack_process }}"
+ host: {{attack_host}}
+
+ monitors:
+ - monitor_type: "openstack-cmd"
+ command_name: "openstack stack list"
+ monitor_time: 10
+ monitor_number: 3
+ sla:
+ max_outage_time: 5
+ - monitor_type: "process"
+ process_name: "{{ attack_process }}"
+ host: {{attack_host}}
+ monitor_time: 30
+ monitor_number: 3
+ sla:
+ max_recover_time: 30
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ outage_time: 5
+ action: monitor
+
+
+context:
+ type: Node
+ name: LF
+ file: {{file}}
+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml
new file mode 100644
index 000000000..85ec510df
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc092.yaml
@@ -0,0 +1,276 @@
+##############################################################################
+## Copyright (c) 2018 Intracom Telecom and others.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC092 config file;
+ SDN Controller resilience in HA configuration
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host = attack_host or 'node6' %}
+
+scenarios:
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+ steps:
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ attackers:
+ -
+ fault_type: "kill-process"
+ process_name: "opendaylight"
+ key: "kill-process"
+ host: {{attack_host}}
+
+ monitors:
+ - monitor_type: "process"
+ process_name: "opendaylight"
+ host: {{attack_host}}
+ key: "monitor-recovery"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "start-service"
+ host: {{attack_host}}
+ operation_key: "start-service"
+ action_parameter:
+ service: "opendaylight"
+ rollback_parameter:
+ service: "opendaylight"
+
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+
+ steps:
+
+ - actionKey: "monitor-recovery"
+ actionType: "monitor"
+ index: 1
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 3
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 4
+
+ - actionKey: "kill-process"
+ actionType: "attacker"
+ index: 5
+
+ - actionKey: "start-service"
+ actionType: "operation"
+ index: 6
+
+
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 80
+ host: athena
+ sla:
+ max_outage_time: 40
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "hermes"
+ return_parameter:
+ all: "@private_ip"
+
+ - operation_type: "general-operation"
+ key: "nova-create-instance"
+ operation_key: "nova-create-instance"
+ action_parameter:
+ serverconfig: "hermes yardstick-image yardstick-flavor test_one"
+ rollback_parameter:
+ serverconfig: "hermes"
+
+ - operation_type: "general-operation"
+ key: "add-server-to-secgroup"
+ operation_key: "add-server-to-secgroup"
+ action_parameter:
+ serverconfig: "hermes ODLHA1"
+ rollback_parameter:
+ serverconfig: "hermes ODLHA1"
+
+
+ steps:
+ - actionKey: "nova-create-instance"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "add-server-to-secgroup"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 3
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 4
+
+ nodes:
+ {{attack_host}}: {{attack_host}}.LF
+ athena: athena.ODLHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+contexts:
+ -
+ type: Node
+ name: LF
+ file: {{file}}
+ -
+ name: ODLHA1
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+ host: athena
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ athena:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ ares:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ networks:
+ test_one:
+ cidr: '10.0.1.0/24'
+ router: 'test_router'
+
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml
new file mode 100644
index 000000000..a034471aa
--- /dev/null
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc093.yaml
@@ -0,0 +1,313 @@
+##############################################################################
+## Copyright (c) 2018 Intracom Telecom and others.
+##
+## All rights reserved. This program and the accompanying materials
+## are made available under the terms of the Apache License, Version 2.0
+## which accompanies this distribution, and is available at
+## http://www.apache.org/licenses/LICENSE-2.0
+###############################################################################
+---
+
+schema: "yardstick:task:0.1"
+description: >
+ Yardstick TC093 config file;
+ SDN Vswitch resilience in non-HA or HA configuration
+
+{% set file = file or '/etc/yardstick/pod.yaml' %}
+{% set attack_host_cmp_one = attack_host_cmp_one or 'node4' %}
+{% set attack_host_cmp_two = attack_host_cmp_two or 'node5' %}
+{% set systemd_service_name = systemd_service_name or 'openvswitch-switch'%}
+
+scenarios:
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 50
+ host: athena
+ sla:
+ max_outage_time: 0
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+ steps:
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+
+ nodes:
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+-
+ type: "GeneralHA"
+ options:
+ attackers:
+ -
+ fault_type: "kill-process"
+ process_name: "openvswitch"
+ key: "kill-process-cmp-one"
+ host: {{attack_host_cmp_one}}
+
+ -
+ fault_type: "kill-process"
+ process_name: "openvswitch"
+ key: "kill-process-cmp-two"
+ host: {{attack_host_cmp_two}}
+
+ monitors:
+ - monitor_type: "process"
+ process_name: "openvswitch"
+ host: {{attack_host_cmp_one}}
+ key: "monitor-recovery-cmp-one"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+ - monitor_type: "process"
+ process_name: "openvswitch"
+ host: {{attack_host_cmp_two}}
+ key: "monitor-recovery-cmp-two"
+ monitor_time: 50
+ sla:
+ max_recover_time: 30
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "snat"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 20
+ parameter:
+ destination_ip: "8.8.8.8"
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 70
+ host: athena
+ sla:
+ max_outage_time: 20
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "restart-service-cmp-one"
+ host: {{attack_host_cmp_one}}
+ operation_key: "start-service"
+ action_parameter:
+ service: {{systemd_service_name ~ " restart"}}
+ rollback_parameter:
+ service: "openvswitch"
+
+ - operation_type: "general-operation"
+ key: "restart-service-cmp-two"
+ host: {{attack_host_cmp_two}}
+ operation_key: "start-service"
+ action_parameter:
+ service: {{systemd_service_name ~ " restart"}}
+ rollback_parameter:
+ service: "openvswitch"
+
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "ares"
+ return_parameter:
+ all: "@private_ip"
+
+
+
+ steps:
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 2
+
+ - actionKey: "snat"
+ actionType: "monitor"
+ index: 3
+
+ - actionKey: "kill-process-cmp-one"
+ actionType: "attacker"
+ index: 4
+
+ - actionKey: "kill-process-cmp-two"
+ actionType: "attacker"
+ index: 5
+
+ - actionKey: "monitor-recovery-cmp-one"
+ actionType: "monitor"
+ index: 6
+
+ - actionKey: "monitor-recovery-cmp-two"
+ actionType: "monitor"
+ index: 7
+
+
+ - actionKey: "restart-service-cmp-one"
+ actionType: "operation"
+ index: 8
+
+ - actionKey: "restart-service-cmp-two"
+ actionType: "operation"
+ index: 9
+
+
+ nodes:
+ {{attack_host_cmp_one}}: {{attack_host_cmp_one}}.LF
+ {{attack_host_cmp_two}}: {{attack_host_cmp_two}}.LF
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+-
+ type: "GeneralHA"
+ options:
+ monitors:
+
+ - monitor_type: "general-monitor"
+ monitor_key: "ip-status"
+ key: "l2"
+ monitor_time: 80
+ host: athena
+ sla:
+ max_outage_time: 40
+ parameter:
+ destination_ip: "@private_ip"
+
+ operations:
+ - operation_type: "general-operation"
+ key: "get-privateip"
+ operation_key: "get-privateip"
+ action_parameter:
+ server_name: "hermes"
+ return_parameter:
+ all: "@private_ip"
+
+ - operation_type: "general-operation"
+ key: "nova-create-instance"
+ operation_key: "nova-create-instance"
+ action_parameter:
+ serverconfig: "hermes yardstick-image yardstick-flavor test_one"
+ rollback_parameter:
+ serverconfig: "hermes"
+
+ - operation_type: "general-operation"
+ key: "add-server-to-secgroup"
+ operation_key: "add-server-to-secgroup"
+ action_parameter:
+ serverconfig: "hermes ODLnoHA1"
+ rollback_parameter:
+ serverconfig: "hermes ODLnoHA1"
+
+
+ steps:
+ - actionKey: "nova-create-instance"
+ actionType: "operation"
+ index: 1
+
+ - actionKey: "add-server-to-secgroup"
+ actionType: "operation"
+ index: 2
+
+ - actionKey: "get-privateip"
+ actionType: "operation"
+ index: 3
+
+ - actionKey: "l2"
+ actionType: "monitor"
+ index: 4
+
+ nodes:
+ athena: athena.ODLnoHA1
+ runner:
+ type: Duration
+ duration: 1
+ sla:
+ action: monitor
+
+
+contexts:
+ -
+ type: Node
+ name: LF
+ file: {{file}}
+ -
+ name: ODLnoHA1
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+ host: athena
+ placement_groups:
+ pgrp1:
+ policy: "availability"
+ servers:
+ athena:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ ares:
+ floating_ip: true
+ placement: "pgrp1"
+ network_ports:
+ test_one:
+ - ens0
+
+ networks:
+ test_one:
+ cidr: '10.0.1.0/24'
+ router: 'test_router'
+
diff --git a/tests/opnfv/test_suites/opnfv_vTC_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-canal-lb-noha_daily.yaml
index f7efe51fb..80e0fbd39 100644
--- a/tests/opnfv/test_suites/opnfv_vTC_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_k8-canal-lb-noha_daily.yaml
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2017 Ericsson AB and others.
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -7,18 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-# ERICSSON POD1 VTC daily task suite
+# k8 canal lb noha daily task suite
schema: "yardstick:suite:0.1"
-name: "opnfv_vTC_daily"
+name: "k8-canal-lb-noha"
test_cases_dir: "tests/opnfv/test_cases/"
test_cases:
-
- file_name: opnfv_yardstick_tc006.yaml
--
- file_name: opnfv_yardstick_tc007.yaml
--
- file_name: opnfv_yardstick_tc020.yaml
--
- file_name: opnfv_yardstick_tc021.yaml
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_vTC_weekly.yaml b/tests/opnfv/test_suites/opnfv_k8-multus-lb-noha_daily.yaml
index 04f607ed4..6ec4d49c9 100644
--- a/tests/opnfv/test_suites/opnfv_vTC_weekly.yaml
+++ b/tests/opnfv/test_suites/opnfv_k8-multus-lb-noha_daily.yaml
@@ -1,5 +1,5 @@
##############################################################################
-# Copyright (c) 2017 Ericsson AB and others.
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -7,18 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---
-# ERICSSON POD1 VTC weekly task suite
+# k8 multus lb noha daily task suite
schema: "yardstick:suite:0.1"
-name: "opnfv_vTC_weekly"
+name: "k8-multus-lb-noha"
test_cases_dir: "tests/opnfv/test_cases/"
test_cases:
-
- file_name: opnfv_yardstick_tc006.yaml
--
- file_name: opnfv_yardstick_tc007.yaml
--
- file_name: opnfv_yardstick_tc020.yaml
--
- file_name: opnfv_yardstick_tc021.yaml
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-multus-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-multus-nofeature-noha_daily.yaml
new file mode 100644
index 000000000..8b1ffeb7e
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-multus-nofeature-noha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 multus nofeature noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-multus-nofeature-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-ha_daily.yaml
new file mode 100644
index 000000000..d5386fd52
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-ha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 nosdn nofeature ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-nosdn-nofeature-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml
index 00dccab95..0ce94551a 100644
--- a/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_k8-nosdn-nofeature-noha_daily.yaml
@@ -15,48 +15,4 @@ name: "k8-nosdn-nofeature-noha"
test_cases_dir: "tests/opnfv/test_cases/"
test_cases:
-
- file_name: opnfv_yardstick_tc002.yaml
--
- file_name: opnfv_yardstick_tc005.yaml
--
- file_name: opnfv_yardstick_tc010.yaml
--
- file_name: opnfv_yardstick_tc011.yaml
--
- file_name: opnfv_yardstick_tc012.yaml
--
- file_name: opnfv_yardstick_tc014.yaml
--
- file_name: opnfv_yardstick_tc037.yaml
--
- file_name: opnfv_yardstick_tc055.yaml
- constraint:
- installer: compass
- pod: huawei-pod1
- task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
--
- file_name: opnfv_yardstick_tc063.yaml
- constraint:
- installer: compass
- pod: huawei-pod1
- task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
--
- file_name: opnfv_yardstick_tc069.yaml
--
- file_name: opnfv_yardstick_tc070.yaml
--
- file_name: opnfv_yardstick_tc071.yaml
--
- file_name: opnfv_yardstick_tc072.yaml
--
- file_name: opnfv_yardstick_tc075.yaml
- constraint:
- installer: compass
- pod: huawei-pod1
- task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-ha_daily.yaml
new file mode 100644
index 000000000..cb2b1311d
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-ha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 nosdn stor4nfv ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-nosdn-stor4nfv-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-noha_daily.yaml
new file mode 100644
index 000000000..961b8da89
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-nosdn-stor4nfv-noha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 nosdn stor4nfv noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-nosdn-stor4nfv-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-ocl-lb-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-ocl-lb-noha_daily.yaml
new file mode 100644
index 000000000..a6ef9e1c9
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-ocl-lb-noha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 ocl lb noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-ocl-lb-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_k8-sriov-cni-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_k8-sriov-cni-nofeature-noha_daily.yaml
new file mode 100644
index 000000000..e0114f4b5
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_k8-sriov-cni-nofeature-noha_daily.yaml
@@ -0,0 +1,18 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# k8 sriov-cni nofeature noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "k8-sriov-cni-nofeature-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc080.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml
index 35bc0ebd8..d49b11343 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node4.LF","target": "node5.LF"}'
+ "host": "node4","target": "node5"}'
-
file_name: opnfv_yardstick_tc019.yaml
constraint:
@@ -113,7 +113,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -121,7 +121,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -147,7 +147,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
-
file_name: opnfv_yardstick_tc027.yaml
constraint:
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml
index 26e92e704..362c7316c 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-bar-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-calipso-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-calipso-noha_daily.yaml
new file mode 100644
index 000000000..3f0c4a992
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-calipso-noha_daily.yaml
@@ -0,0 +1,62 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-nosdn-calipso-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-nosdn-calipso-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc055.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5"}'
+-
+ file_name: opnfv_yardstick_tc063.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5"}'
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc075.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+ task_args:
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-fdio-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-fdio-noha_daily.yaml
index ec0fd224c..bd91a75c7 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-fdio-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-fdio-noha_daily.yaml
@@ -21,18 +21,12 @@ test_cases:
-
file_name: opnfv_yardstick_tc006.yaml
-
- file_name: opnfv_yardstick_tc007.yaml
--
file_name: opnfv_yardstick_tc008.yaml
-
file_name: opnfv_yardstick_tc009.yaml
-
file_name: opnfv_yardstick_tc011.yaml
-
- file_name: opnfv_yardstick_tc020.yaml
--
- file_name: opnfv_yardstick_tc021.yaml
--
file_name: opnfv_yardstick_tc037.yaml
-
file_name: opnfv_yardstick_tc038.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
index 1be7d13af..854adf11b 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-noha_daily.yaml
index 42bc651b2..b5a30487d 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
index eb8d0f307..ea0853cb1 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-ha_daily.yaml
index 625fa6ea0..201a271cc 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-ha_daily.yaml
@@ -34,13 +34,18 @@ test_cases:
-
file_name: opnfv_yardstick_tc037.yaml
-
+ file_name: opnfv_yardstick_tc042.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+-
file_name: opnfv_yardstick_tc055.yaml
constraint:
installer: compass
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -48,7 +53,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -64,4 +69,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-noha_daily.yaml
index 3a3ed3779..e8db0de9b 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk-noha_daily.yaml
@@ -34,13 +34,18 @@ test_cases:
-
file_name: opnfv_yardstick_tc037.yaml
-
+ file_name: opnfv_yardstick_tc042.yaml
+ constraint:
+ installer: compass
+ pod: huawei-pod1
+-
file_name: opnfv_yardstick_tc055.yaml
constraint:
installer: compass
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -48,7 +53,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-ha_daily.yaml
index ef09f3c8b..ee25c1287 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-ha_daily.yaml
@@ -40,7 +40,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -48,7 +48,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -64,4 +64,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-noha_daily.yaml
index a800c5649..8603c1438 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-kvm_ovs_dpdk_bar-noha_daily.yaml
@@ -40,7 +40,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -48,7 +48,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
index 9de6ab2bb..a249a81e2 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-ha_daily.yaml
@@ -41,7 +41,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -49,7 +49,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -65,4 +65,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
index eed5da44d..40fec9fe3 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-lxd-noha_daily.yaml
@@ -41,7 +41,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -49,7 +49,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -65,4 +65,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
index 222987ec5..7c213e2d9 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-ha_daily.yaml
@@ -14,6 +14,8 @@ schema: "yardstick:suite:0.1"
name: "os-nosdn-nofeature-ha"
test_cases_dir: "tests/opnfv/test_cases/"
test_cases:
+
+# Generic test cases base on VM
-
file_name: opnfv_yardstick_tc002.yaml
-
@@ -29,150 +31,164 @@ test_cases:
-
file_name: opnfv_yardstick_tc037.yaml
-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc076.yaml
+-
+ file_name: opnfv_yardstick_tc079.yaml
+-
+ file_name: opnfv_yardstick_tc082.yaml
+-
+ file_name: opnfv_yardstick_tc083.yaml
+
+# Generic test cases base on NODE
+-
file_name: opnfv_yardstick_tc043.yaml
constraint:
installer: compass
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node4.LF","target": "node5.LF"}'
+ "host": "node4","target": "node5"}'
-
- file_name: opnfv_yardstick_tc019.yaml
+ file_name: opnfv_yardstick_tc055.yaml
constraint:
- installer: compass,fuel
- pod: huawei-pod2,ericsson-pod1
+ installer: compass
+ pod: huawei-pod1
task_args:
- huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5"}'
-
- file_name: opnfv_yardstick_tc045.yaml
+ file_name: opnfv_yardstick_tc063.yaml
constraint:
- installer: compass,fuel
- pod: huawei-pod2,ericsson-pod1
+ installer: compass
+ pod: huawei-pod1
task_args:
- huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node5"}'
-
- file_name: opnfv_yardstick_tc046.yaml
+ file_name: opnfv_yardstick_tc073.yaml
constraint:
- installer: fuel
+ installer: compass
+ pod: huawei-pod1
task_args:
- default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc047.yaml
+ file_name: opnfv_yardstick_tc075.yaml
constraint:
- installer: compass,fuel
- pod: huawei-pod2,ericsson-pod1
+ installer: compass
+ pod: huawei-pod1
task_args:
- huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
+ "host": "node1"}'
+
+# Feature test cases
-
- file_name: opnfv_yardstick_tc048.yaml
+ file_name: opnfv_yardstick_tc027.yaml
constraint:
installer: compass,fuel
- pod: huawei-pod2,ericsson-pod1
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
-
- file_name: opnfv_yardstick_tc049.yaml
+ file_name: opnfv_yardstick_tc074.yaml
constraint:
- installer: fuel
+ installer: compass
+ pod: huawei-pod1, huawei-pod2
task_args:
- default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"public_network": "ext-net",
+ "StorPerf_ip": "192.168.10.6"}'
+ huawei-pod2: '{"public_network": "ext-net",
+ "StorPerf_ip": "192.168.11.2"}'
+
+# HA test cases
-
- file_name: opnfv_yardstick_tc050.yaml
+ file_name: opnfv_yardstick_tc045.yaml
constraint:
- installer: fuel
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc051.yaml
+ file_name: opnfv_yardstick_tc046.yaml
constraint:
installer: compass,fuel
- pod: huawei-pod2,ericsson-pod1
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod2: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- ericsson-pod1: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc052.yaml
+ file_name: opnfv_yardstick_tc047.yaml
constraint:
- installer: fuel
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc053.yaml
+ file_name: opnfv_yardstick_tc048.yaml
constraint:
- installer: fuel
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc055.yaml
+ file_name: opnfv_yardstick_tc049.yaml
constraint:
- installer: compass
- pod: huawei-pod1
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc063.yaml
+ file_name: opnfv_yardstick_tc050.yaml
constraint:
- installer: compass
- pod: huawei-pod1
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
--
- file_name: opnfv_yardstick_tc069.yaml
--
- file_name: opnfv_yardstick_tc070.yaml
--
- file_name: opnfv_yardstick_tc071.yaml
--
- file_name: opnfv_yardstick_tc072.yaml
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc074.yaml
+ file_name: opnfv_yardstick_tc051.yaml
constraint:
- installer: compass
- pod: huawei-pod1, huawei-pod2
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod1: '{"public_network": "ext-net",
- "StorPerf_ip": "192.168.10.6"}'
- huawei-pod2: '{"public_network": "ext-net",
- "StorPerf_ip": "192.168.11.2"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc075.yaml
+ file_name: opnfv_yardstick_tc052.yaml
constraint:
- installer: compass
- pod: huawei-pod1
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
- huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc027.yaml
+ file_name: opnfv_yardstick_tc053.yaml
constraint:
installer: compass,fuel
- pod: huawei-pod1,lf-pod2,ericsson-pod3,ericsson-pod4
+ pod: huawei-pod1,lf-pod2
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
- lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
- ericsson-pod3: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
- ericsson-pod4: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml", "openrc":"/root/openrc", "external_network":"admin_floating_net"}'
--
- file_name: opnfv_yardstick_tc076.yaml
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
- file_name: opnfv_yardstick_tc079.yaml
--
- file_name: opnfv_yardstick_tc073.yaml
+ file_name: opnfv_yardstick_tc019.yaml
constraint:
- installer: compass
- pod: huawei-pod1
+ installer: compass,fuel
+ pod: huawei-pod1,lf-pod2
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml"}'
--
- file_name: opnfv_yardstick_tc082.yaml
--
- file_name: opnfv_yardstick_tc083.yaml
+ lf-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml"}'
-
file_name: opnfv_yardstick_tc025.yaml
constraint:
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
index 6700db406..6a6a53b2a 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-nofeature-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml
index d1b4cce1a..5dccf015b 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-openbaton-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml
index 9418e42f4..0375abcc6 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-openo-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node4.LF","target": "node5.LF"}'
+ "host": "node4","target": "node5"}'
-
file_name: opnfv_yardstick_tc045.yaml
constraint:
@@ -97,7 +97,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -105,7 +105,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -121,7 +121,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
-
file_name: opnfv_yardstick_tc027.yaml
constraint:
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
index 3a540f27a..13eda5bc6 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-noha_daily.yaml
index abc336041..969e47aa2 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml
index 10772e0cc..822191504 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml
index 9b2be3710..e0f6dec7b 100644
--- a/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-nosdn-ovs_dpdk-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
index 3f2fe18a3..1b10a4e31 100644
--- a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
index fcc7a9bb2..dba42cc48 100644
--- a/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-ocl-nofeature-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
index 1ab16e5d1..f174a90e4 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-ha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,19 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
+-
+ file_name: opnfv_yardstick_tc092.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host": "node6"}'
+-
+ file_name: opnfv_yardstick_tc093.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host_cmp_one": "node4","attack_host_cmp_two": "node5",
+ "systemd_service_name": "openvswitch"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
index 71b9dff6b..feb8a6631 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-nofeature-noha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -54,3 +54,18 @@ test_cases:
file_name: opnfv_yardstick_tc071.yaml
-
file_name: opnfv_yardstick_tc072.yaml
+-
+ file_name: opnfv_yardstick_tc087.yaml
+ constraint:
+ installer: fuel
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml",
+ "attack_host": "node6"}'
+-
+ file_name: opnfv_yardstick_tc093.yaml
+ constraint:
+ installer: apex
+ task_args:
+ default: '{"file": "etc/yardstick/nodes/apex_baremetal/pod.yaml",
+ "attack_host_cmp_one": "node4","attack_host_cmp_two": "node5",
+ "systemd_service_name": "openvswitch"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml
index b5e53b94c..ce36ca0bf 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-ovs-ha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-ha_daily.yaml
new file mode 100644
index 000000000..734d31d15
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-ha_daily.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-odl-ovs_dpdk-ha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl-ovs_dpdk-ha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-noha_daily.yaml
new file mode 100644
index 000000000..e87dba74b
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl-ovs_dpdk-noha_daily.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-odl-ovs_dpdk-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl-ovs_dpdk-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-ovs_offload-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-ovs_offload-noha_daily.yaml
new file mode 100644
index 000000000..27d100a61
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl-ovs_offload-noha_daily.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-odl-ovs_offload-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl-ovs_offload-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-sfc-ha_daily.yaml
index b464bfeae..6c3f22f57 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-sfc-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-sfc-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-sfc-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-sfc-noha_daily.yaml
index ba870417d..08027373f 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl-sfc-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl-sfc-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl-sriov-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl-sriov-noha_daily.yaml
new file mode 100644
index 000000000..b6d0dd6af
--- /dev/null
+++ b/tests/opnfv/test_suites/opnfv_os-odl-sriov-noha_daily.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+# os-odl-sriov-noha daily task suite
+
+schema: "yardstick:suite:0.1"
+
+name: "os-odl-sriov-noha"
+test_cases_dir: "tests/opnfv/test_cases/"
+test_cases:
+-
+ file_name: opnfv_yardstick_tc002.yaml
+-
+ file_name: opnfv_yardstick_tc005.yaml
+-
+ file_name: opnfv_yardstick_tc010.yaml
+-
+ file_name: opnfv_yardstick_tc011.yaml
+-
+ file_name: opnfv_yardstick_tc012.yaml
+-
+ file_name: opnfv_yardstick_tc014.yaml
+-
+ file_name: opnfv_yardstick_tc037.yaml
+-
+ file_name: opnfv_yardstick_tc069.yaml
+-
+ file_name: opnfv_yardstick_tc070.yaml
+-
+ file_name: opnfv_yardstick_tc071.yaml
+-
+ file_name: opnfv_yardstick_tc072.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
index 43aae7101..78f461d82 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-ha_daily.yaml
@@ -21,7 +21,7 @@ test_cases:
pod: ericsson-pod2
task_args:
ericsson-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml",
- "host": "node1.LF","target": "node2.LF"}'
+ "host": "node1","target": "node2"}'
-
file_name: opnfv_yardstick_tc002.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-noha_daily.yaml
index 372012928..820db3771 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-bgpvpn-noha_daily.yaml
@@ -21,7 +21,7 @@ test_cases:
pod: ericsson-pod2
task_args:
ericsson-pod2: '{"file": "etc/yardstick/nodes/fuel_baremetal/pod.yaml",
- "host": "node1.LF","target": "node2.LF"}'
+ "host": "node1","target": "node2"}'
-
file_name: opnfv_yardstick_tc002.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-fdio-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-fdio-noha_daily.yaml
index 7172979c7..722d885b6 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-fdio-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-fdio-noha_daily.yaml
@@ -21,18 +21,12 @@ test_cases:
-
file_name: opnfv_yardstick_tc006.yaml
-
- file_name: opnfv_yardstick_tc007.yaml
--
file_name: opnfv_yardstick_tc008.yaml
-
file_name: opnfv_yardstick_tc009.yaml
-
file_name: opnfv_yardstick_tc011.yaml
-
- file_name: opnfv_yardstick_tc020.yaml
--
- file_name: opnfv_yardstick_tc021.yaml
--
file_name: opnfv_yardstick_tc037.yaml
-
file_name: opnfv_yardstick_tc038.yaml
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
index 16c04de37..03a533872 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml
index cff147720..1dcdeae8e 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-moon-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
index b8b8c4695..78883c9da 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-ha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
index cd352cc1b..163c21716 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-nofeature-noha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
index 1dde1cb25..86e84916d 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
index 8d7098160..4101fa970 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l2-sfc-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
index a503db99e..d7e7bbb87 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-ha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-noha_daily.yaml
index e83aaec9d..6b29394ce 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l3-nofeature-noha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-odl_l3-ovs-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-odl_l3-ovs-ha_daily.yaml
index 4165c5464..c347a80b9 100644
--- a/tests/opnfv/test_suites/opnfv_os-odl_l3-ovs-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-odl_l3-ovs-ha_daily.yaml
@@ -37,7 +37,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -45,7 +45,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -61,4 +61,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
index ed8894ce1..536341b0f 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
index 94390d525..119297563 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-nofeature-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
index 18e27d6d6..3ad6122dd 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-sfc-ha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_os-onos-sfc-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-onos-sfc-noha_daily.yaml
index d56be6152..b86599f72 100644
--- a/tests/opnfv/test_suites/opnfv_os-onos-sfc-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-onos-sfc-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
diff --git a/tests/opnfv/test_suites/opnfv_os-ovn-nofeature-noha_daily.yaml b/tests/opnfv/test_suites/opnfv_os-ovn-nofeature-noha_daily.yaml
index 567642eda..dbbda6872 100644
--- a/tests/opnfv/test_suites/opnfv_os-ovn-nofeature-noha_daily.yaml
+++ b/tests/opnfv/test_suites/opnfv_os-ovn-nofeature-noha_daily.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -59,4 +59,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/opnfv/test_suites/opnfv_performance.yaml b/tests/opnfv/test_suites/opnfv_performance.yaml
index 948d0633e..10bc6071c 100644
--- a/tests/opnfv/test_suites/opnfv_performance.yaml
+++ b/tests/opnfv/test_suites/opnfv_performance.yaml
@@ -35,7 +35,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node4.LF","target": "node5.LF"}'
+ "host": "node4","target": "node5"}'
-
file_name: opnfv_yardstick_tc055.yaml
constraint:
@@ -43,7 +43,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC055"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc063.yaml
constraint:
@@ -51,7 +51,7 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node5.yardstick-TC063"}'
+ "host": "node5"}'
-
file_name: opnfv_yardstick_tc069.yaml
-
@@ -67,4 +67,4 @@ test_cases:
pod: huawei-pod1
task_args:
huawei-pod1: '{"file": "etc/yardstick/nodes/compass_sclab_physical/pod.yaml",
- "host": "node1.LF"}'
+ "host": "node1"}'
diff --git a/tests/unit/network_services/helpers/test_samplevnf_helper.py b/tests/unit/network_services/helpers/test_samplevnf_helper.py
index 3b6c89d3a..dc74b1859 100644
--- a/tests/unit/network_services/helpers/test_samplevnf_helper.py
+++ b/tests/unit/network_services/helpers/test_samplevnf_helper.py
@@ -143,8 +143,6 @@ class TestMultiPortConfig(unittest.TestCase):
def setUp(self):
self._mock_open = mock.patch.object(six.moves.builtins, 'open')
self.mock_open = self._mock_open.start()
- self._mock_os = mock.patch.object(os, 'path')
- self.mock_os = self._mock_os.start()
self._mock_config_parser = mock.patch.object(
samplevnf_helper, 'ConfigParser')
self.mock_config_parser = self._mock_config_parser.start()
@@ -153,7 +151,6 @@ class TestMultiPortConfig(unittest.TestCase):
def _cleanup(self):
self._mock_open.stop()
- self._mock_os.stop()
self._mock_config_parser.stop()
def test_validate_ip_and_prefixlen(self):
@@ -185,7 +182,8 @@ class TestMultiPortConfig(unittest.TestCase):
samplevnf_helper.MultiPortConfig.validate_ip_and_prefixlen(
'::1', '129')
- def test___init__(self):
+ @mock.patch.object(os.path, 'isfile', return_value=False)
+ def test___init__(self, *args):
topology_file = mock.Mock()
config_tpl = mock.Mock()
tmp_file = mock.Mock()
@@ -193,8 +191,6 @@ class TestMultiPortConfig(unittest.TestCase):
opnfv_vnf = samplevnf_helper.MultiPortConfig(
topology_file, config_tpl, tmp_file, vnfd_mock)
self.assertEqual(0, opnfv_vnf.swq)
- self.mock_os.path = mock.MagicMock()
- self.mock_os.path.isfile = mock.Mock(return_value=False)
opnfv_vnf = samplevnf_helper.MultiPortConfig(
topology_file, config_tpl, tmp_file, vnfd_mock)
self.assertEqual(0, opnfv_vnf.swq)
diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py
index f5f7f0fe7..9f337c673 100644
--- a/tests/unit/network_services/nfvi/test_resource.py
+++ b/tests/unit/network_services/nfvi/test_resource.py
@@ -19,7 +19,8 @@ import unittest
from yardstick.network_services.nfvi.resource import ResourceProfile
from yardstick.network_services.nfvi import resource, collectd
-
+from yardstick.common.exceptions import ResourceCommandError
+from yardstick import ssh
class TestResourceProfile(unittest.TestCase):
VNFD = {'vnfd:vnfd-catalog':
@@ -128,8 +129,31 @@ class TestResourceProfile(unittest.TestCase):
self.assertEqual(val, ('error', 'Invalid', '', ''))
def test__start_collectd(self):
- self.assertIsNone(
- self.resource_profile._start_collectd(self.ssh_mock, "/opt/nsb_bin"))
+ ssh_mock = mock.Mock()
+ ssh_mock.execute = mock.Mock(return_value=(0, "", ""))
+ self.assertIsNone(self.resource_profile._start_collectd(ssh_mock,
+ "/opt/nsb_bin"))
+
+ ssh_mock.execute = mock.Mock(side_effect=ssh.SSHError)
+ with self.assertRaises(ssh.SSHError):
+ self.resource_profile._start_collectd(ssh_mock, "/opt/nsb_bin")
+
+ ssh_mock.execute = mock.Mock(return_value=(1, "", ""))
+ self.assertIsNone(self.resource_profile._start_collectd(ssh_mock,
+ "/opt/nsb_bin"))
+
+ def test__start_rabbitmq(self):
+ ssh_mock = mock.Mock()
+ ssh_mock.execute = mock.Mock(return_value=(0, "RabbitMQ", ""))
+ self.assertIsNone(self.resource_profile._start_rabbitmq(ssh_mock))
+
+ ssh_mock.execute = mock.Mock(return_value=(0, "", ""))
+ with self.assertRaises(ResourceCommandError):
+ self.resource_profile._start_rabbitmq(ssh_mock)
+
+ ssh_mock.execute = mock.Mock(return_value=(1, "", ""))
+ with self.assertRaises(ResourceCommandError):
+ self.resource_profile._start_rabbitmq(ssh_mock)
def test__prepare_collectd_conf(self):
self.assertIsNone(
@@ -154,11 +178,12 @@ class TestResourceProfile(unittest.TestCase):
def test_initiate_systemagent(self):
self.resource_profile._start_collectd = mock.Mock()
+ self.resource_profile._start_rabbitmq = mock.Mock()
self.assertIsNone(
self.resource_profile.initiate_systemagent("/opt/nsb_bin"))
def test_initiate_systemagent_raise(self):
- self.resource_profile._start_collectd = mock.Mock(side_effect=RuntimeError)
+ self.resource_profile._start_rabbitmq = mock.Mock(side_effect=RuntimeError)
with self.assertRaises(RuntimeError):
self.resource_profile.initiate_systemagent("/opt/nsb_bin")
diff --git a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
index 1b4189b48..28840ef98 100644
--- a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
+++ b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
@@ -68,7 +68,7 @@ class TestProxBinSearchProfile(unittest.TestCase):
# Result Samples inc theor_max
result_tuple = {"Result_Actual_throughput": 7.5e-07,
- "Result_theor_max_throughput": 0.00012340000000000002,
+ "Result_theor_max_throughput": 1.234e-10,
"Result_pktSize": 200}
profile.queue.put.assert_called_with(result_tuple)
diff --git a/tests/unit/network_services/traffic_profile/test_rfc2544.py b/tests/unit/network_services/traffic_profile/test_rfc2544.py
index 21c8f6d5b..cb3a547ee 100644
--- a/tests/unit/network_services/traffic_profile/test_rfc2544.py
+++ b/tests/unit/network_services/traffic_profile/test_rfc2544.py
@@ -73,7 +73,7 @@ class TestRFC2544Profile(unittest.TestCase):
def test___init__(self):
r_f_c2544_profile = RFC2544Profile(self.TRAFFIC_PROFILE)
- assert r_f_c2544_profile.rate
+ self.assertIsNotNone(r_f_c2544_profile.rate)
def test_execute(self):
traffic_generator = mock.Mock(autospec=TrexProfile)
diff --git a/tests/unit/network_services/vnf_generic/vnf/test_base.py b/tests/unit/network_services/vnf_generic/vnf/test_base.py
index 664373f8f..9ef6473f0 100644
--- a/tests/unit/network_services/vnf_generic/vnf/test_base.py
+++ b/tests/unit/network_services/vnf_generic/vnf/test_base.py
@@ -215,9 +215,11 @@ class TestGenericVNF(unittest.TestCase):
with self.assertRaises(TypeError) as exc:
# pylint: disable=abstract-class-instantiated
base.GenericVNF('vnf1', VNFD['vnfd:vnfd-catalog']['vnfd'][0])
- msg = ("Can't instantiate abstract class GenericVNF with abstract "
- "methods collect_kpi, instantiate, scale, terminate, "
- "wait_for_instantiate")
+
+ msg = ("Can't instantiate abstract class GenericVNF with abstract methods "
+ "collect_kpi, instantiate, scale, start_collect, "
+ "stop_collect, terminate, wait_for_instantiate")
+
self.assertEqual(msg, str(exc.exception))
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 faceeb695..bc48f994c 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
@@ -24,7 +24,7 @@ import unittest
from tests.unit import STL_MOCKS
from yardstick.common import utils
from yardstick.network_services.vnf_generic.vnf.base import VnfdHelper
-
+from yardstick.network_services import constants
STLClient = mock.MagicMock()
stl_patch = mock.patch.dict("sys.modules", STL_MOCKS)
@@ -46,7 +46,6 @@ if stl_patch:
from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxVpeProfileHelper
from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxlwAFTRProfileHelper
-
class TestCoreTuple(unittest.TestCase):
def test___init__(self):
core_tuple = CoreSocketTuple('core 5s6')
@@ -1537,7 +1536,9 @@ class TestProxDataHelper(unittest.TestCase):
sut = mock.MagicMock()
sut.port_stats.return_value = list(range(10))
- data_helper = ProxDataHelper(vnfd_helper, sut, pkt_size, 25, None)
+ data_helper = ProxDataHelper(
+ vnfd_helper, sut, pkt_size, 25, None,
+ constants.NIC_GBPS_DEFAULT * constants.ONE_GIGABIT_IN_BITS)
self.assertEqual(data_helper.rx_total, 6)
self.assertEqual(data_helper.tx_total, 7)
@@ -1551,7 +1552,7 @@ class TestProxDataHelper(unittest.TestCase):
sut = mock.MagicMock()
sut.port_stats.return_value = list(range(10))
- data_helper = ProxDataHelper(vnfd_helper, sut, None, None, None)
+ data_helper = ProxDataHelper(vnfd_helper, sut, None, None, None, None)
expected = {
'xe1': {
@@ -1574,13 +1575,15 @@ class TestProxDataHelper(unittest.TestCase):
sut = mock.MagicMock()
sut.port_stats.return_value = list(range(10))
- data_helper = ProxDataHelper(vnfd_helper, sut, None, None, 5.4)
+ data_helper = ProxDataHelper(vnfd_helper, sut, None, None,
+ 5.4, constants.NIC_GBPS_DEFAULT * constants.ONE_GIGABIT_IN_BITS)
data_helper._totals_and_pps = 12, 32, 4.5
data_helper.tsc_hz = 9.8
data_helper.measured_stats = {'delta': TotStatsTuple(6.1, 6.2, 6.3, 6.4)}
data_helper.latency = 7
self.assertIsNone(data_helper.result_tuple)
+ self.assertEqual(data_helper.line_speed, 10000000000)
expected = ProxTestDataTuple(5.4, 9.8, 6.1, 6.2, 6.3, 7, 12, 32, 4.5)
with data_helper:
@@ -1595,7 +1598,7 @@ class TestProxDataHelper(unittest.TestCase):
def test___enter___negative(self):
vnfd_helper = mock.MagicMock()
- data_helper = ProxDataHelper(vnfd_helper, None, None, None, None)
+ data_helper = ProxDataHelper(vnfd_helper, None, None, None, None, None)
vnfd_helper.port_pairs.all_ports = []
with self.assertRaises(AssertionError):
@@ -1617,7 +1620,7 @@ class TestProxDataHelper(unittest.TestCase):
sut = ProxSocketHelper(mock.MagicMock())
sut.get_all_tot_stats = mock.MagicMock(side_effect=[start, end])
- data_helper = ProxDataHelper(vnfd_helper, sut, None, None, 5.4)
+ data_helper = ProxDataHelper(vnfd_helper, sut, None, None, 5.4, None)
self.assertIsNone(data_helper.measured_stats)
@@ -1638,7 +1641,7 @@ class TestProxDataHelper(unittest.TestCase):
sut = mock.MagicMock()
sut.hz.return_value = '54.6'
- data_helper = ProxDataHelper(vnfd_helper, sut, None, None, None)
+ data_helper = ProxDataHelper(vnfd_helper, sut, None, None, None, None)
self.assertIsNone(data_helper.tsc_hz)
@@ -1935,7 +1938,8 @@ class TestProxProfileHelper(unittest.TestCase):
helper = ProxProfileHelper(resource_helper)
- helper.run_test(120, 5, 6.5)
+ helper.run_test(120, 5, 6.5,
+ constants.NIC_GBPS_DEFAULT * constants.ONE_GIGABIT_IN_BITS)
class TestProxMplsProfileHelper(unittest.TestCase):
@@ -2081,8 +2085,12 @@ class TestProxBngProfileHelper(unittest.TestCase):
helper = ProxBngProfileHelper(resource_helper)
- helper.run_test(120, 5, 6.5)
- helper.run_test(-1000, 5, 6.5) # negative pkt_size is the only way to make ratio > 1
+ helper.run_test(120, 5, 6.5,
+ constants.NIC_GBPS_DEFAULT * constants.ONE_GIGABIT_IN_BITS)
+
+ # negative pkt_size is the only way to make ratio > 1
+ helper.run_test(-1000, 5, 6.5,
+ constants.NIC_GBPS_DEFAULT * constants.ONE_GIGABIT_IN_BITS)
class TestProxVpeProfileHelper(unittest.TestCase):
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 c7d2abcd5..38a043d00 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
@@ -533,10 +533,12 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase):
@mock.patch.object(six, 'BytesIO', return_value=six.BytesIO(b'100\n'))
@mock.patch.object(utils, 'read_meminfo',
return_value={'Hugepagesize': '2048'})
- def test__setup_hugepages(self, mock_meminfo, *args):
+ def test__setup_hugepages_no_hugepages_defined(self, mock_meminfo, *args):
ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ scenario_helper.all_options = {}
dpdk_setup_helper = DpdkVnfSetupEnvHelper(
- mock.ANY, ssh_helper, mock.ANY)
+ mock.ANY, ssh_helper, scenario_helper)
with mock.patch.object(sample_vnf.LOG, 'info') as mock_info:
dpdk_setup_helper._setup_hugepages()
mock_info.assert_called_once_with(
@@ -544,6 +546,22 @@ class TestDpdkVnfSetupEnvHelper(unittest.TestCase):
'%s', 2048, 8192, 100)
mock_meminfo.assert_called_once_with(ssh_helper)
+ @mock.patch.object(six, 'BytesIO', return_value=six.BytesIO(b'100\n'))
+ @mock.patch.object(utils, 'read_meminfo',
+ return_value={'Hugepagesize': '1048576'})
+ def test__setup_hugepages_8gb_hugepages_defined(self, mock_meminfo, *args):
+ ssh_helper = mock.Mock()
+ scenario_helper = mock.Mock()
+ scenario_helper.all_options = {'hugepages_gb': 8}
+ dpdk_setup_helper = DpdkVnfSetupEnvHelper(
+ mock.ANY, ssh_helper, scenario_helper)
+ with mock.patch.object(sample_vnf.LOG, 'info') as mock_info:
+ dpdk_setup_helper._setup_hugepages()
+ mock_info.assert_called_once_with(
+ 'Hugepages size (kB): %s, number claimed: %s, number set: '
+ '%s', 1048576, 8, 100)
+ mock_meminfo.assert_called_once_with(ssh_helper)
+
@mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.open')
@mock.patch.object(utils, 'find_relative_file')
@mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.MultiPortConfig')
@@ -1643,42 +1661,6 @@ class TestSampleVnf(unittest.TestCase):
# test the default resource helper is MyResourceHelper, not subclass
self.assertEqual(type(sample_vnf.resource_helper), MyResourceHelper)
- def test__get_port0localip6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '0064:ff9b:0:0:0:0:9810:6414'
- result = sample_vnf._get_port0localip6()
- self.assertEqual(result, expected)
-
- def test__get_port1localip6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '0064:ff9b:0:0:0:0:9810:2814'
- result = sample_vnf._get_port1localip6()
- self.assertEqual(result, expected)
-
- def test__get_port0prefixip6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '112'
- result = sample_vnf._get_port0prefixlen6()
- self.assertEqual(result, expected)
-
- def test__get_port1prefixip6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '112'
- result = sample_vnf._get_port1prefixlen6()
- self.assertEqual(result, expected)
-
- def test__get_port0gateway6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '0064:ff9b:0:0:0:0:9810:6414'
- result = sample_vnf._get_port0gateway6()
- self.assertEqual(result, expected)
-
- def test__get_port1gateway6(self):
- sample_vnf = SampleVNF('vnf1', self.VNFD_0)
- expected = '0064:ff9b:0:0:0:0:9810:2814'
- result = sample_vnf._get_port1gateway6()
- self.assertEqual(result, expected)
-
@mock.patch('yardstick.network_services.vnf_generic.vnf.sample_vnf.Process')
def test__start_vnf(self, *args):
vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
@@ -1732,6 +1714,64 @@ class TestSampleVnf(unittest.TestCase):
self.assertIsNone(sample_vnf.instantiate(scenario_cfg, {}))
self.assertEqual(sample_vnf.nfvi_context, context2)
+ def test__update_collectd_options(self):
+ scenario_cfg = {'options':
+ {'collectd':
+ {'interval': 3,
+ 'plugins':
+ {'plugin3': {'param': 3}}},
+ 'vnf__0':
+ {'collectd':
+ {'interval': 2,
+ 'plugins':
+ {'plugin3': {'param': 2},
+ 'plugin2': {'param': 2}}}}}}
+ context_cfg = {'nodes':
+ {'vnf__0':
+ {'collectd':
+ {'interval': 1,
+ 'plugins':
+ {'plugin3': {'param': 1},
+ 'plugin2': {'param': 1},
+ 'plugin1': {'param': 1}}}}}}
+ expected = {'interval': 1,
+ 'plugins':
+ {'plugin3': {'param': 1},
+ 'plugin2': {'param': 1},
+ 'plugin1': {'param': 1}}}
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf__0', vnfd)
+ sample_vnf._update_collectd_options(scenario_cfg, context_cfg)
+ self.assertEqual(sample_vnf.setup_helper.collectd_options, expected)
+
+ def test__update_options(self):
+ options1 = {'interval': 1,
+ 'param1': 'value1',
+ 'plugins':
+ {'plugin3': {'param': 3},
+ 'plugin2': {'param': 1},
+ 'plugin1': {'param': 1}}}
+ options2 = {'interval': 2,
+ 'param2': 'value2',
+ 'plugins':
+ {'plugin4': {'param': 4},
+ 'plugin2': {'param': 2},
+ 'plugin1': {'param': 2}}}
+ expected = {'interval': 1,
+ 'param1': 'value1',
+ 'param2': 'value2',
+ 'plugins':
+ {'plugin4': {'param': 4},
+ 'plugin3': {'param': 3},
+ 'plugin2': {'param': 1},
+ 'plugin1': {'param': 1}}}
+
+ vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
+ sample_vnf = SampleVNF('vnf1', vnfd)
+ sample_vnf._update_options(options2, options1)
+ self.assertEqual(options2, expected)
+
@mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time")
@mock.patch("yardstick.ssh.SSH")
def test_wait_for_instantiate_empty_queue(self, ssh, *args):
@@ -1767,16 +1807,6 @@ class TestSampleVnf(unittest.TestCase):
self.assertEqual(sample_vnf.wait_for_instantiate(), 0)
- def test__build_ports(self):
- vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
- sample_vnf = SampleVNF('vnf1', vnfd)
-
- self.assertIsNone(sample_vnf._build_ports())
- self.assertIsNotNone(sample_vnf.networks)
- self.assertIsNotNone(sample_vnf.uplink_ports)
- self.assertIsNotNone(sample_vnf.downlink_ports)
- self.assertIsNotNone(sample_vnf.my_ports)
-
@mock.patch("yardstick.network_services.vnf_generic.vnf.sample_vnf.time")
def test_vnf_execute_with_queue_data(self, *args):
queue_size_list = [
diff --git a/tools/virt_ci_rampup.sh b/tools/virt_ci_rampup.sh
index 6a9f2e7cb..aaf162cf7 100755
--- a/tools/virt_ci_rampup.sh
+++ b/tools/virt_ci_rampup.sh
@@ -13,9 +13,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+env_http_proxy=$(sed -ne "s/^http_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${http_proxy} ]] && [[ ! -z ${env_http_proxy} ]]; then
+ export http_proxy=${env_http_proxy}
+fi
+env_https_proxy=$(sed -ne "s/^https_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${https_proxy} ]] && [[ ! -z ${env_https_proxy} ]]; then
+ export https_proxy=${env_https_proxy}
+fi
+env_ftp_proxy=$(sed -ne "s/^ftp_proxy=[\"\']\(.*\)[\"\']/\1/p" /etc/environment)
+if [[ -z ${ftp_proxy} ]] && [[ ! -z ${env_ftp_proxy} ]]; then
+ export ftp_proxy=${env_ftp_proxy}
+fi
+if [[ ! -z ${http_proxy} ]] || [[ ! -z ${https_proxy} ]]; then
+ export no_proxy="${no_proxy}"
+ extra_args="${extra_args} -e @/tmp/proxy.yml "
+ cat <<EOF > /tmp/proxy.yml
+---
+proxy_env:
+ http_proxy: ${http_proxy}
+ https_proxy: ${https_proxy}
+ ftp_proxy: ${ftp_proxy}
+ no_proxy: ${no_proxy}
+EOF
+fi
ANSIBLE_SCRIPTS="${0%/*}/../ansible"
-cd ${ANSIBLE_SCRIPTS} &&\
+cd ${ANSIBLE_SCRIPTS} && \
sudo -EH ansible-playbook \
- -e rs_file='../etc/infra/infra_deploy.yaml' \
+ -e RS_FILE='../etc/infra/infra_deploy_two.yaml' -e CLEAN_UP=False ${extra_args} \
-i inventory.ini infra_deploy.yml
diff --git a/yardstick/benchmark/contexts/base.py b/yardstick/benchmark/contexts/base.py
index ae8319e37..692c16892 100644
--- a/yardstick/benchmark/contexts/base.py
+++ b/yardstick/benchmark/contexts/base.py
@@ -6,17 +6,20 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
import abc
import six
-import yardstick.common.utils as utils
+from yardstick.common import constants
+from yardstick.common import utils
class Flags(object):
"""Class to represent the status of the flags in a context"""
_FLAGS = {'no_setup': False,
- 'no_teardown': False}
+ 'no_teardown': False,
+ 'os_cloud_config': constants.OS_CLOUD_DEFAULT_CONFIG}
def __init__(self, **kwargs):
for name, value in self._FLAGS.items():
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 0d1dfb86f..82861829e 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -7,9 +7,6 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import absolute_import
-from __future__ import print_function
-
import collections
import logging
import os
@@ -328,8 +325,10 @@ class HeatContext(Context):
if not os.path.exists(self.key_filename):
SSH.gen_keys(self.key_filename)
- heat_template = HeatTemplate(self.name, self.template_file,
- self.heat_parameters)
+ heat_template = HeatTemplate(
+ self.name, template_file=self.template_file,
+ heat_parameters=self.heat_parameters,
+ os_cloud_config=self._flags.os_cloud_config)
if self.template_file is None:
self._add_resources_to_template(heat_template)
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py
index 14738da8a..4d43f2611 100644
--- a/yardstick/benchmark/contexts/standalone/model.py
+++ b/yardstick/benchmark/contexts/standalone/model.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import absolute_import
import os
import re
import time
@@ -25,11 +24,12 @@ from netaddr import IPNetwork
import xml.etree.ElementTree as ET
from yardstick import ssh
-from yardstick.common.constants import YARDSTICK_ROOT_PATH
+from yardstick.common import constants
+from yardstick.common import exceptions
from yardstick.common.yaml_loader import yaml_load
from yardstick.network_services.utils import PciAddress
from yardstick.network_services.helpers.cpu import CpuSysCores
-from yardstick.common.utils import write_file
+
LOG = logging.getLogger(__name__)
@@ -106,12 +106,17 @@ class Libvirt(object):
@staticmethod
def virsh_create_vm(connection, cfg):
- err = connection.execute("virsh create %s" % cfg)[0]
- LOG.info("VM create status: %s", err)
+ LOG.info('VM create, XML config: %s', cfg)
+ status, _, error = connection.execute('virsh create %s' % cfg)
+ if status:
+ raise exceptions.LibvirtCreateError(error=error)
@staticmethod
def virsh_destroy_vm(vm_name, connection):
- connection.execute("virsh destroy %s" % vm_name)
+ LOG.info('VM destroy, VM name: %s', vm_name)
+ status, _, error = connection.execute('virsh destroy %s' % vm_name)
+ if status:
+ LOG.warning('Error destroying VM %s. Error: %s', vm_name, error)
@staticmethod
def _add_interface_address(interface, pci_address):
@@ -132,7 +137,7 @@ class Libvirt(object):
return vm_pci
@classmethod
- def add_ovs_interface(cls, vpath, port_num, vpci, vports_mac, xml):
+ def add_ovs_interface(cls, vpath, port_num, vpci, vports_mac, xml_str):
"""Add a DPDK OVS 'interface' XML node in 'devices' node
<devices>
@@ -156,7 +161,7 @@ class Libvirt(object):
vhost_path = ('{0}/var/run/openvswitch/dpdkvhostuser{1}'.
format(vpath, port_num))
- root = ET.parse(xml)
+ root = ET.fromstring(xml_str)
pci_address = PciAddress(vpci.strip())
device = root.find('devices')
@@ -181,10 +186,10 @@ class Libvirt(object):
cls._add_interface_address(interface, pci_address)
- root.write(xml)
+ return ET.tostring(root)
@classmethod
- def add_sriov_interfaces(cls, vm_pci, vf_pci, vf_mac, xml):
+ def add_sriov_interfaces(cls, vm_pci, vf_pci, vf_mac, xml_str):
"""Add a SR-IOV 'interface' XML node in 'devices' node
<devices>
@@ -207,7 +212,7 @@ class Libvirt(object):
-sr_iov-how_sr_iov_libvirt_works
"""
- root = ET.parse(xml)
+ root = ET.fromstring(xml_str)
device = root.find('devices')
interface = ET.SubElement(device, 'interface')
@@ -224,20 +229,47 @@ class Libvirt(object):
pci_vm_address = PciAddress(vm_pci.strip())
cls._add_interface_address(interface, pci_vm_address)
- root.write(xml)
+ return ET.tostring(root)
@staticmethod
- def create_snapshot_qemu(connection, index, vm_image):
- # build snapshot image
- image = "/var/lib/libvirt/images/%s.qcow2" % index
- connection.execute("rm %s" % image)
- qemu_template = "qemu-img create -f qcow2 -o backing_file=%s %s"
- connection.execute(qemu_template % (vm_image, image))
+ def create_snapshot_qemu(connection, index, base_image):
+ """Create the snapshot image for a VM using a base image
- return image
+ :param connection: SSH connection to the remote host
+ :param index: index of the VM to be spawn
+ :param base_image: path of the VM base image in the remote host
+ :return: snapshot image path
+ """
+ vm_image = '/var/lib/libvirt/images/%s.qcow2' % index
+ connection.execute('rm -- "%s"' % vm_image)
+ status, _, _ = connection.execute('test -r %s' % base_image)
+ if status:
+ if not os.access(base_image, os.R_OK):
+ raise exceptions.LibvirtQemuImageBaseImageNotPresent(
+ vm_image=vm_image, base_image=base_image)
+ # NOTE(ralonsoh): done in two steps to avoid root permission
+ # issues.
+ LOG.info('Copy %s from execution host to remote host', base_image)
+ file_name = os.path.basename(os.path.normpath(base_image))
+ connection.put_file(base_image, '/tmp/%s' % file_name)
+ status, _, error = connection.execute(
+ 'mv -- "/tmp/%s" "%s"' % (file_name, base_image))
+ if status:
+ raise exceptions.LibvirtQemuImageCreateError(
+ vm_image=vm_image, base_image=base_image, error=error)
+
+ LOG.info('Convert image %s to %s', base_image, vm_image)
+ qemu_cmd = ('qemu-img create -f qcow2 -o backing_file=%s %s' %
+ (base_image, vm_image))
+ status, _, error = connection.execute(qemu_cmd)
+ if status:
+ raise exceptions.LibvirtQemuImageCreateError(
+ vm_image=vm_image, base_image=base_image, error=error)
+ return vm_image
@classmethod
- def build_vm_xml(cls, connection, flavor, cfg, vm_name, index):
+ def build_vm_xml(cls, connection, flavor, vm_name, index):
+ """Build the XML from the configuration parameters"""
memory = flavor.get('ram', '4096')
extra_spec = flavor.get('extra_specs', {})
cpu = extra_spec.get('hw:cpu_cores', '2')
@@ -261,9 +293,7 @@ class Libvirt(object):
socket=socket, threads=threads,
vm_image=image, cpuset=cpuset, cputune=cputune)
- write_file(cfg, vm_xml)
-
- return [vcpu, mac]
+ return vm_xml, mac
@staticmethod
def update_interrupts_hugepages_perf(connection):
@@ -283,6 +313,13 @@ class Libvirt(object):
cpuset = "%s,%s" % (cores, threads)
return cpuset
+ @classmethod
+ def write_file(cls, file_name, xml_str):
+ """Dump a XML string to a file"""
+ root = ET.fromstring(xml_str)
+ et = ET.ElementTree(element=root)
+ et.write(file_name, encoding='utf-8', method='xml')
+
class StandaloneContextHelper(object):
""" This class handles all the common code for standalone
@@ -374,7 +411,8 @@ class StandaloneContextHelper(object):
except IOError as io_error:
if io_error.errno != errno.ENOENT:
raise
- self.file_path = os.path.join(YARDSTICK_ROOT_PATH, file_path)
+ self.file_path = os.path.join(constants.YARDSTICK_ROOT_PATH,
+ file_path)
cfg = self.read_config_file()
nodes.extend([node for node in cfg["nodes"] if str(node["role"]) != nfvi_role])
@@ -506,7 +544,7 @@ class OvsDeploy(object):
StandaloneContextHelper.install_req_libs(self.connection, pkgs)
def ovs_deploy(self):
- ovs_deploy = os.path.join(YARDSTICK_ROOT_PATH,
+ ovs_deploy = os.path.join(constants.YARDSTICK_ROOT_PATH,
"yardstick/resources/scripts/install/",
self.OVS_DEPLOY_SCRIPT)
if os.path.isfile(ovs_deploy):
@@ -522,4 +560,6 @@ class OvsDeploy(object):
cmd = "sudo -E %s --ovs='%s' --dpdk='%s' -p='%s'" % (remote_ovs_deploy,
ovs, dpdk, http_proxy)
- self.connection.execute(cmd)
+ exit_status, _, stderr = self.connection.execute(cmd)
+ if exit_status:
+ raise exceptions.OVSDeployError(stderr=stderr)
diff --git a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
index a18b42ea5..b9e66a481 100644
--- a/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
+++ b/yardstick/benchmark/contexts/standalone/ovs_dpdk.py
@@ -12,26 +12,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import absolute_import
-import os
-import logging
+import io
import collections
+import logging
+import os
+import re
import time
-from collections import OrderedDict
-
from yardstick import ssh
from yardstick.network_services.utils import get_nsb_option
-from yardstick.network_services.utils import provision_tool
from yardstick.benchmark.contexts.base import Context
-from yardstick.benchmark.contexts.standalone.model import Libvirt
-from yardstick.benchmark.contexts.standalone.model import StandaloneContextHelper
-from yardstick.benchmark.contexts.standalone.model import Server
-from yardstick.benchmark.contexts.standalone.model import OvsDeploy
-from yardstick.network_services.utils import PciAddress
+from yardstick.benchmark.contexts.standalone import model
+from yardstick.common import exceptions
+from yardstick.network_services import utils
+
LOG = logging.getLogger(__name__)
+MAIN_BRIDGE = 'br0'
+
class OvsDpdkContext(Context):
""" This class handles OVS standalone nodes - VM running on Non-Managed NFVi
@@ -50,14 +49,15 @@ class OvsDpdkContext(Context):
}
DEFAULT_OVS = '2.6.0'
-
- PKILL_TEMPLATE = "pkill %s %s"
+ CMD_TIMEOUT = 30
+ DEFAULT_USER_PATH = '/usr/local'
def __init__(self):
self.file_path = None
self.sriov = []
self.first_run = True
- self.dpdk_devbind = ''
+ self.dpdk_devbind = os.path.join(get_nsb_option('bin_path'),
+ 'dpdk-devbind.py')
self.vm_names = []
self.nfvi_host = []
self.nodes = []
@@ -65,8 +65,8 @@ class OvsDpdkContext(Context):
self.attrs = {}
self.vm_flavor = None
self.servers = None
- self.helper = StandaloneContextHelper()
- self.vnf_node = Server()
+ self.helper = model.StandaloneContextHelper()
+ self.vnf_node = model.Server()
self.ovs_properties = {}
self.wait_for_vswitchd = 10
super(OvsDpdkContext, self).__init__()
@@ -93,34 +93,32 @@ class OvsDpdkContext(Context):
LOG.debug("Networks: %r", self.networks)
def setup_ovs(self):
- vpath = self.ovs_properties.get("vpath", "/usr/local")
- xargs_kill_cmd = self.PKILL_TEMPLATE % ('-9', 'ovs')
-
+ """Initialize OVS-DPDK"""
+ vpath = self.ovs_properties.get('vpath', self.DEFAULT_USER_PATH)
create_from = os.path.join(vpath, 'etc/openvswitch/conf.db')
create_to = os.path.join(vpath, 'share/openvswitch/vswitch.ovsschema')
cmd_list = [
- "chmod 0666 /dev/vfio/*",
- "chmod a+x /dev/vfio",
- "pkill -9 ovs",
- xargs_kill_cmd,
- "killall -r 'ovs*'",
- "mkdir -p {0}/etc/openvswitch".format(vpath),
- "mkdir -p {0}/var/run/openvswitch".format(vpath),
- "rm {0}/etc/openvswitch/conf.db".format(vpath),
- "ovsdb-tool create {0} {1}".format(create_from, create_to),
- "modprobe vfio-pci",
- "chmod a+x /dev/vfio",
- "chmod 0666 /dev/vfio/*",
+ 'killall -r "ovs.*" -q | true',
+ 'mkdir -p {0}/etc/openvswitch'.format(vpath),
+ 'mkdir -p {0}/var/run/openvswitch'.format(vpath),
+ 'rm {0}/etc/openvswitch/conf.db | true'.format(vpath),
+ 'ovsdb-tool create {0} {1}'.format(create_from, create_to),
+ 'modprobe vfio-pci',
+ 'chmod a+x /dev/vfio',
+ 'chmod 0666 /dev/vfio/*',
]
- for cmd in cmd_list:
- self.connection.execute(cmd)
- bind_cmd = "{dpdk_devbind} --force -b {driver} {port}"
- phy_driver = "vfio-pci"
+
+ bind_cmd = '%s --force -b vfio-pci {port}' % self.dpdk_devbind
for port in self.networks.values():
- vpci = port.get("phy_port")
- self.connection.execute(bind_cmd.format(
- dpdk_devbind=self.dpdk_devbind, driver=phy_driver, port=vpci))
+ cmd_list.append(bind_cmd.format(port=port.get('phy_port')))
+
+ for cmd in cmd_list:
+ LOG.info(cmd)
+ exit_status, _, stderr = self.connection.execute(
+ cmd, timeout=self.CMD_TIMEOUT)
+ if exit_status:
+ raise exceptions.OVSSetupError(command=cmd, error=stderr)
def start_ovs_serverswitch(self):
vpath = self.ovs_properties.get("vpath")
@@ -166,56 +164,78 @@ class OvsDpdkContext(Context):
vpath = self.ovs_properties.get("vpath", "/usr/local")
version = self.ovs_properties.get('version', {})
ovs_ver = [int(x) for x in version.get('ovs', self.DEFAULT_OVS).split('.')]
- ovs_add_port = \
- "ovs-vsctl add-port {br} {port} -- set Interface {port} type={type_}{dpdk_args}"
- ovs_add_queue = "ovs-vsctl set Interface {port} options:n_rxq={queue}"
- chmod_vpath = "chmod 0777 {0}/var/run/openvswitch/dpdkvhostuser*"
-
- cmd_dpdk_list = [
- "ovs-vsctl del-br br0",
- "rm -rf {0}/var/run/openvswitch/dpdkvhostuser*".format(vpath),
- "ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev",
+ ovs_add_port = ('ovs-vsctl add-port {br} {port} -- '
+ 'set Interface {port} type={type_}{dpdk_args}')
+ ovs_add_queue = 'ovs-vsctl set Interface {port} options:n_rxq={queue}'
+ chmod_vpath = 'chmod 0777 {0}/var/run/openvswitch/dpdkvhostuser*'
+
+ cmd_list = [
+ 'ovs-vsctl --if-exists del-br {0}'.format(MAIN_BRIDGE),
+ 'rm -rf {0}/var/run/openvswitch/dpdkvhostuser*'.format(vpath),
+ 'ovs-vsctl add-br {0} -- set bridge {0} datapath_type=netdev'.
+ format(MAIN_BRIDGE)
]
- ordered_network = OrderedDict(self.networks)
+ ordered_network = collections.OrderedDict(self.networks)
for index, vnf in enumerate(ordered_network.values()):
if ovs_ver >= [2, 7, 0]:
dpdk_args = " options:dpdk-devargs=%s" % vnf.get("phy_port")
- dpdk_list.append(ovs_add_port.format(br='br0', port='dpdk%s' % vnf.get("port_num", 0),
- type_='dpdk', dpdk_args=dpdk_args))
- dpdk_list.append(ovs_add_queue.format(port='dpdk%s' % vnf.get("port_num", 0),
- queue=self.ovs_properties.get("queues", 1)))
+ dpdk_list.append(ovs_add_port.format(
+ br=MAIN_BRIDGE, port='dpdk%s' % vnf.get("port_num", 0),
+ type_='dpdk', dpdk_args=dpdk_args))
+ dpdk_list.append(ovs_add_queue.format(
+ port='dpdk%s' % vnf.get("port_num", 0),
+ queue=self.ovs_properties.get("queues", 1)))
# Sorting the array to make sure we execute dpdk0... in the order
list.sort(dpdk_list)
- cmd_dpdk_list.extend(dpdk_list)
+ cmd_list.extend(dpdk_list)
# Need to do two for loop to maintain the dpdk/vhost ports.
for index, _ in enumerate(ordered_network):
- cmd_dpdk_list.append(ovs_add_port.format(br='br0', port='dpdkvhostuser%s' % index,
- type_='dpdkvhostuser', dpdk_args=""))
-
- for cmd in cmd_dpdk_list:
- LOG.info(cmd)
- self.connection.execute(cmd)
-
- # Fixme: add flows code
- ovs_flow = "ovs-ofctl add-flow br0 in_port=%s,action=output:%s"
+ cmd_list.append(ovs_add_port.format(
+ br=MAIN_BRIDGE, port='dpdkvhostuser%s' % index,
+ type_='dpdkvhostuser', dpdk_args=""))
+ ovs_flow = ("ovs-ofctl add-flow {0} in_port=%s,action=output:%s".
+ format(MAIN_BRIDGE))
network_count = len(ordered_network) + 1
for in_port, out_port in zip(range(1, network_count),
range(network_count, network_count * 2)):
- self.connection.execute(ovs_flow % (in_port, out_port))
- self.connection.execute(ovs_flow % (out_port, in_port))
+ cmd_list.append(ovs_flow % (in_port, out_port))
+ cmd_list.append(ovs_flow % (out_port, in_port))
- self.connection.execute(chmod_vpath.format(vpath))
+ cmd_list.append(chmod_vpath.format(vpath))
+
+ for cmd in cmd_list:
+ LOG.info(cmd)
+ exit_status, _, stderr = self.connection.execute(
+ cmd, timeout=self.CMD_TIMEOUT)
+ if exit_status:
+ raise exceptions.OVSSetupError(command=cmd, error=stderr)
+
+ def _check_hugepages(self):
+ meminfo = io.BytesIO()
+ self.connection.get_file_obj('/proc/meminfo', meminfo)
+ regex = re.compile(r"HugePages_Total:\s+(?P<hp_total>\d+)[\n\r]"
+ r"HugePages_Free:\s+(?P<hp_free>\d+)")
+ match = regex.search(meminfo.getvalue().decode('utf-8'))
+ if not match:
+ raise exceptions.OVSHugepagesInfoError()
+ if int(match.group('hp_total')) == 0:
+ raise exceptions.OVSHugepagesNotConfigured()
+ if int(match.group('hp_free')) == 0:
+ raise exceptions.OVSHugepagesZeroFree(
+ total_hugepages=int(match.group('hp_total')))
def cleanup_ovs_dpdk_env(self):
- self.connection.execute("ovs-vsctl del-br br0")
+ self.connection.execute(
+ 'ovs-vsctl --if-exists del-br {0}'.format(MAIN_BRIDGE))
self.connection.execute("pkill -9 ovs")
def check_ovs_dpdk_env(self):
self.cleanup_ovs_dpdk_env()
+ self._check_hugepages()
version = self.ovs_properties.get("version", {})
ovs_ver = version.get("ovs", self.DEFAULT_OVS)
@@ -223,13 +243,15 @@ class OvsDpdkContext(Context):
supported_version = self.SUPPORTED_OVS_TO_DPDK_MAP.get(ovs_ver, None)
if supported_version is None or supported_version.split('.')[:2] != dpdk_ver[:2]:
- raise Exception("Unsupported ovs '{}'. Please check the config...".format(ovs_ver))
+ raise exceptions.OVSUnsupportedVersion(
+ ovs_version=ovs_ver,
+ ovs_to_dpdk_map=self.SUPPORTED_OVS_TO_DPDK_MAP)
status = self.connection.execute("ovs-vsctl -V | grep -i '%s'" % ovs_ver)[0]
if status:
- deploy = OvsDeploy(self.connection,
- get_nsb_option("bin_path"),
- self.ovs_properties)
+ deploy = model.OvsDeploy(self.connection,
+ utils.get_nsb_option("bin_path"),
+ self.ovs_properties)
deploy.ovs_deploy()
def deploy(self):
@@ -240,15 +262,12 @@ class OvsDpdkContext(Context):
return
self.connection = ssh.SSH.from_node(self.host_mgmt)
- self.dpdk_devbind = provision_tool(
- self.connection,
- os.path.join(get_nsb_option("bin_path"), "dpdk-devbind.py"))
# Check dpdk/ovs version, if not present install
self.check_ovs_dpdk_env()
# Todo: NFVi deploy (sriov, vswitch, ovs etc) based on the config.
- StandaloneContextHelper.install_req_libs(self.connection)
- self.networks = StandaloneContextHelper.get_nic_details(
+ model.StandaloneContextHelper.install_req_libs(self.connection)
+ self.networks = model.StandaloneContextHelper.get_nic_details(
self.connection, self.networks, self.dpdk_devbind)
self.setup_ovs()
@@ -256,9 +275,8 @@ class OvsDpdkContext(Context):
self.setup_ovs_bridge_add_flows()
self.nodes = self.setup_ovs_dpdk_context()
LOG.debug("Waiting for VM to come up...")
- self.nodes = StandaloneContextHelper.wait_for_vnfs_to_start(self.connection,
- self.servers,
- self.nodes)
+ self.nodes = model.StandaloneContextHelper.wait_for_vnfs_to_start(
+ self.connection, self.servers, self.nodes)
def undeploy(self):
@@ -278,7 +296,7 @@ class OvsDpdkContext(Context):
# Todo: NFVi undeploy (sriov, vswitch, ovs etc) based on the config.
for vm in self.vm_names:
- Libvirt.check_if_vm_exists_and_delete(vm, self.connection)
+ model.Libvirt.check_if_vm_exists_and_delete(vm, self.connection)
def _get_server(self, attr_name):
"""lookup server info by name from context
@@ -333,50 +351,53 @@ class OvsDpdkContext(Context):
return result
def configure_nics_for_ovs_dpdk(self):
- portlist = OrderedDict(self.networks)
+ portlist = collections.OrderedDict(self.networks)
for key in portlist:
- mac = StandaloneContextHelper.get_mac_address()
+ mac = model.StandaloneContextHelper.get_mac_address()
portlist[key].update({'mac': mac})
self.networks = portlist
LOG.info("Ports %s", self.networks)
- def _enable_interfaces(self, index, vfs, cfg):
+ def _enable_interfaces(self, index, vfs, xml_str):
vpath = self.ovs_properties.get("vpath", "/usr/local")
vf = self.networks[vfs[0]]
port_num = vf.get('port_num', 0)
- vpci = PciAddress(vf['vpci'].strip())
+ vpci = utils.PciAddress(vf['vpci'].strip())
# Generate the vpci for the interfaces
slot = index + port_num + 10
vf['vpci'] = \
"{}:{}:{:02x}.{}".format(vpci.domain, vpci.bus, slot, vpci.function)
- Libvirt.add_ovs_interface(vpath, port_num, vf['vpci'], vf['mac'], str(cfg))
+ return model.Libvirt.add_ovs_interface(
+ vpath, port_num, vf['vpci'], vf['mac'], xml_str)
def setup_ovs_dpdk_context(self):
nodes = []
self.configure_nics_for_ovs_dpdk()
- for index, (key, vnf) in enumerate(OrderedDict(self.servers).items()):
+ for index, (key, vnf) in enumerate(collections.OrderedDict(
+ self.servers).items()):
cfg = '/tmp/vm_ovs_%d.xml' % index
vm_name = "vm_%d" % index
# 1. Check and delete VM if already exists
- Libvirt.check_if_vm_exists_and_delete(vm_name, self.connection)
+ model.Libvirt.check_if_vm_exists_and_delete(vm_name,
+ self.connection)
+ xml_str, mac = model.Libvirt.build_vm_xml(
+ self.connection, self.vm_flavor, vm_name, index)
- _, mac = Libvirt.build_vm_xml(self.connection, self.vm_flavor,
- cfg, vm_name, index)
# 2: Cleanup already available VMs
- for vkey, vfs in OrderedDict(vnf["network_ports"]).items():
- if vkey == "mgmt":
- continue
- self._enable_interfaces(index, vfs, cfg)
+ for vfs in [vfs for vfs_name, vfs in vnf["network_ports"].items()
+ if vfs_name != 'mgmt']:
+ xml_str = self._enable_interfaces(index, vfs, xml_str)
# copy xml to target...
+ model.Libvirt.write_file(cfg, xml_str)
self.connection.put(cfg, cfg)
# NOTE: launch through libvirt
LOG.info("virsh create ...")
- Libvirt.virsh_create_vm(self.connection, cfg)
+ model.Libvirt.virsh_create_vm(self.connection, cfg)
self.vm_names.append(vm_name)
diff --git a/yardstick/benchmark/contexts/standalone/sriov.py b/yardstick/benchmark/contexts/standalone/sriov.py
index d7620552b..95472fdda 100644
--- a/yardstick/benchmark/contexts/standalone/sriov.py
+++ b/yardstick/benchmark/contexts/standalone/sriov.py
@@ -16,15 +16,11 @@ from __future__ import absolute_import
import os
import logging
import collections
-from collections import OrderedDict
from yardstick import ssh
from yardstick.network_services.utils import get_nsb_option
-from yardstick.network_services.utils import provision_tool
from yardstick.benchmark.contexts.base import Context
-from yardstick.benchmark.contexts.standalone.model import Libvirt
-from yardstick.benchmark.contexts.standalone.model import StandaloneContextHelper
-from yardstick.benchmark.contexts.standalone.model import Server
+from yardstick.benchmark.contexts.standalone import model
from yardstick.network_services.utils import PciAddress
LOG = logging.getLogger(__name__)
@@ -41,7 +37,8 @@ class SriovContext(Context):
self.file_path = None
self.sriov = []
self.first_run = True
- self.dpdk_devbind = ''
+ self.dpdk_devbind = os.path.join(get_nsb_option('bin_path'),
+ 'dpdk-devbind.py')
self.vm_names = []
self.nfvi_host = []
self.nodes = []
@@ -49,8 +46,8 @@ class SriovContext(Context):
self.attrs = {}
self.vm_flavor = None
self.servers = None
- self.helper = StandaloneContextHelper()
- self.vnf_node = Server()
+ self.helper = model.StandaloneContextHelper()
+ self.vnf_node = model.Server()
self.drivers = []
super(SriovContext, self).__init__()
@@ -82,20 +79,16 @@ class SriovContext(Context):
return
self.connection = ssh.SSH.from_node(self.host_mgmt)
- self.dpdk_devbind = provision_tool(
- self.connection,
- os.path.join(get_nsb_option("bin_path"), "dpdk-devbind.py"))
# Todo: NFVi deploy (sriov, vswitch, ovs etc) based on the config.
- StandaloneContextHelper.install_req_libs(self.connection)
- self.networks = StandaloneContextHelper.get_nic_details(
+ model.StandaloneContextHelper.install_req_libs(self.connection)
+ self.networks = model.StandaloneContextHelper.get_nic_details(
self.connection, self.networks, self.dpdk_devbind)
self.nodes = self.setup_sriov_context()
LOG.debug("Waiting for VM to come up...")
- self.nodes = StandaloneContextHelper.wait_for_vnfs_to_start(self.connection,
- self.servers,
- self.nodes)
+ self.nodes = model.StandaloneContextHelper.wait_for_vnfs_to_start(
+ self.connection, self.servers, self.nodes)
def undeploy(self):
"""don't need to undeploy"""
@@ -105,7 +98,7 @@ class SriovContext(Context):
# Todo: NFVi undeploy (sriov, vswitch, ovs etc) based on the config.
for vm in self.vm_names:
- Libvirt.check_if_vm_exists_and_delete(vm, self.connection)
+ model.Libvirt.check_if_vm_exists_and_delete(vm, self.connection)
# Bind nics back to kernel
for ports in self.networks.values():
@@ -136,8 +129,8 @@ class SriovContext(Context):
except StopIteration:
pass
else:
- raise ValueError("Duplicate nodes!!! Nodes: %s %s" %
- (node, duplicate))
+ raise ValueError("Duplicate nodes!!! Nodes: %s %s"
+ % (node, duplicate))
node["name"] = attr_name
return node
@@ -179,7 +172,7 @@ class SriovContext(Context):
self.connection.execute(build_vfs.format(ports.get('phy_port')))
# configure VFs...
- mac = StandaloneContextHelper.get_mac_address()
+ mac = model.StandaloneContextHelper.get_mac_address()
interface = ports.get('interface')
if interface is not None:
self.connection.execute(vf_cmd.format(interface, mac))
@@ -201,7 +194,7 @@ class SriovContext(Context):
slot = index + idx + 10
vf['vpci'] = \
"{}:{}:{:02x}.{}".format(vpci.domain, vpci.bus, slot, vpci.function)
- Libvirt.add_sriov_interfaces(
+ model.Libvirt.add_sriov_interfaces(
vf['vpci'], vf['vf_pci']['vf_pci'], vf['mac'], str(cfg))
self.connection.execute("ifconfig %s up" % vf['interface'])
self.connection.execute(vf_spoofchk.format(vf['interface']))
@@ -212,34 +205,37 @@ class SriovContext(Context):
# 1 : modprobe host_driver with num_vfs
self.configure_nics_for_sriov()
- for index, (key, vnf) in enumerate(OrderedDict(self.servers).items()):
+ for index, (key, vnf) in enumerate(collections.OrderedDict(
+ self.servers).items()):
cfg = '/tmp/vm_sriov_%s.xml' % str(index)
vm_name = "vm_%s" % str(index)
# 1. Check and delete VM if already exists
- Libvirt.check_if_vm_exists_and_delete(vm_name, self.connection)
+ model.Libvirt.check_if_vm_exists_and_delete(vm_name,
+ self.connection)
+ xml_str, mac = model.Libvirt.build_vm_xml(
+ self.connection, self.vm_flavor, vm_name, index)
- _, mac = Libvirt.build_vm_xml(self.connection, self.vm_flavor, cfg, vm_name, index)
# 2: Cleanup already available VMs
- for idx, (vkey, vfs) in enumerate(OrderedDict(vnf["network_ports"]).items()):
- if vkey == "mgmt":
- continue
+ network_ports = collections.OrderedDict(
+ {k: v for k, v in vnf["network_ports"].items() if k != 'mgmt'})
+ for idx, vfs in enumerate(network_ports.values()):
self._enable_interfaces(index, idx, vfs, cfg)
# copy xml to target...
+ model.Libvirt.write_file(cfg, xml_str)
self.connection.put(cfg, cfg)
# NOTE: launch through libvirt
LOG.info("virsh create ...")
- Libvirt.virsh_create_vm(self.connection, cfg)
+ model.Libvirt.virsh_create_vm(self.connection, cfg)
self.vm_names.append(vm_name)
# build vnf node details
- nodes.append(self.vnf_node.generate_vnf_instance(self.vm_flavor,
- self.networks,
- self.host_mgmt.get('ip'),
- key, vnf, mac))
+ nodes.append(self.vnf_node.generate_vnf_instance(
+ self.vm_flavor, self.networks, self.host_mgmt.get('ip'),
+ key, vnf, mac))
return nodes
@@ -248,7 +244,8 @@ class SriovContext(Context):
"mac": vfmac,
"pf_if": pfif
}
- vfs = StandaloneContextHelper.get_virtual_devices(self.connection, value)
+ vfs = model.StandaloneContextHelper.get_virtual_devices(
+ self.connection, value)
for k, v in vfs.items():
m = PciAddress(k.strip())
m1 = PciAddress(value.strip())
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index 7f6309a7e..697cc007f 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -112,9 +112,9 @@ class Task(object): # pragma: no cover
continue
try:
- data = self._run(tasks[i]['scenarios'],
- tasks[i]['run_in_parallel'],
- output_config)
+ success, data = self._run(tasks[i]['scenarios'],
+ tasks[i]['run_in_parallel'],
+ output_config)
except KeyboardInterrupt:
raise
except Exception: # pylint: disable=broad-except
@@ -123,9 +123,15 @@ class Task(object): # pragma: no cover
testcases[tasks[i]['case_name']] = {'criteria': 'FAIL',
'tc_data': []}
else:
- LOG.info('Testcase: "%s" SUCCESS!!!', tasks[i]['case_name'])
- testcases[tasks[i]['case_name']] = {'criteria': 'PASS',
- 'tc_data': data}
+ if success:
+ LOG.info('Testcase: "%s" SUCCESS!!!', tasks[i]['case_name'])
+ testcases[tasks[i]['case_name']] = {'criteria': 'PASS',
+ 'tc_data': data}
+ else:
+ LOG.error('Testcase: "%s" FAILED!!!', tasks[i]['case_name'],
+ exc_info=True)
+ testcases[tasks[i]['case_name']] = {'criteria': 'FAIL',
+ 'tc_data': data}
if args.keep_deploy:
# keep deployment, forget about stack
@@ -149,7 +155,7 @@ class Task(object): # pragma: no cover
total_end_time - total_start_time)
LOG.info('To generate report, execute command "yardstick report '
- 'generate %(task_id)s <yaml_name>s"', self.task_id)
+ 'generate %s <YAML_NAME>"', self.task_id)
LOG.info("Task ALL DONE, exiting")
return result
@@ -240,6 +246,7 @@ class Task(object): # pragma: no cover
background_runners = []
+ task_success = True
result = []
# Start all background scenarios
for scenario in filter(_is_background_scenario, scenarios):
@@ -258,8 +265,8 @@ class Task(object): # pragma: no cover
for runner in runners:
status = runner_join(runner, background_runners, self.outputs, result)
if status != 0:
- raise RuntimeError(
- "{0} runner status {1}".format(runner.__execution_type__, status))
+ LOG.error("%s runner status %s", runner.__execution_type__, status)
+ task_success = False
LOG.info("Runner ended")
else:
# run serially
@@ -271,8 +278,8 @@ class Task(object): # pragma: no cover
LOG.error('Scenario NO.%s: "%s" ERROR!',
scenarios.index(scenario) + 1,
scenario.get('type'))
- raise RuntimeError(
- "{0} runner status {1}".format(runner.__execution_type__, status))
+ LOG.error("%s runner status %s", runner.__execution_type__, status)
+ task_success = False
LOG.info("Runner ended")
# Abort background runners
@@ -289,7 +296,7 @@ class Task(object): # pragma: no cover
base_runner.Runner.release(runner)
print("Background task ended")
- return result
+ return task_success, result
def atexit_handler(self):
"""handler for process termination"""
@@ -344,7 +351,8 @@ class Task(object): # pragma: no cover
# TODO support get multi hosts/vms info
context_cfg = {}
- server_name = scenario_cfg.get('options', {}).get('server_name', {})
+ options = scenario_cfg.get('options') or {}
+ server_name = options.get('server_name') or {}
def config_context_target(cfg):
target = cfg['target']
@@ -613,21 +621,32 @@ class TaskParser(object): # pragma: no cover
vnf__0: vnf_0.yardstick
"""
def qualified_name(name):
- node_name, context_name = name.split('.')
+ try:
+ # for openstack
+ node_name, context_name = name.split('.')
+ sep = '.'
+ except ValueError:
+ # for kubernetes, some kubernetes resources don't support
+ # name format like 'xxx.xxx', so we use '-' instead
+ # need unified later
+ node_name, context_name = name.split('-')
+ sep = '-'
+
try:
ctx = next((context for context in contexts
- if context.assigned_name == context_name))
+ if context.assigned_name == context_name))
except StopIteration:
raise y_exc.ScenarioConfigContextNameNotFound(
context_name=context_name)
- return '{}.{}'.format(node_name, ctx.name)
+ return '{}{}{}'.format(node_name, sep, ctx.name)
if 'host' in scenario:
scenario['host'] = qualified_name(scenario['host'])
if 'target' in scenario:
scenario['target'] = qualified_name(scenario['target'])
- server_name = scenario.get('options', {}).get('server_name', {})
+ options = scenario.get('options') or {}
+ server_name = options.get('server_name') or {}
if 'host' in server_name:
server_name['host'] = qualified_name(server_name['host'])
if 'target' in server_name:
diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py
index 99386a440..fbdf6c281 100755
--- a/yardstick/benchmark/runners/base.py
+++ b/yardstick/benchmark/runners/base.py
@@ -121,7 +121,7 @@ class Runner(object):
@staticmethod
def terminate_all():
"""Terminate all runners (subprocesses)"""
- log.debug("Terminating all runners", exc_info=True)
+ log.debug("Terminating all runners")
# release dumper process as some errors before any runner is created
if not Runner.runners:
diff --git a/yardstick/benchmark/runners/duration.py b/yardstick/benchmark/runners/duration.py
index fbf72a74c..60b0348c3 100644
--- a/yardstick/benchmark/runners/duration.py
+++ b/yardstick/benchmark/runners/duration.py
@@ -66,6 +66,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
data = {}
errors = ""
+ benchmark.pre_run_wait_time(interval)
+
try:
result = method(data)
except AssertionError as assertion:
@@ -77,7 +79,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
errors = assertion.args
# catch all exceptions because with multiprocessing we can have un-picklable exception
# problems https://bugs.python.org/issue9400
- except Exception:
+ except Exception: # pylint: disable=broad-except
errors = traceback.format_exc()
LOG.exception("")
else:
@@ -86,7 +88,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
# if we do timeout we don't care about dropping individual KPIs
output_queue.put(result, True, QUEUE_PUT_TIMEOUT)
- time.sleep(interval)
+ benchmark.post_run_wait_time(interval)
benchmark_output = {
'timestamp': time.time(),
diff --git a/yardstick/benchmark/runners/iteration.py b/yardstick/benchmark/runners/iteration.py
index cb0424377..20d6da054 100644
--- a/yardstick/benchmark/runners/iteration.py
+++ b/yardstick/benchmark/runners/iteration.py
@@ -71,6 +71,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
data = {}
errors = ""
+ benchmark.pre_run_wait_time(interval)
+
try:
result = method(data)
except AssertionError as assertion:
@@ -90,7 +92,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
scenario_cfg['options']['rate'] -= delta
sequence = 1
continue
- except Exception:
+ except Exception: # pylint: disable=broad-except
errors = traceback.format_exc()
LOG.exception("")
else:
@@ -99,7 +101,7 @@ def _worker_process(queue, cls, method_name, scenario_cfg,
# if we do timeout we don't care about dropping individual KPIs
output_queue.put(result, True, QUEUE_PUT_TIMEOUT)
- time.sleep(interval)
+ benchmark.post_run_wait_time(interval)
benchmark_output = {
'timestamp': time.time(),
diff --git a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
index cb171eafa..7f1136c08 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/attacker_process.py
@@ -42,29 +42,28 @@ class ProcessAttacker(BaseAttacker):
def check(self):
with open(self.check_script, "r") as stdin_file:
- exit_status, stdout, stderr = self.connection.execute(
+ _, stdout, stderr = self.connection.execute(
"sudo /bin/sh -s {0}".format(self.service_name),
stdin=stdin_file)
if stdout:
- LOG.info("check the environment success!")
+ LOG.info("Check the environment success!")
return int(stdout.strip('\n'))
else:
- LOG.error(
- "the host environment is error, stdout:%s, stderr:%s",
- stdout, stderr)
+ LOG.error("Error checking the host environment, "
+ "stdout:%s, stderr:%s", stdout, stderr)
return False
def inject_fault(self):
with open(self.inject_script, "r") as stdin_file:
- exit_status, stdout, stderr = self.connection.execute(
+ self.connection.execute(
"sudo /bin/sh -s {0}".format(self.service_name),
stdin=stdin_file)
def recover(self):
with open(self.recovery_script, "r") as stdin_file:
- exit_status, stdout, stderr = self.connection.execute(
+ exit_status, _, _ = self.connection.execute(
"sudo /bin/bash -s {0} ".format(self.service_name),
stdin=stdin_file)
if exit_status:
- LOG.info("Fail to restart service!")
+ LOG.info("Failed to restart service: %s", self.recovery_script)
diff --git a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
index d03d04420..d67a16b98 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
@@ -71,7 +71,7 @@ class BaseAttacker(object):
for attacker_cls in utils.itersubclasses(BaseAttacker):
if attacker_type == attacker_cls.__attacker_type__:
return attacker_cls
- raise RuntimeError("No such runner_type %s" % attacker_type)
+ raise RuntimeError("No such runner_type: %s" % attacker_type)
def get_script_fullpath(self, path):
base_path = os.path.dirname(attacker_conf_path)
diff --git a/yardstick/benchmark/scenarios/availability/director.py b/yardstick/benchmark/scenarios/availability/director.py
index 71690c135..6cc0cb286 100644
--- a/yardstick/benchmark/scenarios/availability/director.py
+++ b/yardstick/benchmark/scenarios/availability/director.py
@@ -40,7 +40,7 @@ class Director(object):
nodes = self.context_cfg.get("nodes", None)
# setup attackers
if "attackers" in self.scenario_cfg["options"]:
- LOG.debug("start init attackers...")
+ LOG.debug("Start init attackers...")
attacker_cfgs = self.scenario_cfg["options"]["attackers"]
self.attackerMgr = baseattacker.AttackerMgr()
self.data = self.attackerMgr.init_attackers(attacker_cfgs,
@@ -48,19 +48,19 @@ class Director(object):
# setup monitors
if "monitors" in self.scenario_cfg["options"]:
- LOG.debug("start init monitors...")
+ LOG.debug("Start init monitors...")
monitor_cfgs = self.scenario_cfg["options"]["monitors"]
self.monitorMgr = basemonitor.MonitorMgr(self.data)
self.monitorMgr.init_monitors(monitor_cfgs, nodes)
# setup operations
if "operations" in self.scenario_cfg["options"]:
- LOG.debug("start init operations...")
+ LOG.debug("Start init operations...")
operation_cfgs = self.scenario_cfg["options"]["operations"]
self.operationMgr = baseoperation.OperationMgr()
self.operationMgr.init_operations(operation_cfgs, nodes)
# setup result checker
if "resultCheckers" in self.scenario_cfg["options"]:
- LOG.debug("start init resultCheckers...")
+ LOG.debug("Start init resultCheckers...")
result_check_cfgs = self.scenario_cfg["options"]["resultCheckers"]
self.resultCheckerMgr = baseresultchecker.ResultCheckerMgr()
self.resultCheckerMgr.init_ResultChecker(result_check_cfgs, nodes)
@@ -69,7 +69,7 @@ class Director(object):
if intermediate_variables is None:
intermediate_variables = {}
LOG.debug(
- "the type of current action is %s, the key is %s", type, key)
+ "The type of current action is %s, the key is %s", type, key)
if type == ActionType.ATTACKER:
return actionplayers.AttackerPlayer(self.attackerMgr[key], intermediate_variables)
if type == ActionType.MONITOR:
@@ -80,17 +80,17 @@ class Director(object):
if type == ActionType.OPERATION:
return actionplayers.OperationPlayer(self.operationMgr[key],
intermediate_variables)
- LOG.debug("something run when creatactionplayer")
+ LOG.debug("The type is not recognized by createActionPlayer")
def createActionRollbacker(self, type, key):
LOG.debug(
- "the type of current action is %s, the key is %s", type, key)
+ "The type of current action is %s, the key is %s", type, key)
if type == ActionType.ATTACKER:
return actionrollbackers.AttackerRollbacker(self.attackerMgr[key])
if type == ActionType.OPERATION:
return actionrollbackers.OperationRollbacker(
self.operationMgr[key])
- LOG.debug("no rollbacker created for %s", key)
+ LOG.debug("No rollbacker created for key: %s", key)
def verify(self):
result = True
@@ -99,7 +99,7 @@ class Director(object):
if hasattr(self, 'resultCheckerMgr'):
result &= self.resultCheckerMgr.verify()
if result:
- LOG.debug("monitors are passed")
+ LOG.debug("Monitor results are passed")
return result
def stopMonitors(self):
@@ -107,12 +107,12 @@ class Director(object):
self.monitorMgr.wait_monitors()
def knockoff(self):
- LOG.debug("knock off ....")
+ LOG.debug("Knock off ....")
while self.executionSteps:
singleStep = self.executionSteps.pop()
singleStep.rollback()
def store_result(self, result):
- LOG.debug("store result ....")
+ LOG.debug("Store result ....")
if hasattr(self, 'monitorMgr'):
self.monitorMgr.store_result(result)
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/add_server_to_existing_secgroup.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/add_server_to_existing_secgroup.bash
new file mode 100644
index 000000000..3a50626f5
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/add_server_to_existing_secgroup.bash
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# add server to existing security group
+# parameters: $1 - server name, $2 - security group name
+
+set -e
+
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
+ SECURE="--insecure"
+else
+ SECURE=""
+fi
+
+SECGROUPNAME="$(openstack ${SECURE} security group list -f value -c Name | grep $2)"
+
+openstack ${SECURE} server add security group $1 ${SECGROUPNAME}
+
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_instance_from_image.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_instance_from_image.bash
new file mode 100644
index 000000000..5e0b1ccf1
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/create_instance_from_image.bash
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# create nova server
+# parameters: $1 - server name, $2 - image name, $3 - flavor name, $4 - network name
+
+set -e
+
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
+ SECURE="--insecure"
+else
+ SECURE=""
+fi
+
+NETNAME="$(openstack ${SECURE} network list -f value -c Name | grep $4)"
+
+openstack ${SECURE} server create $1 --image $2 --flavor $3 --network ${NETNAME}
+
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_instance.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_instance.bash
new file mode 100644
index 000000000..008e7f5ff
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/delete_instance.bash
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# delete nova server
+# parameters: $1 - server name
+
+set -e
+
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
+ SECURE="--insecure"
+else
+ SECURE=""
+fi
+
+openstack ${SECURE} server delete $1
+
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_privateip.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_privateip.bash
new file mode 100644
index 000000000..7f2bad540
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/get_server_privateip.bash
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# get private ip of a server
+# parameter: $1 - server name
+
+set -e
+
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
+ SECURE="--insecure"
+else
+ SECURE=""
+fi
+
+openstack ${SECURE} server list -f value -c Name -c Networks | grep $1 | awk '{print $2}' | sed -r 's/.*=([0-9\.\:]+)[;,]*/\1/'
+
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/nova/remove_server_from_secgroup.bash b/yardstick/benchmark/scenarios/availability/ha_tools/nova/remove_server_from_secgroup.bash
new file mode 100644
index 000000000..61d0a2b49
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/nova/remove_server_from_secgroup.bash
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2018 Intracom Telecom and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# remove server from existing security group
+# parameters: $1 - server name, $2 - security group name
+
+set -e
+
+if [ $OS_INSECURE ] && [ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]; then
+ SECURE="--insecure"
+else
+ SECURE=""
+fi
+
+SECGROUPNAME="$(openstack ${SECURE} security group list -f value -c Name | grep $2)"
+
+openstack ${SECURE} server remove security group $1 ${SECGROUPNAME}
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash b/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
index 858d86ca0..2388507d7 100755
--- a/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/start_service.bash
@@ -9,24 +9,23 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-# Start a service and check the service is started
+# Start or restart a service and check the service is started
set -e
service_name=$1
+operation=${2-start} # values are "start" or "restart"
-Distributor=$(lsb_release -a | grep "Distributor ID" | awk '{print $3}')
-
-if [ "$Distributor" != "Ubuntu" -a "$service_name" != "keystone" -a "$service_name" != "neutron-server" -a "$service_name" != "haproxy" ]; then
+if [ -f /usr/bin/yum -a "$service_name" != "keystone" -a "$service_name" != "neutron-server" -a "$service_name" != "haproxy" -a "$service_name" != "openvswitch" ]; then
service_name="openstack-"${service_name}
-elif [ "$Distributor" = "Ubuntu" -a "$service_name" = "keystone" ]; then
+elif [ -f /usr/bin/apt -a "$service_name" = "keystone" ]; then
service_name="apache2"
elif [ "$service_name" = "keystone" ]; then
service_name="httpd"
fi
if which systemctl 2>/dev/null; then
- systemctl start $service_name
+ systemctl $operation $service_name
else
- service $service_name start
+ service $service_name $operation
fi
diff --git a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py
index 50a63f53d..f6004c774 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/basemonitor.py
@@ -103,7 +103,7 @@ class BaseMonitor(multiprocessing.Process):
for monitor in utils.itersubclasses(BaseMonitor):
if monitor_type == monitor.__monitor_type__:
return monitor
- raise RuntimeError("No such monitor_type %s" % monitor_type)
+ raise RuntimeError("No such monitor_type: %s" % monitor_type)
def get_script_fullpath(self, path):
base_path = os.path.dirname(monitor_conf_path)
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
index d0551bf03..3b36c762d 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_command.py
@@ -24,7 +24,7 @@ def _execute_shell_command(command):
output = []
try:
output = subprocess.check_output(command, shell=True)
- except Exception:
+ except Exception: # pylint: disable=broad-except
exitcode = -1
LOG.error("exec command '%s' error:\n ", command, exc_info=True)
@@ -45,7 +45,7 @@ class MonitorOpenstackCmd(basemonitor.BaseMonitor):
self.connection = ssh.SSH.from_node(host,
defaults={"user": "root"})
self.connection.wait(timeout=600)
- LOG.debug("ssh host success!")
+ LOG.debug("ssh host (%s) success!", str(host))
self.check_script = self.get_script_fullpath(
"ha_tools/check_openstack_cmd.bash")
@@ -61,22 +61,20 @@ class MonitorOpenstackCmd(basemonitor.BaseMonitor):
self.cmd = self.cmd + " --insecure"
def monitor_func(self):
- exit_status = 0
exit_status, stdout = _execute_shell_command(self.cmd)
- LOG.debug("Execute command '%s' and the stdout is:\n%s", self.cmd, stdout)
+ LOG.debug("Executed command '%s'. "
+ "The stdout is:\n%s", self.cmd, stdout)
if exit_status:
return False
return True
def verify_SLA(self):
outage_time = self._result.get('outage_time', None)
- LOG.debug("the _result:%s", self._result)
max_outage_time = self._config["sla"]["max_outage_time"]
if outage_time > max_outage_time:
LOG.info("SLA failure: %f > %f", outage_time, max_outage_time)
return False
else:
- LOG.info("the sla is passed")
return True
@@ -97,7 +95,7 @@ def _test(): # pragma: no cover
}
monitor_configs.append(config)
- p = basemonitor.MonitorMgr()
+ p = basemonitor.MonitorMgr({})
p.init_monitors(monitor_configs, context)
p.start_monitors()
p.wait_monitors()
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py
index dce69f45f..971bae1e9 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_multi.py
@@ -29,7 +29,7 @@ class MultiMonitor(basemonitor.BaseMonitor):
monitor_cls = basemonitor.BaseMonitor.get_monitor_cls(monitor_type)
monitor_number = self._config.get("monitor_number", 1)
- for i in range(monitor_number):
+ for _ in range(monitor_number):
monitor_ins = monitor_cls(self._config, self._context,
self.monitor_data)
self.monitors.append(monitor_ins)
@@ -70,7 +70,8 @@ class MultiMonitor(basemonitor.BaseMonitor):
elif "max_recover_time" in self._config["sla"]:
max_outage_time = self._config["sla"]["max_recover_time"]
else:
- raise RuntimeError("monitor max_outage_time config is not found")
+ raise RuntimeError("'max_outage_time' or 'max_recover_time' "
+ "config is not found")
self._result = {"outage_time": outage_time}
if outage_time > max_outage_time:
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
index b0f6f8e9d..8d2f2633c 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
@@ -25,14 +25,14 @@ class MonitorProcess(basemonitor.BaseMonitor):
self.connection = ssh.SSH.from_node(host, defaults={"user": "root"})
self.connection.wait(timeout=600)
- LOG.debug("ssh host success!")
+ LOG.debug("ssh host (%s) success!", str(host))
self.check_script = self.get_script_fullpath(
"ha_tools/check_process_python.bash")
self.process_name = self._config["process_name"]
def monitor_func(self):
with open(self.check_script, "r") as stdin_file:
- exit_status, stdout, stderr = self.connection.execute(
+ _, stdout, _ = self.connection.execute(
"sudo /bin/sh -s {0}".format(self.process_name),
stdin=stdin_file)
@@ -45,14 +45,12 @@ class MonitorProcess(basemonitor.BaseMonitor):
return True
def verify_SLA(self):
- LOG.debug("the _result:%s", self._result)
outage_time = self._result.get('outage_time', None)
max_outage_time = self._config["sla"]["max_recover_time"]
if outage_time > max_outage_time:
- LOG.error("SLA failure: %f > %f", outage_time, max_outage_time)
+ LOG.info("SLA failure: %f > %f", outage_time, max_outage_time)
return False
else:
- LOG.info("the sla is passed")
return True
@@ -73,7 +71,7 @@ def _test(): # pragma: no cover
}
monitor_configs.append(config)
- p = basemonitor.MonitorMgr()
+ p = basemonitor.MonitorMgr({})
p.init_monitors(monitor_configs, context)
p.start_monitors()
p.wait_monitors()
diff --git a/yardstick/benchmark/scenarios/availability/operation_conf.yaml b/yardstick/benchmark/scenarios/availability/operation_conf.yaml
index 0ca88393b..5f3f6c91e 100644
--- a/yardstick/benchmark/scenarios/availability/operation_conf.yaml
+++ b/yardstick/benchmark/scenarios/availability/operation_conf.yaml
@@ -38,3 +38,11 @@ get-vip-host:
start-service:
action_script: ha_tools/start_service.bash
rollback_script: ha_tools/check_process_python.bash
+
+add-server-to-secgroup:
+ action_script: ha_tools/nova/add_server_to_existing_secgroup.bash
+ rollback_script: ha_tools/nova/remove_server_from_secgroup.bash
+
+get-privateip:
+ action_script: ha_tools/nova/get_server_privateip.bash
+ rollback_script: ha_tools/nova/list_servers.bash
diff --git a/yardstick/benchmark/scenarios/availability/scenario_general.py b/yardstick/benchmark/scenarios/availability/scenario_general.py
index 9ac55471d..1fadd2532 100644
--- a/yardstick/benchmark/scenarios/availability/scenario_general.py
+++ b/yardstick/benchmark/scenarios/availability/scenario_general.py
@@ -26,7 +26,6 @@ class ScenarioGeneral(base.Scenario):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
self.intermediate_variables = {}
- self.pass_flag = True
def setup(self):
self.director = Director(self.scenario_cfg, self.context_cfg)
@@ -47,7 +46,7 @@ class ScenarioGeneral(base.Scenario):
step['actionType'], step['actionKey'])
if actionRollbacker:
self.director.executionSteps.append(actionRollbacker)
- except Exception:
+ except Exception: # pylint: disable=broad-except
LOG.exception("Exception")
LOG.debug(
"\033[91m exception when running step: %s .... \033[0m",
@@ -59,31 +58,16 @@ class ScenarioGeneral(base.Scenario):
self.director.stopMonitors()
verify_result = self.director.verify()
-
- self.director.store_result(result)
-
for k, v in self.director.data.items():
if v == 0:
result['sla_pass'] = 0
verify_result = False
- self.pass_flag = False
- LOG.info(
- "\033[92m The service process not found in the host \
-envrioment, the HA test case NOT pass")
+ LOG.info("\033[92m The service process (%s) not found in the host environment", k)
- if verify_result:
- result['sla_pass'] = 1
- LOG.info(
- "\033[92m Congratulations, "
- "the HA test case PASS! \033[0m")
- else:
- result['sla_pass'] = 0
- self.pass_flag = False
- LOG.info(
- "\033[91m Aoh, the HA test case FAIL,"
- "please check the detail debug information! \033[0m")
+ result['sla_pass'] = 1 if verify_result else 0
+ self.director.store_result(result)
+
+ assert verify_result is True, "The HA test case NOT passed"
def teardown(self):
self.director.knockoff()
-
- assert self.pass_flag, "The HA test case NOT passed"
diff --git a/yardstick/benchmark/scenarios/availability/serviceha.py b/yardstick/benchmark/scenarios/availability/serviceha.py
index 6d0d812af..42941c6e7 100755
--- a/yardstick/benchmark/scenarios/availability/serviceha.py
+++ b/yardstick/benchmark/scenarios/availability/serviceha.py
@@ -29,13 +29,12 @@ class ServiceHA(base.Scenario):
self.context_cfg = context_cfg
self.setup_done = False
self.data = {}
- self.pass_flag = True
def setup(self):
"""scenario setup"""
nodes = self.context_cfg.get("nodes", None)
if nodes is None:
- LOG.error("the nodes info is none")
+ LOG.error("The nodes info is none")
return
self.attackers = []
@@ -58,33 +57,27 @@ class ServiceHA(base.Scenario):
def run(self, result):
"""execute the benchmark"""
if not self.setup_done:
- LOG.error("The setup not finished!")
+ LOG.error("The setup is not finished!")
return
self.monitorMgr.start_monitors()
- LOG.info("HA monitor start!")
+ LOG.info("Monitor '%s' start!", self.__scenario_type__)
for attacker in self.attackers:
attacker.inject_fault()
self.monitorMgr.wait_monitors()
- LOG.info("HA monitor stop!")
+ LOG.info("Monitor '%s' stop!", self.__scenario_type__)
sla_pass = self.monitorMgr.verify_SLA()
for k, v in self.data.items():
if v == 0:
- result['sla_pass'] = 0
- self.pass_flag = False
- LOG.info("The service process not found in the host envrioment, \
-the HA test case NOT pass")
- return
+ sla_pass = False
+ LOG.info("The service process (%s) not found in the host envrioment", k)
+
+ result['sla_pass'] = 1 if sla_pass else 0
self.monitorMgr.store_result(result)
- if sla_pass:
- result['sla_pass'] = 1
- LOG.info("The HA test case PASS the SLA")
- else:
- result['sla_pass'] = 0
- self.pass_flag = False
+
assert sla_pass is True, "The HA test case NOT pass the SLA"
return
@@ -94,8 +87,6 @@ the HA test case NOT pass")
for attacker in self.attackers:
attacker.recover()
- assert self.pass_flag, "The HA test case NOT passed"
-
def _test(): # pragma: no cover
"""internal test function"""
diff --git a/yardstick/benchmark/scenarios/base.py b/yardstick/benchmark/scenarios/base.py
index 10a728828..58a02805c 100644
--- a/yardstick/benchmark/scenarios/base.py
+++ b/yardstick/benchmark/scenarios/base.py
@@ -13,9 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-# yardstick comment: this is a modified copy of
-# rally/rally/benchmark/scenarios/base.py
+import abc
+import time
+import six
from stevedore import extension
import yardstick.common.utils as utils
@@ -37,20 +38,29 @@ def _iter_scenario_classes(scenario_type=None):
yield scenario
+@six.add_metaclass(abc.ABCMeta)
class Scenario(object):
def setup(self):
- """ default impl for scenario setup """
+ """Default setup implementation for Scenario classes"""
pass
+ @abc.abstractmethod
def run(self, *args):
- """ catcher for not implemented run methods in subclasses """
- raise RuntimeError("run method not implemented")
+ """Entry point for scenario classes, called from runner worker"""
def teardown(self):
- """ default impl for scenario teardown """
+ """Default teardown implementation for Scenario classes"""
pass
+ def pre_run_wait_time(self, time_seconds):
+ """Time waited before executing the run method"""
+ pass
+
+ def post_run_wait_time(self, time_seconds):
+ """Time waited after executing the run method"""
+ time.sleep(time_seconds)
+
@staticmethod
def get_types():
"""return a list of known runner type (class) names"""
@@ -88,10 +98,14 @@ class Scenario(object):
"""
return cls.__doc__.splitlines()[0] if cls.__doc__ else str(None)
- def _push_to_outputs(self, keys, values):
+ @staticmethod
+ def _push_to_outputs(keys, values):
+ """Return a dictionary given the keys and the values"""
return dict(zip(keys, values))
- def _change_obj_to_dict(self, obj):
+ @staticmethod
+ def _change_obj_to_dict(obj):
+ """Return a dictionary from the __dict__ attribute of an object"""
dic = {}
for k, v in vars(obj).items():
try:
diff --git a/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash b/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
index 5a5dbc394..9f1804819 100644
--- a/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
+++ b/yardstick/benchmark/scenarios/compute/unixbench_benchmark.bash
@@ -18,7 +18,7 @@ OUTPUT_FILE=/tmp/unixbench-out.log
# run unixbench test
run_unixbench()
{
- cd /opt/tempT/UnixBench/
+ cd /opt/tempT/UnixBench/UnixBench/
./Run $OPTIONS > $OUTPUT_FILE
}
diff --git a/yardstick/benchmark/scenarios/lib/attach_volume.py b/yardstick/benchmark/scenarios/lib/attach_volume.py
index 88124964b..96dd130b1 100644
--- a/yardstick/benchmark/scenarios/lib/attach_volume.py
+++ b/yardstick/benchmark/scenarios/lib/attach_volume.py
@@ -6,30 +6,31 @@
# 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 logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
class AttachVolume(base.Scenario):
- """Attach a volmeu to an instance"""
+ """Attach a volume to an instance"""
__scenario_type__ = "AttachVolume"
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.server_id = self.options.get("server_id", "TestServer")
- self.volume_id = self.options.get("volume_id", None)
+ self.server_name_or_id = self.options["server_name_or_id"]
+ self.volume_name_or_id = self.options["volume_name_or_id"]
+ self.device = self.options.get("device")
+ self.wait = self.options.get("wait", True)
+ self.timeout = self.options.get("timeout")
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -44,10 +45,14 @@ class AttachVolume(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.attach_server_volume(self.server_id,
- self.volume_id)
+ status = openstack_utils.attach_volume_to_server(
+ self.shade_client, self.server_name_or_id, self.volume_name_or_id,
+ device=self.device, wait=self.wait, timeout=self.timeout)
+
+ if not status:
+ result.update({"attach_volume": 0})
+ LOG.error("Attach volume to server failed!")
+ raise exceptions.ScenarioAttachVolumeError
- if status:
- LOG.info("Attach volume to server successful!")
- else:
- LOG.info("Attach volume to server failed!")
+ result.update({"attach_volume": 1})
+ LOG.info("Attach volume to server successful!")
diff --git a/yardstick/benchmark/scenarios/lib/create_floating_ip.py b/yardstick/benchmark/scenarios/lib/create_floating_ip.py
index 7108722af..e29f9d1fc 100644
--- a/yardstick/benchmark/scenarios/lib/create_floating_ip.py
+++ b/yardstick/benchmark/scenarios/lib/create_floating_ip.py
@@ -11,7 +11,8 @@ import logging
import os
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -26,9 +27,18 @@ class CreateFloatingIp(base.Scenario):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
self.ext_net_id = os.getenv("EXTERNAL_NETWORK", "external")
+ self.options = self.scenario_cfg["options"]
+
+ self.network_name_or_id = self.options.get("network_name_or_id", self.ext_net_id)
+ self.server = self.options.get("server")
+ self.fixed_address = self.options.get("fixed_address")
+ self.nat_destination = self.options.get("nat_destination")
+ self.port = self.options.get("port")
+ self.wait = self.options.get("wait", False)
+ self.timeout = self.options.get("timeout", 60)
+
+ self.shade_client = openstack_utils.get_shade_client()
- self.neutron_client = op_utils.get_neutron_client()
- self.shade_client = op_utils.get_shade_client()
self.setup_done = False
def setup(self):
@@ -36,21 +46,25 @@ class CreateFloatingIp(base.Scenario):
self.setup_done = True
- def run(self, *args):
+ def run(self, result):
"""execute the test"""
if not self.setup_done:
self.setup()
- net_id = op_utils.get_network_id(self.shade_client, self.ext_net_id)
- floating_info = op_utils.create_floating_ip(self.neutron_client,
- extnet_id=net_id)
+ floating_info = openstack_utils.create_floating_ip(
+ self.shade_client, network_name_or_id=self.network_name_or_id,
+ server=self.server, fixed_address=self.fixed_address,
+ nat_destination=self.nat_destination, port=self.port,
+ wait=self.wait, timeout=self.timeout)
if not floating_info:
+ result.update({"floating_ip_create": 0})
LOG.error("Creating floating ip failed!")
- return
+ raise exceptions.ScenarioCreateFloatingIPError
+ result.update({"floating_ip_create": 1})
LOG.info("Creating floating ip successful!")
- keys = self.scenario_cfg.get('output', '').split()
+ keys = self.scenario_cfg.get("output", '').split()
values = [floating_info["fip_id"], floating_info["fip_addr"]]
return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_keypair.py b/yardstick/benchmark/scenarios/lib/create_keypair.py
index f5b1fff7a..ee9bc440a 100644
--- a/yardstick/benchmark/scenarios/lib/create_keypair.py
+++ b/yardstick/benchmark/scenarios/lib/create_keypair.py
@@ -6,15 +6,11 @@
# 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 logging
-import paramiko
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -27,10 +23,11 @@ class CreateKeypair(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.key_name = self.options.get("key_name", "yardstick_key")
- self.key_filename = self.options.get("key_path", "/tmp/yardstick_key")
+ self.name = self.options["key_name"]
+ self.public_key = self.options.get("public_key")
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,27 +42,17 @@ class CreateKeypair(base.Scenario):
if not self.setup_done:
self.setup()
- rsa_key = paramiko.RSAKey.generate(bits=2048, progress_func=None)
- rsa_key.write_private_key_file(self.key_filename)
- LOG.info("Writing key_file %s ...", self.key_filename)
- with open(self.key_filename + ".pub", "w") as pubkey_file:
- pubkey_file.write(
- "%s %s\n" % (rsa_key.get_name(), rsa_key.get_base64()))
- del rsa_key
-
- keypair = op_utils.create_keypair(self.key_name,
- self.key_filename + ".pub")
+ keypair = openstack_utils.create_keypair(
+ self.shade_client, self.name, public_key=self.public_key)
- if keypair:
- result.update({"keypair_create": 1})
- LOG.info("Create keypair successful!")
- else:
+ if not keypair:
result.update({"keypair_create": 0})
- LOG.info("Create keypair failed!")
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [keypair.id]
- return self._push_to_outputs(keys, values)
+ LOG.error("Create keypair failed!")
+ raise exceptions.ScenarioCreateKeypairError
+
+ result.update({"keypair_create": 1})
+ LOG.info("Create keypair successful!")
+ keys = self.scenario_cfg.get("output", '').split()
+ keypair_id = keypair["id"]
+ values = [keypair_id]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_network.py b/yardstick/benchmark/scenarios/lib/create_network.py
index cffff132a..734820519 100644
--- a/yardstick/benchmark/scenarios/lib/create_network.py
+++ b/yardstick/benchmark/scenarios/lib/create_network.py
@@ -7,13 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+
LOG = logging.getLogger(__name__)
@@ -28,9 +27,14 @@ class CreateNetwork(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.openstack = self.options.get("openstack_paras", None)
+ self.network_name = self.options["network_name"]
+ self.shared = self.options.get("shared", False)
+ self.admin_state_up = self.options.get("admin_state_up", True)
+ self.external = self.options.get("external", False)
+ self.provider = self.options.get("provider")
+ self.project_id = self.options.get("project_id")
- self.neutron_client = op_utils.get_neutron_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,20 +49,17 @@ class CreateNetwork(base.Scenario):
if not self.setup_done:
self.setup()
- openstack_paras = {'network': self.openstack}
- network_id = op_utils.create_neutron_net(self.neutron_client,
- openstack_paras)
- if network_id:
- result.update({"network_create": 1})
- LOG.info("Create network successful!")
- else:
+ network_id = openstack_utils.create_neutron_net(
+ self.shade_client, self.network_name, shared=self.shared,
+ admin_state_up=self.admin_state_up, external=self.external,
+ provider=self.provider, project_id=self.project_id)
+ if not network_id:
result.update({"network_create": 0})
LOG.error("Create network failed!")
+ raise exceptions.ScenarioCreateNetworkError
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [network_id]
- return self._push_to_outputs(keys, values)
+ result.update({"network_create": 1})
+ LOG.info("Create network successful!")
+ keys = self.scenario_cfg.get('output', '').split()
+ values = [network_id]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_router.py b/yardstick/benchmark/scenarios/lib/create_router.py
index 9aa57ebb2..34252f603 100644
--- a/yardstick/benchmark/scenarios/lib/create_router.py
+++ b/yardstick/benchmark/scenarios/lib/create_router.py
@@ -7,13 +7,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -28,9 +26,14 @@ class CreateRouter(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.openstack = self.options.get("openstack_paras", None)
+ self.name = self.options.get('name')
+ self.admin_state_up = self.options.get('admin_state_up', True)
+ self.ext_gateway_net_id = self.options.get('ext_gateway_net_id')
+ self.enable_snat = self.options.get('enable_snat')
+ self.ext_fixed_ips = self.options.get('ext_fixed_ips')
+ self.project_id = self.options.get('project_id')
- self.neutron_client = op_utils.get_neutron_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,22 +48,19 @@ class CreateRouter(base.Scenario):
if not self.setup_done:
self.setup()
- openstack_paras = {'router': self.openstack}
- router_id = op_utils.create_neutron_router(self.neutron_client,
- openstack_paras)
- if router_id:
- result.update({"network_create": 1})
- LOG.info("Create router successful!")
- else:
- result.update({"network_create": 0})
+ router_id = openstack_utils.create_neutron_router(
+ self.shade_client, name=self.name,
+ admin_state_up=self.admin_state_up,
+ ext_gateway_net_id=self.ext_gateway_net_id,
+ enable_snat=self.enable_snat, ext_fixed_ips=self.ext_fixed_ips,
+ project_id=self.project_id)
+ if not router_id:
+ result.update({"router_create": 0})
LOG.error("Create router failed!")
+ raise exceptions.ScenarioCreateRouterError
- check_result = router_id
-
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [check_result]
- return self._push_to_outputs(keys, values)
+ result.update({"router_create": 1})
+ LOG.info("Create router successful!")
+ keys = self.scenario_cfg.get('output', '').split()
+ values = [router_id]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_sec_group.py b/yardstick/benchmark/scenarios/lib/create_sec_group.py
index 3d1aec9e8..1d2e36488 100644
--- a/yardstick/benchmark/scenarios/lib/create_sec_group.py
+++ b/yardstick/benchmark/scenarios/lib/create_sec_group.py
@@ -7,13 +7,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -26,11 +24,12 @@ class CreateSecgroup(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.sg_name = self.options.get("sg_name", "yardstick_sec_group")
- self.description = self.options.get("description", None)
- self.neutron_client = op_utils.get_neutron_client()
+ self.sg_name = self.options["sg_name"]
+ self.description = self.options.get("description", "")
+ self.project_id = self.options.get("project_id")
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,21 +44,16 @@ class CreateSecgroup(base.Scenario):
if not self.setup_done:
self.setup()
- sg_id = op_utils.create_security_group_full(self.neutron_client,
- sg_name=self.sg_name,
- sg_description=self.description)
-
- if sg_id:
- result.update({"sg_create": 1})
- LOG.info("Create security group successful!")
- else:
+ sg_id = openstack_utils.create_security_group_full(
+ self.shade_client, self.sg_name, sg_description=self.description,
+ project_id=self.project_id)
+ if not sg_id:
result.update({"sg_create": 0})
LOG.error("Create security group failed!")
+ raise exceptions.ScenarioCreateSecurityGroupError
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [sg_id]
- return self._push_to_outputs(keys, values)
+ result.update({"sg_create": 1})
+ LOG.info("Create security group successful!")
+ keys = self.scenario_cfg.get("output", '').split()
+ values = [sg_id]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_server.py b/yardstick/benchmark/scenarios/lib/create_server.py
index 31ba18ed4..e2748aecf 100644
--- a/yardstick/benchmark/scenarios/lib/create_server.py
+++ b/yardstick/benchmark/scenarios/lib/create_server.py
@@ -6,14 +6,11 @@
# 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 logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -26,15 +23,27 @@ class CreateServer(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
-
- self.image_name = self.options.get("image_name", None)
- self.flavor_name = self.options.get("flavor_name", None)
- self.openstack = self.options.get("openstack_paras", None)
-
- self.glance_client = op_utils.get_glance_client()
- self.neutron_client = op_utils.get_neutron_client()
- self.nova_client = op_utils.get_nova_client()
+ self.options = self.scenario_cfg["options"]
+
+ self.name = self.options["name"]
+ self.image = self.options["image"]
+ self.flavor = self.options["flavor"]
+ self.auto_ip = self.options.get("auto_ip", True)
+ self.ips = self.options.get("ips")
+ self.ip_pool = self.options.get("ip_pool")
+ self.root_volume = self.options.get("root_volume")
+ self.terminate_volume = self.options.get("terminate_volume", False)
+ self.wait = self.options.get("wait", True)
+ self.timeout = self.options.get("timeout", 180)
+ self.reuse_ips = self.options.get("reuse_ips", True)
+ self.network = self.options.get("network")
+ self.boot_from_volume = self.options.get("boot_from_volume", False)
+ self.volume_size = self.options.get("volume_size", "20")
+ self.boot_volume = self.options.get("boot_volume")
+ self.volumes = self.options.get("volumes")
+ self.nat_destination = self.options.get("nat_destination")
+
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -49,26 +58,23 @@ class CreateServer(base.Scenario):
if not self.setup_done:
self.setup()
- if self.image_name is not None:
- self.openstack['image'] = op_utils.get_image_id(self.glance_client,
- self.image_name)
- if self.flavor_name is not None:
- self.openstack['flavor'] = op_utils.get_flavor_id(self.nova_client,
- self.flavor_name)
-
- vm = op_utils.create_instance_and_wait_for_active(self.openstack)
-
- if vm:
- result.update({"instance_create": 1})
- LOG.info("Create server successful!")
- else:
+ server = openstack_utils.create_instance_and_wait_for_active(
+ self.shade_client, self.name, self.image,
+ self.flavor, auto_ip=self.auto_ip, ips=self.ips,
+ ip_pool=self.ip_pool, root_volume=self.root_volume,
+ terminate_volume=self.terminate_volume, wait=self.wait,
+ timeout=self.timeout, reuse_ips=self.reuse_ips,
+ network=self.network, boot_from_volume=self.boot_from_volume,
+ volume_size=self.volume_size, boot_volume=self.boot_volume,
+ volumes=self.volumes, nat_destination=self.nat_destination)
+
+ if not server:
result.update({"instance_create": 0})
LOG.error("Create server failed!")
+ raise exceptions.ScenarioCreateServerError
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [vm.id]
- return self._push_to_outputs(keys, values)
+ result.update({"instance_create": 1})
+ LOG.info("Create instance successful!")
+ keys = self.scenario_cfg.get("output", '').split()
+ values = [server["id"]]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_subnet.py b/yardstick/benchmark/scenarios/lib/create_subnet.py
index c34af8a9e..e383c99de 100644
--- a/yardstick/benchmark/scenarios/lib/create_subnet.py
+++ b/yardstick/benchmark/scenarios/lib/create_subnet.py
@@ -7,13 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+
LOG = logging.getLogger(__name__)
@@ -28,9 +27,23 @@ class CreateSubnet(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.openstack = self.options.get("openstack_paras", None)
-
- self.neutron_client = op_utils.get_neutron_client()
+ self.network_name_or_id = self.options['network_name_or_id']
+ self.cidr = self.options.get('cidr')
+ self.ip_version = self.options.get('ip_version', 4)
+ self.enable_dhcp = self.options.get('enable_dhcp', False)
+ self.subnet_name = self.options.get('subnet_name')
+ self.tenant_id = self.options.get('tenant_id')
+ self.allocation_pools = self.options.get('allocation_pools')
+ self.gateway_ip = self.options.get('gateway_ip')
+ self.disable_gateway_ip = self.options.get('disable_gateway_ip', False)
+ self.dns_nameservers = self.options.get('dns_nameservers')
+ self.host_routes = self.options.get('host_routes')
+ self.ipv6_ra_mode = self.options.get('ipv6_ra_mode')
+ self.ipv6_address_mode = self.options.get('ipv6_address_mode')
+ self.use_default_subnetpool = self.options.get(
+ 'use_default_subnetpool', False)
+
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,22 +58,23 @@ class CreateSubnet(base.Scenario):
if not self.setup_done:
self.setup()
- openstack_paras = {'subnets': [self.openstack]}
- subnet_id = op_utils.create_neutron_subnet(self.neutron_client,
- openstack_paras)
- if subnet_id:
- result.update({"subnet_create": 1})
- LOG.info("Create subnet successful!")
- else:
+ subnet_id = openstack_utils.create_neutron_subnet(
+ self.shade_client, self.network_name_or_id, cidr=self.cidr,
+ ip_version=self.ip_version, enable_dhcp=self.enable_dhcp,
+ subnet_name=self.subnet_name, tenant_id=self.tenant_id,
+ allocation_pools=self.allocation_pools, gateway_ip=self.gateway_ip,
+ disable_gateway_ip=self.disable_gateway_ip,
+ dns_nameservers=self.dns_nameservers, host_routes=self.host_routes,
+ ipv6_ra_mode=self.ipv6_ra_mode,
+ ipv6_address_mode=self.ipv6_address_mode,
+ use_default_subnetpool=self.use_default_subnetpool)
+ if not subnet_id:
result.update({"subnet_create": 0})
LOG.error("Create subnet failed!")
+ raise exceptions.ScenarioCreateSubnetError
- check_result = subnet_id
-
- try:
- keys = self.scenario_cfg.get('output', '').split()
- except KeyError:
- pass
- else:
- values = [check_result]
- return self._push_to_outputs(keys, values)
+ result.update({"subnet_create": 1})
+ LOG.info("Create subnet successful!")
+ keys = self.scenario_cfg.get('output', '').split()
+ values = [subnet_id]
+ return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/create_volume.py b/yardstick/benchmark/scenarios/lib/create_volume.py
index df523a5ec..b66749026 100644
--- a/yardstick/benchmark/scenarios/lib/create_volume.py
+++ b/yardstick/benchmark/scenarios/lib/create_volume.py
@@ -7,14 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import time
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -27,15 +25,16 @@ class CreateVolume(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.volume_name = self.options.get("volume_name", "TestVolume")
- self.volume_size = self.options.get("size", 100)
- self.image_name = self.options.get("image", None)
- self.image_id = None
+ self.size = self.options["size_gb"]
+ self.wait = self.options.get("wait", True)
+ self.timeout = self.options.get("timeout")
+ self.image = self.options.get("image")
+ self.name = self.options.get("name")
+ self.description = self.options.get("description")
- self.glance_client = op_utils.get_glance_client()
- self.cinder_client = op_utils.get_cinder_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -44,27 +43,29 @@ class CreateVolume(base.Scenario):
self.setup_done = True
- def run(self):
+ def run(self, result):
"""execute the test"""
if not self.setup_done:
self.setup()
- self.image_id = op_utils.get_image_id(self.glance_client,
- self.image_name)
+ volume = openstack_utils.create_volume(
+ self.shade_client, self.size, wait=self.wait, timeout=self.timeout,
+ image=self.image, name=self.name, description=self.description)
- volume = op_utils.create_volume(self.cinder_client, self.volume_name,
- self.volume_size, self.image_id)
+ if not volume:
+ result.update({"volume_create": 0})
+ LOG.error("Create volume failed!")
+ raise exceptions.ScenarioCreateVolumeError
- status = volume.status
- while(status == 'creating' or status == 'downloading'):
+ status = volume["status"]
+ while status == "creating" or status == "downloading":
LOG.info("Volume status is: %s", status)
time.sleep(5)
- volume = op_utils.get_volume_by_name(self.volume_name)
- status = volume.status
-
+ volume = openstack_utils.get_volume(self.shade_client, self.name)
+ status = volume["status"]
+ result.update({"volume_create": 1})
LOG.info("Create volume successful!")
-
- values = [volume.id]
- keys = self.scenario_cfg.get('output', '').split()
+ values = [volume["id"]]
+ keys = self.scenario_cfg.get("output", '').split()
return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/delete_floating_ip.py b/yardstick/benchmark/scenarios/lib/delete_floating_ip.py
index 4314952fb..a35445f6f 100644
--- a/yardstick/benchmark/scenarios/lib/delete_floating_ip.py
+++ b/yardstick/benchmark/scenarios/lib/delete_floating_ip.py
@@ -7,13 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+
LOG = logging.getLogger(__name__)
@@ -28,9 +27,10 @@ class DeleteFloatingIp(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.floating_ip_id = self.options.get("floating_ip_id", None)
+ self.floating_ip_id = self.options["floating_ip_id"]
+ self.retry = self.options.get("retry", 1)
- self.nova_client = op_utils.get_nova_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
def setup(self):
@@ -44,11 +44,13 @@ class DeleteFloatingIp(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_floating_ip(nova_client=self.nova_client,
- floatingip_id=self.floating_ip_id)
- if status:
- result.update({"delete_floating_ip": 1})
- LOG.info("Delete floating ip successful!")
- else:
+ status = openstack_utils.delete_floating_ip(
+ self.shade_client, self.floating_ip_id,
+ retry=self.retry)
+ if not status:
result.update({"delete_floating_ip": 0})
LOG.error("Delete floating ip failed!")
+ raise exceptions.ScenarioDeleteFloatingIPError
+
+ result.update({"delete_floating_ip": 1})
+ LOG.info("Delete floating ip successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_keypair.py b/yardstick/benchmark/scenarios/lib/delete_keypair.py
index 135139959..a52a38567 100644
--- a/yardstick/benchmark/scenarios/lib/delete_keypair.py
+++ b/yardstick/benchmark/scenarios/lib/delete_keypair.py
@@ -6,14 +6,12 @@
# 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 logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+
LOG = logging.getLogger(__name__)
@@ -26,11 +24,11 @@ class DeleteKeypair(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.key_name = self.options.get("key_name", "yardstick_key")
+ self.key_name = self.options["key_name"]
- self.nova_client = op_utils.get_nova_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,12 +43,13 @@ class DeleteKeypair(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_keypair(self.nova_client,
- self.key_name)
+ status = openstack_utils.delete_keypair(self.shade_client,
+ self.key_name)
- if status:
- result.update({"delete_keypair": 1})
- LOG.info("Delete keypair successful!")
- else:
+ if not status:
result.update({"delete_keypair": 0})
- LOG.info("Delete keypair failed!")
+ LOG.error("Delete keypair failed!")
+ raise exceptions.ScenarioDeleteKeypairError
+
+ result.update({"delete_keypair": 1})
+ LOG.info("Delete keypair successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_network.py b/yardstick/benchmark/scenarios/lib/delete_network.py
index 2e8b595f9..8874e8b1e 100644
--- a/yardstick/benchmark/scenarios/lib/delete_network.py
+++ b/yardstick/benchmark/scenarios/lib/delete_network.py
@@ -10,7 +10,8 @@
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -24,11 +25,11 @@ class DeleteNetwork(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.network_id = self.options.get("network_id", None)
+ self.network_name_or_id = self.options["network_name_or_id"]
- self.shade_client = op_utils.get_shade_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -43,12 +44,13 @@ class DeleteNetwork(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_neutron_net(self.shade_client,
- network_id=self.network_id)
- if status:
- result.update({"delete_network": 1})
- LOG.info("Delete network successful!")
- else:
+ status = openstack_utils.delete_neutron_net(self.shade_client,
+ self.network_name_or_id)
+
+ if not status:
result.update({"delete_network": 0})
LOG.error("Delete network failed!")
- return status
+ raise exceptions.ScenarioDeleteNetworkError
+
+ result.update({"delete_network": 1})
+ LOG.info("Delete network successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_router.py b/yardstick/benchmark/scenarios/lib/delete_router.py
index 358fd40cf..5e7467b2c 100644
--- a/yardstick/benchmark/scenarios/lib/delete_router.py
+++ b/yardstick/benchmark/scenarios/lib/delete_router.py
@@ -7,13 +7,12 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+
LOG = logging.getLogger(__name__)
@@ -28,9 +27,9 @@ class DeleteRouter(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.router_id = self.options.get("router_id", None)
+ self.router_id = self.options["router_id"]
- self.neutron_client = op_utils.get_neutron_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,11 +44,12 @@ class DeleteRouter(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_neutron_router(self.neutron_client,
- router_id=self.router_id)
- if status:
- result.update({"delete_router": 1})
- LOG.info("Delete router successful!")
- else:
+ status = openstack_utils.delete_neutron_router(self.shade_client,
+ self.router_id)
+ if not status:
result.update({"delete_router": 0})
LOG.error("Delete router failed!")
+ raise exceptions.ScenarioDeleteRouterError
+
+ result.update({"delete_router": 1})
+ LOG.info("Delete router successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_router_interface.py b/yardstick/benchmark/scenarios/lib/delete_router_interface.py
index 117c80811..e71aed3ef 100644
--- a/yardstick/benchmark/scenarios/lib/delete_router_interface.py
+++ b/yardstick/benchmark/scenarios/lib/delete_router_interface.py
@@ -7,13 +7,11 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-from __future__ import print_function
-from __future__ import absolute_import
-
import logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -28,10 +26,11 @@ class DeleteRouterInterface(base.Scenario):
self.context_cfg = context_cfg
self.options = self.scenario_cfg['options']
- self.subnet_id = self.options.get("subnet_id", None)
- self.router_id = self.options.get("router_id", None)
+ self.router = self.options["router"]
+ self.subnet_id = self.options.get("subnet_id")
+ self.port_id = self.options.get("port_id")
- self.neutron_client = op_utils.get_neutron_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -46,12 +45,13 @@ class DeleteRouterInterface(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.remove_interface_router(self.neutron_client,
- router_id=self.router_id,
- subnet_id=self.subnet_id)
- if status:
- result.update({"delete_router_interface": 1})
- LOG.info("Delete router interface successful!")
- else:
+ status = openstack_utils.remove_router_interface(
+ self.shade_client, self.router, subnet_id=self.subnet_id,
+ port_id=self.port_id)
+ if not status:
result.update({"delete_router_interface": 0})
LOG.error("Delete router interface failed!")
+ raise exceptions.ScenarioRemoveRouterIntError
+
+ result.update({"delete_router_interface": 1})
+ LOG.info("Delete router interface successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_server.py b/yardstick/benchmark/scenarios/lib/delete_server.py
index bcd8faba7..46229ff04 100644
--- a/yardstick/benchmark/scenarios/lib/delete_server.py
+++ b/yardstick/benchmark/scenarios/lib/delete_server.py
@@ -6,14 +6,11 @@
# 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 logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
LOG = logging.getLogger(__name__)
@@ -26,9 +23,13 @@ class DeleteServer(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
- self.server_id = self.options.get("server_id", None)
- self.nova_client = op_utils.get_nova_client()
+ self.options = self.scenario_cfg["options"]
+ self.server_name_or_id = self.options["name_or_id"]
+ self.wait = self.options.get("wait", False)
+ self.timeout = self.options.get("timeout", 180)
+ self.delete_ips = self.options.get("delete_ips", False)
+ self.delete_ip_retry = self.options.get("delete_ip_retry", 1)
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -43,9 +44,15 @@ class DeleteServer(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_instance(self.nova_client,
- instance_id=self.server_id)
- if status:
- LOG.info("Delete server successful!")
- else:
+ status = openstack_utils.delete_instance(
+ self.shade_client, self.server_name_or_id, wait=self.wait,
+ timeout=self.timeout, delete_ips=self.delete_ips,
+ delete_ip_retry=self.delete_ip_retry)
+
+ if not status:
+ result.update({"delete_server": 0})
LOG.error("Delete server failed!")
+ raise exceptions.ScenarioDeleteServerError
+
+ result.update({"delete_server": 1})
+ LOG.info("Delete server successful!")
diff --git a/yardstick/benchmark/scenarios/lib/delete_volume.py b/yardstick/benchmark/scenarios/lib/delete_volume.py
index ea2b85812..59e19dfdf 100644
--- a/yardstick/benchmark/scenarios/lib/delete_volume.py
+++ b/yardstick/benchmark/scenarios/lib/delete_volume.py
@@ -6,14 +6,11 @@
# 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 logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
LOG = logging.getLogger(__name__)
@@ -26,11 +23,13 @@ class DeleteVolume(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.volume_id = self.options.get("volume_id", None)
+ self.volume_name_or_id = self.options.get("name_or_id")
+ self.wait = self.options.get("wait", True)
+ self.timeout = self.options.get("timeout")
- self.cinder_client = op_utils.get_cinder_client()
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -45,11 +44,14 @@ class DeleteVolume(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.delete_volume(self.cinder_client, self.volume_id)
+ status = openstack_utils.delete_volume(
+ self.shade_client, name_or_id=self.volume_name_or_id,
+ wait=self.wait, timeout=self.timeout)
- if status:
- result.update({"delete_volume": 1})
- LOG.info("Delete volume successful!")
- else:
+ if not status:
result.update({"delete_volume": 0})
- LOG.info("Delete volume failed!")
+ LOG.error("Delete volume failed!")
+ raise exceptions.ScenarioDeleteVolumeError
+
+ result.update({"delete_volume": 1})
+ LOG.info("Delete volume successful!")
diff --git a/yardstick/benchmark/scenarios/lib/detach_volume.py b/yardstick/benchmark/scenarios/lib/detach_volume.py
index 0b02a3a81..76c0167bd 100644
--- a/yardstick/benchmark/scenarios/lib/detach_volume.py
+++ b/yardstick/benchmark/scenarios/lib/detach_volume.py
@@ -6,14 +6,12 @@
# 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 logging
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+
LOG = logging.getLogger(__name__)
@@ -26,10 +24,14 @@ class DetachVolume(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
+ self.options = self.scenario_cfg["options"]
- self.server_id = self.options.get("server_id", "TestServer")
- self.volume_id = self.options.get("volume_id", None)
+ self.server = self.options["server_name_or_id"]
+ self.volume = self.options["volume_name_or_id"]
+ self.wait = self.options.get("wait", True)
+ self.timeout = self.options.get("timeout")
+
+ self.shade_client = openstack_utils.get_shade_client()
self.setup_done = False
@@ -44,11 +46,14 @@ class DetachVolume(base.Scenario):
if not self.setup_done:
self.setup()
- status = op_utils.detach_volume(self.server_id, self.volume_id)
+ status = openstack_utils.detach_volume(
+ self.shade_client, self.server, self.volume,
+ wait=self.wait, timeout=self.timeout)
- if status:
- result.update({"detach_volume": 1})
- LOG.info("Detach volume from server successful!")
- else:
+ if not status:
result.update({"detach_volume": 0})
- LOG.info("Detach volume from server failed!")
+ LOG.error("Detach volume from server failed!")
+ raise exceptions.ScenarioDetachVolumeError
+
+ result.update({"detach_volume": 1})
+ LOG.info("Detach volume from server successful!")
diff --git a/yardstick/benchmark/scenarios/lib/get_flavor.py b/yardstick/benchmark/scenarios/lib/get_flavor.py
index d5e33947e..6727a7343 100644
--- a/yardstick/benchmark/scenarios/lib/get_flavor.py
+++ b/yardstick/benchmark/scenarios/lib/get_flavor.py
@@ -6,14 +6,11 @@
# 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 logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -26,8 +23,12 @@ class GetFlavor(base.Scenario):
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg['options']
- self.flavor_name = self.options.get("flavor_name", "TestFlavor")
+ self.options = self.scenario_cfg["options"]
+ self.name_or_id = self.options["name_or_id"]
+ self.filters = self.options.get("filters")
+ self.get_extra = self.options.get("get_extra", True)
+ self.shade_client = openstack_utils.get_shade_client()
+
self.setup_done = False
def setup(self):
@@ -41,14 +42,18 @@ class GetFlavor(base.Scenario):
if not self.setup_done:
self.setup()
- LOG.info("Querying flavor: %s", self.flavor_name)
- flavor = op_utils.get_flavor_by_name(self.flavor_name)
- if flavor:
- LOG.info("Get flavor successful!")
- values = [self._change_obj_to_dict(flavor)]
- else:
- LOG.info("Get flavor: no flavor matched!")
- values = []
+ LOG.info("Querying flavor: %s", self.name_or_id)
+ flavor = openstack_utils.get_flavor(
+ self.shade_client, self.name_or_id, filters=self.filters,
+ get_extra=self.get_extra)
+
+ if not flavor:
+ result.update({"get_flavor": 0})
+ LOG.error("Get flavor failed!")
+ raise exceptions.ScenarioGetFlavorError
- keys = self.scenario_cfg.get('output', '').split()
+ result.update({"get_flavor": 1})
+ LOG.info("Get flavor successful!")
+ values = [flavor]
+ keys = self.scenario_cfg.get("output", '').split()
return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/lib/get_server.py b/yardstick/benchmark/scenarios/lib/get_server.py
index fcf47c80d..f65fa9ebf 100644
--- a/yardstick/benchmark/scenarios/lib/get_server.py
+++ b/yardstick/benchmark/scenarios/lib/get_server.py
@@ -6,14 +6,11 @@
# 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 logging
from yardstick.benchmark.scenarios import base
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
LOG = logging.getLogger(__name__)
@@ -21,63 +18,58 @@ LOG = logging.getLogger(__name__)
class GetServer(base.Scenario):
"""Get a server instance
- Parameters
- server_id - ID of the server
- type: string
- unit: N/A
- default: null
- server_name - name of the server
- type: string
- unit: N/A
- default: null
-
- Either server_id or server_name is required.
-
- Outputs
+ Parameters:
+ name_or_id - Name or ID of the server
+ type: string
+ filters - meta data to use for further filtering
+ type: dict
+ detailed: Whether or not to add detailed additional information.
+ type: bool
+ bare: Whether to skip adding any additional information to the server
+ record.
+ type: bool
+ all_projects: Whether to get server from all projects or just the current
+ auth scoped project.
+ type: bool
+
+ Outputs:
rc - response code of getting server instance
- 0 for success
- 1 for failure
+ 1 for success
+ 0 for failure
type: int
- unit: N/A
server - instance of the server
type: dict
- unit: N/A
+
"""
- __scenario_type__ = "GetServer"
+ __scenario_type__ = 'GetServer'
def __init__(self, scenario_cfg, context_cfg):
self.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
- self.options = self.scenario_cfg.get('options', {})
+ self.options = self.scenario_cfg['options']
- self.server_id = self.options.get("server_id")
- if self.server_id:
- LOG.debug('Server id is %s', self.server_id)
+ self.server_name_or_id = self.options.get('name_or_id')
+ self.filters = self.options.get('filters')
+ self.detailed = self.options.get('detailed', False)
+ self.bare = self.options.get('bare', False)
- default_name = self.scenario_cfg.get('host',
- self.scenario_cfg.get('target'))
- self.server_name = self.options.get('server_name', default_name)
- if self.server_name:
- LOG.debug('Server name is %s', self.server_name)
-
- self.nova_client = op_utils.get_nova_client()
+ self.shade_client = openstack_utils.get_shade_client()
def run(self, result):
"""execute the test"""
- if self.server_id:
- server = self.nova_client.servers.get(self.server_id)
- else:
- server = op_utils.get_server_by_name(self.server_name)
-
- keys = self.scenario_cfg.get('output', '').split()
+ server = openstack_utils.get_server(
+ self.shade_client, name_or_id=self.server_name_or_id,
+ filters=self.filters, detailed=self.detailed, bare=self.bare)
- if server:
- LOG.info("Get server successful!")
- values = [0, self._change_obj_to_dict(server)]
- else:
- LOG.info("Get server failed!")
- values = [1]
+ if not server:
+ result.update({'get_server': 0})
+ LOG.error('Get Server failed!')
+ raise exceptions.ScenarioGetServerError
+ result.update({'get_server': 1})
+ LOG.info('Get Server successful!')
+ keys = self.scenario_cfg.get('output', '').split()
+ values = [server]
return self._push_to_outputs(keys, values)
diff --git a/yardstick/benchmark/scenarios/networking/netperf.py b/yardstick/benchmark/scenarios/networking/netperf.py
index a8d9010ed..33c02d409 100755
--- a/yardstick/benchmark/scenarios/networking/netperf.py
+++ b/yardstick/benchmark/scenarios/networking/netperf.py
@@ -104,7 +104,9 @@ class Netperf(base.Scenario):
cmd_args = "-H %s -l %s -t %s" % (ipaddr, testlen, testname)
# get test specific options
- default_args = "-O 'THROUGHPUT,THROUGHPUT_UNITS,MEAN_LATENCY'"
+ output_opt = options.get(
+ "output_opt", "THROUGHPUT,THROUGHPUT_UNITS,MEAN_LATENCY")
+ default_args = "-O %s" % output_opt
cmd_args += " -- %s" % default_args
option_pair_list = [("send_msg_size", "-m"),
("recv_msg_size", "-M"),
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
index ce8a7f497..9a7b975a2 100644
--- a/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
+++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk.py
@@ -70,39 +70,42 @@ class PktgenDPDKLatency(base.Scenario):
def run(self, result):
"""execute the benchmark"""
+ options = self.scenario_cfg['options']
+ eth1 = options.get("eth1", "ens4")
+ eth2 = options.get("eth2", "ens5")
if not self.setup_done:
self.setup()
if not self.testpmd_args:
- self.testpmd_args = utils.get_port_mac(self.client, 'eth2')
+ self.testpmd_args = utils.get_port_mac(self.client, eth2)
if not self.pktgen_args:
- server_rev_mac = utils.get_port_mac(self.server, 'eth1')
- server_send_mac = utils.get_port_mac(self.server, 'eth2')
- client_src_ip = utils.get_port_ip(self.client, 'eth1')
- client_dst_ip = utils.get_port_ip(self.client, 'eth2')
+ server_rev_mac = utils.get_port_mac(self.server, eth1)
+ server_send_mac = utils.get_port_mac(self.server, eth2)
+ client_src_ip = utils.get_port_ip(self.client, eth1)
+ client_dst_ip = utils.get_port_ip(self.client, eth2)
self.pktgen_args = [client_src_ip, client_dst_ip,
server_rev_mac, server_send_mac]
- options = self.scenario_cfg['options']
packetsize = options.get("packetsize", 64)
rate = options.get("rate", 100)
- cmd = "screen sudo -E bash ~/testpmd_fwd.sh %s " % (self.testpmd_args)
+ cmd = "screen sudo -E bash ~/testpmd_fwd.sh %s %s %s" % \
+ (self.testpmd_args, eth1, eth2)
LOG.debug("Executing command: %s", cmd)
self.server.send_command(cmd)
time.sleep(1)
- cmd = "screen sudo -E bash ~/pktgen_dpdk.sh %s %s %s %s %s %s" % \
+ cmd = "screen sudo -E bash ~/pktgen_dpdk.sh %s %s %s %s %s %s %s %s" % \
(self.pktgen_args[0], self.pktgen_args[1], self.pktgen_args[2],
- self.pktgen_args[3], rate, packetsize)
+ self.pktgen_args[3], rate, packetsize, eth1, eth2)
LOG.debug("Executing command: %s", cmd)
self.client.send_command(cmd)
# wait for finishing test
- time.sleep(1)
+ time.sleep(60)
cmd = r"""\
cat ~/result.log -vT \
diff --git a/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash b/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash
index b872aa3df..dcd5a9bfb 100644
--- a/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash
+++ b/yardstick/benchmark/scenarios/networking/pktgen_dpdk_latency_benchmark.bash
@@ -7,7 +7,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-!/bin/sh
+#!/bin/sh
set -e
@@ -18,6 +18,11 @@ FWD_REV_MAC=$3 # MAC address of forwarding receiver in VM B
FWD_SEND_MAC=$4 # MAC address of forwarding sender in VM B
RATE=$5 # packet rate in percentage
PKT_SIZE=$6 # packet size
+ETH1=$7
+ETH2=$8
+
+DPDK_VERSION="dpdk-17.02"
+PKTGEN_VERSION="pktgen-3.2.12"
load_modules()
@@ -31,13 +36,13 @@ load_modules()
if lsmod | grep "igb_uio" &> /dev/null ; then
echo "igb_uio module is loaded"
else
- insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+ insmod /opt/tempT/$DPDK_VERSION/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
fi
if lsmod | grep "rte_kni" &> /dev/null ; then
echo "rte_kni module is loaded"
else
- insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
+ insmod /opt/tempT/$DPDK_VERSION/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
fi
}
@@ -48,8 +53,10 @@ change_permissions()
}
add_interface_to_dpdk(){
+ ip link set $ETH1 down
+ ip link set $ETH2 down
interfaces=$(lspci |grep Eth |tail -n +2 |awk '{print $1}')
- /dpdk/tools/dpdk-devbind.py --bind=igb_uio $interfaces
+ /opt/tempT/$DPDK_VERSION/usertools/dpdk-devbind.py --bind=igb_uio $interfaces
}
@@ -106,20 +113,14 @@ spawn ./app/app/x86_64-native-linuxapp-gcc/pktgen -c 0x07 -n 4 -b $blacklist --
expect "Pktgen>"
send "\n"
expect "Pktgen>"
-send "screen on\n"
+send "on\n"
expect "Pktgen>"
set count 10
while { $count } {
send "page latency\n"
- expect {
- timeout { send "\n" }
- -regexp {..*} {
- set result "${result}$expect_out(0,string)"
- set timeout 1
- exp_continue
- }
- "Pktgen>"
- }
+ expect -re "(..*)"
+ set result "${result}$expect_out(0,string)"
+ set timeout 1
set count [expr $count-1]
}
send "stop 0\n"
@@ -136,7 +137,7 @@ EOF
run_pktgen()
{
blacklist=$(lspci |grep Eth |awk '{print $1}'|head -1)
- cd /pktgen-dpdk
+ cd /opt/tempT/$PKTGEN_VERSION
touch /home/ubuntu/result.log
result_log="/home/ubuntu/result.log"
sudo expect /home/ubuntu/pktgen.exp $blacklist $result_log
@@ -153,4 +154,3 @@ main()
}
main
-
diff --git a/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash b/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash
index 247a8a833..30b63a734 100644
--- a/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash
+++ b/yardstick/benchmark/scenarios/networking/testpmd_fwd.bash
@@ -13,6 +13,10 @@ set -e
# Commandline arguments
DST_MAC=$1 # MAC address of the peer port
+ETH1=$2
+ETH2=$3
+
+DPDK_VERSION="dpdk-17.02"
load_modules()
{
@@ -25,13 +29,13 @@ load_modules()
if lsmod | grep "igb_uio" &> /dev/null ; then
echo "igb_uio module is loaded"
else
- insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
+ insmod /opt/tempT/$DPDK_VERSION/x86_64-native-linuxapp-gcc/kmod/igb_uio.ko
fi
if lsmod | grep "rte_kni" &> /dev/null ; then
echo "rte_kni module is loaded"
else
- insmod /dpdk/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
+ insmod /opt/tempT/$DPDK_VERSION/x86_64-native-linuxapp-gcc/kmod/rte_kni.ko
fi
}
@@ -42,15 +46,17 @@ change_permissions()
}
add_interface_to_dpdk(){
+ ip link set $ETH1 down
+ ip link set $ETH2 down
interfaces=$(lspci |grep Eth |tail -n +2 |awk '{print $1}')
- /dpdk/tools/dpdk-devbind.py --bind=igb_uio $interfaces
+ /opt/tempT/$DPDK_VERSION/usertools//dpdk-devbind.py --bind=igb_uio $interfaces
}
run_testpmd()
{
blacklist=$(lspci |grep Eth |awk '{print $1}'|head -1)
- cd /dpdk
- sudo ./destdir/bin/testpmd -c 0x07 -n 4 -b $blacklist -- -a --eth-peer=1,$DST_MAC --forward-mode=mac
+ cd /opt/tempT/$DPDK_VERSION/x86_64-native-linuxapp-gcc/app
+ sudo ./testpmd -c 0x07 -n 4 -b $blacklist -- -a --eth-peer=1,$DST_MAC --forward-mode=mac
}
main()
diff --git a/yardstick/benchmark/scenarios/networking/vnf_generic.py b/yardstick/benchmark/scenarios/networking/vnf_generic.py
index 0e4785294..78f866e25 100644
--- a/yardstick/benchmark/scenarios/networking/vnf_generic.py
+++ b/yardstick/benchmark/scenarios/networking/vnf_generic.py
@@ -14,6 +14,7 @@
import copy
import logging
+import time
import ipaddress
from itertools import chain
@@ -440,7 +441,7 @@ class NetworkServiceTestCase(scenario_base.Scenario):
traffic_gen.listen_traffic(self.traffic_profile)
# register collector with yardstick for KPI collection.
- self.collector = Collector(self.vnfs, self.context_cfg["nodes"], self.traffic_profile)
+ self.collector = Collector(self.vnfs)
self.collector.start()
# Start the actual traffic
@@ -484,3 +485,11 @@ class NetworkServiceTestCase(scenario_base.Scenario):
# https://bugs.python.org/issue9400
LOG.exception("")
raise RuntimeError("Error in teardown")
+
+ def pre_run_wait_time(self, time_seconds):
+ """Time waited before executing the run method"""
+ time.sleep(time_seconds)
+
+ def post_run_wait_time(self, time_seconds):
+ """Time waited after executing the run method"""
+ pass
diff --git a/yardstick/cmd/commands/task.py b/yardstick/cmd/commands/task.py
index a3488a23d..c6379e586 100644
--- a/yardstick/cmd/commands/task.py
+++ b/yardstick/cmd/commands/task.py
@@ -25,6 +25,7 @@ class TaskCommands(object): # pragma: no cover
Set of commands to manage benchmark tasks.
"""
+ EXIT_TEST_FAILED = 2
@cliargs("inputfile", type=str, help="path to task or suite file", nargs=1)
@cliargs("--task-args", dest="task_args",
@@ -48,18 +49,20 @@ class TaskCommands(object): # pragma: no cover
param = change_osloobj_to_paras(args)
self.output_file = param.output_file
- result = {}
LOG.info('Task START')
try:
result = Task().start(param, **kwargs)
except Exception as e: # pylint: disable=broad-except
self._write_error_data(e)
-
- if result.get('result', {}).get('criteria') == 'PASS':
- LOG.info('Task SUCCESS')
- else:
LOG.info('Task FAILED')
- raise RuntimeError('Task Failed')
+ raise
+ else:
+ if result.get('result', {}).get('criteria') == 'PASS':
+ LOG.info('Task SUCCESS')
+ else:
+ LOG.info('Task FAILED')
+ # exit without backtrace
+ raise SystemExit(self.EXIT_TEST_FAILED)
def _write_error_data(self, error):
data = {'status': 2, 'result': str(error)}
diff --git a/yardstick/common/ansible_common.py b/yardstick/common/ansible_common.py
index be262c215..ca5a110e2 100644
--- a/yardstick/common/ansible_common.py
+++ b/yardstick/common/ansible_common.py
@@ -31,6 +31,7 @@ import six.moves.configparser as ConfigParser
import yaml
from six import StringIO
from chainmap import ChainMap
+from oslo_serialization import jsonutils
from yardstick.common.utils import Timer
from yardstick.common import constants as consts
@@ -508,6 +509,58 @@ class AnsibleCommon(object):
timeout = 1200.0
return timeout
+ def _generate_ansible_cfg(self, directory):
+ parser = ConfigParser.ConfigParser()
+ parser.add_section('defaults')
+ parser.set('defaults', 'host_key_checking', 'False')
+
+ cfg_path = os.path.join(directory, 'ansible.cfg')
+ with open(cfg_path, 'w') as f:
+ parser.write(f)
+
+ def get_sut_info(self, directory, sut_dir='sut'):
+ if not os.path.isdir(directory):
+ raise OSError('No such directory: %s' % directory)
+
+ self._generate_ansible_cfg(directory)
+
+ prefix = 'tmp'
+ self.gen_inventory_ini_dict()
+ ini_file = self._gen_ansible_inventory_file(directory, prefix=prefix)
+ with ini_file as f:
+ inventory_path = str(f)
+
+ self._exec_get_sut_info_cmd(directory, inventory_path, sut_dir)
+
+ sut_dir = os.path.join(directory, sut_dir)
+ sut_info = self._gen_sut_info_dict(sut_dir)
+
+ return sut_info
+
+ def _exec_get_sut_info_cmd(self, directory, inventory_path, sut_dir):
+ cmd = ['ansible', 'all', '-m', 'setup', '-i',
+ inventory_path, '--tree', sut_dir]
+
+ proc = Popen(cmd, stdout=PIPE, cwd=directory)
+ output, _ = proc.communicate()
+ retcode = proc.wait()
+ LOG.debug("exit status = %s", retcode)
+ if retcode != 0:
+ raise CalledProcessError(retcode, cmd, output)
+
+ def _gen_sut_info_dict(self, sut_dir):
+ sut_info = {}
+
+ if os.path.isdir(sut_dir):
+ root, _, files = next(os.walk(sut_dir))
+ for filename in files:
+ abs_path = os.path.join(root, filename)
+ with open(abs_path) as f:
+ data = jsonutils.load(f)
+ sut_info[filename] = data
+
+ return sut_info
+
def execute_ansible(self, playbooks, directory, timeout=None,
extra_vars=None, ansible_check=False, prefix='tmp',
verbose=False):
diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py
index 153bd4bf4..8640afbae 100644
--- a/yardstick/common/constants.py
+++ b/yardstick/common/constants.py
@@ -152,3 +152,6 @@ IS_PUBLIC = 'is_public'
# general
TESTCASE_PRE = 'opnfv_yardstick_'
TESTSUITE_PRE = 'opnfv_'
+
+# OpenStack cloud default config parameters
+OS_CLOUD_DEFAULT_CONFIG = {'verify': False}
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py
index 7f72887e1..36c7eef05 100644
--- a/yardstick/common/exceptions.py
+++ b/yardstick/common/exceptions.py
@@ -54,6 +54,10 @@ class YardstickException(Exception):
return False
+class ResourceCommandError(YardstickException):
+ message = 'Command: "%(command)s" Failed, stderr: "%(stderr)s"'
+
+
class FunctionNotImplemented(YardstickException):
message = ('The function "%(function_name)s" is not implemented in '
'"%(class_name)" class.')
@@ -64,6 +68,11 @@ class YardstickBannedModuleImported(YardstickException):
message = 'Module "%(module)s" cannnot be imported. Reason: "%(reason)s"'
+class PayloadMissingAttributes(YardstickException):
+ message = ('Error instantiating a Payload class, missing attributes: '
+ '%(missing_attributes)s')
+
+
class HeatTemplateError(YardstickException):
"""Error in Heat during the stack deployment"""
message = ('Error in Heat during the creation of the OpenStack stack '
@@ -82,6 +91,47 @@ class DPDKSetupDriverError(YardstickException):
message = '"igb_uio" driver is not loaded'
+class OVSUnsupportedVersion(YardstickException):
+ message = ('Unsupported OVS version "%(ovs_version)s". Please check the '
+ 'config. OVS to DPDK version map: %(ovs_to_dpdk_map)s.')
+
+
+class OVSHugepagesInfoError(YardstickException):
+ message = 'MemInfo cannnot be retrieved.'
+
+
+class OVSHugepagesNotConfigured(YardstickException):
+ message = 'HugePages are not configured in this system.'
+
+
+class OVSHugepagesZeroFree(YardstickException):
+ message = ('There are no HugePages free in this system. Total HugePages '
+ 'configured: %(total_hugepages)s')
+
+
+class OVSDeployError(YardstickException):
+ message = 'OVS deploy tool failed with error: %(stderr)s.'
+
+
+class OVSSetupError(YardstickException):
+ message = 'OVS setup error. Command: %(command)s. Error: %(error)s.'
+
+
+class LibvirtCreateError(YardstickException):
+ message = 'Error creating the virtual machine. Error: %(error)s.'
+
+
+class LibvirtQemuImageBaseImageNotPresent(YardstickException):
+ message = ('Error creating the qemu image for %(vm_image)s. Base image: '
+ '%(base_image)s. Base image not present in execution host or '
+ 'remote host.')
+
+
+class LibvirtQemuImageCreateError(YardstickException):
+ message = ('Error creating the qemu image for %(vm_image)s. Base image: '
+ '%(base_image)s. Error: %(error)s.')
+
+
class ScenarioConfigContextNameNotFound(YardstickException):
message = 'Context name "%(context_name)s" not found'
@@ -100,3 +150,95 @@ class TaskReadError(YardstickException):
class TaskRenderError(YardstickException):
message = 'Failed to render template:\n%(input_task)s'
+
+
+class TimerTimeout(YardstickException):
+ message = 'Timer timeout expired, %(timeout)s seconds'
+
+
+class WaitTimeout(YardstickException):
+ message = 'Wait timeout while waiting for condition'
+
+
+class ScenarioCreateNetworkError(YardstickException):
+ message = 'Create Neutron Network Scenario failed'
+
+
+class ScenarioCreateSubnetError(YardstickException):
+ message = 'Create Neutron Subnet Scenario failed'
+
+
+class ScenarioDeleteRouterError(YardstickException):
+ message = 'Delete Neutron Router Scenario failed'
+
+
+class MissingPodInfoError(YardstickException):
+ message = 'Missing pod args, please check'
+
+
+class UnsupportedPodFormatError(YardstickException):
+ message = 'Failed to load pod info, unsupported format'
+
+
+class ScenarioCreateRouterError(YardstickException):
+ message = 'Create Neutron Router Scenario failed'
+
+
+class ScenarioRemoveRouterIntError(YardstickException):
+ message = 'Remove Neutron Router Interface Scenario failed'
+
+
+class ScenarioCreateFloatingIPError(YardstickException):
+ message = 'Create Neutron Floating IP Scenario failed'
+
+
+class ScenarioDeleteFloatingIPError(YardstickException):
+ message = 'Delete Neutron Floating IP Scenario failed'
+
+
+class ScenarioCreateSecurityGroupError(YardstickException):
+ message = 'Create Neutron Security Group Scenario failed'
+
+
+class ScenarioDeleteNetworkError(YardstickException):
+ message = 'Delete Neutron Network Scenario failed'
+
+
+class ScenarioCreateServerError(YardstickException):
+ message = 'Nova Create Server Scenario failed'
+
+
+class ScenarioDeleteServerError(YardstickException):
+ message = 'Delete Server Scenario failed'
+
+
+class ScenarioCreateKeypairError(YardstickException):
+ message = 'Nova Create Keypair Scenario failed'
+
+
+class ScenarioDeleteKeypairError(YardstickException):
+ message = 'Nova Delete Keypair Scenario failed'
+
+
+class ScenarioAttachVolumeError(YardstickException):
+ message = 'Nova Attach Volume Scenario failed'
+
+
+class ScenarioGetServerError(YardstickException):
+ message = 'Nova Get Server Scenario failed'
+
+
+class ScenarioGetFlavorError(YardstickException):
+ message = 'Nova Get Falvor Scenario failed'
+
+
+class ScenarioCreateVolumeError(YardstickException):
+ message = 'Cinder Create Volume Scenario failed'
+
+
+class ScenarioDeleteVolumeError(YardstickException):
+ message = 'Cinder Delete Volume Scenario failed'
+
+
+class ScenarioDetachVolumeError(YardstickException):
+ message = 'Cinder Detach Volume Scenario failed'
diff --git a/yardstick/common/messaging/__init__.py b/yardstick/common/messaging/__init__.py
new file mode 100644
index 000000000..f0f012ec3
--- /dev/null
+++ b/yardstick/common/messaging/__init__.py
@@ -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.
+
+# MQ is statically configured:
+# - MQ service: RabbitMQ
+# - user/password: yardstick/yardstick
+# - host:port: localhost:5672
+MQ_USER = 'yardstick'
+MQ_PASS = 'yardstick'
+MQ_SERVICE = 'rabbit'
+SERVER = 'localhost'
+PORT = 5672
+TRANSPORT_URL = (MQ_SERVICE + '://' + MQ_USER + ':' + MQ_PASS + '@' + SERVER +
+ ':' + str(PORT) + '/')
+
+# RPC server.
+RPC_SERVER_EXECUTOR = 'threading'
+
+# Topics.
+RUNNER = 'runner'
+
+# Methods.
+# RUNNER methods:
+RUNNER_INFO = 'runner_info'
+RUNNER_LOOP = 'runner_loop'
diff --git a/yardstick/common/messaging/consumer.py b/yardstick/common/messaging/consumer.py
new file mode 100644
index 000000000..24ec6f184
--- /dev/null
+++ b/yardstick/common/messaging/consumer.py
@@ -0,0 +1,85 @@
+# 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.
+
+import abc
+import logging
+
+from oslo_config import cfg
+import oslo_messaging
+import six
+
+from yardstick.common import messaging
+
+
+LOG = logging.getLogger(__name__)
+
+
+@six.add_metaclass(abc.ABCMeta)
+class NotificationHandler(object):
+ """Abstract class to define a endpoint object for a MessagingConsumer"""
+
+ def __init__(self, _id, ctx_pids, queue):
+ self._id = _id
+ self._ctx_pids = ctx_pids
+ self._queue = queue
+
+
+@six.add_metaclass(abc.ABCMeta)
+class MessagingConsumer(object):
+ """Abstract class to implement a MQ consumer
+
+ This abstract class allows a class implementing this interface to receive
+ the messages published by a `MessagingNotifier`.
+ """
+
+ def __init__(self, topic, pids, endpoints, fanout=True):
+ """Init function.
+
+ :param topic: (string) MQ exchange topic
+ :param pids: (list of int) list of PIDs of the processes implementing
+ the MQ Notifier which will be in the message context
+ :param endpoints: (list of class) list of classes implementing the
+ methods (see `MessagingNotifier.send_message) used by
+ the Notifier
+ :param fanout: (bool) MQ clients may request that a copy of the message
+ be delivered to all servers listening on a topic by
+ setting fanout to ``True``, rather than just one of them
+ :returns: `MessagingConsumer` class object
+ """
+
+ self._pids = pids
+ self._endpoints = endpoints
+ self._transport = oslo_messaging.get_rpc_transport(
+ cfg.CONF, url=messaging.TRANSPORT_URL)
+ self._target = oslo_messaging.Target(topic=topic, fanout=fanout,
+ server=messaging.SERVER)
+ self._server = oslo_messaging.get_rpc_server(
+ self._transport, self._target, self._endpoints,
+ executor=messaging.RPC_SERVER_EXECUTOR,
+ access_policy=oslo_messaging.DefaultRPCAccessPolicy)
+
+ def start_rpc_server(self):
+ """Start the RPC server."""
+ if self._server:
+ self._server.start()
+
+ def stop_rpc_server(self):
+ """Stop the RPC server."""
+ if self._server:
+ self._server.stop()
+
+ def wait(self):
+ """Wait for message processing to complete (blocking)."""
+ if self._server:
+ self._server.wait()
diff --git a/yardstick/common/messaging/payloads.py b/yardstick/common/messaging/payloads.py
new file mode 100644
index 000000000..d29d79808
--- /dev/null
+++ b/yardstick/common/messaging/payloads.py
@@ -0,0 +1,53 @@
+# 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.
+
+import abc
+
+import six
+
+from yardstick.common import exceptions
+
+
+@six.add_metaclass(abc.ABCMeta)
+class Payload(object):
+ """Base Payload class to transfer data through the MQ service"""
+
+ REQUIRED_FIELDS = {'version'}
+
+ def __init__(self, **kwargs):
+ """Init method
+
+ :param kwargs: (dictionary) attributes and values of the object
+ :returns: Payload object
+ """
+
+ if not all(req_field in kwargs for req_field in self.REQUIRED_FIELDS):
+ _attrs = set(kwargs) - self.REQUIRED_FIELDS
+ missing_attributes = ', '.join(str(_attr) for _attr in _attrs)
+ raise exceptions.PayloadMissingAttributes(
+ missing_attributes=missing_attributes)
+
+ for name, value in kwargs.items():
+ setattr(self, name, value)
+
+ self._fields = set(kwargs.keys())
+
+ def obj_to_dict(self):
+ """Returns a dictionary with the attributes of the object"""
+ return {field: getattr(self, field) for field in self._fields}
+
+ @classmethod
+ def dict_to_obj(cls, _dict):
+ """Returns a Payload object built from the dictionary elements"""
+ return cls(**_dict)
diff --git a/yardstick/common/messaging/producer.py b/yardstick/common/messaging/producer.py
new file mode 100644
index 000000000..b6adc0c17
--- /dev/null
+++ b/yardstick/common/messaging/producer.py
@@ -0,0 +1,70 @@
+# 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.
+
+import abc
+import logging
+import os
+
+from oslo_config import cfg
+import oslo_messaging
+import six
+
+from yardstick.common import messaging
+
+
+LOG = logging.getLogger(__name__)
+
+
+@six.add_metaclass(abc.ABCMeta)
+class MessagingProducer(object):
+ """Abstract class to implement a MQ producer
+
+ This abstract class allows a class implementing this interface to publish
+ messages in a message queue.
+ """
+
+ def __init__(self, topic, pid=os.getpid(), fanout=True):
+ """Init function.
+
+ :param topic: (string) MQ exchange topic
+ :param pid: (int) PID of the process implementing this MQ Notifier
+ :param fanout: (bool) MQ clients may request that a copy of the message
+ be delivered to all servers listening on a topic by
+ setting fanout to ``True``, rather than just one of them
+ :returns: `MessagingNotifier` class object
+ """
+ self._topic = topic
+ self._pid = pid
+ self._fanout = fanout
+ self._transport = oslo_messaging.get_rpc_transport(
+ cfg.CONF, url=messaging.TRANSPORT_URL)
+ self._target = oslo_messaging.Target(topic=topic, fanout=fanout,
+ server=messaging.SERVER)
+ self._notifier = oslo_messaging.RPCClient(self._transport,
+ self._target)
+
+ def send_message(self, method, payload):
+ """Send a cast message, that will invoke a method without blocking.
+
+ The cast() method is used to invoke an RPC method that does not return
+ a value. cast() RPC requests may be broadcast to all Servers listening
+ on a given topic by setting the fanout Target property to ``True``.
+
+ :param methos: (string) method name, that must be implemented in the
+ consumer endpoints
+ :param payload: (subclass `Payload`) payload content
+ """
+ self._notifier.cast({'pid': self._pid},
+ method,
+ **payload.obj_to_dict())
diff --git a/yardstick/common/openstack_utils.py b/yardstick/common/openstack_utils.py
index e3f67baa5..e3e08feb6 100644
--- a/yardstick/common/openstack_utils.py
+++ b/yardstick/common/openstack_utils.py
@@ -7,20 +7,20 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import os
-import time
-import sys
+import copy
import logging
+import os
+from cinderclient import client as cinderclient
+from novaclient import client as novaclient
+from glanceclient import client as glanceclient
from keystoneauth1 import loading
from keystoneauth1 import session
+from neutronclient.neutron import client as neutronclient
import shade
from shade import exc
-from cinderclient import client as cinderclient
-from novaclient import client as novaclient
-from glanceclient import client as glanceclient
-from neutronclient.neutron import client as neutronclient
+from yardstick.common import constants
log = logging.getLogger(__name__)
@@ -156,204 +156,205 @@ def get_glance_client(): # pragma: no cover
return glanceclient.Client(get_glance_client_version(), session=sess)
-def get_shade_client():
- return shade.openstack_cloud()
+def get_shade_client(**os_cloud_config):
+ """Get Shade OpenStack cloud client
+
+ By default, the input parameters given to "shade.openstack_cloud" method
+ are stored in "constants.OS_CLOUD_DEFAULT_CONFIG". The input parameters
+ passed in this function, "os_cloud_config", will overwrite the default
+ ones.
+
+ :param os_cloud_config: (kwargs) input arguments for
+ "shade.openstack_cloud" method.
+ :return: ``shade.OpenStackCloud`` object.
+ """
+ params = copy.deepcopy(constants.OS_CLOUD_DEFAULT_CONFIG)
+ params.update(os_cloud_config)
+ return shade.openstack_cloud(**params)
# *********************************************
# NOVA
# *********************************************
-def get_instances(nova_client):
- try:
- return nova_client.servers.list(search_opts={'all_tenants': 1})
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_instances(nova_client)]")
-
+def create_keypair(shade_client, name, public_key=None):
+ """Create a new keypair.
-def get_instance_status(nova_client, instance): # pragma: no cover
- try:
- return nova_client.servers.get(instance.id).status
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_instance_status(nova_client)]")
-
-
-def get_instance_by_name(nova_client, instance_name): # pragma: no cover
- try:
- return nova_client.servers.find(name=instance_name)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_instance_by_name(nova_client, '%s')]",
- instance_name)
+ :param name: Name of the keypair being created.
+ :param public_key: Public key for the new keypair.
-
-def get_aggregates(nova_client): # pragma: no cover
- try:
- return nova_client.aggregates.list()
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_aggregates(nova_client)]")
-
-
-def get_availability_zones(nova_client): # pragma: no cover
- try:
- return nova_client.availability_zones.list()
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_availability_zones(nova_client)]")
-
-
-def get_availability_zone_names(nova_client): # pragma: no cover
- try:
- return [az.zoneName for az in get_availability_zones(nova_client)]
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_availability_zone_names(nova_client)]")
-
-
-def create_aggregate(nova_client, aggregate_name, av_zone): # pragma: no cover
- try:
- nova_client.aggregates.create(aggregate_name, av_zone)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [create_aggregate(nova_client, %s, %s)]",
- aggregate_name, av_zone)
- return False
- else:
- return True
-
-
-def get_aggregate_id(nova_client, aggregate_name): # pragma: no cover
+ :return: Created keypair.
+ """
try:
- aggregates = get_aggregates(nova_client)
- _id = next((ag.id for ag in aggregates if ag.name == aggregate_name))
- except Exception: # pylint: disable=broad-except
- log.exception("Error [get_aggregate_id(nova_client, %s)]",
- aggregate_name)
- else:
- return _id
-
-
-def add_host_to_aggregate(nova_client, aggregate_name,
- compute_host): # pragma: no cover
+ return shade_client.create_keypair(name, public_key=public_key)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_keypair(shade_client)]. "
+ "Exception message, '%s'", o_exc.orig_message)
+
+
+def create_instance_and_wait_for_active(shade_client, name, image,
+ flavor, auto_ip=True, ips=None,
+ ip_pool=None, root_volume=None,
+ terminate_volume=False, wait=True,
+ timeout=180, reuse_ips=True,
+ network=None, boot_from_volume=False,
+ volume_size='20', boot_volume=None,
+ volumes=None, nat_destination=None,
+ **kwargs):
+ """Create a virtual server instance.
+
+ :param name:(string) Name of the server.
+ :param image:(dict) Image dict, name or ID to boot with. Image is required
+ unless boot_volume is given.
+ :param flavor:(dict) Flavor dict, name or ID to boot onto.
+ :param auto_ip: Whether to take actions to find a routable IP for
+ the server.
+ :param ips: List of IPs to attach to the server.
+ :param ip_pool:(string) Name of the network or floating IP pool to get an
+ address from.
+ :param root_volume:(string) Name or ID of a volume to boot from.
+ (defaults to None - deprecated, use boot_volume)
+ :param boot_volume:(string) Name or ID of a volume to boot from.
+ :param terminate_volume:(bool) If booting from a volume, whether it should
+ be deleted when the server is destroyed.
+ :param volumes:(optional) A list of volumes to attach to the server.
+ :param wait:(optional) Wait for the address to appear as assigned to the server.
+ :param timeout: Seconds to wait, defaults to 60.
+ :param reuse_ips:(bool)Whether to attempt to reuse pre-existing
+ floating ips should a floating IP be needed.
+ :param network:(dict) Network dict or name or ID to attach the server to.
+ Mutually exclusive with the nics parameter. Can also be be
+ a list of network names or IDs or network dicts.
+ :param boot_from_volume:(bool) Whether to boot from volume. 'boot_volume'
+ implies True, but boot_from_volume=True with
+ no boot_volume is valid and will create a
+ volume from the image and use that.
+ :param volume_size: When booting an image from volume, how big should
+ the created volume be?
+ :param nat_destination: Which network should a created floating IP
+ be attached to, if it's not possible to infer from
+ the cloud's configuration.
+ :param meta:(optional) A dict of arbitrary key/value metadata to store for
+ this server. Both keys and values must be <=255 characters.
+ :param reservation_id: A UUID for the set of servers being requested.
+ :param min_count:(optional extension) The minimum number of servers to
+ launch.
+ :param max_count:(optional extension) The maximum number of servers to
+ launch.
+ :param security_groups: A list of security group names.
+ :param userdata: User data to pass to be exposed by the metadata server
+ this can be a file type object as well or a string.
+ :param key_name:(optional extension) Name of previously created keypair to
+ inject into the instance.
+ :param availability_zone: Name of the availability zone for instance
+ placement.
+ :param block_device_mapping:(optional) A dict of block device mappings for
+ this server.
+ :param block_device_mapping_v2:(optional) A dict of block device mappings
+ for this server.
+ :param nics:(optional extension) An ordered list of nics to be added to
+ this server, with information about connected networks, fixed
+ IPs, port etc.
+ :param scheduler_hints:(optional extension) Arbitrary key-value pairs
+ specified by the client to help boot an instance.
+ :param config_drive:(optional extension) Value for config drive either
+ boolean, or volume-id.
+ :param disk_config:(optional extension) Control how the disk is partitioned
+ when the server is created. Possible values are 'AUTO'
+ or 'MANUAL'.
+ :param admin_pass:(optional extension) Add a user supplied admin password.
+
+ :returns: The created server.
+ """
try:
- aggregate_id = get_aggregate_id(nova_client, aggregate_name)
- nova_client.aggregates.add_host(aggregate_id, compute_host)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [add_host_to_aggregate(nova_client, %s, %s)]",
- aggregate_name, compute_host)
- return False
- else:
- return True
-
-
-def create_aggregate_with_host(nova_client, aggregate_name, av_zone,
- compute_host): # pragma: no cover
+ return shade_client.create_server(
+ name, image, flavor, auto_ip=auto_ip, ips=ips, ip_pool=ip_pool,
+ root_volume=root_volume, terminate_volume=terminate_volume,
+ wait=wait, timeout=timeout, reuse_ips=reuse_ips, network=network,
+ boot_from_volume=boot_from_volume, volume_size=volume_size,
+ boot_volume=boot_volume, volumes=volumes,
+ nat_destination=nat_destination, **kwargs)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_instance(shade_client)]. "
+ "Exception message, '%s'", o_exc.orig_message)
+
+
+def attach_volume_to_server(shade_client, server_name_or_id, volume_name_or_id,
+ device=None, wait=True, timeout=None):
+ """Attach a volume to a server.
+
+ This will attach a volume, described by the passed in volume
+ dict, to the server described by the passed in server dict on the named
+ device on the server.
+
+ If the volume is already attached to the server, or generally not
+ available, then an exception is raised. To re-attach to a server,
+ but under a different device, the user must detach it first.
+
+ :param server_name_or_id:(string) The server name or id to attach to.
+ :param volume_name_or_id:(string) The volume name or id to attach.
+ :param device:(string) The device name where the volume will attach.
+ :param wait:(bool) If true, waits for volume to be attached.
+ :param timeout: Seconds to wait for volume attachment. None is forever.
+
+ :returns: True if attached successful, False otherwise.
+ """
try:
- create_aggregate(nova_client, aggregate_name, av_zone)
- add_host_to_aggregate(nova_client, aggregate_name, compute_host)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [create_aggregate_with_host("
- "nova_client, %s, %s, %s)]",
- aggregate_name, av_zone, compute_host)
- return False
- else:
+ server = shade_client.get_server(name_or_id=server_name_or_id)
+ volume = shade_client.get_volume(volume_name_or_id)
+ shade_client.attach_volume(
+ server, volume, device=device, wait=wait, timeout=timeout)
return True
-
-
-def create_keypair(name, key_path=None): # pragma: no cover
- try:
- with open(key_path) as fpubkey:
- keypair = get_nova_client().keypairs.create(
- name=name, public_key=fpubkey.read())
- return keypair
- except Exception: # pylint: disable=broad-except
- log.exception("Error [create_keypair(nova_client)]")
-
-
-def create_instance(json_body): # pragma: no cover
- try:
- return get_nova_client().servers.create(**json_body)
- except Exception: # pylint: disable=broad-except
- log.exception("Error create instance failed")
- return None
-
-
-def create_instance_and_wait_for_active(json_body): # pragma: no cover
- SLEEP = 3
- VM_BOOT_TIMEOUT = 180
- nova_client = get_nova_client()
- instance = create_instance(json_body)
- for _ in range(int(VM_BOOT_TIMEOUT / SLEEP)):
- status = get_instance_status(nova_client, instance)
- if status.lower() == "active":
- return instance
- elif status.lower() == "error":
- log.error("The instance went to ERROR status.")
- return None
- time.sleep(SLEEP)
- log.error("Timeout booting the instance.")
- return None
-
-
-def attach_server_volume(server_id, volume_id,
- device=None): # pragma: no cover
- try:
- get_nova_client().volumes.create_server_volume(server_id,
- volume_id, device)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [attach_server_volume(nova_client, '%s', '%s')]",
- server_id, volume_id)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [attach_volume_to_server(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
return False
- else:
- return True
-def delete_instance(nova_client, instance_id): # pragma: no cover
- try:
- nova_client.servers.force_delete(instance_id)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [delete_instance(nova_client, '%s')]",
- instance_id)
- return False
- else:
- return True
-
+def delete_instance(shade_client, name_or_id, wait=False, timeout=180,
+ delete_ips=False, delete_ip_retry=1):
+ """Delete a server instance.
-def remove_host_from_aggregate(nova_client, aggregate_name,
- compute_host): # pragma: no cover
+ :param name_or_id: name or ID of the server to delete
+ :param wait:(bool) If true, waits for server to be deleted.
+ :param timeout:(int) Seconds to wait for server deletion.
+ :param delete_ips:(bool) If true, deletes any floating IPs associated with
+ the instance.
+ :param delete_ip_retry:(int) Number of times to retry deleting
+ any floating ips, should the first try be
+ unsuccessful.
+ :returns: True if delete succeeded, False otherwise.
+ """
try:
- aggregate_id = get_aggregate_id(nova_client, aggregate_name)
- nova_client.aggregates.remove_host(aggregate_id, compute_host)
- except Exception: # pylint: disable=broad-except
- log.exception("Error remove_host_from_aggregate(nova_client, %s, %s)",
- aggregate_name, compute_host)
+ return shade_client.delete_server(
+ name_or_id, wait=wait, timeout=timeout, delete_ips=delete_ips,
+ delete_ip_retry=delete_ip_retry)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [delete_instance(shade_client, '%s')]. "
+ "Exception message: %s", name_or_id,
+ o_exc.orig_message)
return False
- else:
- return True
-def remove_hosts_from_aggregate(nova_client,
- aggregate_name): # pragma: no cover
- aggregate_id = get_aggregate_id(nova_client, aggregate_name)
- hosts = nova_client.aggregates.get(aggregate_id).hosts
- assert(
- all(remove_host_from_aggregate(nova_client, aggregate_name, host)
- for host in hosts))
+def get_server(shade_client, name_or_id=None, filters=None, detailed=False,
+ bare=False):
+ """Get a server by name or ID.
+ :param name_or_id: Name or ID of the server.
+ :param filters:(dict) A dictionary of meta data to use for further
+ filtering.
+ :param detailed:(bool) Whether or not to add detailed additional
+ information.
+ :param bare:(bool) Whether to skip adding any additional information to the
+ server record.
-def delete_aggregate(nova_client, aggregate_name): # pragma: no cover
- try:
- remove_hosts_from_aggregate(nova_client, aggregate_name)
- nova_client.aggregates.delete(aggregate_name)
- except Exception: # pylint: disable=broad-except
- log.exception("Error [delete_aggregate(nova_client, %s)]",
- aggregate_name)
- return False
- else:
- return True
-
-
-def get_server_by_name(name): # pragma: no cover
+ :returns: A server ``munch.Munch`` or None if no matching server is found.
+ """
try:
- return get_nova_client().servers.list(search_opts={'name': name})[0]
- except IndexError:
- log.exception('Failed to get nova client')
- raise
+ return shade_client.get_server(name_or_id=name_or_id, filters=filters,
+ detailed=detailed, bare=bare)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [get_server(shade_client, '%s')]. "
+ "Exception message: %s", name_or_id, o_exc.orig_message)
def create_flavor(name, ram, vcpus, disk, **kwargs): # pragma: no cover
@@ -366,14 +367,6 @@ def create_flavor(name, ram, vcpus, disk, **kwargs): # pragma: no cover
return None
-def get_image_by_name(name): # pragma: no cover
- images = get_nova_client().images.list()
- try:
- return next((a for a in images if a.name == name))
- except StopIteration:
- log.exception('No image matched')
-
-
def get_flavor_id(nova_client, flavor_name): # pragma: no cover
flavors = nova_client.flavors.list(detailed=True)
flavor_id = ''
@@ -384,27 +377,22 @@ def get_flavor_id(nova_client, flavor_name): # pragma: no cover
return flavor_id
-def get_flavor_by_name(name): # pragma: no cover
- flavors = get_nova_client().flavors.list()
- try:
- return next((a for a in flavors if a.name == name))
- except StopIteration:
- log.exception('No flavor matched')
-
+def get_flavor(shade_client, name_or_id, filters=None, get_extra=True):
+ """Get a flavor by name or ID.
-def check_status(status, name, iterations, interval): # pragma: no cover
- for _ in range(iterations):
- try:
- server = get_server_by_name(name)
- except IndexError:
- log.error('Cannot found %s server', name)
- raise
+ :param name_or_id: Name or ID of the flavor.
+ :param filters: A dictionary of meta data to use for further filtering.
+ :param get_extra: Whether or not the list_flavors call should get the extra
+ flavor specs.
- if server.status == status:
- return True
-
- time.sleep(interval)
- return False
+ :returns: A flavor ``munch.Munch`` or None if no matching flavor is found.
+ """
+ try:
+ return shade_client.get_flavor(name_or_id, filters=filters,
+ get_extra=get_extra)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [get_flavor(shade_client, '%s')]. "
+ "Exception message: %s", name_or_id, o_exc.orig_message)
def delete_flavor(flavor_id): # pragma: no cover
@@ -417,31 +405,47 @@ def delete_flavor(flavor_id): # pragma: no cover
return True
-def delete_keypair(nova_client, key): # pragma: no cover
+def delete_keypair(shade_client, name):
+ """Delete a keypair.
+
+ :param name: Name of the keypair to delete.
+
+ :returns: True if delete succeeded, False otherwise.
+ """
try:
- nova_client.keypairs.delete(key=key)
- return True
- except Exception: # pylint: disable=broad-except
- log.exception("Error [delete_keypair(nova_client)]")
+ return shade_client.delete_keypair(name)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [delete_neutron_router(shade_client, '%s')]. "
+ "Exception message: %s", name, o_exc.orig_message)
return False
# *********************************************
# NEUTRON
# *********************************************
-def get_network_id(shade_client, network_name):
- networks = shade_client.list_networks({'name': network_name})
- if networks:
- return networks[0]['id']
-
-
-def create_neutron_net(neutron_client, json_body): # pragma: no cover
+def create_neutron_net(shade_client, network_name, shared=False,
+ admin_state_up=True, external=False, provider=None,
+ project_id=None):
+ """Create a neutron network.
+
+ :param network_name:(string) name of the network being created.
+ :param shared:(bool) whether the network is shared.
+ :param admin_state_up:(bool) set the network administrative state.
+ :param external:(bool) whether this network is externally accessible.
+ :param provider:(dict) a dict of network provider options.
+ :param project_id:(string) specify the project ID this network
+ will be created on (admin-only).
+ :returns:(string) the network id.
+ """
try:
- network = neutron_client.create_network(body=json_body)
- return network['network']['id']
- except Exception: # pylint: disable=broad-except
- log.error("Error [create_neutron_net(neutron_client)]")
- raise Exception("operation error")
+ networks = shade_client.create_network(
+ name=network_name, shared=shared, admin_state_up=admin_state_up,
+ external=external, provider=provider, project_id=project_id)
+ return networks['id']
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_neutron_net(shade_client)]."
+ "Exception message, '%s'", o_exc.orig_message)
+ return None
def delete_neutron_net(shade_client, network_id):
@@ -452,31 +456,88 @@ def delete_neutron_net(shade_client, network_id):
return False
-def create_neutron_subnet(neutron_client, json_body): # pragma: no cover
+def create_neutron_subnet(shade_client, network_name_or_id, cidr=None,
+ ip_version=4, enable_dhcp=False, subnet_name=None,
+ tenant_id=None, allocation_pools=None,
+ gateway_ip=None, disable_gateway_ip=False,
+ dns_nameservers=None, host_routes=None,
+ ipv6_ra_mode=None, ipv6_address_mode=None,
+ use_default_subnetpool=False):
+ """Create a subnet on a specified network.
+
+ :param network_name_or_id:(string) the unique name or ID of the
+ attached network. If a non-unique name is
+ supplied, an exception is raised.
+ :param cidr:(string) the CIDR.
+ :param ip_version:(int) the IP version.
+ :param enable_dhcp:(bool) whether DHCP is enable.
+ :param subnet_name:(string) the name of the subnet.
+ :param tenant_id:(string) the ID of the tenant who owns the network.
+ :param allocation_pools: A list of dictionaries of the start and end
+ addresses for the allocation pools.
+ :param gateway_ip:(string) the gateway IP address.
+ :param disable_gateway_ip:(bool) whether gateway IP address is enabled.
+ :param dns_nameservers: A list of DNS name servers for the subnet.
+ :param host_routes: A list of host route dictionaries for the subnet.
+ :param ipv6_ra_mode:(string) IPv6 Router Advertisement mode.
+ Valid values are: 'dhcpv6-stateful',
+ 'dhcpv6-stateless', or 'slaac'.
+ :param ipv6_address_mode:(string) IPv6 address mode.
+ Valid values are: 'dhcpv6-stateful',
+ 'dhcpv6-stateless', or 'slaac'.
+ :param use_default_subnetpool:(bool) use the default subnetpool for
+ ``ip_version`` to obtain a CIDR. It is
+ required to pass ``None`` to the ``cidr``
+ argument when enabling this option.
+ :returns:(string) the subnet id.
+ """
try:
- subnet = neutron_client.create_subnet(body=json_body)
- return subnet['subnets'][0]['id']
- except Exception: # pylint: disable=broad-except
- log.error("Error [create_neutron_subnet")
- raise Exception("operation error")
+ subnet = shade_client.create_subnet(
+ network_name_or_id, cidr=cidr, ip_version=ip_version,
+ enable_dhcp=enable_dhcp, subnet_name=subnet_name,
+ tenant_id=tenant_id, allocation_pools=allocation_pools,
+ gateway_ip=gateway_ip, disable_gateway_ip=disable_gateway_ip,
+ dns_nameservers=dns_nameservers, host_routes=host_routes,
+ ipv6_ra_mode=ipv6_ra_mode, ipv6_address_mode=ipv6_address_mode,
+ use_default_subnetpool=use_default_subnetpool)
+ return subnet['id']
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_neutron_subnet(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
+ return None
-def create_neutron_router(neutron_client, json_body): # pragma: no cover
+def create_neutron_router(shade_client, name=None, admin_state_up=True,
+ ext_gateway_net_id=None, enable_snat=None,
+ ext_fixed_ips=None, project_id=None):
+ """Create a logical router.
+
+ :param name:(string) the router name.
+ :param admin_state_up:(bool) the administrative state of the router.
+ :param ext_gateway_net_id:(string) network ID for the external gateway.
+ :param enable_snat:(bool) enable Source NAT (SNAT) attribute.
+ :param ext_fixed_ips: List of dictionaries of desired IP and/or subnet
+ on the external network.
+ :param project_id:(string) project ID for the router.
+
+ :returns:(string) the router id.
+ """
try:
- router = neutron_client.create_router(json_body)
- return router['router']['id']
- except Exception: # pylint: disable=broad-except
- log.error("Error [create_neutron_router(neutron_client)]")
- raise Exception("operation error")
+ router = shade_client.create_router(
+ name, admin_state_up, ext_gateway_net_id, enable_snat,
+ ext_fixed_ips, project_id)
+ return router['id']
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_neutron_router(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
-def delete_neutron_router(neutron_client, router_id): # pragma: no cover
+def delete_neutron_router(shade_client, router_id):
try:
- neutron_client.delete_router(router=router_id)
- return True
- except Exception: # pylint: disable=broad-except
- log.error("Error [delete_neutron_router(neutron_client, '%s')]",
- router_id)
+ return shade_client.delete_router(router_id)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [delete_neutron_router(shade_client, '%s')]. "
+ "Exception message: %s", router_id, o_exc.orig_message)
return False
@@ -490,151 +551,174 @@ def remove_gateway_router(neutron_client, router_id): # pragma: no cover
return False
-def remove_interface_router(neutron_client, router_id, subnet_id,
- **json_body): # pragma: no cover
- json_body.update({"subnet_id": subnet_id})
- try:
- neutron_client.remove_interface_router(router=router_id,
- body=json_body)
- return True
- except Exception: # pylint: disable=broad-except
- log.error("Error [remove_interface_router(neutron_client, '%s', "
- "'%s')]", router_id, subnet_id)
- return False
-
-
-def create_floating_ip(neutron_client, extnet_id): # pragma: no cover
- props = {'floating_network_id': extnet_id}
- try:
- ip_json = neutron_client.create_floatingip({'floatingip': props})
- fip_addr = ip_json['floatingip']['floating_ip_address']
- fip_id = ip_json['floatingip']['id']
- except Exception: # pylint: disable=broad-except
- log.error("Error [create_floating_ip(neutron_client)]")
- return None
- return {'fip_addr': fip_addr, 'fip_id': fip_id}
+def remove_router_interface(shade_client, router, subnet_id=None,
+ port_id=None):
+ """Detach a subnet from an internal router interface.
+ At least one of subnet_id or port_id must be supplied. If you specify both
+ subnet and port ID, the subnet ID must correspond to the subnet ID of the
+ first IP address on the port specified by the port ID.
+ Otherwise an error occurs.
-def delete_floating_ip(nova_client, floatingip_id): # pragma: no cover
+ :param router: The dict object of the router being changed
+ :param subnet_id:(string) The ID of the subnet to use for the interface
+ :param port_id:(string) The ID of the port to use for the interface
+ :returns: True on success
+ """
try:
- nova_client.floating_ips.delete(floatingip_id)
+ shade_client.remove_router_interface(
+ router, subnet_id=subnet_id, port_id=port_id)
return True
- except Exception: # pylint: disable=broad-except
- log.error("Error [delete_floating_ip(nova_client, '%s')]",
- floatingip_id)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [remove_interface_router(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
return False
-def get_security_groups(neutron_client): # pragma: no cover
+def create_floating_ip(shade_client, network_name_or_id=None, server=None,
+ fixed_address=None, nat_destination=None,
+ port=None, wait=False, timeout=60):
+ """Allocate a new floating IP from a network or a pool.
+
+ :param network_name_or_id: Name or ID of the network
+ that the floating IP should come from.
+ :param server: Server dict for the server to create
+ the IP for and to which it should be attached.
+ :param fixed_address: Fixed IP to attach the floating ip to.
+ :param nat_destination: Name or ID of the network
+ that the fixed IP to attach the floating
+ IP to should be on.
+ :param port: The port ID that the floating IP should be
+ attached to. Specifying a port conflicts with specifying a
+ server,fixed_address or nat_destination.
+ :param wait: Whether to wait for the IP to be active.Only applies
+ if a server is provided.
+ :param timeout: How long to wait for the IP to be active.Only
+ applies if a server is provided.
+
+ :returns:Floating IP id and address
+ """
try:
- security_groups = neutron_client.list_security_groups()[
- 'security_groups']
- return security_groups
- except Exception: # pylint: disable=broad-except
- log.error("Error [get_security_groups(neutron_client)]")
- return None
-
-
-def get_security_group_id(neutron_client, sg_name): # pragma: no cover
- security_groups = get_security_groups(neutron_client)
- id = ''
- for sg in security_groups:
- if sg['name'] == sg_name:
- id = sg['id']
- break
- return id
+ fip = shade_client.create_floating_ip(
+ network=network_name_or_id, server=server,
+ fixed_address=fixed_address, nat_destination=nat_destination,
+ port=port, wait=wait, timeout=timeout)
+ return {'fip_addr': fip['floating_ip_address'], 'fip_id': fip['id']}
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [create_floating_ip(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
-def create_security_group(neutron_client, sg_name,
- sg_description): # pragma: no cover
- json_body = {'security_group': {'name': sg_name,
- 'description': sg_description}}
+def delete_floating_ip(shade_client, floating_ip_id, retry=1):
try:
- secgroup = neutron_client.create_security_group(json_body)
- return secgroup['security_group']
- except Exception: # pylint: disable=broad-except
- log.error("Error [create_security_group(neutron_client, '%s', "
- "'%s')]", sg_name, sg_description)
- return None
+ return shade_client.delete_floating_ip(floating_ip_id=floating_ip_id,
+ retry=retry)
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [delete_floating_ip(shade_client,'%s')]. "
+ "Exception message: %s", floating_ip_id, o_exc.orig_message)
+ return False
-def create_secgroup_rule(neutron_client, sg_id, direction, protocol,
- port_range_min=None, port_range_max=None,
- **json_body): # pragma: no cover
- # We create a security group in 2 steps
- # 1 - we check the format and set the json body accordingly
- # 2 - we call neturon client to create the security group
-
- # Format check
- json_body.update({'security_group_rule': {'direction': direction,
- 'security_group_id': sg_id, 'protocol': protocol}})
- # parameters may be
- # - both None => we do nothing
- # - both Not None => we add them to the json description
- # but one cannot be None is the other is not None
- if (port_range_min is not None and port_range_max is not None):
- # add port_range in json description
- json_body['security_group_rule']['port_range_min'] = port_range_min
- json_body['security_group_rule']['port_range_max'] = port_range_max
- log.debug("Security_group format set (port range included)")
- else:
- # either both port range are set to None => do nothing
- # or one is set but not the other => log it and return False
- if port_range_min is None and port_range_max is None:
- log.debug("Security_group format set (no port range mentioned)")
- else:
- log.error("Bad security group format."
- "One of the port range is not properly set:"
- "range min: %s, range max: %s", port_range_min,
- port_range_max)
- return False
+def create_security_group_rule(shade_client, secgroup_name_or_id,
+ port_range_min=None, port_range_max=None,
+ protocol=None, remote_ip_prefix=None,
+ remote_group_id=None, direction='ingress',
+ ethertype='IPv4', project_id=None):
+ """Create a new security group rule
+
+ :param secgroup_name_or_id:(string) The security group name or ID to
+ associate with this security group rule. If a
+ non-unique group name is given, an exception is
+ raised.
+ :param port_range_min:(int) The minimum port number in the range that is
+ matched by the security group rule. If the protocol
+ is TCP or UDP, this value must be less than or equal
+ to the port_range_max attribute value. If nova is
+ used by the cloud provider for security groups, then
+ a value of None will be transformed to -1.
+ :param port_range_max:(int) The maximum port number in the range that is
+ matched by the security group rule. The
+ port_range_min attribute constrains the
+ port_range_max attribute. If nova is used by the
+ cloud provider for security groups, then a value of
+ None will be transformed to -1.
+ :param protocol:(string) The protocol that is matched by the security group
+ rule. Valid values are None, tcp, udp, and icmp.
+ :param remote_ip_prefix:(string) The remote IP prefix to be associated with
+ this security group rule. This attribute matches
+ the specified IP prefix as the source IP address of
+ the IP packet.
+ :param remote_group_id:(string) The remote group ID to be associated with
+ this security group rule.
+ :param direction:(string) Ingress or egress: The direction in which the
+ security group rule is applied.
+ :param ethertype:(string) Must be IPv4 or IPv6, and addresses represented
+ in CIDR must match the ingress or egress rules.
+ :param project_id:(string) Specify the project ID this security group will
+ be created on (admin-only).
+
+ :returns: True on success.
+ """
- # Create security group using neutron client
try:
- neutron_client.create_security_group_rule(json_body)
+ shade_client.create_security_group_rule(
+ secgroup_name_or_id, port_range_min=port_range_min,
+ port_range_max=port_range_max, protocol=protocol,
+ remote_ip_prefix=remote_ip_prefix, remote_group_id=remote_group_id,
+ direction=direction, ethertype=ethertype, project_id=project_id)
return True
- except Exception: # pylint: disable=broad-except
- log.exception("Impossible to create_security_group_rule,"
- "security group rule probably already exists")
+ except exc.OpenStackCloudException as op_exc:
+ log.error("Failed to create_security_group_rule(shade_client). "
+ "Exception message: %s", op_exc.orig_message)
return False
-def create_security_group_full(neutron_client, sg_name,
- sg_description): # pragma: no cover
- sg_id = get_security_group_id(neutron_client, sg_name)
- if sg_id != '':
+def create_security_group_full(shade_client, sg_name,
+ sg_description, project_id=None):
+ security_group = shade_client.get_security_group(sg_name)
+
+ if security_group:
log.info("Using existing security group '%s'...", sg_name)
- else:
- log.info("Creating security group '%s'...", sg_name)
- SECGROUP = create_security_group(neutron_client,
- sg_name,
- sg_description)
- if not SECGROUP:
- log.error("Failed to create the security group...")
- return None
-
- sg_id = SECGROUP['id']
-
- log.debug("Security group '%s' with ID=%s created successfully.",
- SECGROUP['name'], sg_id)
-
- log.debug("Adding ICMP rules in security group '%s'...", sg_name)
- if not create_secgroup_rule(neutron_client, sg_id,
- 'ingress', 'icmp'):
- log.error("Failed to create the security group rule...")
- return None
-
- log.debug("Adding SSH rules in security group '%s'...", sg_name)
- if not create_secgroup_rule(
- neutron_client, sg_id, 'ingress', 'tcp', '22', '22'):
- log.error("Failed to create the security group rule...")
- return None
-
- if not create_secgroup_rule(
- neutron_client, sg_id, 'egress', 'tcp', '22', '22'):
- log.error("Failed to create the security group rule...")
- return None
- return sg_id
+ return security_group['id']
+
+ log.info("Creating security group '%s'...", sg_name)
+ try:
+ security_group = shade_client.create_security_group(
+ sg_name, sg_description, project_id=project_id)
+ except (exc.OpenStackCloudException,
+ exc.OpenStackCloudUnavailableFeature) as op_exc:
+ log.error("Error [create_security_group(shade_client, %s, %s)]. "
+ "Exception message: %s", sg_name, sg_description,
+ op_exc.orig_message)
+ return
+
+ log.debug("Security group '%s' with ID=%s created successfully.",
+ security_group['name'], security_group['id'])
+
+ log.debug("Adding ICMP rules in security group '%s'...", sg_name)
+ if not create_security_group_rule(shade_client, security_group['id'],
+ direction='ingress', protocol='icmp'):
+ log.error("Failed to create the security group rule...")
+ shade_client.delete_security_group(sg_name)
+ return
+
+ log.debug("Adding SSH rules in security group '%s'...", sg_name)
+ if not create_security_group_rule(shade_client, security_group['id'],
+ direction='ingress', protocol='tcp',
+ port_range_min='22',
+ port_range_max='22'):
+ log.error("Failed to create the security group rule...")
+ shade_client.delete_security_group(sg_name)
+ return
+
+ if not create_security_group_rule(shade_client, security_group['id'],
+ direction='egress', protocol='tcp',
+ port_range_min='22',
+ port_range_max='22'):
+ log.error("Failed to create the security group rule...")
+ shade_client.delete_security_group(sg_name)
+ return
+ return security_group['id']
# *********************************************
@@ -684,57 +768,94 @@ def delete_image(glance_client, image_id): # pragma: no cover
return True
+def list_images(shade_client=None):
+ if shade_client is None:
+ shade_client = get_shade_client()
+
+ try:
+ return shade_client.list_images()
+ except exc.OpenStackCloudException as o_exc:
+ log.error("Error [list_images(shade_client)]."
+ "Exception message, '%s'", o_exc.orig_message)
+ return False
+
+
# *********************************************
# CINDER
# *********************************************
-def get_volume_id(volume_name): # pragma: no cover
- volumes = get_cinder_client().volumes.list()
- return next((v.id for v in volumes if v.name == volume_name), None)
+def get_volume_id(shade_client, volume_name):
+ return shade_client.get_volume_id(volume_name)
+
+def get_volume(shade_client, name_or_id, filters=None):
+ """Get a volume by name or ID.
-def create_volume(cinder_client, volume_name, volume_size,
- volume_image=False): # pragma: no cover
+ :param name_or_id: Name or ID of the volume.
+ :param filters: A dictionary of meta data to use for further filtering.
+
+ :returns: A volume ``munch.Munch`` or None if no matching volume is found.
+ """
+ return shade_client.get_volume(name_or_id, filters=filters)
+
+
+def create_volume(shade_client, size, wait=True, timeout=None,
+ image=None, **kwargs):
+ """Create a volume.
+
+ :param size: Size, in GB of the volume to create.
+ :param name: (optional) Name for the volume.
+ :param description: (optional) Name for the volume.
+ :param wait: If true, waits for volume to be created.
+ :param timeout: Seconds to wait for volume creation. None is forever.
+ :param image: (optional) Image name, ID or object from which to create
+ the volume.
+
+ :returns: The created volume object.
+
+ """
try:
- if volume_image:
- volume = cinder_client.volumes.create(name=volume_name,
- size=volume_size,
- imageRef=volume_image)
- else:
- volume = cinder_client.volumes.create(name=volume_name,
- size=volume_size)
- return volume
- except Exception: # pylint: disable=broad-except
- log.exception("Error [create_volume(cinder_client, %s)]",
- (volume_name, volume_size))
- return None
+ return shade_client.create_volume(size, wait=wait, timeout=timeout,
+ image=image, **kwargs)
+ except (exc.OpenStackCloudException, exc.OpenStackCloudTimeout) as op_exc:
+ log.error("Failed to create_volume(shade_client). "
+ "Exception message: %s", op_exc.orig_message)
-def delete_volume(cinder_client, volume_id,
- forced=False): # pragma: no cover
+def delete_volume(shade_client, name_or_id=None, wait=True, timeout=None):
+ """Delete a volume.
+
+ :param name_or_id:(string) Name or unique ID of the volume.
+ :param wait:(bool) If true, waits for volume to be deleted.
+ :param timeout:(string) Seconds to wait for volume deletion. None is forever.
+
+ :return: True on success, False otherwise.
+ """
try:
- if forced:
- try:
- cinder_client.volumes.detach(volume_id)
- except Exception: # pylint: disable=broad-except
- log.error(sys.exc_info()[0])
- cinder_client.volumes.force_delete(volume_id)
- else:
- while True:
- volume = get_cinder_client().volumes.get(volume_id)
- if volume.status.lower() == 'available':
- break
- cinder_client.volumes.delete(volume_id)
- return True
- except Exception: # pylint: disable=broad-except
- log.exception("Error [delete_volume(cinder_client, '%s')]", volume_id)
+ return shade_client.delete_volume(name_or_id=name_or_id,
+ wait=wait, timeout=timeout)
+ except (exc.OpenStackCloudException, exc.OpenStackCloudTimeout) as o_exc:
+ log.error("Error [delete_volume(shade_client,'%s')]. "
+ "Exception message: %s", name_or_id, o_exc.orig_message)
return False
-def detach_volume(server_id, volume_id): # pragma: no cover
+def detach_volume(shade_client, server_name_or_id, volume_name_or_id,
+ wait=True, timeout=None):
+ """Detach a volume from a server.
+
+ :param server_name_or_id: The server name or id to detach from.
+ :param volume_name_or_id: The volume name or id to detach.
+ :param wait: If true, waits for volume to be detached.
+ :param timeout: Seconds to wait for volume detachment. None is forever.
+
+ :return: True on success.
+ """
try:
- get_nova_client().volumes.delete_server_volume(server_id, volume_id)
+ volume = shade_client.get_volume(volume_name_or_id)
+ server = get_server(shade_client, name_or_id=server_name_or_id)
+ shade_client.detach_volume(server, volume, wait=wait, timeout=timeout)
return True
- except Exception: # pylint: disable=broad-except
- log.exception("Error [detach_server_volume(nova_client, '%s', '%s')]",
- server_id, volume_id)
+ except (exc.OpenStackCloudException, exc.OpenStackCloudTimeout) as o_exc:
+ log.error("Error [detach_volume(shade_client)]. "
+ "Exception message: %s", o_exc.orig_message)
return False
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py
index 357f66be8..108ee17bc 100644
--- a/yardstick/common/utils.py
+++ b/yardstick/common/utils.py
@@ -23,9 +23,11 @@ import logging
import os
import random
import re
+import signal
import socket
import subprocess
import sys
+import time
import six
from flask import jsonify
@@ -34,6 +36,8 @@ from oslo_serialization import jsonutils
from oslo_utils import encodeutils
import yardstick
+from yardstick.common import exceptions
+
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
@@ -136,6 +140,11 @@ def source_env(env_file):
p = subprocess.Popen(". %s; env" % env_file, stdout=subprocess.PIPE,
shell=True)
output = p.communicate()[0]
+
+ # sometimes output type would be binary_type, and it don't have splitlines
+ # method, so we need to decode
+ if isinstance(output, six.binary_type):
+ output = encodeutils.safe_decode(output)
env = dict(line.split('=', 1) for line in output.splitlines() if '=' in line)
os.environ.update(env)
return env
@@ -400,15 +409,24 @@ class ErrorClass(object):
class Timer(object):
- def __init__(self):
+ def __init__(self, timeout=None):
super(Timer, self).__init__()
self.start = self.delta = None
+ self._timeout = int(timeout) if timeout else None
+
+ def _timeout_handler(self, *args):
+ raise exceptions.TimerTimeout(timeout=self._timeout)
def __enter__(self):
self.start = datetime.datetime.now()
+ if self._timeout:
+ signal.signal(signal.SIGALRM, self._timeout_handler)
+ signal.alarm(self._timeout)
return self
def __exit__(self, *_):
+ if self._timeout:
+ signal.alarm(0)
self.delta = datetime.datetime.now() - self.start
def __getattr__(self, item):
@@ -455,3 +473,22 @@ def open_relative_file(path, task_path):
if e.errno == errno.ENOENT:
return open(os.path.join(task_path, path))
raise
+
+
+def wait_until_true(predicate, timeout=60, sleep=1, exception=None):
+ """Wait until callable predicate is evaluated as True
+
+ :param predicate: (func) callable deciding whether waiting should continue
+ :param timeout: (int) timeout in seconds how long should function wait
+ :param sleep: (int) polling interval for results in seconds
+ :param exception: exception instance to raise on timeout. If None is passed
+ (default) then WaitTimeout exception is raised.
+ """
+ try:
+ with Timer(timeout=timeout):
+ while not predicate():
+ time.sleep(sleep)
+ except exceptions.TimerTimeout:
+ if exception and issubclass(exception, Exception):
+ raise exception # pylint: disable=raising-bad-type
+ raise exceptions.WaitTimeout
diff --git a/yardstick/network_services/collector/subscriber.py b/yardstick/network_services/collector/subscriber.py
index 7e18302eb..322b3f5a2 100644
--- a/yardstick/network_services/collector/subscriber.py
+++ b/yardstick/network_services/collector/subscriber.py
@@ -14,42 +14,29 @@
"""This module implements stub for publishing results in yardstick format."""
import logging
-from yardstick.network_services.nfvi.resource import ResourceProfile
-from yardstick.network_services.utils import get_nsb_option
-
LOG = logging.getLogger(__name__)
class Collector(object):
"""Class that handles dictionary of results in yardstick-plot format."""
- def __init__(self, vnfs, nodes, traffic_profile, timeout=3600):
+ def __init__(self, vnfs):
super(Collector, self).__init__()
- self.traffic_profile = traffic_profile
self.vnfs = vnfs
- self.nodes = nodes
- self.timeout = timeout
- self.bin_path = get_nsb_option('bin_path', '')
- self.resource_profiles = {node_name: ResourceProfile.make_from_node(node, self.timeout)
- for node_name, node in self.nodes.items()
- if node.get("collectd")}
def start(self):
- """Nothing to do, yet"""
- for resource in self.resource_profiles.values():
- resource.initiate_systemagent(self.bin_path)
- resource.start()
- resource.amqp_process_for_nfvi_kpi()
+ for vnf in self.vnfs:
+ vnf.start_collect()
def stop(self):
- """Nothing to do, yet"""
- for resource in self.resource_profiles.values():
- resource.stop()
+ for vnf in self.vnfs:
+ vnf.stop_collect()
def get_kpi(self):
"""Returns dictionary of results in yardstick-plot format
- :return:
+ :return: (dict) dictionary of kpis collected from the VNFs;
+ the keys are the names of the VNFs.
"""
results = {}
for vnf in self.vnfs:
@@ -58,17 +45,4 @@ class Collector(object):
LOG.debug("collect KPI for %s", vnf.name)
results[vnf.name] = vnf.collect_kpi()
- for node_name, resource in self.resource_profiles.items():
- # Result example:
- # {"VNF1: { "tput" : [1000, 999] }, "VNF2": { "latency": 100 }}
- LOG.debug("collect KPI for %s", node_name)
- 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'])
- # 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/constants.py b/yardstick/network_services/constants.py
index 79951e353..0064b4fc5 100644
--- a/yardstick/network_services/constants.py
+++ b/yardstick/network_services/constants.py
@@ -15,3 +15,5 @@
REMOTE_TMP = "/tmp"
DEFAULT_VNF_TIMEOUT = 3600
PROCESS_JOIN_TIMEOUT = 3
+ONE_GIGABIT_IN_BITS = 1000000000
+NIC_GBPS_DEFAULT = 10
diff --git a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
index 70ce4ff03..c538ceeba 100644
--- a/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
+++ b/yardstick/network_services/libs/ixia_libs/IxNet/IxNet.py
@@ -12,13 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import absolute_import
-from __future__ import print_function
-import sys
import logging
import re
from itertools import product
+import IxNetwork
+
log = logging.getLogger(__name__)
@@ -135,7 +134,6 @@ class IxNextgen(object):
port.append(port0)
cfg = {
- 'py_lib_path': tg_cfg["mgmt-interface"]["tg-config"]["py_lib_path"],
'machine': tg_cfg["mgmt-interface"]["ip"],
'port': tg_cfg["mgmt-interface"]["tg-config"]["tcl_port"],
'chassis': tg_cfg["mgmt-interface"]["tg-config"]["ixchassis"],
@@ -186,7 +184,7 @@ class IxNextgen(object):
self.set_random_ip_multi_attribute(ip, seeds[1], fixed_bits, random_mask, l3_count)
def add_ip_header(self, params, version):
- for it, ep, i in self.iter_over_get_lists('/traffic', 'trafficItem', "configElement", 1):
+ for _, ep, i in self.iter_over_get_lists('/traffic', 'trafficItem', "configElement", 1):
iter1 = (v['outer_l3'] for v in params.values() if str(v['id']) == str(i))
try:
l3 = next(iter1, {})
@@ -194,21 +192,13 @@ class IxNextgen(object):
except (KeyError, IndexError):
continue
- for ip, ip_bits, _ in self.iter_over_get_lists(ep, 'stack', 'field'):
+ for _, ip_bits, _ in self.iter_over_get_lists(ep, 'stack', 'field'):
self.set_random_ip_multi_attributes(ip_bits, version, seeds, l3)
self.ixnet.commit()
def _connect(self, tg_cfg):
self._cfg = self.get_config(tg_cfg)
-
- sys.path.append(self._cfg["py_lib_path"])
- # Import IxNetwork after getting ixia lib path
- try:
- import IxNetwork
- except ImportError:
- raise
-
self.ixnet = IxNetwork.IxNet()
machine = self._cfg['machine']
@@ -292,7 +282,7 @@ class IxNextgen(object):
self.update_ether_multi_attribute(ether, str(l2.get('srcmac', "00:00:00:00:00:01")))
def ix_update_ether(self, params):
- for ti, ep, index in self.iter_over_get_lists('/traffic', 'trafficItem',
+ for _, ep, index in self.iter_over_get_lists('/traffic', 'trafficItem',
"configElement", 1):
iter1 = (v['outer_l2'] for v in params.values() if str(v['id']) == str(index))
try:
@@ -300,7 +290,7 @@ class IxNextgen(object):
except KeyError:
continue
- for ip, ether, _ in self.iter_over_get_lists(ep, 'stack', 'field'):
+ for _, ether, _ in self.iter_over_get_lists(ep, 'stack', 'field'):
self.update_ether_multi_attributes(ether, l2)
self.ixnet.commit()
diff --git a/yardstick/network_services/nfvi/resource.py b/yardstick/network_services/nfvi/resource.py
index dc5c46a86..0c0bf223a 100644
--- a/yardstick/network_services/nfvi/resource.py
+++ b/yardstick/network_services/nfvi/resource.py
@@ -27,6 +27,7 @@ from oslo_config import cfg
from oslo_utils.encodeutils import safe_decode
from yardstick import ssh
+from yardstick.common.exceptions import ResourceCommandError
from yardstick.common.task_template import finalize_for_yaml
from yardstick.common.utils import validate_non_string_sequence
from yardstick.network_services.nfvi.collectd import AmqpConsumer
@@ -249,45 +250,46 @@ class ResourceProfile(object):
if status != 0:
LOG.error("cannot find OVS socket %s", socket_path)
+ def _start_rabbitmq(self, connection):
+ # Reset amqp queue
+ LOG.debug("reset and setup amqp to collect data from collectd")
+ # ensure collectd.conf.d exists to avoid error/warning
+ cmd_list = ["sudo mkdir -p /etc/collectd/collectd.conf.d",
+ "sudo service rabbitmq-server restart",
+ "sudo rabbitmqctl stop_app",
+ "sudo rabbitmqctl reset",
+ "sudo rabbitmqctl start_app",
+ "sudo rabbitmqctl add_user admin admin",
+ "sudo rabbitmqctl authenticate_user admin admin",
+ "sudo rabbitmqctl set_permissions -p / admin '.*' '.*' '.*'"
+ ]
+ for cmd in cmd_list:
+ exit_status, stdout, stderr = connection.execute(cmd)
+ if exit_status != 0:
+ raise ResourceCommandError(command=cmd, stderr=stderr)
+
+ # check stdout for "sudo rabbitmqctl status" command
+ cmd = "sudo rabbitmqctl status"
+ _, stdout, stderr = connection.execute(cmd)
+ if not re.search("RabbitMQ", stdout):
+ LOG.error("rabbitmqctl status don't have RabbitMQ in running apps")
+ raise ResourceCommandError(command=cmd, stderr=stderr)
+
def _start_collectd(self, connection, bin_path):
LOG.debug("Starting collectd to collect NFVi stats")
- connection.execute('sudo pkill -x -9 collectd')
collectd_path = os.path.join(bin_path, "collectd", "sbin", "collectd")
config_file_path = os.path.join(bin_path, "collectd", "etc")
+ self._prepare_collectd_conf(config_file_path)
+
+ connection.execute('sudo pkill -x -9 collectd')
exit_status = connection.execute("which %s > /dev/null 2>&1" % collectd_path)[0]
if exit_status != 0:
LOG.warning("%s is not present disabling", collectd_path)
- # disable auto-provisioning because it requires Internet access
- # collectd_installer = os.path.join(bin_path, "collectd.sh")
- # provision_tool(connection, collectd)
- # http_proxy = os.environ.get('http_proxy', '')
- # https_proxy = os.environ.get('https_proxy', '')
- # connection.execute("sudo %s '%s' '%s'" % (
- # collectd_installer, http_proxy, https_proxy))
return
if "ovs_stats" in self.plugins:
self._setup_ovs_stats(connection)
LOG.debug("Starting collectd to collect NFVi stats")
- # ensure collectd.conf.d exists to avoid error/warning
- connection.execute("sudo mkdir -p /etc/collectd/collectd.conf.d")
- self._prepare_collectd_conf(config_file_path)
-
- # Reset amqp queue
- LOG.debug("reset and setup amqp to collect data from collectd")
- connection.execute("sudo rm -rf /var/lib/rabbitmq/mnesia/rabbit*")
- connection.execute("sudo service rabbitmq-server start")
- connection.execute("sudo rabbitmqctl stop_app")
- connection.execute("sudo rabbitmqctl reset")
- connection.execute("sudo rabbitmqctl start_app")
- connection.execute("sudo service rabbitmq-server restart")
-
- LOG.debug("Creating admin user for rabbitmq in order to collect data from collectd")
- connection.execute("sudo rabbitmqctl delete_user guest")
- connection.execute("sudo rabbitmqctl add_user admin admin")
- connection.execute("sudo rabbitmqctl authenticate_user admin admin")
- connection.execute("sudo rabbitmqctl set_permissions -p / admin '.*' '.*' '.*'")
-
LOG.debug("Start collectd service..... %s second timeout", self.timeout)
# intel_pmu plug requires large numbers of files open, so try to set
# ulimit -n to a large value
@@ -299,9 +301,10 @@ class ResourceProfile(object):
""" Start system agent for NFVi collection on host """
if self.enable:
try:
+ self._start_rabbitmq(self.connection)
self._start_collectd(self.connection, bin_path)
- except Exception:
- LOG.exception("Exception during collectd start")
+ except ResourceCommandError as e:
+ LOG.exception("Exception during collectd and rabbitmq start: %s", str(e))
raise
def start(self):
diff --git a/yardstick/network_services/traffic_profile/prox_binsearch.py b/yardstick/network_services/traffic_profile/prox_binsearch.py
index 5700f98e5..7a84f1365 100644
--- a/yardstick/network_services/traffic_profile/prox_binsearch.py
+++ b/yardstick/network_services/traffic_profile/prox_binsearch.py
@@ -20,6 +20,7 @@ import datetime
import time
from yardstick.network_services.traffic_profile.prox_profile import ProxProfile
+from yardstick.network_services import constants
LOG = logging.getLogger(__name__)
@@ -99,9 +100,13 @@ class ProxBinSearchProfile(ProxProfile):
# throughput and packet loss from the most recent successful test
successful_pkt_loss = 0.0
+ line_speed = traffic_gen.scenario_helper.all_options.get(
+ "interface_speed_gbps", constants.NIC_GBPS_DEFAULT) * constants.ONE_GIGABIT_IN_BITS
for test_value in self.bounds_iterator(LOG):
result, port_samples = self._profile_helper.run_test(pkt_size, duration,
- test_value, self.tolerated_loss)
+ test_value,
+ self.tolerated_loss,
+ line_speed)
self.curr_time = time.time()
diff_time = self.curr_time - self.prev_time
self.prev_time = self.curr_time
@@ -111,7 +116,6 @@ class ProxBinSearchProfile(ProxProfile):
self.current_lower = test_value
successful_pkt_loss = result.pkt_loss
samples = result.get_samples(pkt_size, successful_pkt_loss, port_samples)
- samples["TxThroughput"] = samples["TxThroughput"] * 1000 * 1000
# store results with success tag in influxdb
success_samples = {'Success_' + key: value for key, value in samples.items()}
diff --git a/yardstick/network_services/vnf_generic/vnf/base.py b/yardstick/network_services/vnf_generic/vnf/base.py
index a776b0989..9ceac3167 100644
--- a/yardstick/network_services/vnf_generic/vnf/base.py
+++ b/yardstick/network_services/vnf_generic/vnf/base.py
@@ -195,6 +195,18 @@ class GenericVNF(object):
:return: {"kpi": value, "kpi2": value}
"""
+ @abc.abstractmethod
+ def start_collect(self):
+ """Start KPI collection
+ :return: None
+ """
+
+ @abc.abstractmethod
+ def stop_collect(self):
+ """Stop KPI collection
+ :return: None
+ """
+
@six.add_metaclass(abc.ABCMeta)
class GenericTrafficGen(GenericVNF):
@@ -254,3 +266,23 @@ class GenericTrafficGen(GenericVNF):
:return: True/False
"""
pass
+
+ def start_collect(self):
+ """Start KPI collection.
+
+ Traffic measurements are always collected during injection.
+
+ Optional.
+
+ :return: True/False
+ """
+ pass
+
+ def stop_collect(self):
+ """Stop KPI collection.
+
+ Optional.
+
+ :return: True/False
+ """
+ pass
diff --git a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
index 29f9c7bba..31ed30140 100644
--- a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
+++ b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py
@@ -35,6 +35,7 @@ from yardstick.common.utils import SocketTopology, join_non_strings, try_int
from yardstick.network_services.helpers.iniparser import ConfigParser
from yardstick.network_services.vnf_generic.vnf.sample_vnf import ClientResourceHelper
from yardstick.network_services.vnf_generic.vnf.sample_vnf import DpdkVnfSetupEnvHelper
+from yardstick.network_services import constants
PROX_PORT = 8474
@@ -44,7 +45,6 @@ SECTION_CONTENTS = 1
LOG = logging.getLogger(__name__)
LOG.setLevel(logging.DEBUG)
-TEN_GIGABIT = 1e10
BITS_PER_BYTE = 8
RETRY_SECONDS = 60
RETRY_INTERVAL = 1
@@ -466,13 +466,14 @@ class ProxSocketHelper(object):
core_data['current'] = core_data[key1] + core_data[key2]
self.set_speed(core_data['cores'], core_data['current'])
- def set_pps(self, cores, pps, pkt_size):
+ def set_pps(self, cores, pps, pkt_size,
+ line_speed=(constants.ONE_GIGABIT_IN_BITS * constants.NIC_GBPS_DEFAULT)):
""" set packets per second for specific cores on the remote instance """
msg = "Set packets per sec for core(s) %s to %g%% of line rate (packet size: %d)"
LOG.debug(msg, cores, pps, pkt_size)
# speed in percent of line-rate
- speed = float(pps) * (pkt_size + 20) / TEN_GIGABIT / BITS_PER_BYTE
+ speed = float(pps) * (pkt_size + 20) / line_speed / BITS_PER_BYTE
self._run_template_over_cores("speed {} 0 {}\n", cores, speed)
def lat_stats(self, cores, task=0):
@@ -698,6 +699,20 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper):
mac = intf["virtual-interface"]["dst_mac"]
section_data[1] = mac
+ if item_val.startswith("@@src_mac"):
+ tx_port_iter = re.finditer(r'\d+', item_val)
+ tx_port_no = int(next(tx_port_iter).group(0))
+ intf = self.vnfd_helper.find_interface_by_port(tx_port_no)
+ mac = intf["virtual-interface"]["local_mac"]
+ section_data[1] = mac.replace(":", " ", 6)
+
+ if item_key == "src mac" and item_val.startswith("@@"):
+ tx_port_iter = re.finditer(r'\d+', item_val)
+ tx_port_no = int(next(tx_port_iter).group(0))
+ intf = self.vnfd_helper.find_interface_by_port(tx_port_no)
+ mac = intf["virtual-interface"]["local_mac"]
+ section_data[1] = mac
+
# if addition file specified in prox config
if not self.additional_files:
return sections
@@ -967,12 +982,13 @@ class ProxResourceHelper(ClientResourceHelper):
class ProxDataHelper(object):
- def __init__(self, vnfd_helper, sut, pkt_size, value, tolerated_loss):
+ def __init__(self, vnfd_helper, sut, pkt_size, value, tolerated_loss, line_speed):
super(ProxDataHelper, self).__init__()
self.vnfd_helper = vnfd_helper
self.sut = sut
self.pkt_size = pkt_size
self.value = value
+ self.line_speed = line_speed
self.tolerated_loss = tolerated_loss
self.port_count = len(self.vnfd_helper.port_pairs.all_ports)
self.tsc_hz = None
@@ -1058,9 +1074,7 @@ class ProxDataHelper(object):
self.tsc_hz = float(self.sut.hz())
def line_rate_to_pps(self):
- # NOTE: to fix, don't hardcode 10Gb/s
- return self.port_count * TEN_GIGABIT / BITS_PER_BYTE / (self.pkt_size + 20)
-
+ return self.port_count * self.line_speed / BITS_PER_BYTE / (self.pkt_size + 20)
class ProxProfileHelper(object):
@@ -1139,8 +1153,10 @@ class ProxProfileHelper(object):
return cores
- def run_test(self, pkt_size, duration, value, tolerated_loss=0.0):
- data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size, value, tolerated_loss)
+ def run_test(self, pkt_size, duration, value, tolerated_loss=0.0,
+ line_speed=(constants.ONE_GIGABIT_IN_BITS * constants.NIC_GBPS_DEFAULT)):
+ data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size,
+ value, tolerated_loss, line_speed)
with data_helper, self.traffic_context(pkt_size, value):
with data_helper.measure_tot_stats():
@@ -1396,8 +1412,10 @@ class ProxBngProfileHelper(ProxProfileHelper):
time.sleep(3)
self.sut.stop(self.all_rx_cores)
- def run_test(self, pkt_size, duration, value, tolerated_loss=0.0):
- data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size, value, tolerated_loss)
+ def run_test(self, pkt_size, duration, value, tolerated_loss=0.0,
+ line_speed=(constants.ONE_GIGABIT_IN_BITS * constants.NIC_GBPS_DEFAULT)):
+ data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size,
+ value, tolerated_loss, line_speed)
with data_helper, self.traffic_context(pkt_size, value):
with data_helper.measure_tot_stats():
@@ -1583,8 +1601,10 @@ class ProxVpeProfileHelper(ProxProfileHelper):
time.sleep(3)
self.sut.stop(self.all_rx_cores)
- def run_test(self, pkt_size, duration, value, tolerated_loss=0.0):
- data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size, value, tolerated_loss)
+ def run_test(self, pkt_size, duration, value, tolerated_loss=0.0,
+ line_speed=(constants.ONE_GIGABIT_IN_BITS * constants.NIC_GBPS_DEFAULT)):
+ data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size,
+ value, tolerated_loss, line_speed)
with data_helper, self.traffic_context(pkt_size, value):
with data_helper.measure_tot_stats():
@@ -1772,8 +1792,10 @@ class ProxlwAFTRProfileHelper(ProxProfileHelper):
time.sleep(3)
self.sut.stop(self.all_rx_cores)
- def run_test(self, pkt_size, duration, value, tolerated_loss=0.0):
- data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size, value, tolerated_loss)
+ def run_test(self, pkt_size, duration, value, tolerated_loss=0.0,
+ line_speed=(constants.ONE_GIGABIT_IN_BITS * constants.NIC_GBPS_DEFAULT)):
+ data_helper = ProxDataHelper(self.vnfd_helper, self.sut, pkt_size,
+ value, tolerated_loss, line_speed)
with data_helper, self.traffic_context(pkt_size, value):
with data_helper.measure_tot_stats():
diff --git a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
index 2cdb3f904..285e08659 100644
--- a/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/prox_vnf.py
@@ -22,7 +22,7 @@ from yardstick.common.process import check_if_process_failed
from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxDpdkVnfSetupEnvHelper
from yardstick.network_services.vnf_generic.vnf.prox_helpers import ProxResourceHelper
from yardstick.network_services.vnf_generic.vnf.sample_vnf import SampleVNF
-from yardstick.network_services.constants import PROCESS_JOIN_TIMEOUT
+from yardstick.network_services import constants
LOG = logging.getLogger(__name__)
@@ -136,5 +136,5 @@ class ProxApproxVnf(SampleVNF):
self._tear_down()
if self._vnf_process is not None:
LOG.debug("joining before terminate %s", self._vnf_process.name)
- self._vnf_process.join(PROCESS_JOIN_TIMEOUT)
+ self._vnf_process.join(constants.PROCESS_JOIN_TIMEOUT)
self._vnf_process.terminate()
diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
index f16b4142d..34b0260b4 100644
--- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
+++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py
@@ -32,12 +32,9 @@ from yardstick.benchmark.contexts.base import Context
from yardstick.common import exceptions as y_exceptions
from yardstick.common.process import check_if_process_failed
from yardstick.common import utils
-from yardstick.network_services.constants import DEFAULT_VNF_TIMEOUT
-from yardstick.network_services.constants import PROCESS_JOIN_TIMEOUT
-from yardstick.network_services.constants import REMOTE_TMP
+from yardstick.network_services import constants
from yardstick.network_services.helpers.dpdkbindnic_helper import DpdkBindHelper, DpdkNode
from yardstick.network_services.helpers.samplevnf_helper import MultiPortConfig
-from yardstick.network_services.helpers.samplevnf_helper import PortPairs
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 GenericTrafficGen
@@ -51,8 +48,8 @@ LOG = logging.getLogger(__name__)
class SetupEnvHelper(object):
- CFG_CONFIG = os.path.join(REMOTE_TMP, "sample_config")
- CFG_SCRIPT = os.path.join(REMOTE_TMP, "sample_script")
+ CFG_CONFIG = os.path.join(constants.REMOTE_TMP, "sample_config")
+ CFG_SCRIPT = os.path.join(constants.REMOTE_TMP, "sample_script")
DEFAULT_CONFIG_TPL_CFG = "sample.cfg"
PIPELINE_COMMAND = ''
VNF_TYPE = "SAMPLE"
@@ -62,6 +59,7 @@ class SetupEnvHelper(object):
self.vnfd_helper = vnfd_helper
self.ssh_helper = ssh_helper
self.scenario_helper = scenario_helper
+ self.collectd_options = {}
def build_config(self):
raise NotImplementedError
@@ -81,7 +79,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
APP_NAME = 'DpdkVnf'
FIND_NET_CMD = "find /sys/class/net -lname '*{}*' -printf '%f'"
NR_HUGEPAGES_PATH = '/proc/sys/vm/nr_hugepages'
- HUGEPAGES_KB = 1024 * 1024 * 16
@staticmethod
def _update_packet_type(ip_pipeline_cfg, traffic_options):
@@ -120,7 +117,8 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
def _setup_hugepages(self):
meminfo = utils.read_meminfo(self.ssh_helper)
hp_size_kb = int(meminfo['Hugepagesize'])
- nr_hugepages = int(abs(self.HUGEPAGES_KB / hp_size_kb))
+ hugepages_gb = self.scenario_helper.all_options.get('hugepages_gb', 16)
+ nr_hugepages = int(abs(hugepages_gb * 1024 * 1024 / hp_size_kb))
self.ssh_helper.execute('echo %s | sudo tee %s' %
(nr_hugepages, self.NR_HUGEPAGES_PATH))
hp = six.BytesIO()
@@ -227,12 +225,6 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
if exit_status == 0:
return
- def get_collectd_options(self):
- options = self.scenario_helper.all_options.get("collectd", {})
- # override with specific node settings
- options.update(self.scenario_helper.options.get("collectd", {}))
- return options
-
def _setup_resources(self):
# what is this magic? how do we know which socket is for which port?
# what about quad-socket?
@@ -245,11 +237,11 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper):
# this won't work because we don't have DPDK port numbers yet
ports = sorted(self.vnfd_helper.interfaces, key=self.vnfd_helper.port_num)
port_names = (intf["name"] for intf in ports)
- collectd_options = self.get_collectd_options()
- plugins = collectd_options.get("plugins", {})
+ plugins = self.collectd_options.get("plugins", {})
+ interval = self.collectd_options.get("interval")
# we must set timeout to be the same as the VNF otherwise KPIs will die before VNF
return ResourceProfile(self.vnfd_helper.mgmt_interface, port_names=port_names,
- plugins=plugins, interval=collectd_options.get("interval"),
+ plugins=plugins, interval=interval,
timeout=self.scenario_helper.timeout)
def _check_interface_fields(self):
@@ -371,7 +363,7 @@ class ClientResourceHelper(ResourceHelper):
try:
return self.client.get_stats(*args, **kwargs)
except STLError:
- LOG.exception("TRex client not connected")
+ LOG.error('TRex client not connected')
return {}
def generate_samples(self, ports, key=None, default=None):
@@ -609,8 +601,10 @@ class ScenarioHelper(object):
@property
def timeout(self):
- return self.options.get('timeout', DEFAULT_VNF_TIMEOUT)
-
+ test_duration = self.scenario_cfg.get('runner', {}).get('duration',
+ self.options.get('timeout', constants.DEFAULT_VNF_TIMEOUT))
+ test_timeout = self.options.get('timeout', constants.DEFAULT_VNF_TIMEOUT)
+ return test_duration if test_duration > test_timeout else test_timeout
class SampleVNF(GenericVNF):
""" Class providing file-like API for generic VNF implementation """
@@ -657,49 +651,6 @@ class SampleVNF(GenericVNF):
self.vnf_port_pairs = None
self._vnf_process = None
- def _build_ports(self):
- self._port_pairs = PortPairs(self.vnfd_helper.interfaces)
- self.networks = self._port_pairs.networks
- self.uplink_ports = self.vnfd_helper.port_nums(self._port_pairs.uplink_ports)
- self.downlink_ports = self.vnfd_helper.port_nums(self._port_pairs.downlink_ports)
- self.my_ports = self.vnfd_helper.port_nums(self._port_pairs.all_ports)
-
- def _get_route_data(self, route_index, route_type):
- route_iter = iter(self.vnfd_helper.vdu0.get('nd_route_tbl', []))
- for _ in range(route_index):
- next(route_iter, '')
- return next(route_iter, {}).get(route_type, '')
-
- def _get_port0localip6(self):
- return_value = self._get_route_data(0, 'network')
- LOG.info("_get_port0localip6 : %s", return_value)
- return return_value
-
- def _get_port1localip6(self):
- return_value = self._get_route_data(1, 'network')
- LOG.info("_get_port1localip6 : %s", return_value)
- return return_value
-
- def _get_port0prefixlen6(self):
- return_value = self._get_route_data(0, 'netmask')
- LOG.info("_get_port0prefixlen6 : %s", return_value)
- return return_value
-
- def _get_port1prefixlen6(self):
- return_value = self._get_route_data(1, 'netmask')
- LOG.info("_get_port1prefixlen6 : %s", return_value)
- return return_value
-
- def _get_port0gateway6(self):
- return_value = self._get_route_data(0, 'network')
- LOG.info("_get_port0gateway6 : %s", return_value)
- return return_value
-
- def _get_port1gateway6(self):
- return_value = self._get_route_data(1, 'network')
- LOG.info("_get_port1gateway6 : %s", return_value)
- return return_value
-
def _start_vnf(self):
self.queue_wrapper = QueueFileWrapper(self.q_in, self.q_out, self.VNF_PROMPT)
name = "{}-{}-{}".format(self.name, self.APP_NAME, os.getpid())
@@ -710,6 +661,7 @@ class SampleVNF(GenericVNF):
pass
def instantiate(self, scenario_cfg, context_cfg):
+ self._update_collectd_options(scenario_cfg, context_cfg)
self.scenario_helper.scenario_cfg = scenario_cfg
self.context_cfg = context_cfg
self.nfvi_context = Context.get_context_from_server(self.scenario_helper.nodes[self.name])
@@ -721,6 +673,54 @@ class SampleVNF(GenericVNF):
self.resource_helper.setup()
self._start_vnf()
+ def _update_collectd_options(self, scenario_cfg, context_cfg):
+ """Update collectd configuration options
+ This function retrieves all collectd options contained in the test case
+
+ definition builds a single dictionary combining them. The following fragment
+ represents a test case with the collectd options and priorities (1 highest, 3 lowest):
+ ---
+ schema: yardstick:task:0.1
+ scenarios:
+ - type: NSPerf
+ nodes:
+ tg__0: trafficgen_1.yardstick
+ vnf__0: vnf.yardstick
+ options:
+ collectd:
+ <options> # COLLECTD priority 3
+ vnf__0:
+ collectd:
+ plugins:
+ load
+ <options> # COLLECTD priority 2
+ context:
+ type: Node
+ name: yardstick
+ nfvi_type: baremetal
+ file: /etc/yardstick/nodes/pod_ixia.yaml # COLLECTD priority 1
+ """
+ scenario_options = scenario_cfg.get('options', {})
+ generic_options = scenario_options.get('collectd', {})
+ scenario_node_options = scenario_options.get(self.name, {})\
+ .get('collectd', {})
+ context_node_options = context_cfg.get('nodes', {})\
+ .get(self.name, {}).get('collectd', {})
+
+ options = generic_options
+ self._update_options(options, scenario_node_options)
+ self._update_options(options, context_node_options)
+
+ self.setup_helper.collectd_options = options
+
+ def _update_options(self, options, additional_options):
+ """Update collectd options and plugins dictionary"""
+ for k, v in additional_options.items():
+ if isinstance(v, dict) and k in options:
+ options[k].update(v)
+ else:
+ options[k] = v
+
def wait_for_instantiate(self):
buf = []
time.sleep(self.WAIT_TIME) # Give some time for config to load
@@ -736,7 +736,6 @@ class SampleVNF(GenericVNF):
LOG.info("%s VNF is up and running.", self.APP_NAME)
self._vnf_up_post()
self.queue_wrapper.clear()
- self.resource_helper.start_collect()
return self._vnf_process.exitcode
if "PANIC" in message:
@@ -749,6 +748,12 @@ class SampleVNF(GenericVNF):
# by other VNF output
self.q_in.put('\r\n')
+ def start_collect(self):
+ self.resource_helper.start_collect()
+
+ def stop_collect(self):
+ self.resource_helper.stop_collect()
+
def _build_run_kwargs(self):
self.run_kwargs = {
'stdin': self.queue_wrapper,
@@ -794,7 +799,7 @@ class SampleVNF(GenericVNF):
if self._vnf_process is not None:
# be proper and join first before we kill
LOG.debug("joining before terminate %s", self._vnf_process.name)
- self._vnf_process.join(PROCESS_JOIN_TIMEOUT)
+ self._vnf_process.join(constants.PROCESS_JOIN_TIMEOUT)
self._vnf_process.terminate()
# no terminate children here because we share processes with tg
@@ -938,12 +943,12 @@ class SampleVNFTrafficGen(GenericTrafficGen):
if self._traffic_process is not None:
# be proper and try to join before terminating
LOG.debug("joining before terminate %s", self._traffic_process.name)
- self._traffic_process.join(PROCESS_JOIN_TIMEOUT)
+ self._traffic_process.join(constants.PROCESS_JOIN_TIMEOUT)
self._traffic_process.terminate()
if self._tg_process is not None:
# be proper and try to join before terminating
LOG.debug("joining before terminate %s", self._tg_process.name)
- self._tg_process.join(PROCESS_JOIN_TIMEOUT)
+ self._tg_process.join(constants.PROCESS_JOIN_TIMEOUT)
self._tg_process.terminate()
# no terminate children here because we share processes with vnf
diff --git a/yardstick/network_services/vnf_generic/vnf/vnf_ssh_helper.py b/yardstick/network_services/vnf_generic/vnf/vnf_ssh_helper.py
index 8e02cf3ac..de6fd9329 100644
--- a/yardstick/network_services/vnf_generic/vnf/vnf_ssh_helper.py
+++ b/yardstick/network_services/vnf_generic/vnf/vnf_ssh_helper.py
@@ -17,7 +17,7 @@ import os
from six.moves import StringIO
-from yardstick.network_services.constants import REMOTE_TMP
+from yardstick.network_services import constants
from yardstick.ssh import AutoConnectSSH
LOG = logging.getLogger(__name__)
@@ -46,7 +46,7 @@ class VnfSshHelper(AutoConnectSSH):
return self.get_class()(self.node, self.bin_path)
def upload_config_file(self, prefix, content):
- cfg_file = os.path.join(REMOTE_TMP, prefix)
+ cfg_file = os.path.join(constants.REMOTE_TMP, prefix)
LOG.debug(content)
file_obj = StringIO(content)
self.put_file_obj(file_obj, cfg_file)
diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py
index d69f86044..e0c0db262 100644
--- a/yardstick/orchestrator/heat.py
+++ b/yardstick/orchestrator/heat.py
@@ -15,18 +15,20 @@ import datetime
import getpass
import logging
import pkg_resources
+import pprint
import socket
import tempfile
import time
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
-import shade
+from shade._heat import event_utils
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import constants as consts
from yardstick.common import exceptions
from yardstick.common import template_format
-from yardstick.common import constants as consts
+from yardstick.common import openstack_utils as op_utils
+
log = logging.getLogger(__name__)
@@ -39,10 +41,11 @@ _DEPLOYED_STACKS = {}
class HeatStack(object):
"""Represents a Heat stack (deployed template) """
- def __init__(self, name):
+ def __init__(self, name, os_cloud_config=None):
self.name = name
self.outputs = {}
- self._cloud = shade.openstack_cloud()
+ os_cloud_config = {} if not os_cloud_config else os_cloud_config
+ self._cloud = op_utils.get_shade_client(**os_cloud_config)
self._stack = None
def _update_stack_tracking(self):
@@ -63,6 +66,10 @@ class HeatStack(object):
self._update_stack_tracking()
+ def get_failures(self):
+ return event_utils.get_events(self._cloud, self._stack.id,
+ event_args={'resource_status': 'FAILED'})
+
def get(self):
"""Retrieves an existing stack from the target cloud
@@ -146,10 +153,12 @@ name (i.e. %s).
# short hand for resources part of template
self.resources = self._template['resources']
- def __init__(self, name, template_file=None, heat_parameters=None):
+ def __init__(self, name, template_file=None, heat_parameters=None,
+ os_cloud_config=None):
self.name = name
self.keystone_client = None
self.heat_parameters = {}
+ self._os_cloud_config = {} if not os_cloud_config else os_cloud_config
# heat_parameters is passed to heat in stack create, empty dict when
# yardstick creates the template (no get_param in resources part)
@@ -616,7 +625,7 @@ name (i.e. %s).
log.info("Creating stack '%s' START", self.name)
start_time = time.time()
- stack = HeatStack(self.name)
+ stack = HeatStack(self.name, os_cloud_config=self._os_cloud_config)
stack.create(self._template, self.heat_parameters, block, timeout)
if not block:
@@ -625,6 +634,9 @@ name (i.e. %s).
return stack
if stack.status != self.HEAT_STATUS_COMPLETE:
+ for event in stack.get_failures():
+ log.error("%s", event.resource_status_reason)
+ log.error(pprint.pformat(self._template))
raise exceptions.HeatTemplateError(stack_name=self.name)
log.info("Creating stack '%s' DONE in %d secs",
diff --git a/yardstick/service/__init__.py b/yardstick/service/__init__.py
new file mode 100644
index 000000000..1c3953de6
--- /dev/null
+++ b/yardstick/service/__init__.py
@@ -0,0 +1,12 @@
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+
+class Service(object):
+ pass
diff --git a/yardstick/service/environment.py b/yardstick/service/environment.py
new file mode 100644
index 000000000..324589f79
--- /dev/null
+++ b/yardstick/service/environment.py
@@ -0,0 +1,101 @@
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+import tempfile
+import logging
+import collections
+
+from oslo_serialization import jsonutils
+
+from yardstick.service import Service
+from yardstick.common.exceptions import MissingPodInfoError
+from yardstick.common.exceptions import UnsupportedPodFormatError
+from yardstick.common.ansible_common import AnsibleCommon
+
+LOG = logging.getLogger(__name__)
+
+
+class Environment(Service):
+ def __init__(self, pod=None):
+ super(Environment, self).__init__()
+ # pod can be a dict or a json format string
+ self.pod = pod
+
+ def get_sut_info(self):
+ temdir = tempfile.mkdtemp(prefix='sut')
+
+ nodes = self._load_pod_info()
+ ansible = AnsibleCommon(nodes=nodes)
+ ansible.gen_inventory_ini_dict()
+ sut_info = ansible.get_sut_info(temdir)
+
+ return self._format_sut_info(sut_info)
+
+ def _load_pod_info(self):
+ if self.pod is None:
+ raise MissingPodInfoError
+
+ if isinstance(self.pod, collections.Mapping):
+ try:
+ return self.pod['nodes']
+ except KeyError:
+ raise UnsupportedPodFormatError
+
+ try:
+ return jsonutils.loads(self.pod)['nodes']
+ except (ValueError, KeyError):
+ raise UnsupportedPodFormatError
+
+ def _format_sut_info(self, sut_info):
+ return {k: self._format_node_info(v) for k, v in sut_info.items()}
+
+ def _format_node_info(self, node_info):
+ info = []
+ facts = node_info.get('ansible_facts', {})
+
+ info.append(['hostname', facts.get('ansible_hostname')])
+
+ info.append(['product_name', facts.get('ansible_product_name')])
+ info.append(['product_version', facts.get('ansible_product_version')])
+
+ processors = facts.get('ansible_processor', [])
+ try:
+ processor_type = '{} {}'.format(processors[0], processors[1])
+ except IndexError:
+ LOG.exception('No Processor in SUT data')
+ processor_type = None
+
+ info.append(['processor_type', processor_type])
+ info.append(['architecture', facts.get('ansible_architecture')])
+ info.append(['processor_cores', facts.get('ansible_processor_cores')])
+ info.append(['processor_vcpus', facts.get('ansible_processor_vcpus')])
+
+ memory = facts.get('ansible_memtotal_mb')
+ memory = round(memory * 1.0 / 1024, 2) if memory else None
+ info.append(['memory', '{} GB'.format(memory)])
+
+ devices = facts.get('ansible_devices', {})
+ info.extend([self._get_device_info(k, v) for k, v in devices.items()])
+
+ lsb_description = facts.get('ansible_lsb', {}).get('description')
+ info.append(['OS', lsb_description])
+
+ interfaces = facts.get('ansible_interfaces')
+ info.append(['interfaces', interfaces])
+ if isinstance(interfaces, collections.Sequence):
+ info.extend([self._get_interface_info(facts, i) for i in interfaces])
+ info = [i for i in info if i]
+
+ return info
+
+ def _get_interface_info(self, facts, name):
+ mac = facts.get('ansible_{}'.format(name), {}).get('macaddress')
+ return [name, mac] if mac else []
+
+ def _get_device_info(self, name, info):
+ return ['disk_{}'.format(name), info.get('size')]
diff --git a/tests/unit/network_services/collector/__init__.py b/yardstick/tests/functional/common/messaging/__init__.py
index e69de29bb..e69de29bb 100644
--- a/tests/unit/network_services/collector/__init__.py
+++ b/yardstick/tests/functional/common/messaging/__init__.py
diff --git a/yardstick/tests/functional/common/messaging/test_messaging.py b/yardstick/tests/functional/common/messaging/test_messaging.py
new file mode 100644
index 000000000..99874343b
--- /dev/null
+++ b/yardstick/tests/functional/common/messaging/test_messaging.py
@@ -0,0 +1,99 @@
+# 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.
+
+import multiprocessing
+import time
+
+from yardstick.common.messaging import consumer
+from yardstick.common.messaging import payloads
+from yardstick.common.messaging import producer
+from yardstick.tests.functional import base
+
+
+TOPIC = 'topic_MQ'
+METHOD_INFO = 'info'
+
+
+class DummyPayload(payloads.Payload):
+ REQUIRED_FIELDS = {'version', 'data'}
+
+
+class DummyEndpoint(consumer.NotificationHandler):
+
+ def info(self, ctxt, **kwargs):
+ if ctxt['pid'] in self._ctx_pids:
+ self._queue.put('ID {}, data: {}, pid: {}'.format(
+ self._id, kwargs['data'], ctxt['pid']))
+
+
+class DummyConsumer(consumer.MessagingConsumer):
+
+ def __init__(self, _id, ctx_pids, queue):
+ self._id = _id
+ endpoints = [DummyEndpoint(_id, ctx_pids, queue)]
+ super(DummyConsumer, self).__init__(TOPIC, ctx_pids, endpoints)
+
+
+class DummyProducer(producer.MessagingProducer):
+ pass
+
+
+def _run_consumer(_id, ctx_pids, queue):
+ _consumer = DummyConsumer(_id, ctx_pids, queue)
+ _consumer.start_rpc_server()
+ _consumer.wait()
+
+
+class MessagingTestCase(base.BaseFunctionalTestCase):
+
+ @staticmethod
+ def _terminate_consumers(num_consumers, processes):
+ for i in range(num_consumers):
+ processes[i].terminate()
+
+ def test_run_five_consumers(self):
+ output_queue = multiprocessing.Queue()
+ num_consumers = 10
+ ctx_1 = 100001
+ ctx_2 = 100002
+ producers = [DummyProducer(TOPIC, pid=ctx_1),
+ DummyProducer(TOPIC, pid=ctx_2)]
+
+ processes = []
+ for i in range(num_consumers):
+ processes.append(multiprocessing.Process(
+ name='consumer_{}'.format(i),
+ target=_run_consumer,
+ args=(i, [ctx_1, ctx_2], output_queue)))
+ processes[i].start()
+ self.addCleanup(self._terminate_consumers, num_consumers, processes)
+
+ time.sleep(2) # Let consumers to create the listeners
+ for producer in producers:
+ for message in ['message 0', 'message 1']:
+ producer.send_message(METHOD_INFO,
+ DummyPayload(version=1, data=message))
+
+ time.sleep(2) # Let consumers attend the calls
+ output = []
+ while not output_queue.empty():
+ output.append(output_queue.get(True, 1))
+
+ self.assertEqual(num_consumers * 4, len(output))
+ msg_template = 'ID {}, data: {}, pid: {}'
+ for i in range(num_consumers):
+ for ctx in [ctx_1, ctx_2]:
+ for message in ['message 0', 'message 1']:
+ msg = msg_template.format(i, message, ctx)
+ self.assertIn(msg, output)
diff --git a/yardstick/tests/integration/dummy-scenario-heat-context.yaml b/yardstick/tests/integration/dummy-scenario-heat-context.yaml
new file mode 100644
index 000000000..45a39951a
--- /dev/null
+++ b/yardstick/tests/integration/dummy-scenario-heat-context.yaml
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2018 Intel
+#
+# 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
+##############################################################################
+{% set context_name = context_name or "demo" %}
+---
+# Sample Heat context config with Dummy context
+
+schema: "yardstick:task:0.1"
+
+scenarios:
+-
+ type: Dummy
+
+ runner:
+ type: Duration
+ duration: 5
+ interval: 1
+
+context:
+ name: {{ context_name }}
+ image: yardstick-image
+ flavor: yardstick-flavor
+ user: ubuntu
+
+ servers:
+ athena:
+ name: athena
+ ares:
+ name: ares
+
+ networks:
+ test:
+ name: test
diff --git a/tests/unit/network_services/libs/__init__.py b/yardstick/tests/unit/apiserver/resources/v1/__init__.py
index e69de29bb..e69de29bb 100644
--- a/tests/unit/network_services/libs/__init__.py
+++ b/yardstick/tests/unit/apiserver/resources/v1/__init__.py
diff --git a/yardstick/tests/unit/apiserver/resources/v1/test_testsuites.py b/yardstick/tests/unit/apiserver/resources/v1/test_testsuites.py
new file mode 100644
index 000000000..85c045f44
--- /dev/null
+++ b/yardstick/tests/unit/apiserver/resources/v1/test_testsuites.py
@@ -0,0 +1,35 @@
+##############################################################################
+# Copyright (c) 2018 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+import mock
+
+import unittest
+
+from yardstick.tests.unit.apiserver import APITestCase
+from api.utils.thread import TaskThread
+
+
+class TestsuiteTestCase(APITestCase):
+
+ def test_run_test_suite(self):
+ if self.app is None:
+ unittest.skip('host config error')
+ return
+
+ TaskThread.start = mock.MagicMock()
+
+ url = 'yardstick/testsuites/action'
+ data = {
+ 'action': 'run_test_suite',
+ 'args': {
+ 'opts': {},
+ 'testsuite': 'opnfv_smoke'
+ }
+ }
+ resp = self._post(url, data)
+ self.assertEqual(resp.get('status'), 1)
diff --git a/tests/unit/network_services/libs/ixia_libs/__init__.py b/yardstick/tests/unit/apiserver/resources/v2/__init__.py
index e69de29bb..e69de29bb 100644
--- a/tests/unit/network_services/libs/ixia_libs/__init__.py
+++ b/yardstick/tests/unit/apiserver/resources/v2/__init__.py
diff --git a/yardstick/tests/unit/apiserver/resources/v2/test_images.py b/yardstick/tests/unit/apiserver/resources/v2/test_images.py
new file mode 100644
index 000000000..ab131eec5
--- /dev/null
+++ b/yardstick/tests/unit/apiserver/resources/v2/test_images.py
@@ -0,0 +1,46 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+import mock
+
+import unittest
+
+from yardstick.tests.unit.apiserver import APITestCase
+from api.resources.v2.images import format_image_info
+
+
+class V2ImagesTestCase(APITestCase):
+ @mock.patch('yardstick.common.openstack_utils.list_images')
+ @mock.patch('yardstick.common.utils.source_env')
+ def test_get(self, _, mock_list_images):
+ if self.app is None:
+ unittest.skip('host config error')
+ return
+
+ single_image = mock.MagicMock()
+ single_image.name = 'yardstick-image'
+ single_image.size = 16384
+ single_image.status = 'active'
+ single_image.updated_at = '2018-04-08'
+
+ mock_list_images.return_value = [single_image]
+ url = 'api/v2/yardstick/images'
+ resp = self._get(url)
+ self.assertEqual(resp.get('status'), 1)
+
+
+class FormatImageInfoTestCase(unittest.TestCase):
+ def test_format_image_info(self):
+ image = mock.MagicMock()
+ image.name = 'yardstick-image'
+ image.size = 1048576
+ image.status = 'active'
+ image.updated_at = '2018-04-08'
+
+ image_dict = format_image_info(image)
+ self.assertEqual(image_dict.get('size'), 1)
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
index 18ea3c4e6..72e684a68 100644
--- a/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
+++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_model.py
@@ -14,11 +14,16 @@
import copy
import os
-import unittest
-import mock
+import uuid
+import mock
+import unittest
from xml.etree import ElementTree
+
+from yardstick import ssh
from yardstick.benchmark.contexts.standalone import model
+from yardstick.common import exceptions
+from yardstick import constants
from yardstick.network_services import utils
@@ -38,22 +43,19 @@ XML_SAMPLE_INTERFACE = """<?xml version="1.0"?>
</domain>
"""
+
class ModelLibvirtTestCase(unittest.TestCase):
def setUp(self):
- self.xml = ElementTree.ElementTree(
- element=ElementTree.fromstring(XML_SAMPLE))
self.pci_address_str = '0001:04:03.2'
self.pci_address = utils.PciAddress(self.pci_address_str)
self.mac = '00:00:00:00:00:01'
- self._mock_write_xml = mock.patch.object(ElementTree.ElementTree,
- 'write')
- self.mock_write_xml = self._mock_write_xml.start()
-
+ self._mock_ssh = mock.Mock()
+ self.mock_ssh = self._mock_ssh.start()
self.addCleanup(self._cleanup)
def _cleanup(self):
- self._mock_write_xml.stop()
+ self._mock_ssh.stop()
# TODO: Remove mocking of yardstick.ssh.SSH (here and elsewhere)
# In this case, we are mocking a param to be passed into other methods
@@ -67,20 +69,31 @@ class ModelLibvirtTestCase(unittest.TestCase):
model.Libvirt.check_if_vm_exists_and_delete("vm_0", ssh_mock)
def test_virsh_create_vm(self):
- 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
- # NOTE(ralonsoh): this test doesn't cover function execution.
- model.Libvirt.virsh_create_vm(ssh_mock, "vm_0")
+ self.mock_ssh.execute = mock.Mock(return_value=(0, 0, 0))
+ model.Libvirt.virsh_create_vm(self.mock_ssh, 'vm_0')
+ self.mock_ssh.execute.assert_called_once_with('virsh create vm_0')
+
+ def test_virsh_create_vm_error(self):
+ self.mock_ssh.execute = mock.Mock(return_value=(1, 0, 'error_create'))
+ with self.assertRaises(exceptions.LibvirtCreateError) as exc:
+ model.Libvirt.virsh_create_vm(self.mock_ssh, 'vm_0')
+ self.assertEqual('Error creating the virtual machine. Error: '
+ 'error_create.', str(exc.exception))
+ self.mock_ssh.execute.assert_called_once_with('virsh create vm_0')
def test_virsh_destroy_vm(self):
- 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
- # NOTE(ralonsoh): this test doesn't cover function execution.
- model.Libvirt.virsh_destroy_vm("vm_0", ssh_mock)
+ self.mock_ssh.execute = mock.Mock(return_value=(0, 0, 0))
+ model.Libvirt.virsh_destroy_vm('vm_0', self.mock_ssh)
+ self.mock_ssh.execute.assert_called_once_with('virsh destroy vm_0')
+
+ @mock.patch.object(model, 'LOG')
+ def test_virsh_destroy_vm_error(self, mock_logger):
+ self.mock_ssh.execute = mock.Mock(return_value=(1, 0, 'error_destroy'))
+ mock_logger.warning = mock.Mock()
+ model.Libvirt.virsh_destroy_vm('vm_0', self.mock_ssh)
+ mock_logger.warning.assert_called_once_with(
+ 'Error destroying VM %s. Error: %s', 'vm_0', 'error_destroy')
+ self.mock_ssh.execute.assert_called_once_with('virsh destroy vm_0')
def test_add_interface_address(self):
xml = ElementTree.ElementTree(
@@ -98,101 +111,164 @@ class ModelLibvirtTestCase(unittest.TestCase):
result.get('function'))
def test_add_ovs_interfaces(self):
- xml_input = mock.Mock()
- with mock.patch.object(ElementTree, 'parse', return_value=self.xml) \
- as mock_parse:
- xml = copy.deepcopy(self.xml)
- mock_parse.return_value = xml
- model.Libvirt.add_ovs_interface(
- '/usr/local', 0, self.pci_address_str, self.mac, xml_input)
- mock_parse.assert_called_once_with(xml_input)
- self.mock_write_xml.assert_called_once_with(xml_input)
- interface = xml.find('devices').find('interface')
- self.assertEqual('vhostuser', interface.get('type'))
- mac = interface.find('mac')
- self.assertEqual(self.mac, mac.get('address'))
- source = interface.find('source')
- self.assertEqual('unix', source.get('type'))
- self.assertEqual('/usr/local/var/run/openvswitch/dpdkvhostuser0',
- source.get('path'))
- self.assertEqual('client', source.get('mode'))
- _model = interface.find('model')
- self.assertEqual('virtio', _model.get('type'))
- driver = interface.find('driver')
- self.assertEqual('4', driver.get('queues'))
- host = driver.find('host')
- self.assertEqual('off', host.get('mrg_rxbuf'))
- self.assertIsNotNone(interface.find('address'))
+ xml_input = copy.deepcopy(XML_SAMPLE)
+ xml_output = model.Libvirt.add_ovs_interface(
+ '/usr/local', 0, self.pci_address_str, self.mac, xml_input)
+
+ root = ElementTree.fromstring(xml_output)
+ et_out = ElementTree.ElementTree(element=root)
+ interface = et_out.find('devices').find('interface')
+ self.assertEqual('vhostuser', interface.get('type'))
+ mac = interface.find('mac')
+ self.assertEqual(self.mac, mac.get('address'))
+ source = interface.find('source')
+ self.assertEqual('unix', source.get('type'))
+ self.assertEqual('/usr/local/var/run/openvswitch/dpdkvhostuser0',
+ source.get('path'))
+ self.assertEqual('client', source.get('mode'))
+ _model = interface.find('model')
+ self.assertEqual('virtio', _model.get('type'))
+ driver = interface.find('driver')
+ self.assertEqual('4', driver.get('queues'))
+ host = driver.find('host')
+ self.assertEqual('off', host.get('mrg_rxbuf'))
+ self.assertIsNotNone(interface.find('address'))
def test_add_sriov_interfaces(self):
- xml_input = mock.Mock()
- with mock.patch.object(ElementTree, 'parse', return_value=self.xml) \
- as mock_parse:
- xml = copy.deepcopy(self.xml)
- mock_parse.return_value = xml
- vm_pci = '0001:05:04.2'
- model.Libvirt.add_sriov_interfaces(
- vm_pci, self.pci_address_str, self.mac, xml_input)
- mock_parse.assert_called_once_with(xml_input)
- self.mock_write_xml.assert_called_once_with(xml_input)
- interface = xml.find('devices').find('interface')
- self.assertEqual('yes', interface.get('managed'))
- self.assertEqual('hostdev', interface.get('type'))
- mac = interface.find('mac')
- self.assertEqual(self.mac, mac.get('address'))
- source = interface.find('source')
- source_address = source.find('address')
- self.assertIsNotNone(source.find('address'))
-
- self.assertEqual('pci', source_address.get('type'))
- self.assertEqual('0x' + self.pci_address_str.split(':')[0],
- source_address.get('domain'))
- self.assertEqual('0x' + self.pci_address_str.split(':')[1],
- source_address.get('bus'))
- self.assertEqual('0x' + self.pci_address_str.split(':')[2].split('.')[0],
- source_address.get('slot'))
- self.assertEqual('0x' + self.pci_address_str.split(':')[2].split('.')[1],
- source_address.get('function'))
-
- interface_address = interface.find('address')
- self.assertEqual('pci', interface_address.get('type'))
- self.assertEqual('0x' + vm_pci.split(':')[0],
- interface_address.get('domain'))
- self.assertEqual('0x' + vm_pci.split(':')[1],
- interface_address.get('bus'))
- self.assertEqual('0x' + vm_pci.split(':')[2].split('.')[0],
- interface_address.get('slot'))
- self.assertEqual('0x' + vm_pci.split(':')[2].split('.')[1],
- interface_address.get('function'))
+ xml_input = copy.deepcopy(XML_SAMPLE)
+ vm_pci = '0001:05:04.2'
+ xml_output = model.Libvirt.add_sriov_interfaces(
+ vm_pci, self.pci_address_str, self.mac, xml_input)
+ root = ElementTree.fromstring(xml_output)
+ et_out = ElementTree.ElementTree(element=root)
+ interface = et_out.find('devices').find('interface')
+ self.assertEqual('yes', interface.get('managed'))
+ self.assertEqual('hostdev', interface.get('type'))
+ mac = interface.find('mac')
+ self.assertEqual(self.mac, mac.get('address'))
+ source = interface.find('source')
+ source_address = source.find('address')
+ self.assertIsNotNone(source.find('address'))
+
+ self.assertEqual('pci', source_address.get('type'))
+ self.assertEqual('0x' + self.pci_address_str.split(':')[0],
+ source_address.get('domain'))
+ self.assertEqual('0x' + self.pci_address_str.split(':')[1],
+ source_address.get('bus'))
+ self.assertEqual('0x' + self.pci_address_str.split(':')[2].split('.')[0],
+ source_address.get('slot'))
+ self.assertEqual('0x' + self.pci_address_str.split(':')[2].split('.')[1],
+ source_address.get('function'))
+
+ interface_address = interface.find('address')
+ self.assertEqual('pci', interface_address.get('type'))
+ self.assertEqual('0x' + vm_pci.split(':')[0],
+ interface_address.get('domain'))
+ self.assertEqual('0x' + vm_pci.split(':')[1],
+ interface_address.get('bus'))
+ self.assertEqual('0x' + vm_pci.split(':')[2].split('.')[0],
+ interface_address.get('slot'))
+ self.assertEqual('0x' + vm_pci.split(':')[2].split('.')[1],
+ interface_address.get('function'))
def test_create_snapshot_qemu(self):
- result = "/var/lib/libvirt/images/0.qcow2"
- 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
- image = model.Libvirt.create_snapshot_qemu(ssh_mock, "0", "ubuntu.img")
- self.assertEqual(image, result)
-
- @mock.patch.object(model.Libvirt, 'pin_vcpu_for_perf')
- @mock.patch.object(model.Libvirt, 'create_snapshot_qemu')
+ self.mock_ssh.execute = mock.Mock(return_value=(0, 0, 0))
+ index = 1
+ vm_image = '/var/lib/libvirt/images/%s.qcow2' % index
+ base_image = '/tmp/base_image'
+
+ model.Libvirt.create_snapshot_qemu(self.mock_ssh, index, base_image)
+ self.mock_ssh.execute.assert_has_calls([
+ mock.call('rm -- "%s"' % vm_image),
+ mock.call('test -r %s' % base_image),
+ mock.call('qemu-img create -f qcow2 -o backing_file=%s %s' %
+ (base_image, vm_image))
+ ])
+
+ @mock.patch.object(os.path, 'basename', return_value='base_image')
+ @mock.patch.object(os.path, 'normpath')
+ @mock.patch.object(os, 'access', return_value=True)
+ def test_create_snapshot_qemu_no_image_remote(self,
+ mock_os_access, mock_normpath, mock_basename):
+ self.mock_ssh.execute = mock.Mock(
+ side_effect=[(0, 0, 0), (1, 0, 0), (0, 0, 0), (0, 0, 0)])
+ index = 1
+ vm_image = '/var/lib/libvirt/images/%s.qcow2' % index
+ base_image = '/tmp/base_image'
+ mock_normpath.return_value = base_image
+
+ model.Libvirt.create_snapshot_qemu(self.mock_ssh, index, base_image)
+ self.mock_ssh.execute.assert_has_calls([
+ mock.call('rm -- "%s"' % vm_image),
+ mock.call('test -r %s' % base_image),
+ mock.call('mv -- "/tmp/%s" "%s"' % ('base_image', base_image)),
+ mock.call('qemu-img create -f qcow2 -o backing_file=%s %s' %
+ (base_image, vm_image))
+ ])
+ mock_os_access.assert_called_once_with(base_image, os.R_OK)
+ mock_normpath.assert_called_once_with(base_image)
+ mock_basename.assert_has_calls([mock.call(base_image)])
+ self.mock_ssh.put_file.assert_called_once_with(base_image,
+ '/tmp/base_image')
+
+ @mock.patch.object(os, 'access', return_value=False)
+ def test_create_snapshot_qemu_no_image_local(self, mock_os_access):
+ self.mock_ssh.execute = mock.Mock(side_effect=[(0, 0, 0), (1, 0, 0)])
+ base_image = '/tmp/base_image'
+
+ with self.assertRaises(exceptions.LibvirtQemuImageBaseImageNotPresent):
+ model.Libvirt.create_snapshot_qemu(self.mock_ssh, 3, base_image)
+ mock_os_access.assert_called_once_with(base_image, os.R_OK)
+
+ def test_create_snapshot_qemu_error_qemuimg_command(self):
+ self.mock_ssh.execute = mock.Mock(
+ side_effect=[(0, 0, 0), (0, 0, 0), (1, 0, 0)])
+ index = 1
+ vm_image = '/var/lib/libvirt/images/%s.qcow2' % index
+ base_image = '/tmp/base_image'
+
+ with self.assertRaises(exceptions.LibvirtQemuImageCreateError):
+ model.Libvirt.create_snapshot_qemu(self.mock_ssh, index,
+ base_image)
+ self.mock_ssh.execute.assert_has_calls([
+ mock.call('rm -- "%s"' % vm_image),
+ mock.call('test -r %s' % base_image),
+ mock.call('qemu-img create -f qcow2 -o backing_file=%s %s' %
+ (base_image, vm_image))
+ ])
+
+ @mock.patch.object(model.Libvirt, 'pin_vcpu_for_perf', return_value='4,5')
+ @mock.patch.object(model.Libvirt, 'create_snapshot_qemu',
+ return_value='qemu_image')
def test_build_vm_xml(self, mock_create_snapshot_qemu,
- *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)
- ssh_mock.execute = \
- mock.Mock(return_value=(0, "a", ""))
- ssh.return_value = ssh_mock
- mock_create_snapshot_qemu.return_value = "0.img"
-
- status = model.Libvirt.build_vm_xml(ssh_mock, {}, cfg_file, 'vm_0', 0)
- self.assertEqual(status[0], result[0])
+ mock_pin_vcpu_for_perf):
+ extra_specs = {'hw:cpu_cores': '4',
+ 'hw:cpu_sockets': '3',
+ 'hw:cpu_threads': '2',
+ 'cputune': 'cool'}
+ flavor = {'ram': '1024',
+ 'extra_specs': extra_specs,
+ 'hw_socket': '1',
+ 'images': 'images'}
+ mac = model.StandaloneContextHelper.get_mac_address(0x00)
+ _uuid = uuid.uuid4()
+ connection = mock.Mock()
+ with mock.patch.object(model.StandaloneContextHelper,
+ 'get_mac_address', return_value=mac) as \
+ mock_get_mac_address, \
+ mock.patch.object(uuid, 'uuid4', return_value=_uuid):
+ xml_out, mac = model.Libvirt.build_vm_xml(
+ connection, flavor, 'vm_name', 100)
+
+ xml_ref = model.VM_TEMPLATE.format(vm_name='vm_name',
+ random_uuid=_uuid, mac_addr=mac, memory='1024', vcpu='8', cpu='4',
+ numa_cpus='0-7', socket='3', threads='2',
+ vm_image='qemu_image', cpuset='4,5', cputune='cool')
+ self.assertEqual(xml_ref, xml_out)
+ mock_get_mac_address.assert_called_once_with(0x00)
+ mock_create_snapshot_qemu.assert_called_once_with(
+ connection, 100, 'images')
+ mock_pin_vcpu_for_perf.assert_called_once_with(connection, '1')
# TODO: Edit this test to test state instead of output
# update_interrupts_hugepages_perf does not return anything
@@ -398,43 +474,80 @@ class ServerTestCase(unittest.TestCase):
class OvsDeployTestCase(unittest.TestCase):
- NETWORKS = {
- 'mgmt': {'cidr': '152.16.100.10/24'},
- 'private_0': {
- 'phy_port': "0000:05:00.0",
- 'vpci': "0000:00:07.0",
- 'driver': 'i40e',
- 'mac': '',
- 'cidr': '152.16.100.10/24',
- 'gateway_ip': '152.16.100.20'},
- 'public_0': {
- 'phy_port': "0000:05:00.1",
- 'vpci': "0000:00:08.0",
- 'driver': 'i40e',
- 'mac': '',
- 'cidr': '152.16.40.10/24',
- 'gateway_ip': '152.16.100.20'}
- }
-
- @mock.patch('yardstick.ssh.SSH')
- def setUp(self, mock_ssh):
- self.ovs_deploy = model.OvsDeploy(mock_ssh, '/tmp/dpdk-devbind.py', {})
+ OVS_DETAILS = {'version': {'ovs': 'ovs_version', 'dpdk': 'dpdk_version'}}
- def test___init__(self):
- self.assertIsNotNone(self.ovs_deploy.connection)
-
- @mock.patch('yardstick.benchmark.contexts.standalone.model.os')
- def test_prerequisite(self, *args):
- # NOTE(ralonsoh): this test should check mocked function calls.
- self.ovs_deploy.helper = mock.Mock()
- self.assertIsNone(self.ovs_deploy.prerequisite())
-
- @mock.patch('yardstick.benchmark.contexts.standalone.model.os')
- def test_prerequisite_2(self, *args):
- # NOTE(ralonsoh): this test should check mocked function calls. Rename
- # this test properly.
- self.ovs_deploy.helper = mock.Mock()
- self.ovs_deploy.connection.execute = mock.Mock(
- return_value=(1, '1.2.3.4 00:00:00:00:00:01', ''))
- self.ovs_deploy.prerequisite = mock.Mock()
- self.assertIsNone(self.ovs_deploy.ovs_deploy())
+ def setUp(self):
+ self._mock_ssh = mock.patch.object(ssh, 'SSH')
+ self.mock_ssh = self._mock_ssh.start()
+ self.ovs_deploy = model.OvsDeploy(self.mock_ssh,
+ '/tmp/dpdk-devbind.py',
+ self.OVS_DETAILS)
+ self._mock_path_isfile = mock.patch.object(os.path, 'isfile')
+ self._mock_path_join = mock.patch.object(os.path, 'join')
+ self.mock_path_isfile = self._mock_path_isfile.start()
+ self.mock_path_join = self._mock_path_join.start()
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_ssh.stop()
+ self._mock_path_isfile.stop()
+ self._mock_path_join.stop()
+
+ @mock.patch.object(model.StandaloneContextHelper, 'install_req_libs')
+ def test_prerequisite(self, mock_install_req_libs):
+ pkgs = ["git", "build-essential", "pkg-config", "automake",
+ "autotools-dev", "libltdl-dev", "cmake", "libnuma-dev",
+ "libpcap-dev"]
+ self.ovs_deploy.prerequisite()
+ mock_install_req_libs.assert_called_once_with(
+ self.ovs_deploy.connection, pkgs)
+
+ def test_ovs_deploy_no_file(self):
+ self.mock_path_isfile.return_value = False
+ mock_file = mock.Mock()
+ self.mock_path_join.return_value = mock_file
+
+ self.ovs_deploy.ovs_deploy()
+ self.mock_path_isfile.assert_called_once_with(mock_file)
+ self.mock_path_join.assert_called_once_with(
+ constants.YARDSTICK_ROOT_PATH,
+ 'yardstick/resources/scripts/install/',
+ self.ovs_deploy.OVS_DEPLOY_SCRIPT)
+
+ @mock.patch.object(os.environ, 'get', return_value='test_proxy')
+ def test_ovs_deploy(self, mock_env_get):
+ self.mock_path_isfile.return_value = True
+ mock_deploy_file = mock.Mock()
+ mock_remove_ovs_deploy = mock.Mock()
+ self.mock_path_join.side_effect = [mock_deploy_file,
+ mock_remove_ovs_deploy]
+ dpdk_version = self.OVS_DETAILS['version']['dpdk']
+ ovs_version = self.OVS_DETAILS['version']['ovs']
+
+ with mock.patch.object(self.ovs_deploy.connection, 'put') as \
+ mock_put, \
+ mock.patch.object(self.ovs_deploy.connection, 'execute') as \
+ mock_execute, \
+ mock.patch.object(self.ovs_deploy, 'prerequisite'):
+ mock_execute.return_value = (0, 0, 0)
+ self.ovs_deploy.ovs_deploy()
+
+ self.mock_path_isfile.assert_called_once_with(mock_deploy_file)
+ self.mock_path_join.assert_has_calls([
+ mock.call(constants.YARDSTICK_ROOT_PATH,
+ 'yardstick/resources/scripts/install/',
+ self.ovs_deploy.OVS_DEPLOY_SCRIPT),
+ mock.call(self.ovs_deploy.bin_path,
+ self.ovs_deploy.OVS_DEPLOY_SCRIPT)
+ ])
+ mock_put.assert_called_once_with(mock_deploy_file,
+ mock_remove_ovs_deploy)
+ cmd = ("sudo -E %(remote_ovs_deploy)s --ovs='%(ovs_version)s' "
+ "--dpdk='%(dpdk_version)s' -p='%(proxy)s'" %
+ {'remote_ovs_deploy': mock_remove_ovs_deploy,
+ 'ovs_version': ovs_version,
+ 'dpdk_version': dpdk_version,
+ 'proxy': 'test_proxy'})
+ mock_execute.assert_called_once_with(cmd)
+ mock_env_get.assert_called_once_with('http_proxy', '')
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
index 0223fd3ff..bc3bb73cd 100644
--- a/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
+++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_ovs_dpdk.py
@@ -12,12 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import io
import os
import mock
+import six
import unittest
+from yardstick.benchmark.contexts.standalone import model
from yardstick.benchmark.contexts.standalone import ovs_dpdk
+from yardstick.common import exceptions
+from yardstick.network_services import utils
class OvsDpdkContextTestCase(unittest.TestCase):
@@ -27,7 +32,6 @@ class OvsDpdkContextTestCase(unittest.TestCase):
NODES_DUPLICATE_SAMPLE = "nodes_duplicate_sample.yaml"
NETWORKS = {
- 'mgmt': {'cidr': '152.16.100.10/24'},
'private_0': {
'phy_port': "0000:05:00.0",
'vpci': "0000:00:07.0",
@@ -82,15 +86,43 @@ class OvsDpdkContextTestCase(unittest.TestCase):
self.assertIsNone(self.ovs_dpdk.init(ATTRS))
def test_setup_ovs(self):
- 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
- self.ovs_dpdk.connection = ssh_mock
- self.ovs_dpdk.networks = self.NETWORKS
- self.ovs_dpdk.ovs_properties = {}
- self.assertIsNone(self.ovs_dpdk.setup_ovs())
+ fake_path = '/fake_path'
+ fake_dpdk_nic_bind = 'dpdk_tool.py'
+ self.ovs_dpdk.ovs_properties = {'vpath': fake_path}
+ self.ovs_dpdk.dpdk_devbind = fake_dpdk_nic_bind
+ self.ovs_dpdk.networks = self.NETWORKS
+ self.ovs_dpdk.connection = mock.Mock()
+ self.ovs_dpdk.connection.execute = mock.Mock(return_value=(0, 0, 0))
+ create_from = fake_path + '/etc/openvswitch/conf.db'
+ create_to = fake_path + '/share/openvswitch/vswitch.ovsschema'
+ cmd_list = [
+ 'killall -r "ovs.*" -q | true',
+ 'mkdir -p {0}/etc/openvswitch'.format(fake_path),
+ 'mkdir -p {0}/var/run/openvswitch'.format(fake_path),
+ 'rm {0}/etc/openvswitch/conf.db | true'.format(fake_path),
+ 'ovsdb-tool create {0} {1}'.format(create_from, create_to),
+ 'modprobe vfio-pci',
+ 'chmod a+x /dev/vfio',
+ 'chmod 0666 /dev/vfio/*',
+ '{0} --force -b vfio-pci {1}'.format(fake_dpdk_nic_bind,
+ self.ovs_dpdk.networks['private_0']['phy_port']),
+ '{0} --force -b vfio-pci {1}'.format(fake_dpdk_nic_bind,
+ self.ovs_dpdk.networks['public_0']['phy_port'])
+ ]
+ calls = [mock.call(cmd, timeout=self.ovs_dpdk.CMD_TIMEOUT)
+ for cmd in cmd_list]
+
+ self.ovs_dpdk.setup_ovs()
+ self.ovs_dpdk.connection.execute.assert_has_calls(calls,
+ any_order=True)
+
+ def test_setup_ovs_exception(self):
+ self.ovs_dpdk.networks = self.NETWORKS
+ self.ovs_dpdk.connection = mock.Mock()
+ self.ovs_dpdk.connection.execute = mock.Mock(return_value=(1, 0, 0))
+
+ with self.assertRaises(exceptions.OVSSetupError):
+ self.ovs_dpdk.setup_ovs()
def test_start_ovs_serverswitch(self):
with mock.patch("yardstick.ssh.SSH") as ssh:
@@ -129,34 +161,45 @@ class OvsDpdkContextTestCase(unittest.TestCase):
self.ovs_dpdk.wait_for_vswitchd = 0
self.assertIsNone(self.ovs_dpdk.cleanup_ovs_dpdk_env())
- @mock.patch('yardstick.benchmark.contexts.standalone.model.OvsDeploy')
- def test_check_ovs_dpdk_env(self, mock_ovs):
- with mock.patch("yardstick.ssh.SSH") as ssh:
- ssh_mock = mock.Mock(autospec=ssh.SSH)
- ssh_mock.execute = \
- mock.Mock(return_value=(1, "a", ""))
- ssh.return_value = ssh_mock
- self.ovs_dpdk.connection = ssh_mock
- self.ovs_dpdk.networks = self.NETWORKS
- self.ovs_dpdk.ovs_properties = {
- 'version': {'ovs': '2.7.0', 'dpdk': '16.11.1'}
- }
- self.ovs_dpdk.wait_for_vswitchd = 0
- self.ovs_dpdk.cleanup_ovs_dpdk_env = mock.Mock()
- self.assertIsNone(self.ovs_dpdk.check_ovs_dpdk_env())
- self.ovs_dpdk.ovs_properties = {
- 'version': {'ovs': '2.0.0'}
- }
- self.ovs_dpdk.wait_for_vswitchd = 0
- self.cleanup_ovs_dpdk_env = mock.Mock()
- mock_ovs.deploy = mock.Mock()
- # NOTE(elfoley): Check for a specific Exception
- self.assertRaises(Exception, self.ovs_dpdk.check_ovs_dpdk_env)
+ @mock.patch.object(ovs_dpdk.OvsDpdkContext, '_check_hugepages')
+ @mock.patch.object(utils, 'get_nsb_option')
+ @mock.patch.object(model.OvsDeploy, 'ovs_deploy')
+ def test_check_ovs_dpdk_env(self, mock_ovs_deploy, mock_get_nsb_option,
+ mock_check_hugepages):
+ self.ovs_dpdk.connection = mock.Mock()
+ self.ovs_dpdk.connection.execute = mock.Mock(
+ return_value=(1, 0, 0))
+ self.ovs_dpdk.networks = self.NETWORKS
+ self.ovs_dpdk.ovs_properties = {
+ 'version': {'ovs': '2.7.0', 'dpdk': '16.11.1'}
+ }
+ self.ovs_dpdk.wait_for_vswitchd = 0
+ self.ovs_dpdk.cleanup_ovs_dpdk_env = mock.Mock()
+ mock_get_nsb_option.return_value = 'fake_path'
+
+ self.ovs_dpdk.check_ovs_dpdk_env()
+ mock_ovs_deploy.assert_called_once()
+ mock_check_hugepages.assert_called_once()
+ mock_get_nsb_option.assert_called_once_with('bin_path')
+
+ @mock.patch.object(ovs_dpdk.OvsDpdkContext, '_check_hugepages')
+ def test_check_ovs_dpdk_env_wrong_version(self, mock_check_hugepages):
+ self.ovs_dpdk.connection = mock.Mock()
+ self.ovs_dpdk.connection.execute = mock.Mock(
+ return_value=(1, 0, 0))
+ self.ovs_dpdk.networks = self.NETWORKS
+ self.ovs_dpdk.ovs_properties = {
+ 'version': {'ovs': '0.0.1', 'dpdk': '9.8.7'}
+ }
+ self.ovs_dpdk.wait_for_vswitchd = 0
+ self.ovs_dpdk.cleanup_ovs_dpdk_env = mock.Mock()
- @mock.patch('yardstick.ssh.SSH')
- def test_deploy(self, mock_ssh):
- mock_ssh.execute.return_value = 0, "a", ""
+ with self.assertRaises(exceptions.OVSUnsupportedVersion):
+ self.ovs_dpdk.check_ovs_dpdk_env()
+ mock_check_hugepages.assert_called_once()
+ @mock.patch('yardstick.ssh.SSH')
+ def test_deploy(self, *args):
self.ovs_dpdk.vm_deploy = False
self.assertIsNone(self.ovs_dpdk.deploy())
@@ -174,21 +217,19 @@ class OvsDpdkContextTestCase(unittest.TestCase):
# output.
self.assertIsNone(self.ovs_dpdk.deploy())
- @mock.patch('yardstick.benchmark.contexts.standalone.model.Libvirt')
- @mock.patch('yardstick.ssh.SSH')
- def test_undeploy(self, mock_ssh, *args):
- mock_ssh.execute.return_value = 0, "a", ""
-
- self.ovs_dpdk.vm_deploy = False
- self.assertIsNone(self.ovs_dpdk.undeploy())
-
+ @mock.patch.object(model.Libvirt, 'check_if_vm_exists_and_delete')
+ def test_undeploy(self, mock_libvirt):
self.ovs_dpdk.vm_deploy = True
- self.ovs_dpdk.connection = mock_ssh
+ self.ovs_dpdk.connection = mock.Mock()
self.ovs_dpdk.vm_names = ['vm_0', 'vm_1']
self.ovs_dpdk.drivers = ['vm_0', 'vm_1']
self.ovs_dpdk.cleanup_ovs_dpdk_env = mock.Mock()
self.ovs_dpdk.networks = self.NETWORKS
- self.assertIsNone(self.ovs_dpdk.undeploy())
+ self.ovs_dpdk.undeploy()
+ mock_libvirt.assert_has_calls([
+ mock.call(self.ovs_dpdk.vm_names[0], self.ovs_dpdk.connection),
+ mock.call(self.ovs_dpdk.vm_names[1], self.ovs_dpdk.connection)
+ ])
def _get_file_abspath(self, filename):
curr_path = os.path.dirname(os.path.abspath(__file__))
@@ -310,34 +351,28 @@ 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, *args):
- 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
+ @mock.patch.object(model.Libvirt, 'add_ovs_interface')
+ def test__enable_interfaces(self, mock_add_ovs_interface):
self.ovs_dpdk.vm_deploy = True
- self.ovs_dpdk.connection = ssh_mock
+ self.ovs_dpdk.connection = mock.Mock()
self.ovs_dpdk.vm_names = ['vm_0', 'vm_1']
self.ovs_dpdk.drivers = []
self.ovs_dpdk.networks = self.NETWORKS
+ self.ovs_dpdk.ovs_properties = {'vpath': 'fake_path'}
self.ovs_dpdk.get_vf_datas = mock.Mock(return_value="")
- self.assertIsNone(self.ovs_dpdk._enable_interfaces(
- 0, ["private_0"], 'test'))
-
- @mock.patch('yardstick.benchmark.contexts.standalone.model.Server')
- @mock.patch('yardstick.benchmark.contexts.standalone.ovs_dpdk.Libvirt')
- def test_setup_ovs_dpdk_context(self, mock_libvirt, *args):
- 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_mock.put = \
- mock.Mock(return_value=(0, "a", ""))
- ssh.return_value = ssh_mock
+ self.ovs_dpdk._enable_interfaces(0, ["private_0"], 'test')
+ mock_add_ovs_interface.assert_called_once_with(
+ 'fake_path', 0, self.NETWORKS['private_0']['vpci'],
+ self.NETWORKS['private_0']['mac'], 'test')
+
+ @mock.patch.object(model.Libvirt, 'write_file')
+ @mock.patch.object(model.Libvirt, 'build_vm_xml')
+ @mock.patch.object(model.Libvirt, 'check_if_vm_exists_and_delete')
+ @mock.patch.object(model.Libvirt, 'virsh_create_vm')
+ def test_setup_ovs_dpdk_context(self, mock_create_vm, mock_check_if_exists,
+ mock_build_xml, mock_write_file):
self.ovs_dpdk.vm_deploy = True
- self.ovs_dpdk.connection = ssh_mock
+ self.ovs_dpdk.connection = mock.Mock()
self.ovs_dpdk.vm_names = ['vm_0', 'vm_1']
self.ovs_dpdk.drivers = []
self.ovs_dpdk.servers = {
@@ -353,11 +388,64 @@ class OvsDpdkContextTestCase(unittest.TestCase):
self.ovs_dpdk.host_mgmt = {}
self.ovs_dpdk.flavor = {}
self.ovs_dpdk.configure_nics_for_ovs_dpdk = mock.Mock(return_value="")
- mock_libvirt.build_vm_xml.return_value = [6, "00:00:00:00:00:01"]
- self.ovs_dpdk._enable_interfaces = mock.Mock(return_value="")
- mock_libvirt.virsh_create_vm.return_value = ""
- mock_libvirt.pin_vcpu_for_perf.return_value = ""
+ xml_str = mock.Mock()
+ mock_build_xml.return_value = (xml_str, '00:00:00:00:00:01')
+ self.ovs_dpdk._enable_interfaces = mock.Mock(return_value=xml_str)
+ vnf_instance = mock.Mock()
self.ovs_dpdk.vnf_node.generate_vnf_instance = mock.Mock(
- return_value={})
-
- self.assertIsNotNone(self.ovs_dpdk.setup_ovs_dpdk_context())
+ return_value=vnf_instance)
+
+ self.assertEqual([vnf_instance],
+ self.ovs_dpdk.setup_ovs_dpdk_context())
+ mock_create_vm.assert_called_once_with(
+ self.ovs_dpdk.connection, '/tmp/vm_ovs_0.xml')
+ mock_check_if_exists.assert_called_once_with(
+ 'vm_0', self.ovs_dpdk.connection)
+ mock_build_xml.assert_called_once_with(
+ self.ovs_dpdk.connection, self.ovs_dpdk.vm_flavor, 'vm_0', 0)
+ mock_write_file.assert_called_once_with('/tmp/vm_ovs_0.xml', xml_str)
+
+ @mock.patch.object(io, 'BytesIO')
+ def test__check_hugepages(self, mock_bytesio):
+ data = six.BytesIO('HugePages_Total: 20\n'
+ 'HugePages_Free: 20\n'
+ 'HugePages_Rsvd: 0\n'
+ 'HugePages_Surp: 0\n'
+ 'Hugepagesize: 1048576 kB'.encode())
+ mock_bytesio.return_value = data
+ self.ovs_dpdk.connection = mock.Mock()
+ self.ovs_dpdk._check_hugepages()
+
+ @mock.patch.object(io, 'BytesIO')
+ def test__check_hugepages_no_info(self, mock_bytesio):
+ data = six.BytesIO(''.encode())
+ mock_bytesio.return_value = data
+ self.ovs_dpdk.connection = mock.Mock()
+ with self.assertRaises(exceptions.OVSHugepagesInfoError):
+ self.ovs_dpdk._check_hugepages()
+
+ @mock.patch.object(io, 'BytesIO')
+ def test__check_hugepages_no_total_hp(self, mock_bytesio):
+ data = six.BytesIO('HugePages_Total: 0\n'
+ 'HugePages_Free: 0\n'
+ 'HugePages_Rsvd: 0\n'
+ 'HugePages_Surp: 0\n'
+ 'Hugepagesize: 1048576 kB'.encode())
+ mock_bytesio.return_value = data
+ self.ovs_dpdk.connection = mock.Mock()
+ with self.assertRaises(exceptions.OVSHugepagesNotConfigured):
+ self.ovs_dpdk._check_hugepages()
+
+ @mock.patch.object(io, 'BytesIO')
+ def test__check_hugepages_no_free_hp(self, mock_bytesio):
+ data = six.BytesIO('HugePages_Total: 20\n'
+ 'HugePages_Free: 0\n'
+ 'HugePages_Rsvd: 0\n'
+ 'HugePages_Surp: 0\n'
+ 'Hugepagesize: 1048576 kB'.encode())
+ mock_bytesio.return_value = data
+ self.ovs_dpdk.connection = mock.Mock()
+ with self.assertRaises(exceptions.OVSHugepagesZeroFree) as exc:
+ self.ovs_dpdk._check_hugepages()
+ self.assertEqual('There are no HugePages free in this system. Total '
+ 'HugePages configured: 20', exc.exception.msg)
diff --git a/yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py b/yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py
index f0953ef55..e70ab0ae8 100644
--- a/yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py
+++ b/yardstick/tests/unit/benchmark/contexts/standalone/test_sriov.py
@@ -18,6 +18,7 @@ import mock
import unittest
from yardstick import ssh
+from yardstick.benchmark.contexts.standalone import model
from yardstick.benchmark.contexts.standalone import sriov
@@ -69,10 +70,11 @@ class SriovContextTestCase(unittest.TestCase):
if self.sriov in self.sriov.list:
self.sriov._delete_context()
- @mock.patch('yardstick.benchmark.contexts.standalone.sriov.Libvirt')
- @mock.patch('yardstick.benchmark.contexts.standalone.model.StandaloneContextHelper')
- @mock.patch('yardstick.benchmark.contexts.standalone.model.Server')
- def test___init__(self, mock_helper, mock_server, *args):
+ @mock.patch.object(model, 'StandaloneContextHelper')
+ @mock.patch.object(model, 'Libvirt')
+ @mock.patch.object(model, 'Server')
+ def test___init__(self, mock_helper, mock_libvirt, mock_server):
+ # pylint: disable=unused-argument
# NOTE(ralonsoh): this test doesn't cover function execution.
self.sriov.helper = mock_helper
self.sriov.vnf_node = mock_server
@@ -97,9 +99,11 @@ class SriovContextTestCase(unittest.TestCase):
self.sriov.wait_for_vnfs_to_start = mock.Mock(return_value={})
self.assertIsNone(self.sriov.deploy())
- @mock.patch('yardstick.benchmark.contexts.standalone.sriov.Libvirt')
@mock.patch.object(ssh, 'SSH', return_value=(0, "a", ""))
- def test_undeploy(self, mock_ssh, *args):
+ @mock.patch.object(model, 'Libvirt')
+ def test_undeploy(self, mock_libvirt, mock_ssh):
+ # pylint: disable=unused-argument
+ # NOTE(ralonsoh): the pylint exception should be removed.
self.sriov.vm_deploy = False
self.assertIsNone(self.sriov.undeploy())
@@ -237,11 +241,11 @@ class SriovContextTestCase(unittest.TestCase):
self.sriov._get_vf_data = mock.Mock(return_value="")
self.assertIsNone(self.sriov.configure_nics_for_sriov())
- @mock.patch('yardstick.benchmark.contexts.standalone.sriov.Libvirt')
- @mock.patch.object(ssh, 'SSH')
- def test__enable_interfaces(self, mock_ssh, *args):
- mock_ssh.return_value = 0, "a", ""
-
+ @mock.patch.object(ssh, 'SSH', return_value=(0, "a", ""))
+ @mock.patch.object(model, 'Libvirt')
+ def test__enable_interfaces(self, mock_libvirt, mock_ssh):
+ # pylint: disable=unused-argument
+ # NOTE(ralonsoh): the pylint exception should be removed.
self.sriov.vm_deploy = True
self.sriov.connection = mock_ssh
self.sriov.vm_names = ['vm_0', 'vm_1']
@@ -251,20 +255,12 @@ class SriovContextTestCase(unittest.TestCase):
self.assertIsNone(self.sriov._enable_interfaces(
0, 0, ["private_0"], 'test'))
- @mock.patch('yardstick.benchmark.contexts.standalone.model.Server')
- @mock.patch('yardstick.benchmark.contexts.standalone.sriov.Libvirt')
- def test_setup_sriov_context(self, mock_libvirt, *args):
- 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_mock.put = \
- mock.Mock(return_value=(0, "a", ""))
- ssh.return_value = ssh_mock
- self.sriov.vm_deploy = True
- self.sriov.connection = ssh_mock
- self.sriov.vm_names = ['vm_0', 'vm_1']
- self.sriov.drivers = []
+ @mock.patch.object(model.Libvirt, 'build_vm_xml')
+ @mock.patch.object(model.Libvirt, 'check_if_vm_exists_and_delete')
+ @mock.patch.object(model.Libvirt, 'write_file')
+ @mock.patch.object(model.Libvirt, 'virsh_create_vm')
+ def test_setup_sriov_context(self, mock_create_vm, mock_write_file,
+ mock_check, mock_build_vm_xml):
self.sriov.servers = {
'vnf_0': {
'network_ports': {
@@ -274,15 +270,31 @@ class SriovContextTestCase(unittest.TestCase):
}
}
}
- self.sriov.networks = self.NETWORKS
- self.sriov.host_mgmt = {}
- self.sriov.flavor = {}
- self.sriov.configure_nics_for_sriov = mock.Mock(return_value="")
- mock_libvirt.build_vm_xml = mock.Mock(
- return_value=[6, "00:00:00:00:00:01"])
- self.sriov._enable_interfaces = mock.Mock(return_value="")
- self.sriov.vnf_node.generate_vnf_instance = mock.Mock(return_value={})
- self.assertIsNotNone(self.sriov.setup_sriov_context())
+ connection = mock.Mock()
+ self.sriov.connection = connection
+ self.sriov.host_mgmt = {'ip': '1.2.3.4'}
+ self.sriov.vm_flavor = 'flavor'
+ self.sriov.networks = 'networks'
+ self.sriov.configure_nics_for_sriov = mock.Mock()
+ cfg = '/tmp/vm_sriov_0.xml'
+ vm_name = 'vm_0'
+ xml_out = mock.Mock()
+ mock_build_vm_xml.return_value = (xml_out, '00:00:00:00:00:01')
+
+ with mock.patch.object(self.sriov, 'vnf_node') as mock_vnf_node, \
+ mock.patch.object(self.sriov, '_enable_interfaces'):
+ mock_vnf_node.generate_vnf_instance = mock.Mock(
+ return_value='node')
+ nodes_out = self.sriov.setup_sriov_context()
+ self.assertEqual(['node'], nodes_out)
+ mock_vnf_node.generate_vnf_instance.assert_called_once_with(
+ 'flavor', 'networks', '1.2.3.4', 'vnf_0',
+ self.sriov.servers['vnf_0'], '00:00:00:00:00:01')
+ mock_build_vm_xml.assert_called_once_with(
+ connection, 'flavor', vm_name, 0)
+ mock_create_vm.assert_called_once_with(connection, cfg)
+ mock_check.assert_called_once_with(vm_name, connection)
+ mock_write_file.assert_called_once_with(cfg, xml_out)
def test__get_vf_data(self):
with mock.patch("yardstick.ssh.SSH") as ssh:
diff --git a/yardstick/tests/unit/benchmark/contexts/test_base.py b/yardstick/tests/unit/benchmark/contexts/test_base.py
index 153c6a527..b19883479 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_base.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_base.py
@@ -25,6 +25,7 @@ class FlagsTestCase(unittest.TestCase):
def test___init__(self):
self.assertFalse(self.flags.no_setup)
self.assertFalse(self.flags.no_teardown)
+ self.assertEqual({'verify': False}, self.flags.os_cloud_config)
def test___init__with_flags(self):
flags = base.Flags(no_setup=True)
@@ -32,10 +33,12 @@ class FlagsTestCase(unittest.TestCase):
self.assertFalse(flags.no_teardown)
def test_parse(self):
- self.flags.parse(no_setup=True, no_teardown="False")
+ self.flags.parse(no_setup=True, no_teardown='False',
+ os_cloud_config={'verify': True})
self.assertTrue(self.flags.no_setup)
- self.assertEqual(self.flags.no_teardown, "False")
+ self.assertEqual('False', self.flags.no_teardown)
+ self.assertEqual({'verify': True}, self.flags.os_cloud_config)
def test_parse_forbidden_flags(self):
self.flags.parse(foo=42)
diff --git a/yardstick/tests/unit/benchmark/contexts/test_heat.py b/yardstick/tests/unit/benchmark/contexts/test_heat.py
index c54a7ab12..ebb1d69ba 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_heat.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_heat.py
@@ -229,12 +229,12 @@ class HeatContextTestCase(unittest.TestCase):
self.assertRaises(y_exc.HeatTemplateError,
self.test_context.deploy)
- mock_path_exists.assert_called_once()
+ mock_path_exists.assert_called()
mock_resources_template.assert_called_once()
@mock.patch.object(os.path, 'exists', return_value=False)
@mock.patch.object(ssh.SSH, 'gen_keys')
- @mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
+ @mock.patch.object(heat, 'HeatTemplate')
def test_deploy(self, mock_template, mock_genkeys, mock_path_exists):
self.test_context._name = 'foo'
self.test_context._task_id = '1234567890'
@@ -245,16 +245,17 @@ class HeatContextTestCase(unittest.TestCase):
self.test_context.get_neutron_info = mock.MagicMock()
self.test_context.deploy()
- mock_template.assert_called_with('foo-12345678',
- '/bar/baz/some-heat-file',
- {'image': 'cirros'})
+ mock_template.assert_called_with(
+ 'foo-12345678', template_file='/bar/baz/some-heat-file',
+ heat_parameters={'image': 'cirros'},
+ os_cloud_config=self.test_context._flags.os_cloud_config)
self.assertIsNotNone(self.test_context.stack)
key_filename = ''.join(
[consts.YARDSTICK_ROOT_PATH,
'yardstick/resources/files/yardstick_key-',
self.test_context._name_task_id])
mock_genkeys.assert_called_once_with(key_filename)
- mock_path_exists.assert_called_once_with(key_filename)
+ mock_path_exists.assert_any_call(key_filename)
@mock.patch.object(heat, 'HeatTemplate')
@mock.patch.object(os.path, 'exists', return_value=False)
@@ -280,7 +281,7 @@ class HeatContextTestCase(unittest.TestCase):
'yardstick/resources/files/yardstick_key-',
self.test_context._name])
mock_genkeys.assert_called_once_with(key_filename)
- mock_path_exists.assert_called_once_with(key_filename)
+ mock_path_exists.assert_any_call(key_filename)
@mock.patch.object(heat, 'HeatTemplate')
@mock.patch.object(os.path, 'exists', return_value=False)
@@ -296,7 +297,6 @@ class HeatContextTestCase(unittest.TestCase):
self.test_context._flags.no_setup = True
self.test_context.template_file = '/bar/baz/some-heat-file'
self.test_context.get_neutron_info = mock.MagicMock()
-
self.test_context.deploy()
mock_retrieve_stack.assert_called_once_with(self.test_context._name)
@@ -306,7 +306,7 @@ class HeatContextTestCase(unittest.TestCase):
'yardstick/resources/files/yardstick_key-',
self.test_context._name])
mock_genkeys.assert_called_once_with(key_filename)
- mock_path_exists.assert_called_once_with(key_filename)
+ mock_path_exists.assert_any_call(key_filename)
@mock.patch.object(heat, 'HeatTemplate', return_value='heat_template')
@mock.patch.object(heat.HeatContext, '_add_resources_to_template')
@@ -334,7 +334,7 @@ class HeatContextTestCase(unittest.TestCase):
'yardstick/resources/files/yardstick_key-',
self.test_context._name_task_id])
mock_genkeys.assert_called_once_with(key_filename)
- mock_path_exists.assert_called_with(key_filename)
+ mock_path_exists.assert_any_call(key_filename)
mock_call_gen_keys = mock.call.gen_keys(key_filename)
mock_call_add_resources = (
@@ -420,7 +420,7 @@ class HeatContextTestCase(unittest.TestCase):
self.test_context.key_filename = 'foo/bar/foobar'
self.test_context.undeploy()
mock_delete_key.assert_called()
- self.assertTrue(mock_template.delete.called)
+ mock_template.delete.assert_called_once()
@mock.patch('yardstick.benchmark.contexts.heat.HeatTemplate')
def test_undeploy_no_teardown(self, mock_template):
diff --git a/yardstick/tests/unit/benchmark/contexts/test_kubernetes.py b/yardstick/tests/unit/benchmark/contexts/test_kubernetes.py
index 22153e4e8..4dd9d40d1 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_kubernetes.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_kubernetes.py
@@ -58,10 +58,10 @@ class KubernetesTestCase(unittest.TestCase):
mock_delete_services):
self.k8s_context.undeploy()
- self.assertTrue(mock_delete_ssh.called)
- self.assertTrue(mock_delete_rcs.called)
- self.assertTrue(mock_delete_pods.called)
- self.assertTrue(mock_delete_services.called)
+ mock_delete_ssh.assert_called_once()
+ mock_delete_rcs.assert_called_once()
+ mock_delete_pods.assert_called_once()
+ mock_delete_services.assert_called_once()
@mock.patch.object(kubernetes.KubernetesContext, '_create_services')
@mock.patch.object(kubernetes.KubernetesContext, '_wait_until_running')
@@ -77,11 +77,11 @@ class KubernetesTestCase(unittest.TestCase):
with mock.patch("yardstick.benchmark.contexts.kubernetes.time"):
self.k8s_context.deploy()
- self.assertTrue(mock_set_ssh_key.called)
- self.assertTrue(mock_create_rcs.called)
- self.assertTrue(mock_create_services.called)
- self.assertTrue(mock_get_rc_pods.called)
- self.assertTrue(mock_wait_until_running.called)
+ mock_set_ssh_key.assert_called_once()
+ mock_create_rcs.assert_called_once()
+ mock_create_services.assert_called_once()
+ mock_get_rc_pods.assert_called_once()
+ mock_wait_until_running.assert_called_once()
@mock.patch.object(kubernetes, 'paramiko', **{"resource_filename.return_value": ""})
@mock.patch.object(kubernetes, 'pkg_resources', **{"resource_filename.return_value": ""})
@@ -93,8 +93,8 @@ class KubernetesTestCase(unittest.TestCase):
self.k8s_context._set_ssh_key()
self.k8s_context._delete_ssh_key()
- self.assertTrue(mock_create.called)
- self.assertTrue(mock_delete.called)
+ mock_create.assert_called_once()
+ mock_delete.assert_called_once()
@mock.patch.object(kubernetes.k8s_utils, 'read_pod_status')
def test_wait_until_running(self, mock_read_pod_status):
@@ -136,34 +136,34 @@ class KubernetesTestCase(unittest.TestCase):
@mock.patch.object(kubernetes.KubernetesContext, '_create_rc')
def test_create_rcs(self, mock_create_rc):
self.k8s_context._create_rcs()
- self.assertTrue(mock_create_rc.called)
+ mock_create_rc.assert_called()
@mock.patch.object(kubernetes.k8s_utils, 'create_replication_controller')
def test_create_rc(self, mock_create_replication_controller):
self.k8s_context._create_rc({})
- self.assertTrue(mock_create_replication_controller.called)
+ mock_create_replication_controller.assert_called_once()
@mock.patch.object(kubernetes.KubernetesContext, '_delete_rc')
def test_delete_rcs(self, mock_delete_rc):
self.k8s_context._delete_rcs()
- self.assertTrue(mock_delete_rc.called)
+ mock_delete_rc.assert_called()
@mock.patch.object(kubernetes.k8s_utils, 'delete_replication_controller')
def test_delete_rc(self, mock_delete_replication_controller):
self.k8s_context._delete_rc({})
- self.assertTrue(mock_delete_replication_controller.called)
+ mock_delete_replication_controller.assert_called_once()
@mock.patch.object(kubernetes.k8s_utils, 'get_node_list')
def test_get_node_ip(self, mock_get_node_list):
self.k8s_context._get_node_ip()
- self.assertTrue(mock_get_node_list.called)
+ mock_get_node_list.assert_called_once()
@mock.patch('yardstick.orchestrator.kubernetes.ServiceObject.create')
def test_create_services(self, mock_create):
self.k8s_context._create_services()
- self.assertTrue(mock_create.called)
+ mock_create.assert_called()
@mock.patch('yardstick.orchestrator.kubernetes.ServiceObject.delete')
def test_delete_services(self, mock_delete):
self.k8s_context._delete_services()
- self.assertTrue(mock_delete.called)
+ mock_delete.assert_called()
diff --git a/yardstick/tests/unit/benchmark/contexts/test_node.py b/yardstick/tests/unit/benchmark/contexts/test_node.py
index 9761f6d53..8b232481b 100644
--- a/yardstick/tests/unit/benchmark/contexts/test_node.py
+++ b/yardstick/tests/unit/benchmark/contexts/test_node.py
@@ -176,7 +176,7 @@ class NodeContextTestCase(unittest.TestCase):
'type': 'script'
}
obj.deploy()
- self.assertTrue(dispatch_script_mock.called)
+ dispatch_script_mock.assert_called_once()
@mock.patch('{}.NodeContext._dispatch_ansible'.format(PREFIX))
def test_deploy_anisible(self, dispatch_ansible_mock):
@@ -186,7 +186,7 @@ class NodeContextTestCase(unittest.TestCase):
'type': 'ansible'
}
obj.deploy()
- self.assertTrue(dispatch_ansible_mock.called)
+ dispatch_ansible_mock.assert_called_once()
@mock.patch('{}.NodeContext._dispatch_script'.format(PREFIX))
def test_undeploy(self, dispatch_script_mock):
@@ -195,7 +195,7 @@ class NodeContextTestCase(unittest.TestCase):
'type': 'script'
}
obj.undeploy()
- self.assertTrue(dispatch_script_mock.called)
+ dispatch_script_mock.assert_called_once()
@mock.patch('{}.NodeContext._dispatch_ansible'.format(PREFIX))
def test_undeploy_anisble(self, dispatch_ansible_mock):
@@ -204,7 +204,7 @@ class NodeContextTestCase(unittest.TestCase):
'type': 'ansible'
}
obj.undeploy()
- self.assertTrue(dispatch_ansible_mock.called)
+ dispatch_ansible_mock.assert_called_once()
@mock.patch('{}.ssh.SSH._put_file_shell'.format(PREFIX))
@mock.patch('{}.ssh.SSH.execute'.format(PREFIX))
@@ -224,8 +224,8 @@ class NodeContextTestCase(unittest.TestCase):
execute_mock.return_value = (0, '', '')
obj._execute_remote_script('node5', info)
- self.assertTrue(put_file_mock.called)
- self.assertTrue(execute_mock.called)
+ put_file_mock.assert_called_once()
+ execute_mock.assert_called()
@mock.patch('{}.NodeContext._execute_local_script'.format(PREFIX))
def test_execute_script_local(self, local_execute_mock):
@@ -234,7 +234,7 @@ class NodeContextTestCase(unittest.TestCase):
obj = node.NodeContext()
self.addCleanup(obj._delete_context)
obj._execute_script(node_name, info)
- self.assertTrue(local_execute_mock.called)
+ local_execute_mock.assert_called_once()
@mock.patch('{}.NodeContext._execute_remote_script'.format(PREFIX))
def test_execute_script_remote(self, remote_execute_mock):
@@ -243,7 +243,7 @@ class NodeContextTestCase(unittest.TestCase):
obj = node.NodeContext()
self.addCleanup(obj._delete_context)
obj._execute_script(node_name, info)
- self.assertTrue(remote_execute_mock.called)
+ remote_execute_mock.assert_called_once()
def test_get_script(self):
script_args = 'hello.bash'
@@ -276,7 +276,7 @@ class NodeContextTestCase(unittest.TestCase):
'pwd': 'ubuntu',
}]
obj._get_client(node_name_args)
- self.assertTrue(wait_mock.called)
+ wait_mock.assert_called_once()
def test_get_server(self):
self.test_context.init(self.attrs)
diff --git a/yardstick/tests/unit/benchmark/core/test_task.py b/yardstick/tests/unit/benchmark/core/test_task.py
index 82a90b172..9e8e4e9f7 100644
--- a/yardstick/tests/unit/benchmark/core/test_task.py
+++ b/yardstick/tests/unit/benchmark/core/test_task.py
@@ -153,7 +153,7 @@ class TaskTestCase(unittest.TestCase):
runner.get_result.return_value = []
mock_base_runner.Runner.get.return_value = runner
t._run([scenario], False, "yardstick.out")
- self.assertTrue(runner.run.called)
+ runner.run.assert_called_once()
@mock.patch.object(os, 'environ')
def test_check_precondition(self, mock_os_environ):
@@ -421,6 +421,34 @@ key2:
self.parser._change_node_names(scenario, [my_context])
self.assertEqual(scenario, expected_scenario)
+ def test__change_node_names_options_empty(self):
+ ctx_attrs = {
+ 'name': 'demo',
+ 'task_id': '1234567890'
+ }
+
+ my_context = dummy.DummyContext()
+ my_context.init(ctx_attrs)
+ scenario = copy.deepcopy(self.scenario)
+ scenario['options'] = None
+
+ self.parser._change_node_names(scenario, [my_context])
+ self.assertIsNone(scenario['options'])
+
+ def test__change_node_names_options_server_name_empty(self):
+ ctx_attrs = {
+ 'name': 'demo',
+ 'task_id': '1234567890'
+ }
+
+ my_context = dummy.DummyContext()
+ my_context.init(ctx_attrs)
+ scenario = copy.deepcopy(self.scenario)
+ scenario['options']['server_name'] = None
+
+ self.parser._change_node_names(scenario, [my_context])
+ self.assertIsNone(scenario['options']['server_name'])
+
def test__parse_tasks(self):
task_obj = task.Task()
_uuid = uuid.uuid4()
diff --git a/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py b/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py
index 45840d569..d1172d5a6 100644
--- a/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py
+++ b/yardstick/tests/unit/benchmark/scenarios/availability/test_scenario_general.py
@@ -14,7 +14,8 @@ from yardstick.benchmark.scenarios.availability import scenario_general
class ScenarioGeneralTestCase(unittest.TestCase):
- def setUp(self):
+ @mock.patch.object(scenario_general, 'Director')
+ def setUp(self, *args):
self.scenario_cfg = {
'type': "general_scenario",
'options': {
@@ -36,32 +37,28 @@ class ScenarioGeneralTestCase(unittest.TestCase):
}
}
self.instance = scenario_general.ScenarioGeneral(self.scenario_cfg, None)
-
- self._mock_director = mock.patch.object(scenario_general, 'Director')
- self.mock_director = self._mock_director.start()
- self.addCleanup(self._stop_mock)
-
- def _stop_mock(self):
- self._mock_director.stop()
+ self.instance.setup()
+ self.instance.director.verify.return_value = True
def test_scenario_general_all_successful(self):
- self.instance.setup()
- self.instance.run({})
+
+ ret = {}
+ self.instance.run(ret)
self.instance.teardown()
+ self.assertEqual(ret['sla_pass'], 1)
def test_scenario_general_exception(self):
- mock_obj = mock.Mock()
- mock_obj.createActionPlayer.side_effect = KeyError('Wrong')
- self.instance.director = mock_obj
+ self.instance.director.createActionPlayer.side_effect = KeyError('Wrong')
self.instance.director.data = {}
- self.instance.run({})
+ ret = {}
+ self.instance.run(ret)
self.instance.teardown()
+ self.assertEqual(ret['sla_pass'], 1)
def test_scenario_general_case_fail(self):
- mock_obj = mock.Mock()
- mock_obj.verify.return_value = False
- self.instance.director = mock_obj
+ self.instance.director.verify.return_value = False
self.instance.director.data = {}
- self.instance.run({})
- self.instance.pass_flag = True
+ ret = {}
+ self.assertRaises(AssertionError, self.instance.run, ret)
self.instance.teardown()
+ self.assertEqual(ret['sla_pass'], 0)
diff --git a/yardstick/tests/unit/benchmark/scenarios/availability/test_serviceha.py b/yardstick/tests/unit/benchmark/scenarios/availability/test_serviceha.py
index 6bb3ec63b..dd656fbd5 100644
--- a/yardstick/tests/unit/benchmark/scenarios/availability/test_serviceha.py
+++ b/yardstick/tests/unit/benchmark/scenarios/availability/test_serviceha.py
@@ -60,15 +60,16 @@ class ServicehaTestCase(unittest.TestCase):
p.setup()
self.assertTrue(p.setup_done)
- # def test__serviceha_run_sla_error(self, mock_attacker, mock_monitor):
- # p = serviceha.ServiceHA(self.args, self.ctx)
+ @mock.patch.object(serviceha, 'baseattacker')
+ @mock.patch.object(serviceha, 'basemonitor')
+ def test__serviceha_run_sla_error(self, mock_monitor, *args):
+ p = serviceha.ServiceHA(self.args, self.ctx)
- # p.setup()
- # self.assertEqual(p.setup_done, True)
+ p.setup()
+ self.assertEqual(p.setup_done, True)
- # result = {}
- # result["outage_time"] = 10
- # mock_monitor.Monitor().get_result.return_value = result
+ mock_monitor.MonitorMgr().verify_SLA.return_value = False
- # ret = {}
- # self.assertRaises(AssertionError, p.run, ret)
+ ret = {}
+ self.assertRaises(AssertionError, p.run, ret)
+ self.assertEqual(ret['sla_pass'], 0)
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py
index 98d967f2b..af4f0c8ab 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py
@@ -27,7 +27,7 @@ class AddMemoryLoadTestCase(unittest.TestCase):
mock_from_node().execute.return_value = (0, '0 2048 512', '')
obj = AddMemoryLoad(scenario_cfg, context_cfg)
obj.run({})
- self.assertTrue(mock_from_node.called)
+ mock_from_node.assert_called()
@mock.patch('yardstick.ssh.SSH.from_node')
def test_add_memory_load_without_load(self, mock_from_node):
@@ -41,7 +41,7 @@ class AddMemoryLoadTestCase(unittest.TestCase):
}
obj = AddMemoryLoad(scenario_cfg, context_cfg)
obj.run({})
- self.assertTrue(mock_from_node.called)
+ mock_from_node.assert_called_once()
@mock.patch('yardstick.ssh.SSH.from_node')
def test_add_memory_load_without_args(self, mock_from_node):
@@ -54,4 +54,4 @@ class AddMemoryLoadTestCase(unittest.TestCase):
}
obj = AddMemoryLoad(scenario_cfg, context_cfg)
obj.run({})
- self.assertTrue(mock_from_node.called)
+ mock_from_node.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py
index a61195f66..bb7fa4536 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py
@@ -6,21 +6,51 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.attach_volume import AttachVolume
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import attach_volume
class AttachVolumeTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.attach_server_volume')
- def test_attach_volume(self, mock_attach_server_volume):
- options = {
- 'volume_id': '123-456-000',
- 'server_id': '000-123-456'
- }
- args = {"options": options}
- obj = AttachVolume(args, {})
- obj.run({})
- self.assertTrue(mock_attach_server_volume.called)
+ def setUp(self):
+
+ self._mock_attach_volume_to_server = mock.patch.object(
+ openstack_utils, 'attach_volume_to_server')
+ self.mock_attach_volume_to_server = (
+ self._mock_attach_volume_to_server.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(attach_volume, 'LOG')
+ self.mock_log = self._mock_log.start()
+ _uuid = uuidutils.generate_uuid()
+ self.args = {'options': {'server_name_or_id': _uuid,
+ 'volume_name_or_id': _uuid}}
+ self.result = {}
+ self.addCleanup(self._stop_mock)
+ self.attachvol_obj = attach_volume.AttachVolume(self.args, mock.ANY)
+
+ def _stop_mock(self):
+ self._mock_attach_volume_to_server.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_attach_volume_to_server.return_value = True
+ self.assertIsNone(self.attachvol_obj.run(self.result))
+ self.assertEqual({'attach_volume': 1}, self.result)
+ self.mock_log.info.asset_called_once_with(
+ 'Attach volume to server successful!')
+
+ def test_run_fail(self):
+ self.mock_attach_volume_to_server.return_value = False
+ with self.assertRaises(exceptions.ScenarioAttachVolumeError):
+ self.attachvol_obj.run(self.result)
+ self.assertEqual({'attach_volume': 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ 'Attach volume to server failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py
index a50e752fa..270c9d3c9 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py
@@ -19,7 +19,7 @@ class CheckNumaInfoTestCase(unittest.TestCase):
scenario_cfg = {'info1': {}, 'info2': {}}
obj = CheckNumaInfo(scenario_cfg, {})
obj.run({})
- self.assertTrue(mock_check_vm2.called)
+ mock_check_vm2.assert_called_once()
def test_check_vm2_status_length_eq_1(self):
info1 = {
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py
index 663ca5d5b..0b175fae8 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py
@@ -26,4 +26,4 @@ class CreateFlavorTestCase(unittest.TestCase):
args = {"options": options}
obj = CreateFlavor(args, {})
obj.run({})
- self.assertTrue(mock_create_flavor.called)
+ mock_create_flavor.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_floating_ip.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_floating_ip.py
index a7286f5da..894cc1c2a 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_floating_ip.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_floating_ip.py
@@ -11,48 +11,47 @@ import unittest
import mock
from yardstick.benchmark.scenarios.lib import create_floating_ip
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
class CreateFloatingIpTestCase(unittest.TestCase):
def setUp(self):
- self._mock_get_network_id = mock.patch.object(
- op_utils, 'get_network_id')
- self.mock_get_network_id = self._mock_get_network_id.start()
self._mock_create_floating_ip = mock.patch.object(
- op_utils, 'create_floating_ip')
+ openstack_utils, 'create_floating_ip')
self.mock_create_floating_ip = self._mock_create_floating_ip.start()
- self._mock_get_neutron_client = mock.patch.object(
- op_utils, 'get_neutron_client')
- self.mock_get_neutron_client = self._mock_get_neutron_client.start()
self._mock_get_shade_client = mock.patch.object(
- op_utils, 'get_shade_client')
+ openstack_utils, 'get_shade_client')
self.mock_get_shade_client = self._mock_get_shade_client.start()
self._mock_log = mock.patch.object(create_floating_ip, 'LOG')
self.mock_log = self._mock_log.start()
+ self.args = {'options': {'network_name_or_id': 'yardstick_net'}}
+ self.result = {}
- self._fip_obj = create_floating_ip.CreateFloatingIp(mock.ANY, mock.ANY)
- self._fip_obj.scenario_cfg = {'output': 'key1\nkey2'}
+ self.fip_obj = create_floating_ip.CreateFloatingIp(self.args, mock.ANY)
+ self.fip_obj.scenario_cfg = {'output': 'key1\nkey2'}
self.addCleanup(self._stop_mock)
def _stop_mock(self):
- self._mock_get_network_id.stop()
self._mock_create_floating_ip.stop()
- self._mock_get_neutron_client.stop()
self._mock_get_shade_client.stop()
self._mock_log.stop()
def test_run(self):
self.mock_create_floating_ip.return_value = {'fip_id': 'value1',
'fip_addr': 'value2'}
- output = self._fip_obj.run(mock.ANY)
- self.assertDictEqual({'key1': 'value1', 'key2': 'value2'}, output)
+ output = self.fip_obj.run(self.result)
+ self.assertEqual({'floating_ip_create': 1}, self.result)
+ self.assertEqual({'key1': 'value1', 'key2': 'value2'}, output)
+ self.mock_log.info.asset_called_once_with(
+ 'Creating floating ip successful!')
def test_run_no_fip(self):
self.mock_create_floating_ip.return_value = None
- output = self._fip_obj.run(mock.ANY)
- self.assertIsNone(output)
+ with self.assertRaises(exceptions.ScenarioCreateFloatingIPError):
+ self.fip_obj.run(self.result)
+ self.assertEqual({'floating_ip_create': 0}, self.result)
self.mock_log.error.assert_called_once_with(
'Creating floating ip failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py
index 1c3d6cebc..a7b683f47 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py
@@ -6,22 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-
-import mock
+from oslo_utils import uuidutils
import unittest
+import mock
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios.lib import create_keypair
class CreateKeypairTestCase(unittest.TestCase):
- @mock.patch.object(create_keypair, 'paramiko')
- @mock.patch.object(create_keypair, 'op_utils')
- def test_create_keypair(self, mock_op_utils, *args):
- options = {
- 'key_name': 'yardstick_key',
- 'key_path': '/tmp/yardstick_key'
- }
- args = {"options": options}
- obj = create_keypair.CreateKeypair(args, {})
- obj.run({})
- mock_op_utils.create_keypair.assert_called_once()
+
+ def setUp(self):
+
+ self._mock_create_keypair = mock.patch.object(
+ openstack_utils, 'create_keypair')
+ self.mock_create_keypair = (
+ self._mock_create_keypair.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_keypair, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'key_name': 'yardstick_key'}}
+ self.result = {}
+
+ self.ckeypair_obj = create_keypair.CreateKeypair(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_create_keypair.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.ckeypair_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_keypair.return_value = {
+ 'name': 'key-name', 'type': 'ssh', 'id': _uuid}
+ output = self.ckeypair_obj.run(self.result)
+ self.assertDictEqual({'keypair_create': 1}, self.result)
+ self.assertDictEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create keypair successful!')
+
+ def test_run_fail(self):
+ self.mock_create_keypair.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateKeypairError):
+ self.ckeypair_obj.run(self.result)
+ self.assertDictEqual({'keypair_create': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Create keypair failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py
index ad4adeeb2..17a4ef2e1 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py
@@ -6,25 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.create_network import CreateNetwork
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import create_network
class CreateNetworkTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.create_neutron_net')
- def test_create_network(self, mock_get_neutron_client, mock_create_neutron_net):
- options = {
- 'openstack_paras': {
- 'name': 'yardstick_net',
- 'admin_state_up': 'True'
- }
- }
- args = {"options": options}
- obj = CreateNetwork(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_create_neutron_net.called)
+ def setUp(self):
+
+ self._mock_create_neutron_net = mock.patch.object(
+ openstack_utils, 'create_neutron_net')
+ self.mock_create_neutron_net = self._mock_create_neutron_net.start()
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_network, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'network_name': 'yardstick_net'}}
+ self.result = {}
+
+ self._cnet_obj = create_network.CreateNetwork(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_create_neutron_net.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self._cnet_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_neutron_net.return_value = _uuid
+ output = self._cnet_obj.run(self.result)
+ self.assertEqual({"network_create": 1}, self.result)
+ self.assertEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create network successful!')
+
+ def test_run_fail_exception(self):
+ self.mock_create_neutron_net.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateNetworkError):
+ self._cnet_obj.run(self.result)
+ self.assertEqual({"network_create": 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ 'Create network failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py
index 9a1611c3d..bea02a630 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py
@@ -24,4 +24,4 @@ class CreatePortTestCase(unittest.TestCase):
args = {"options": options}
obj = CreatePort(args, {})
obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
+ mock_get_neutron_client.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py
index 107921403..8d6f119ab 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py
@@ -6,25 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.create_router import CreateRouter
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import create_router
class CreateRouterTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.create_neutron_router')
- def test_create_router(self, mock_get_neutron_client, mock_create_neutron_router):
- options = {
- 'openstack_paras': {
- 'admin_state_up': 'True',
- 'name': 'yardstick_router'
- }
- }
- args = {"options": options}
- obj = CreateRouter(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_create_neutron_router.called)
+ def setUp(self):
+
+ self._mock_create_neutron_router = mock.patch.object(
+ openstack_utils, 'create_neutron_router')
+ self.mock_create_neutron_router = (
+ self._mock_create_neutron_router.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_router, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'name': 'yardstick_net'}}
+ self.result = {}
+
+ self.crouter_obj = create_router.CreateRouter(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_create_neutron_router.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.crouter_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_neutron_router.return_value = _uuid
+ output = self.crouter_obj.run(self.result)
+ self.assertEqual({"router_create": 1}, self.result)
+ self.assertEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create router successful!')
+
+ def test_run_fail(self):
+ self.mock_create_neutron_router.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateRouterError):
+ self.crouter_obj.run(self.result)
+ self.assertEqual({"router_create": 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Create router failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py
index b55767360..0477a49d4 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py
@@ -6,25 +6,54 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.create_sec_group import CreateSecgroup
-
-
-class CreateSecGroupTestCase(unittest.TestCase):
-
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.create_security_group_full')
- def test_create_sec_group(self, mock_get_neutron_client, mock_create_security_group_full):
- options = {
- 'openstack_paras': {
- 'sg_name': 'yardstick_sec_group',
- 'description': 'security group for yardstick manual VM'
- }
- }
- args = {"options": options}
- obj = CreateSecgroup(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_create_security_group_full.called)
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import create_sec_group
+
+
+class CreateSecurityGroupTestCase(unittest.TestCase):
+
+ def setUp(self):
+
+ self._mock_create_security_group_full = mock.patch.object(
+ openstack_utils, 'create_security_group_full')
+ self.mock_create_security_group_full = (
+ self._mock_create_security_group_full.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_sec_group, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'sg_name': 'yardstick_sg'}}
+ self.result = {}
+
+ self.csecgp_obj = create_sec_group.CreateSecgroup(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_create_security_group_full.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.csecgp_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_security_group_full.return_value = _uuid
+ output = self.csecgp_obj.run(self.result)
+ self.assertEqual({'sg_create': 1}, self.result)
+ self.assertEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with(
+ 'Create security group successful!')
+
+ def test_run_fail(self):
+ self.mock_create_security_group_full.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateSecurityGroupError):
+ self.csecgp_obj.run(self.result)
+ self.assertEqual({'sg_create': 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ 'Create security group failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py
index faee98fd1..b58785112 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py
@@ -6,29 +6,54 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.create_server import CreateServer
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import create_server
class CreateServerTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.create_instance_and_wait_for_active')
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- @mock.patch('yardstick.common.openstack_utils.get_glance_client')
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- def test_create_server(self, mock_get_nova_client, mock_get_neutron_client,
- mock_get_glance_client, mock_create_instance_and_wait_for_active):
- scenario_cfg = {
- 'options': {
- 'openstack_paras': 'example'
- },
- 'output': 'server'
- }
- obj = CreateServer(scenario_cfg, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_get_glance_client.called)
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_create_instance_and_wait_for_active.called)
+ def setUp(self):
+
+ self._mock_create_instance_and_wait_for_active = mock.patch.object(
+ openstack_utils, 'create_instance_and_wait_for_active')
+ self.mock_create_instance_and_wait_for_active = (
+ self._mock_create_instance_and_wait_for_active.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_server, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {
+ 'options': {'name': 'server-name', 'image': 'image-name',
+ 'flavor': 'flavor-name'}}
+ self.result = {}
+
+ self.addCleanup(self._stop_mock)
+ self.cserver_obj = create_server.CreateServer(self.args, mock.ANY)
+
+ def _stop_mock(self):
+ self._mock_create_instance_and_wait_for_active.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.cserver_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_instance_and_wait_for_active.return_value = (
+ {'name': 'server-name', 'flavor': 'flavor-name', 'id': _uuid})
+ output = self.cserver_obj.run(self.result)
+ self.assertEqual({'instance_create': 1}, self.result)
+ self.assertEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create server successful!')
+
+ def test_run_fail(self):
+ self.mock_create_instance_and_wait_for_active.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateServerError):
+ self.cserver_obj.run(self.result)
+ self.assertEqual({'instance_create': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Create server failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py
index 1536e83e0..856e985c4 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py
@@ -6,27 +6,53 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.create_subnet import CreateSubnet
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import create_subnet
class CreateSubnetTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.create_neutron_subnet')
- def test_create_subnet(self, mock_get_neutron_client, mock_create_neutron_subnet):
- options = {
- 'openstack_paras': {
- 'network_id': '123-123-123',
- 'name': 'yardstick_subnet',
- 'cidr': '10.10.10.0/24',
- 'ip_version': '4'
- }
- }
- args = {"options": options}
- obj = CreateSubnet(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_create_neutron_subnet.called)
+ def setUp(self):
+
+ self._mock_create_neutron_subnet = mock.patch.object(
+ openstack_utils, 'create_neutron_subnet')
+ self.mock_create_neutron_subnet = (
+ self._mock_create_neutron_subnet.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_subnet, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'network_name_or_id': 'yardstick_net'}}
+ self.result = {"subnet_create": 0}
+
+ self._csubnet_obj = create_subnet.CreateSubnet(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_create_neutron_subnet.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self._csubnet_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_neutron_subnet.return_value = _uuid
+ output = self._csubnet_obj.run(self.result)
+ self.assertDictEqual({"subnet_create": 1}, self.result)
+ self.assertDictEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create subnet successful!')
+
+ def test_run_fail(self):
+ self._csubnet_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_neutron_subnet.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateSubnetError):
+ self._csubnet_obj.run(self.result)
+ self.assertDictEqual({"subnet_create": 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Create subnet failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py
index 4bfec3252..f91d2c3f4 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py
@@ -6,95 +6,53 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-import mock
+from oslo_utils import uuidutils
import unittest
+import mock
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios.lib import create_volume
class CreateVolumeTestCase(unittest.TestCase):
def setUp(self):
- self._mock_cinder_client = mock.patch(
- 'yardstick.common.openstack_utils.get_cinder_client')
- self.mock_cinder_client = self._mock_cinder_client.start()
- self._mock_glance_client = mock.patch(
- 'yardstick.common.openstack_utils.get_glance_client')
- self.mock_glance_client = self._mock_glance_client.start()
- self.addCleanup(self._stop_mock)
-
- self.scenario_cfg = {
- "options" :
- {
- 'volume_name': 'yardstick_test_volume_01',
- 'size': '256',
- 'image': 'cirros-0.3.5'
- }
- }
- self.scenario = create_volume.CreateVolume(
- scenario_cfg=self.scenario_cfg,
- context_cfg={})
+ self._mock_create_volume = mock.patch.object(
+ openstack_utils, 'create_volume')
+ self.mock_create_volume = (
+ self._mock_create_volume.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(create_volume, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'size_gb': 1}}
+ self.result = {}
+
+ self.cvolume_obj = create_volume.CreateVolume(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
def _stop_mock(self):
- self._mock_cinder_client.stop()
- self._mock_glance_client.stop()
-
- def test_init(self):
- self.mock_cinder_client.return_value = "All volumes are equal"
- self.mock_glance_client.return_value = "Images are more equal"
-
- expected_vol_name = self.scenario_cfg["options"]["volume_name"]
- expected_vol_size = self.scenario_cfg["options"]["size"]
- expected_im_name = self.scenario_cfg["options"]["image"]
- expected_im_id = None
-
- scenario = create_volume.CreateVolume(
- scenario_cfg=self.scenario_cfg,
- context_cfg={})
-
- self.assertEqual(expected_vol_name, scenario.volume_name)
- self.assertEqual(expected_vol_size, scenario.volume_size)
- self.assertEqual(expected_im_name, scenario.image_name)
- self.assertEqual(expected_im_id, scenario.image_id)
- self.assertEqual("All volumes are equal", scenario.cinder_client)
- self.assertEqual("Images are more equal", scenario.glance_client)
-
- def test_setup(self):
- self.assertFalse(self.scenario.setup_done)
- self.scenario.setup()
- self.assertTrue(self.scenario.setup_done)
-
- @mock.patch('yardstick.common.openstack_utils.create_volume')
- @mock.patch('yardstick.common.openstack_utils.get_image_id')
- def test_run(self, mock_image_id, mock_create_volume):
- self.scenario.run()
-
- mock_image_id.assert_called_once()
- mock_create_volume.assert_called_once()
-
- @mock.patch.object(create_volume.CreateVolume, 'setup')
- def test_run_no_setup(self, scenario_setup):
- self.scenario.setup_done = False
- self.scenario.run()
- scenario_setup.assert_called_once()
-
- @mock.patch('yardstick.common.openstack_utils.create_volume')
- @mock.patch('yardstick.common.openstack_utils.get_image_id')
- @mock.patch('yardstick.common.openstack_utils.get_cinder_client')
- @mock.patch('yardstick.common.openstack_utils.get_glance_client')
- def test_create_volume(self, mock_get_glance_client,
- mock_get_cinder_client, mock_image_id,
- mock_create_volume):
- options = {
- 'volume_name': 'yardstick_test_volume_01',
- 'size': '256',
- 'image': 'cirros-0.3.5'
- }
- args = {"options": options}
- scenario = create_volume.CreateVolume(args, {})
- scenario.run()
- self.assertTrue(mock_create_volume.called)
- self.assertTrue(mock_image_id.called)
- self.assertTrue(mock_get_glance_client.called)
- self.assertTrue(mock_get_cinder_client.called)
+ self._mock_create_volume.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.cvolume_obj.scenario_cfg = {'output': 'id'}
+ self.mock_create_volume.return_value = {'name': 'yardstick_volume',
+ 'id': _uuid,
+ 'status': 'available'}
+ output = self.cvolume_obj.run(self.result)
+ self.assertDictEqual({'volume_create': 1}, self.result)
+ self.assertDictEqual({'id': _uuid}, output)
+ self.mock_log.info.asset_called_once_with('Create volume successful!')
+
+ def test_run_fail(self):
+ self.mock_create_volume.return_value = None
+ with self.assertRaises(exceptions.ScenarioCreateVolumeError):
+ self.cvolume_obj.run(self.result)
+ self.assertDictEqual({'volume_create': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Create volume failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py
index e345afe3c..24dbf8a16 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py
@@ -23,5 +23,5 @@ class DeleteFlavorTestCase(unittest.TestCase):
args = {"options": options}
obj = DeleteFlavor(args, {})
obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_delete_flavor.called)
+ mock_get_nova_client.assert_called_once()
+ mock_delete_flavor.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py
index be997199c..45a39eba2 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py
@@ -6,22 +6,50 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_floating_ip import DeleteFloatingIp
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import delete_floating_ip
class DeleteFloatingIpTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- @mock.patch('yardstick.common.openstack_utils.delete_floating_ip')
- def test_delete_floating_ip(self, mock_get_nova_client, mock_delete_floating_ip):
- options = {
- 'floating_ip_id': '123-123-123'
- }
- args = {"options": options}
- obj = DeleteFloatingIp(args, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_delete_floating_ip.called)
+ def setUp(self):
+ self._mock_delete_floating_ip = mock.patch.object(
+ openstack_utils, 'delete_floating_ip')
+ self.mock_delete_floating_ip = self._mock_delete_floating_ip.start()
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_floating_ip, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'floating_ip_id': uuidutils.generate_uuid()}}
+ self.result = {}
+
+ self.del_obj = delete_floating_ip.DeleteFloatingIp(
+ self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_delete_floating_ip.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_delete_floating_ip.return_value = True
+ self.assertIsNone(self.del_obj.run(self.result))
+ self.assertEqual({"delete_floating_ip": 1}, self.result)
+ self.mock_log.info.assert_called_once_with(
+ "Delete floating ip successful!")
+
+ def test_run_fail(self):
+ self.mock_delete_floating_ip.return_value = False
+ with self.assertRaises(exceptions.ScenarioDeleteFloatingIPError):
+ self.del_obj.run(self.result)
+ self.assertEqual({"delete_floating_ip": 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ "Delete floating ip failed!")
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py
index eb3f9fc85..e382d46fa 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py
@@ -24,6 +24,6 @@ class DeleteImageTestCase(unittest.TestCase):
args = {"options": options}
obj = DeleteImage(args, {})
obj.run({})
- self.assertTrue(mock_delete_image.called)
- self.assertTrue(mock_image_id.called)
- self.assertTrue(mock_get_glance_client.called)
+ mock_delete_image.assert_called_once()
+ mock_image_id.assert_called_once()
+ mock_get_glance_client.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py
index 38cc929c0..c7940251e 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py
@@ -9,19 +9,43 @@
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_keypair import DeleteKeypair
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import delete_keypair
class DeleteKeypairTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- @mock.patch('yardstick.common.openstack_utils.delete_keypair')
- def test_detach_volume(self, mock_get_nova_client, mock_delete_keypair):
- options = {
- 'key_name': 'yardstick_key'
- }
- args = {"options": options}
- obj = DeleteKeypair(args, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_delete_keypair.called)
+ def setUp(self):
+ self._mock_delete_keypair = mock.patch.object(
+ openstack_utils, 'delete_keypair')
+ self.mock_delete_keypair = self._mock_delete_keypair.start()
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_keypair, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'key_name': 'yardstick_key'}}
+ self.result = {}
+ self.delkey_obj = delete_keypair.DeleteKeypair(self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_delete_keypair.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_delete_keypair.return_value = True
+ self.assertIsNone(self.delkey_obj.run(self.result))
+ self.assertEqual({'delete_keypair': 1}, self.result)
+ self.mock_log.info.assert_called_once_with(
+ 'Delete keypair successful!')
+
+ def test_run_fail(self):
+ self.mock_delete_keypair.return_value = False
+ with self.assertRaises(exceptions.ScenarioDeleteKeypairError):
+ self.delkey_obj.run(self.result)
+ self.assertEqual({'delete_keypair': 0}, self.result)
+ self.mock_log.error.assert_called_once_with("Delete keypair failed!")
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_network.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_network.py
index aef99ee94..b6dbf4791 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_network.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_network.py
@@ -11,7 +11,8 @@ from oslo_utils import uuidutils
import unittest
import mock
-import yardstick.common.openstack_utils as op_utils
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
from yardstick.benchmark.scenarios.lib import delete_network
@@ -19,16 +20,17 @@ class DeleteNetworkTestCase(unittest.TestCase):
def setUp(self):
self._mock_delete_neutron_net = mock.patch.object(
- op_utils, 'delete_neutron_net')
+ openstack_utils, "delete_neutron_net")
self.mock_delete_neutron_net = self._mock_delete_neutron_net.start()
self._mock_get_shade_client = mock.patch.object(
- op_utils, 'get_shade_client')
+ openstack_utils, "get_shade_client")
self.mock_get_shade_client = self._mock_get_shade_client.start()
- self._mock_log = mock.patch.object(delete_network, 'LOG')
+ self._mock_log = mock.patch.object(delete_network, "LOG")
self.mock_log = self._mock_log.start()
- _uuid = uuidutils.generate_uuid()
- self.args = {'options': {'network_id': _uuid}}
- self._del_obj = delete_network.DeleteNetwork(self.args, mock.ANY)
+ self.args = {"options": {"network_name_or_id": (
+ uuidutils.generate_uuid())}}
+ self.result = {}
+ self.del_obj = delete_network.DeleteNetwork(self.args, mock.ANY)
self.addCleanup(self._stop_mock)
@@ -39,11 +41,14 @@ class DeleteNetworkTestCase(unittest.TestCase):
def test_run(self):
self.mock_delete_neutron_net.return_value = True
- self.assertTrue(self._del_obj.run({}))
+ self.assertIsNone(self.del_obj.run(self.result))
+ self.assertEqual({"delete_network": 1}, self.result)
self.mock_log.info.assert_called_once_with(
"Delete network successful!")
def test_run_fail(self):
self.mock_delete_neutron_net.return_value = False
- self.assertFalse(self._del_obj.run({}))
+ with self.assertRaises(exceptions.ScenarioDeleteNetworkError):
+ self.del_obj.run(self.result)
+ self.assertEqual({"delete_network": 0}, self.result)
self.mock_log.error.assert_called_once_with("Delete network failed!")
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py
index 008ed9168..9fd318580 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py
@@ -22,4 +22,4 @@ class DeletePortTestCase(unittest.TestCase):
args = {"options": options}
obj = DeletePort(args, {})
obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
+ mock_get_neutron_client.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py
index 9b31566ac..b76100f19 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py
@@ -6,22 +6,49 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_router import DeleteRouter
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import delete_router
class DeleteRouterTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.delete_neutron_router')
- def test_delete_router(self, mock_get_neutron_client, mock_delete_neutron_router):
- options = {
- 'router_id': '123-123-123'
- }
- args = {"options": options}
- obj = DeleteRouter(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_delete_neutron_router.called)
+ def setUp(self):
+ self._mock_delete_neutron_router = mock.patch.object(
+ openstack_utils, 'delete_neutron_router')
+ self.mock_delete_neutron_router = (
+ self._mock_delete_neutron_router.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_router, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'router_id': uuidutils.generate_uuid()}}
+ self.result = {"delete_router": 0}
+
+ self._del_obj = delete_router.DeleteRouter(self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_delete_neutron_router.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_delete_neutron_router.return_value = True
+ self.assertIsNone(self._del_obj.run(self.result))
+ self.assertEqual({"delete_router": 1}, self.result)
+ self.mock_log.info.assert_called_once_with("Delete router successful!")
+
+ def test_run_fail(self):
+ self.mock_delete_neutron_router.return_value = False
+ with self.assertRaises(exceptions.ScenarioDeleteRouterError):
+ self._del_obj.run(self.result)
+ self.assertEqual({"delete_router": 0}, self.result)
+ self.mock_log.error.assert_called_once_with("Delete router failed!")
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py
index e19c38d47..0c9cf7c17 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py
@@ -23,5 +23,5 @@ class DeleteRouterGatewayTestCase(unittest.TestCase):
args = {"options": options}
obj = DeleteRouterGateway(args, {})
obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_remove_gateway_router.called)
+ mock_get_neutron_client.assert_called_once()
+ mock_remove_gateway_router.assert_called_once()
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py
index 6c4fdd5e3..823cb951a 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py
@@ -6,23 +6,51 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_router_interface import DeleteRouterInterface
+from yardstick.benchmark.scenarios.lib import delete_router_interface
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
class DeleteRouterInterfaceTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
- @mock.patch('yardstick.common.openstack_utils.remove_interface_router')
- def test_delete_router_interface(self, mock_get_neutron_client, mock_remove_interface_router):
- options = {
- 'router_id': '123-123-123',
- 'subnet_id': '321-321-321'
- }
- args = {"options": options}
- obj = DeleteRouterInterface(args, {})
- obj.run({})
- self.assertTrue(mock_get_neutron_client.called)
- self.assertTrue(mock_remove_interface_router.called)
+ def setUp(self):
+ self._mock_remove_router_interface = mock.patch.object(
+ openstack_utils, 'remove_router_interface')
+ self.mock_remove_router_interface = (
+ self._mock_remove_router_interface.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_router_interface, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'router': uuidutils.generate_uuid()}}
+ self.result = {}
+ self.delrout_obj = delete_router_interface.DeleteRouterInterface(
+ self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_remove_router_interface.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_remove_router_interface.return_value = True
+ self.assertIsNone(self.delrout_obj.run(self.result))
+ self.assertEqual({"delete_router_interface": 1}, self.result)
+ self.mock_log.info.assert_called_once_with(
+ "Delete router interface successful!")
+
+ def test_run_fail(self):
+ self.mock_remove_router_interface.return_value = False
+ with self.assertRaises(exceptions.ScenarioRemoveRouterIntError):
+ self.delrout_obj.run(self.result)
+ self.assertEqual({"delete_router_interface": 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ "Delete router interface failed!")
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py
index dedce2d4a..55fe53df8 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py
@@ -6,22 +6,49 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_server import DeleteServer
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import delete_server
class DeleteServerTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.delete_instance')
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- def test_delete_server(self, mock_get_nova_client, mock_delete_instance):
- options = {
- 'server_id': '1234-4567-0000'
- }
- args = {"options": options}
- obj = DeleteServer(args, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_delete_instance.called)
+ def setUp(self):
+ self._mock_delete_instance = mock.patch.object(
+ openstack_utils, 'delete_instance')
+ self.mock_delete_instance = (
+ self._mock_delete_instance.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_server, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'name_or_id': uuidutils.generate_uuid()
+ }}
+ self.result = {}
+
+ self.delserver_obj = delete_server.DeleteServer(self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_delete_instance.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_delete_instance.return_value = True
+ self.assertIsNone(self.delserver_obj.run(self.result))
+ self.assertEqual({'delete_server': 1}, self.result)
+ self.mock_log.info.assert_called_once_with('Delete server successful!')
+
+ def test_run_fail(self):
+ self.mock_delete_instance.return_value = False
+ with self.assertRaises(exceptions.ScenarioDeleteServerError):
+ self.delserver_obj.run(self.result)
+ self.assertEqual({'delete_server': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Delete server failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py
index 2ea82e2a4..0db16f396 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py
@@ -9,19 +9,44 @@
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.delete_volume import DeleteVolume
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import delete_volume
class DeleteVolumeTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_cinder_client')
- @mock.patch('yardstick.common.openstack_utils.delete_volume')
- def test_delete_volume(self, mock_get_cinder_client, mock_delete_volume):
- options = {
- 'volume_id': '123-123-123'
- }
- args = {"options": options}
- obj = DeleteVolume(args, {})
- obj.run({})
- self.assertTrue(mock_get_cinder_client.called)
- self.assertTrue(mock_delete_volume.called)
+ def setUp(self):
+ self._mock_delete_volume = mock.patch.object(
+ openstack_utils, 'delete_volume')
+ self.mock_delete_volume = (
+ self._mock_delete_volume.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(delete_volume, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'name_or_id': 'yardstick_volume'}}
+ self.result = {}
+
+ self.delvol_obj = delete_volume.DeleteVolume(self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_delete_volume.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_delete_volume.return_value = True
+ self.assertIsNone(self.delvol_obj.run(self.result))
+ self.assertEqual({'delete_volume': 1}, self.result)
+ self.mock_log.info.assert_called_once_with('Delete volume successful!')
+
+ def test_run_fail(self):
+ self.mock_delete_volume.return_value = False
+ with self.assertRaises(exceptions.ScenarioDeleteVolumeError):
+ self.delvol_obj.run(self.result)
+ self.assertEqual({'delete_volume': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Delete volume failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py
index 34fbac68c..2bc57f495 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py
@@ -6,21 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.detach_volume import DetachVolume
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import detach_volume
class DetachVolumeTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.detach_volume')
- def test_detach_volume(self, mock_detach_volume):
- options = {
- 'server_id': '321-321-321',
- 'volume_id': '123-123-123'
- }
- args = {"options": options}
- obj = DetachVolume(args, {})
- obj.run({})
- self.assertTrue(mock_detach_volume.called)
+ def setUp(self):
+ self._mock_detach_volume = mock.patch.object(
+ openstack_utils, 'detach_volume')
+ self.mock_detach_volume = (
+ self._mock_detach_volume.start())
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(detach_volume, 'LOG')
+ self.mock_log = self._mock_log.start()
+ _uuid = uuidutils.generate_uuid()
+ self.args = {'options': {'server_name_or_id': _uuid,
+ 'volume_name_or_id': _uuid}}
+ self.result = {}
+
+ self.detachvol_obj = detach_volume.DetachVolume(self.args, mock.ANY)
+
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_detach_volume.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ self.mock_detach_volume.return_value = True
+ self.assertIsNone(self.detachvol_obj.run(self.result))
+ self.assertEqual({'detach_volume': 1}, self.result)
+ self.mock_log.info.assert_called_once_with(
+ 'Detach volume from server successful!')
+
+ def test_run_fail(self):
+ self.mock_detach_volume.return_value = False
+ with self.assertRaises(exceptions.ScenarioDetachVolumeError):
+ self.detachvol_obj.run(self.result)
+ self.assertEqual({'detach_volume': 0}, self.result)
+ self.mock_log.error.assert_called_once_with(
+ 'Detach volume from server failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
index e9025f33f..1c1364348 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
@@ -6,20 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.get_flavor import GetFlavor
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import get_flavor
class GetFlavorTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_flavor_by_name')
- def test_get_flavor(self, mock_get_flavor_by_name):
- options = {
- 'flavor_name': 'yardstick_test_flavor'
- }
- args = {"options": options}
- obj = GetFlavor(args, {})
- obj.run({})
- self.assertTrue(mock_get_flavor_by_name.called)
+ def setUp(self):
+
+ self._mock_get_flavor = mock.patch.object(
+ openstack_utils, 'get_flavor')
+ self.mock_get_flavor = self._mock_get_flavor.start()
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(get_flavor, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'name_or_id': 'yardstick_flavor'}}
+ self.result = {}
+
+ self.getflavor_obj = get_flavor.GetFlavor(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_get_flavor.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.getflavor_obj.scenario_cfg = {'output': 'flavor'}
+ self.mock_get_flavor.return_value = (
+ {'name': 'flavor-name', 'id': _uuid})
+ output = self.getflavor_obj.run(self.result)
+ self.assertDictEqual({'get_flavor': 1}, self.result)
+ self.assertDictEqual({'flavor': {'name': 'flavor-name', 'id': _uuid}},
+ output)
+ self.mock_log.info.asset_called_once_with('Get flavor successful!')
+
+ def test_run_fail(self):
+ self.mock_get_flavor.return_value = None
+ with self.assertRaises(exceptions.ScenarioGetFlavorError):
+ self.getflavor_obj.run(self.result)
+ self.assertDictEqual({'get_flavor': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Get flavor failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py
index aa9f63e26..879b2b988 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py
@@ -25,9 +25,9 @@ class GetMigrateTargetHostTestCase(unittest.TestCase):
mock_get_nova_client):
obj = GetMigrateTargetHost({}, {})
obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_get_current_host_name.called)
- self.assertTrue(mock_get_migrate_host.called)
+ mock_get_nova_client.assert_called_once()
+ mock_get_current_host_name.assert_called_once()
+ mock_get_migrate_host.assert_called_once()
@mock.patch('{}.openstack_utils.get_nova_client'.format(BASE))
def test_get_migrate_host(self, mock_get_nova_client):
@@ -39,5 +39,5 @@ class GetMigrateTargetHostTestCase(unittest.TestCase):
mock_get_nova_client().hosts.list_all.return_value = [A('compute')]
obj = GetMigrateTargetHost({}, {})
host = obj._get_migrate_host('host5')
- self.assertTrue(mock_get_nova_client.called)
+ mock_get_nova_client.assert_called()
self.assertEqual(host, 'host4')
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py
index 4b2132c2c..bea978b8a 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py
@@ -44,8 +44,8 @@ class GetNumaInfoTestCase(unittest.TestCase):
}
obj = GetNumaInfo(scenario_cfg, {})
obj.run({})
- self.assertTrue(mock_get_current_host_name.called)
- self.assertTrue(mock_check_numa_node.called)
+ mock_get_current_host_name.assert_called_once()
+ mock_check_numa_node.assert_called_once()
@mock.patch('yardstick.ssh.SSH.from_node')
@mock.patch('{}.GetNumaInfo._get_current_host_name'.format(BASE))
diff --git a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py
index 97b81ed60..5b5329cb0 100644
--- a/yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py
+++ b/yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py
@@ -6,37 +6,52 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+from oslo_utils import uuidutils
import unittest
import mock
-from yardstick.benchmark.scenarios.lib.get_server import GetServer
+from yardstick.common import openstack_utils
+from yardstick.common import exceptions
+from yardstick.benchmark.scenarios.lib import get_server
class GetServerTestCase(unittest.TestCase):
- @mock.patch('yardstick.common.openstack_utils.get_server_by_name')
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- def test_get_server_with_name(self, mock_get_nova_client, mock_get_server_by_name):
- scenario_cfg = {
- 'options': {
- 'server_name': 'yardstick_server'
- },
- 'output': 'status server'
- }
- obj = GetServer(scenario_cfg, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
- self.assertTrue(mock_get_server_by_name.called)
-
- @mock.patch('yardstick.common.openstack_utils.get_nova_client')
- def test_get_server_with_id(self, mock_get_nova_client):
- scenario_cfg = {
- 'options': {
- 'server_id': '1'
- },
- 'output': 'status server'
- }
- mock_get_nova_client().servers.get.return_value = None
- obj = GetServer(scenario_cfg, {})
- obj.run({})
- self.assertTrue(mock_get_nova_client.called)
+ def setUp(self):
+
+ self._mock_get_server = mock.patch.object(
+ openstack_utils, 'get_server')
+ self.mock_get_server = self._mock_get_server.start()
+ self._mock_get_shade_client = mock.patch.object(
+ openstack_utils, 'get_shade_client')
+ self.mock_get_shade_client = self._mock_get_shade_client.start()
+ self._mock_log = mock.patch.object(get_server, 'LOG')
+ self.mock_log = self._mock_log.start()
+ self.args = {'options': {'name_or_id': 'yardstick_key'}}
+ self.result = {}
+
+ self.getserver_obj = get_server.GetServer(self.args, mock.ANY)
+ self.addCleanup(self._stop_mock)
+
+ def _stop_mock(self):
+ self._mock_get_server.stop()
+ self._mock_get_shade_client.stop()
+ self._mock_log.stop()
+
+ def test_run(self):
+ _uuid = uuidutils.generate_uuid()
+ self.getserver_obj.scenario_cfg = {'output': 'server'}
+ self.mock_get_server.return_value = (
+ {'name': 'server-name', 'id': _uuid})
+ output = self.getserver_obj.run(self.result)
+ self.assertDictEqual({'get_server': 1}, self.result)
+ self.assertDictEqual({'server': {'name': 'server-name', 'id': _uuid}},
+ output)
+ self.mock_log.info.asset_called_once_with('Get Server successful!')
+
+ def test_run_fail(self):
+ self.mock_get_server.return_value = None
+ with self.assertRaises(exceptions.ScenarioGetServerError):
+ self.getserver_obj.run(self.result)
+ self.assertDictEqual({'get_server': 0}, self.result)
+ self.mock_log.error.assert_called_once_with('Get Server failed!')
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
index d6636383a..74144afd5 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
@@ -65,7 +65,7 @@ class IperfTestCase(unittest.TestCase):
p.target = mock_ssh.SSH.from_node()
p.teardown()
- self.assertTrue(mock_ssh.SSH.from_node().close.called)
+ mock_ssh.SSH.from_node().close.assert_called()
mock_ssh.SSH.from_node().execute.assert_called_with("pkill iperf3")
def test_iperf_successful_no_sla(self, mock_ssh):
diff --git a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
index ec22d6147..9bfbf0752 100644
--- a/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
+++ b/yardstick/tests/unit/benchmark/scenarios/networking/test_vnf_generic.py
@@ -355,7 +355,7 @@ class TestNetworkServiceTestCase(unittest.TestCase):
return file_path
def test___init__(self):
- assert self.topology
+ self.assertIsNotNone(self.topology)
def test__get_ip_flow_range_string(self):
self.scenario_cfg["traffic_options"]["flow"] = \
diff --git a/yardstick/tests/unit/benchmark/scenarios/test_base.py b/yardstick/tests/unit/benchmark/scenarios/test_base.py
index 985338532..284a71cc8 100644
--- a/yardstick/tests/unit/benchmark/scenarios/test_base.py
+++ b/yardstick/tests/unit/benchmark/scenarios/test_base.py
@@ -13,10 +13,21 @@
# License for the specific language governing permissions and limitations
# under the License.
+import time
+
+import mock
+
from yardstick.benchmark.scenarios import base
from yardstick.tests.unit import base as ut_base
+class _TestScenario(base.Scenario):
+ __scenario_type__ = 'Test Scenario'
+
+ def run(self):
+ pass
+
+
class ScenarioTestCase(ut_base.BaseUnitTestCase):
def test_get_scenario_type(self):
@@ -85,6 +96,25 @@ class ScenarioTestCase(ut_base.BaseUnitTestCase):
self.assertEqual('No such scenario type %s' % wrong_scenario_name,
str(exc.exception))
+ def test_scenario_abstract_class(self):
+ # pylint: disable=abstract-class-instantiated
+ with self.assertRaises(TypeError):
+ base.Scenario()
+
+ @mock.patch.object(time, 'sleep')
+ def test_pre_run_wait_time(self, mock_sleep):
+ """Ensure default behaviour (backwards compatibility): no wait time"""
+ test_scenario = _TestScenario()
+ test_scenario.pre_run_wait_time(mock.ANY)
+ mock_sleep.assert_not_called()
+
+ @mock.patch.object(time, 'sleep')
+ def test_post_run_wait_time(self, mock_sleep):
+ """Ensure default behaviour (backwards compatibility): wait time"""
+ test_scenario = _TestScenario()
+ test_scenario.post_run_wait_time(100)
+ mock_sleep.assert_called_once_with(100)
+
class IterScenarioClassesTestCase(ut_base.BaseUnitTestCase):
diff --git a/yardstick/tests/unit/common/messaging/__init__.py b/yardstick/tests/unit/common/messaging/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/common/messaging/__init__.py
diff --git a/yardstick/tests/unit/common/messaging/test_consumer.py b/yardstick/tests/unit/common/messaging/test_consumer.py
new file mode 100644
index 000000000..612dcaecd
--- /dev/null
+++ b/yardstick/tests/unit/common/messaging/test_consumer.py
@@ -0,0 +1,54 @@
+# 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.
+
+import mock
+from oslo_config import cfg
+import oslo_messaging
+
+from yardstick.common import messaging
+from yardstick.common.messaging import consumer
+from yardstick.tests.unit import base as ut_base
+
+
+class TestEndPoint(object):
+ def action_1(self):
+ pass
+
+
+class _MessagingConsumer(consumer.MessagingConsumer):
+ pass
+
+
+class MessagingConsumerTestCase(ut_base.BaseUnitTestCase):
+
+ def test__init(self):
+ with mock.patch.object(oslo_messaging, 'get_rpc_server') as \
+ mock_get_rpc_server, \
+ mock.patch.object(oslo_messaging, 'get_rpc_transport') as \
+ mock_get_rpc_transport, \
+ mock.patch.object(oslo_messaging, 'Target') as \
+ mock_Target:
+ mock_get_rpc_transport.return_value = 'test_rpc_transport'
+ mock_Target.return_value = 'test_Target'
+
+ _MessagingConsumer('test_topic', 'test_pid', [TestEndPoint],
+ fanout=True)
+ mock_get_rpc_transport.assert_called_once_with(
+ cfg.CONF, url=messaging.TRANSPORT_URL)
+ mock_Target.assert_called_once_with(
+ topic='test_topic', fanout=True, server=messaging.SERVER)
+ mock_get_rpc_server.assert_called_once_with(
+ 'test_rpc_transport', 'test_Target', [TestEndPoint],
+ executor=messaging.RPC_SERVER_EXECUTOR,
+ access_policy=oslo_messaging.DefaultRPCAccessPolicy)
diff --git a/yardstick/tests/unit/common/messaging/test_payloads.py b/yardstick/tests/unit/common/messaging/test_payloads.py
new file mode 100644
index 000000000..00ec220c9
--- /dev/null
+++ b/yardstick/tests/unit/common/messaging/test_payloads.py
@@ -0,0 +1,46 @@
+# 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.
+
+from yardstick.common import exceptions
+from yardstick.common.messaging import payloads
+from yardstick.tests.unit import base as ut_base
+
+
+class _DummyPayload(payloads.Payload):
+ REQUIRED_FIELDS = {'version', 'key1', 'key2'}
+
+
+class PayloadTestCase(ut_base.BaseUnitTestCase):
+
+ def test__init(self):
+ payload = _DummyPayload(version=1, key1='value1', key2='value2')
+ self.assertEqual(1, payload.version)
+ self.assertEqual('value1', payload.key1)
+ self.assertEqual('value2', payload.key2)
+ self.assertEqual(3, len(payload._fields))
+
+ def test__init_missing_required_fields(self):
+ with self.assertRaises(exceptions.PayloadMissingAttributes):
+ _DummyPayload(key1='value1', key2='value2')
+
+ def test_obj_to_dict(self):
+ payload = _DummyPayload(version=1, key1='value1', key2='value2')
+ payload_dict = payload.obj_to_dict()
+ self.assertEqual({'version': 1, 'key1': 'value1', 'key2': 'value2'},
+ payload_dict)
+
+ def test_dict_to_obj(self):
+ _dict = {'version': 2, 'key1': 'value100', 'key2': 'value200'}
+ payload = _DummyPayload.dict_to_obj(_dict)
+ self.assertEqual(set(_dict.keys()), payload._fields)
diff --git a/yardstick/tests/unit/common/messaging/test_producer.py b/yardstick/tests/unit/common/messaging/test_producer.py
new file mode 100644
index 000000000..0289689dc
--- /dev/null
+++ b/yardstick/tests/unit/common/messaging/test_producer.py
@@ -0,0 +1,46 @@
+# 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.
+
+import mock
+from oslo_config import cfg
+import oslo_messaging
+
+from yardstick.common import messaging
+from yardstick.common.messaging import producer
+from yardstick.tests.unit import base as ut_base
+
+
+class _MessagingProducer(producer.MessagingProducer):
+ pass
+
+
+class MessagingProducerTestCase(ut_base.BaseUnitTestCase):
+
+ def test__init(self):
+ with mock.patch.object(oslo_messaging, 'RPCClient') as \
+ mock_RPCClient, \
+ mock.patch.object(oslo_messaging, 'get_rpc_transport') as \
+ mock_get_rpc_transport, \
+ mock.patch.object(oslo_messaging, 'Target') as \
+ mock_Target:
+ mock_get_rpc_transport.return_value = 'test_rpc_transport'
+ mock_Target.return_value = 'test_Target'
+
+ _MessagingProducer('test_topic', 'test_pid', fanout=True)
+ mock_get_rpc_transport.assert_called_once_with(
+ cfg.CONF, url=messaging.TRANSPORT_URL)
+ mock_Target.assert_called_once_with(
+ topic='test_topic', fanout=True, server=messaging.SERVER)
+ mock_RPCClient.assert_called_once_with('test_rpc_transport',
+ 'test_Target')
diff --git a/yardstick/tests/unit/common/test_ansible_common.py b/yardstick/tests/unit/common/test_ansible_common.py
index b01195fcc..48d8a60c8 100644
--- a/yardstick/tests/unit/common/test_ansible_common.py
+++ b/yardstick/tests/unit/common/test_ansible_common.py
@@ -17,6 +17,7 @@ from __future__ import absolute_import
import os
import tempfile
+import shutil
from collections import defaultdict
import mock
@@ -246,3 +247,18 @@ class AnsibleCommonTestCase(unittest.TestCase):
a.execute_ansible('', d, ansible_check=True, verbose=True)
finally:
os.rmdir(d)
+
+ def test_get_sut_info(self):
+ d = tempfile.mkdtemp()
+ a = ansible_common.AnsibleCommon({})
+ try:
+ a.get_sut_info(d)
+ finally:
+ shutil.rmtree(d)
+
+ def test_get_sut_info_not_exist(self):
+ a = ansible_common.AnsibleCommon({})
+ try:
+ a.get_sut_info('/hello/world')
+ except OSError:
+ pass
diff --git a/yardstick/tests/unit/common/test_openstack_utils.py b/yardstick/tests/unit/common/test_openstack_utils.py
index 4863f05c0..a1a4af2e9 100644
--- a/yardstick/tests/unit/common/test_openstack_utils.py
+++ b/yardstick/tests/unit/common/test_openstack_utils.py
@@ -10,8 +10,10 @@
from oslo_utils import uuidutils
import unittest
import mock
-
+import shade
from shade import exc
+
+from yardstick.common import constants
from yardstick.common import openstack_utils
@@ -35,44 +37,44 @@ class GetHeatApiVersionTestCase(unittest.TestCase):
self.assertEqual(api_version, expected_result)
-class GetNetworkIdTestCase(unittest.TestCase):
+class GetShadeClientTestCase(unittest.TestCase):
- def test_get_network_id(self):
- _uuid = uuidutils.generate_uuid()
- mock_shade_client = mock.Mock()
- mock_shade_client.list_networks = mock.Mock()
- mock_shade_client.list_networks.return_value = [{'id': _uuid}]
+ @mock.patch.object(shade, 'openstack_cloud', return_value='os_client')
+ def test_get_shade_client(self, mock_openstack_cloud):
+ os_cloud_config = {'param1': True, 'param2': 'value2'}
+ self.assertEqual('os_client',
+ openstack_utils.get_shade_client(**os_cloud_config))
+ os_cloud_config.update(constants.OS_CLOUD_DEFAULT_CONFIG)
+ mock_openstack_cloud.assert_called_once_with(**os_cloud_config)
- output = openstack_utils.get_network_id(mock_shade_client,
- 'network_name')
- self.assertEqual(_uuid, output)
+ mock_openstack_cloud.reset_mock()
+ os_cloud_config = {'verify': True, 'param2': 'value2'}
+ self.assertEqual('os_client',
+ openstack_utils.get_shade_client(**os_cloud_config))
+ mock_openstack_cloud.assert_called_once_with(**os_cloud_config)
- def test_get_network_id_no_network(self):
- mock_shade_client = mock.Mock()
- mock_shade_client.list_networks = mock.Mock()
- mock_shade_client.list_networks.return_value = None
-
- output = openstack_utils.get_network_id(mock_shade_client,
- 'network_name')
- self.assertIsNone(output)
+ @mock.patch.object(shade, 'openstack_cloud', return_value='os_client')
+ def test_get_shade_client_no_parameters(self, mock_openstack_cloud):
+ self.assertEqual('os_client', openstack_utils.get_shade_client())
+ mock_openstack_cloud.assert_called_once_with(
+ **constants.OS_CLOUD_DEFAULT_CONFIG)
class DeleteNeutronNetTestCase(unittest.TestCase):
def setUp(self):
self.mock_shade_client = mock.Mock()
- self.mock_shade_client.delete_network = mock.Mock()
def test_delete_neutron_net(self):
self.mock_shade_client.delete_network.return_value = True
output = openstack_utils.delete_neutron_net(self.mock_shade_client,
- 'network_id')
+ 'network_name_or_id')
self.assertTrue(output)
def test_delete_neutron_net_fail(self):
self.mock_shade_client.delete_network.return_value = False
output = openstack_utils.delete_neutron_net(self.mock_shade_client,
- 'network_id')
+ 'network_name_or_id')
self.assertFalse(output)
@mock.patch.object(openstack_utils, 'log')
@@ -80,6 +82,577 @@ class DeleteNeutronNetTestCase(unittest.TestCase):
self.mock_shade_client.delete_network.side_effect = (
exc.OpenStackCloudException('error message'))
output = openstack_utils.delete_neutron_net(self.mock_shade_client,
- 'network_id')
+ 'network_name_or_id')
+ self.assertFalse(output)
+ mock_logger.error.assert_called_once()
+
+
+class CreateNeutronNetTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.network_name = 'name'
+ self.mock_shade_client.create_network = mock.Mock()
+
+ def test_create_neutron_net(self):
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.create_network.return_value = {'id': _uuid}
+ output = openstack_utils.create_neutron_net(self.mock_shade_client,
+ self.network_name)
+ self.assertEqual(_uuid, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_neutron_net_exception(self, mock_logger):
+ self.mock_shade_client.create_network.side_effect = (
+ exc.OpenStackCloudException('error message'))
+
+ output = openstack_utils.create_neutron_net(self.mock_shade_client,
+ self.network_name)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class CreateNeutronSubnetTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.network_name_or_id = 'name_or_id'
+ self.mock_shade_client.create_subnet = mock.Mock()
+
+ def test_create_neutron_subnet(self):
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.create_subnet.return_value = {'id': _uuid}
+ output = openstack_utils.create_neutron_subnet(
+ self.mock_shade_client, self.network_name_or_id)
+ self.assertEqual(_uuid, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_neutron_subnet_exception(self, mock_logger):
+ self.mock_shade_client.create_subnet.side_effect = (
+ exc.OpenStackCloudException('error message'))
+
+ output = openstack_utils.create_neutron_subnet(
+ self.mock_shade_client, self.network_name_or_id)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class DeleteNeutronRouterTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.delete_router = mock.Mock()
+
+ def test_delete_neutron_router(self):
+ self.mock_shade_client.delete_router.return_value = True
+ output = openstack_utils.delete_neutron_router(self.mock_shade_client,
+ 'router_id')
+ self.assertTrue(output)
+
+ def test_delete_neutron_router_fail(self):
+ self.mock_shade_client.delete_router.return_value = False
+ output = openstack_utils.delete_neutron_router(self.mock_shade_client,
+ 'router_id')
+ self.assertFalse(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_delete_neutron_router_exception(self, mock_logger):
+ self.mock_shade_client.delete_router.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.delete_neutron_router(self.mock_shade_client,
+ 'router_id')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class CreateNeutronRouterTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.create_subnet = mock.Mock()
+
+ def test_create_neutron_router(self):
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.create_router.return_value = {'id': _uuid}
+ output = openstack_utils.create_neutron_router(
+ self.mock_shade_client)
+ self.assertEqual(_uuid, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_neutron_subnet_exception(self, mock_logger):
+ self.mock_shade_client.create_router.side_effect = (
+ exc.OpenStackCloudException('error message'))
+
+ output = openstack_utils.create_neutron_router(
+ self.mock_shade_client)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class RemoveRouterInterfaceTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.router = 'router'
+ self.mock_shade_client.remove_router_interface = mock.Mock()
+
+ def test_remove_router_interface(self):
+ self.mock_shade_client.remove_router_interface.return_value = True
+ output = openstack_utils.remove_router_interface(
+ self.mock_shade_client, self.router)
+ self.assertTrue(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_remove_router_interface_exception(self, mock_logger):
+ self.mock_shade_client.remove_router_interface.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.remove_router_interface(
+ self.mock_shade_client, self.router)
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class CreateFloatingIpTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.network_name_or_id = 'name'
+ self.mock_shade_client.create_floating_ip = mock.Mock()
+
+ def test_create_floating_ip(self):
+ self.mock_shade_client.create_floating_ip.return_value = \
+ {'floating_ip_address': 'value1', 'id': 'value2'}
+ output = openstack_utils.create_floating_ip(self.mock_shade_client,
+ self.network_name_or_id)
+ self.assertEqual({'fip_addr': 'value1', 'fip_id': 'value2'}, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_floating_ip_exception(self, mock_logger):
+ self.mock_shade_client.create_floating_ip.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.create_floating_ip(
+ self.mock_shade_client, self.network_name_or_id)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class DeleteFloatingIpTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.floating_ip_id = 'floating_ip_id'
+ self.mock_shade_client.delete_floating_ip = mock.Mock()
+
+ def test_delete_floating_ip(self):
+ self.mock_shade_client.delete_floating_ip.return_value = True
+ output = openstack_utils.delete_floating_ip(self.mock_shade_client,
+ 'floating_ip_id')
+ self.assertTrue(output)
+
+ def test_delete_floating_ip_fail(self):
+ self.mock_shade_client.delete_floating_ip.return_value = False
+ output = openstack_utils.delete_floating_ip(self.mock_shade_client,
+ 'floating_ip_id')
+ self.assertFalse(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_delete_floating_ip_exception(self, mock_logger):
+ self.mock_shade_client.delete_floating_ip.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.delete_floating_ip(self.mock_shade_client,
+ 'floating_ip_id')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class CreateSecurityGroupRuleTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.secgroup_name_or_id = 'sg_name_id'
+ self.mock_shade_client.create_security_group_rule = mock.Mock()
+
+ def test_create_security_group_rule(self):
+ self.mock_shade_client.create_security_group_rule.return_value = (
+ {'security_group_rule'})
+ output = openstack_utils.create_security_group_rule(
+ self.mock_shade_client, self.secgroup_name_or_id)
+ self.assertTrue(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_security_group_rule_exception(self, mock_logger):
+ self.mock_shade_client.create_security_group_rule.side_effect = (
+ exc.OpenStackCloudException('error message'))
+
+ output = openstack_utils.create_security_group_rule(
+ self.mock_shade_client, self.secgroup_name_or_id)
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class ListImageTestCase(unittest.TestCase):
+
+ def test_list_images(self):
+ mock_shade_client = mock.MagicMock()
+ mock_shade_client.list_images.return_value = []
+ openstack_utils.list_images(mock_shade_client)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_list_images_exception(self, mock_logger):
+ mock_shade_client = mock.MagicMock()
+ mock_shade_client.list_images = mock.MagicMock()
+ mock_shade_client.list_images.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ images = openstack_utils.list_images(mock_shade_client)
+ mock_logger.error.assert_called_once()
+ self.assertFalse(images)
+
+
+class SecurityGroupTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.sg_name = 'sg_name'
+ self.sg_description = 'sg_description'
+ self._uuid = uuidutils.generate_uuid()
+
+ def test_create_security_group_full_existing_security_group(self):
+ self.mock_shade_client.get_security_group.return_value = (
+ {'name': 'name', 'id': self._uuid})
+ output = openstack_utils.create_security_group_full(
+ self.mock_shade_client, self.sg_name, self.sg_description)
+ self.mock_shade_client.get_security_group.assert_called_once()
+ self.assertEqual(self._uuid, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_security_group_full_non_existing_security_group(
+ self, mock_logger):
+ self.mock_shade_client.get_security_group.return_value = None
+ self.mock_shade_client.create_security_group.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.create_security_group_full(
+ self.mock_shade_client, self.sg_name, self.sg_description)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+ @mock.patch.object(openstack_utils, 'create_security_group_rule')
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_security_group_full_create_rule_fail(
+ self, mock_logger, mock_create_security_group_rule):
+ self.mock_shade_client.get_security_group.return_value = None
+ self.mock_shade_client.create_security_group.return_value = (
+ {'name': 'name', 'id': self._uuid})
+ mock_create_security_group_rule.return_value = False
+ output = openstack_utils.create_security_group_full(
+ self.mock_shade_client, self.sg_name, self.sg_description)
+ mock_create_security_group_rule.assert_called()
+ self.mock_shade_client.delete_security_group(self.sg_name)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+ @mock.patch.object(openstack_utils, 'create_security_group_rule')
+ def test_create_security_group_full(
+ self, mock_create_security_group_rule):
+ self.mock_shade_client.get_security_group.return_value = None
+ self.mock_shade_client.create_security_group.return_value = (
+ {'name': 'name', 'id': self._uuid})
+ mock_create_security_group_rule.return_value = True
+ output = openstack_utils.create_security_group_full(
+ self.mock_shade_client, self.sg_name, self.sg_description)
+ mock_create_security_group_rule.assert_called()
+ self.mock_shade_client.delete_security_group(self.sg_name)
+ self.assertEqual(self._uuid, output)
+
+# *********************************************
+# NOVA
+# *********************************************
+
+
+class CreateInstanceTestCase(unittest.TestCase):
+
+ def test_create_instance_and_wait_for_active(self):
+ self.mock_shade_client = mock.Mock()
+ name = 'server_name'
+ image = 'image_name'
+ flavor = 'flavor_name'
+ self.mock_shade_client.create_server.return_value = (
+ {'name': name, 'image': image, 'flavor': flavor})
+ output = openstack_utils.create_instance_and_wait_for_active(
+ self.mock_shade_client, name, image, flavor)
+ self.assertEqual(
+ {'name': name, 'image': image, 'flavor': flavor}, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_instance_and_wait_for_active_fail(self, mock_logger):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.create_server.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.create_instance_and_wait_for_active(
+ self.mock_shade_client, 'server_name', 'image_name', 'flavor_name')
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class DeleteInstanceTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+
+ def test_delete_instance(self):
+ self.mock_shade_client.delete_server.return_value = True
+ output = openstack_utils.delete_instance(self.mock_shade_client,
+ 'instance_name_id')
+ self.assertTrue(output)
+
+ def test_delete_instance_fail(self):
+ self.mock_shade_client.delete_server.return_value = False
+ output = openstack_utils.delete_instance(self.mock_shade_client,
+ 'instance_name_id')
+ self.assertFalse(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_delete_instance_exception(self, mock_logger):
+ self.mock_shade_client.delete_server.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.delete_instance(self.mock_shade_client,
+ 'instance_name_id')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class CreateKeypairTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.name = 'key_name'
+
+ def test_create_keypair(self):
+ self.mock_shade_client.create_keypair.return_value = (
+ {'name': 'key-name', 'type': 'ssh'})
+ output = openstack_utils.create_keypair(
+ self.mock_shade_client, self.name)
+ self.assertEqual(
+ {'name': 'key-name', 'type': 'ssh'},
+ output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_keypair_fail(self, mock_logger):
+ self.mock_shade_client.create_keypair.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.create_keypair(
+ self.mock_shade_client, self.name)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class DeleteKeypairTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+
+ def test_delete_keypair(self):
+ self.mock_shade_client.delete_keypair.return_value = True
+ output = openstack_utils.delete_keypair(self.mock_shade_client,
+ 'key_name')
+ self.assertTrue(output)
+
+ def test_delete_keypair_fail(self):
+ self.mock_shade_client.delete_keypair.return_value = False
+ output = openstack_utils.delete_keypair(self.mock_shade_client,
+ 'key_name')
+ self.assertFalse(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_delete_keypair_exception(self, mock_logger):
+ self.mock_shade_client.delete_keypair.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.delete_keypair(self.mock_shade_client,
+ 'key_name')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class AttachVolumeToServerTestCase(unittest.TestCase):
+
+ def test_attach_volume_to_server(self):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.get_server.return_value = {'server_dict'}
+ self.mock_shade_client.get_volume.return_value = {'volume_dict'}
+ self.mock_shade_client.attach_volume.return_value = True
+ output = openstack_utils.attach_volume_to_server(
+ self.mock_shade_client, 'server_name_or_id', 'volume_name_or_id')
+ self.assertTrue(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_attach_volume_to_server_fail(self, mock_logger):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.attach_volume.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.attach_volume_to_server(
+ self.mock_shade_client, 'server_name_or_id', 'volume_name_or_id')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class GetServerTestCase(unittest.TestCase):
+
+ def test_get_server(self):
+ self.mock_shade_client = mock.Mock()
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.get_server.return_value = {
+ 'name': 'server_name', 'id': _uuid}
+ output = openstack_utils.get_server(self.mock_shade_client,
+ 'server_name_or_id')
+ self.assertEqual({'name': 'server_name', 'id': _uuid}, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_get_server_exception(self, mock_logger):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.get_server.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.get_server(self.mock_shade_client,
+ 'server_name_or_id')
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class GetFlavorTestCase(unittest.TestCase):
+
+ def test_get_flavor(self):
+ self.mock_shade_client = mock.Mock()
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.get_flavor.return_value = {
+ 'name': 'flavor_name', 'id': _uuid}
+ output = openstack_utils.get_flavor(self.mock_shade_client,
+ 'flavor_name_or_id')
+ self.assertEqual({'name': 'flavor_name', 'id': _uuid}, output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_get_flavor_exception(self, mock_logger):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.get_flavor.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.get_flavor(self.mock_shade_client,
+ 'flavor_name_or_id')
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+# *********************************************
+# CINDER
+# *********************************************
+
+
+class GetVolumeIDTestCase(unittest.TestCase):
+
+ def test_get_volume_id(self):
+ self.mock_shade_client = mock.Mock()
+ _uuid = uuidutils.generate_uuid()
+ self.mock_shade_client.get_volume_id.return_value = _uuid
+ output = openstack_utils.get_volume_id(self.mock_shade_client,
+ 'volume_name')
+ self.assertEqual(_uuid, output)
+
+ def test_get_volume_id_None(self):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.get_volume_id.return_value = None
+ output = openstack_utils.get_volume_id(self.mock_shade_client,
+ 'volume_name')
+ self.assertIsNone(output)
+
+
+class GetVolumeTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.mock_shade_client.get_volume = mock.Mock()
+
+ def test_get_volume(self):
+ self.mock_shade_client.get_volume.return_value = {'volume'}
+ output = openstack_utils.get_volume(self.mock_shade_client,
+ 'volume_name_or_id')
+ self.assertEqual({'volume'}, output)
+
+ def test_get_volume_None(self):
+ self.mock_shade_client.get_volume.return_value = None
+ output = openstack_utils.get_volume(self.mock_shade_client,
+ 'volume_name_or_id')
+ self.assertIsNone(output)
+
+
+class CreateVolumeTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+ self.size = 1
+
+ def test_create_volume(self):
+ self.mock_shade_client.create_volume.return_value = (
+ {'name': 'volume-name', 'size': self.size})
+ output = openstack_utils.create_volume(
+ self.mock_shade_client, self.size)
+ self.assertEqual(
+ {'name': 'volume-name', 'size': self.size},
+ output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_create_volume_fail(self, mock_logger):
+ self.mock_shade_client.create_volume.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.create_volume(self.mock_shade_client,
+ self.size)
+ mock_logger.error.assert_called_once()
+ self.assertIsNone(output)
+
+
+class DeleteVolumeTestCase(unittest.TestCase):
+
+ def setUp(self):
+ self.mock_shade_client = mock.Mock()
+
+ def test_delete_volume(self):
+ self.mock_shade_client.delete_volume.return_value = True
+ output = openstack_utils.delete_volume(self.mock_shade_client,
+ 'volume_name_or_id')
+ self.assertTrue(output)
+
+ def test_delete_volume_fail(self):
+ self.mock_shade_client.delete_volume.return_value = False
+ output = openstack_utils.delete_volume(self.mock_shade_client,
+ 'volume_name_or_id')
self.assertFalse(output)
+
+ @mock.patch.object(openstack_utils, 'log')
+ def test_delete_volume_exception(self, mock_logger):
+ self.mock_shade_client.delete_volume.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.delete_volume(self.mock_shade_client,
+ 'volume_name_or_id')
mock_logger.error.assert_called_once()
+ self.assertFalse(output)
+
+
+class DetachVolumeTestCase(unittest.TestCase):
+
+ @mock.patch.object(openstack_utils, 'get_server')
+ def test_detach_volume(self, mock_get_server):
+ self.mock_shade_client = mock.Mock()
+ mock_get_server.return_value = {'server_dict'}
+ self.mock_shade_client.get_volume.return_value = {'volume_dict'}
+ output = openstack_utils.detach_volume(self.mock_shade_client,
+ 'server_name_or_id',
+ 'volume_name_or_id')
+ self.assertTrue(output)
+
+ @mock.patch.object(openstack_utils, 'get_server')
+ @mock.patch.object(openstack_utils, 'log')
+ def test_detach_volume_exception(self, mock_logger, mock_get_server):
+ self.mock_shade_client = mock.Mock()
+ mock_get_server.return_value = {'server_dict'}
+ self.mock_shade_client.get_volume.return_value = {'volume_dict'}
+ self.mock_shade_client.detach_volume.side_effect = (
+ exc.OpenStackCloudException('error message'))
+ output = openstack_utils.detach_volume(self.mock_shade_client,
+ 'server_name_or_id',
+ 'volume_name_or_id')
+ mock_logger.error.assert_called_once()
+ self.assertFalse(output)
diff --git a/yardstick/tests/unit/common/test_utils.py b/yardstick/tests/unit/common/test_utils.py
index e71d0ff0f..666b29b5f 100644
--- a/yardstick/tests/unit/common/test_utils.py
+++ b/yardstick/tests/unit/common/test_utils.py
@@ -16,13 +16,15 @@ import mock
import os
import six
from six.moves import configparser
+import time
import unittest
import yardstick
from yardstick import ssh
import yardstick.error
-from yardstick.common import utils
from yardstick.common import constants
+from yardstick.common import utils
+from yardstick.common import exceptions
class IterSubclassesTestCase(unittest.TestCase):
@@ -305,8 +307,8 @@ power management:
"""
socket_map = utils.SocketTopology.parse_cpuinfo(cpuinfo)
- assert sorted(socket_map.keys()) == [0]
- assert sorted(socket_map[0].keys()) == [2, 3, 4]
+ self.assertEqual(sorted(socket_map.keys()), [0])
+ self.assertEqual(sorted(socket_map[0].keys()), [2, 3, 4])
def test_single_socket_hyperthread(self):
cpuinfo = """\
@@ -393,11 +395,11 @@ power management:
"""
socket_map = utils.SocketTopology.parse_cpuinfo(cpuinfo)
- assert sorted(socket_map.keys()) == [0]
- assert sorted(socket_map[0].keys()) == [1, 2, 3]
- assert sorted(socket_map[0][1]) == [5]
- assert sorted(socket_map[0][2]) == [6]
- assert sorted(socket_map[0][3]) == [7]
+ self.assertEqual(sorted(socket_map.keys()), [0])
+ self.assertEqual(sorted(socket_map[0].keys()), [1, 2, 3])
+ self.assertEqual(sorted(socket_map[0][1]), [5])
+ self.assertEqual(sorted(socket_map[0][2]), [6])
+ self.assertEqual(sorted(socket_map[0][3]), [7])
def test_dual_socket_hyperthread(self):
cpuinfo = """\
@@ -592,15 +594,15 @@ power management:
"""
socket_map = utils.SocketTopology.parse_cpuinfo(cpuinfo)
- assert sorted(socket_map.keys()) == [0, 1]
- assert sorted(socket_map[0].keys()) == [0, 1, 2]
- assert sorted(socket_map[1].keys()) == [26, 27, 28]
- assert sorted(socket_map[0][0]) == [44]
- assert sorted(socket_map[0][1]) == [1]
- assert sorted(socket_map[0][2]) == [2]
- assert sorted(socket_map[1][26]) == [85]
- assert sorted(socket_map[1][27]) == [86]
- assert sorted(socket_map[1][28]) == [43, 87]
+ self.assertEqual(sorted(socket_map.keys()), [0, 1])
+ self.assertEqual(sorted(socket_map[0].keys()), [0, 1, 2])
+ self.assertEqual(sorted(socket_map[1].keys()), [26, 27, 28])
+ self.assertEqual(sorted(socket_map[0][0]), [44])
+ self.assertEqual(sorted(socket_map[0][1]), [1])
+ self.assertEqual(sorted(socket_map[0][2]), [2])
+ self.assertEqual(sorted(socket_map[1][26]), [85])
+ self.assertEqual(sorted(socket_map[1][27]), [86])
+ self.assertEqual(sorted(socket_map[1][28]), [43, 87])
def test_dual_socket_no_hyperthread(self):
cpuinfo = """\
@@ -796,11 +798,11 @@ power management:
"""
socket_map = utils.SocketTopology.parse_cpuinfo(cpuinfo)
processors = socket_map.processors()
- assert processors == [1, 2, 43, 44, 85, 86, 87]
+ self.assertEqual(processors, [1, 2, 43, 44, 85, 86, 87])
cores = socket_map.cores()
- assert cores == [0, 1, 2, 26, 27, 28]
+ self.assertEqual(cores, [0, 1, 2, 26, 27, 28])
sockets = socket_map.sockets()
- assert sockets == [0, 1]
+ self.assertEqual(sockets, [0, 1])
class ChangeObjToDictTestCase(unittest.TestCase):
@@ -1158,3 +1160,43 @@ class ReadMeminfoTestCase(unittest.TestCase):
output = utils.read_meminfo(ssh_client)
mock_get_client.assert_called_once_with('/proc/meminfo', mock.ANY)
self.assertEqual(self.MEMINFO_DICT, output)
+
+
+class TimerTestCase(unittest.TestCase):
+
+ def test__getattr(self):
+ with utils.Timer() as timer:
+ time.sleep(1)
+ self.assertEqual(1, round(timer.total_seconds(), 0))
+ self.assertEqual(1, timer.delta.seconds)
+
+ def test__enter_with_timeout(self):
+ with utils.Timer(timeout=10) as timer:
+ time.sleep(1)
+ self.assertEqual(1, round(timer.total_seconds(), 0))
+
+ def test__enter_with_timeout_exception(self):
+ with self.assertRaises(exceptions.TimerTimeout):
+ with utils.Timer(timeout=1):
+ time.sleep(2)
+
+
+class WaitUntilTrueTestCase(unittest.TestCase):
+
+ def test_no_timeout(self):
+ self.assertIsNone(utils.wait_until_true(lambda: True,
+ timeout=1, sleep=1))
+
+ def test_timeout_generic_exception(self):
+ with self.assertRaises(exceptions.WaitTimeout):
+ self.assertIsNone(utils.wait_until_true(lambda: False,
+ timeout=1, sleep=1))
+
+ def test_timeout_given_exception(self):
+ class MyTimeoutException(exceptions.YardstickException):
+ message = 'My timeout exception'
+
+ with self.assertRaises(MyTimeoutException):
+ self.assertIsNone(
+ utils.wait_until_true(lambda: False, timeout=1, sleep=1,
+ exception=MyTimeoutException))
diff --git a/yardstick/tests/unit/network_services/__init__.py b/yardstick/tests/unit/network_services/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/network_services/__init__.py
diff --git a/yardstick/tests/unit/network_services/collector/__init__.py b/yardstick/tests/unit/network_services/collector/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/network_services/collector/__init__.py
diff --git a/tests/unit/network_services/collector/test_publisher.py b/yardstick/tests/unit/network_services/collector/test_publisher.py
index 4a175841d..145441ddd 100644
--- a/tests/unit/network_services/collector/test_publisher.py
+++ b/yardstick/tests/unit/network_services/collector/test_publisher.py
@@ -13,9 +13,6 @@
# limitations under the License.
#
-# Unittest for yardstick.network_services.collector.publisher
-
-from __future__ import absolute_import
import unittest
from yardstick.network_services.collector import publisher
diff --git a/tests/unit/network_services/collector/test_subscriber.py b/yardstick/tests/unit/network_services/collector/test_subscriber.py
index d4b4ecf7a..14e26f7fe 100644
--- a/tests/unit/network_services/collector/test_subscriber.py
+++ b/yardstick/tests/unit/network_services/collector/test_subscriber.py
@@ -13,13 +13,11 @@
# limitations under the License.
#
-# Unittest for yardstick.network_services.collector.subscriber
-
-from __future__ import absolute_import
import unittest
import mock
from yardstick.network_services.collector import subscriber
+from yardstick import ssh
class MockVnfAprrox(object):
@@ -40,57 +38,41 @@ class MockVnfAprrox(object):
class CollectorTestCase(unittest.TestCase):
- NODES = {
- 'node1': {},
- 'node2': {
- 'ip': '1.2.3.4',
- 'collectd': {
- 'plugins': {'abc': 12, 'def': 34},
- 'interval': 987,
- },
- },
- }
- TRAFFIC_PROFILE = {
- 'key1': 'value1',
- }
-
def setUp(self):
vnf = MockVnfAprrox()
- self.ssh_patch = mock.patch('yardstick.network_services.nfvi.resource.ssh', autospec=True)
+ vnf.start_collect = mock.Mock()
+ vnf.stop_collect = mock.Mock()
+ self.ssh_patch = mock.patch.object(ssh, 'AutoConnectSSH')
mock_ssh = self.ssh_patch.start()
mock_instance = mock.Mock()
mock_instance.execute.return_value = 0, '', ''
- mock_ssh.AutoConnectSSH.from_node.return_value = mock_instance
- self.collector = subscriber.Collector([vnf], self.NODES, self.TRAFFIC_PROFILE, 1800)
+ mock_ssh.from_node.return_value = mock_instance
+ self.collector = subscriber.Collector([vnf])
def tearDown(self):
self.ssh_patch.stop()
def test___init__(self, *_):
vnf = MockVnfAprrox()
- collector = subscriber.Collector([vnf], {}, {})
+ collector = subscriber.Collector([vnf])
self.assertEqual(len(collector.vnfs), 1)
- self.assertEqual(collector.traffic_profile, {})
-
- def test___init___with_data(self, *_):
- self.assertEqual(len(self.collector.vnfs), 1)
- self.assertDictEqual(self.collector.traffic_profile, self.TRAFFIC_PROFILE)
- self.assertEqual(len(self.collector.resource_profiles), 1)
-
- def test___init___negative(self, *_):
- pass
def test_start(self, *_):
self.assertIsNone(self.collector.start())
+ for vnf in self.collector.vnfs:
+ vnf.start_collect.assert_called_once()
def test_stop(self, *_):
self.assertIsNone(self.collector.stop())
+ for vnf in self.collector.vnfs:
+ vnf.stop_collect.assert_called_once()
def test_get_kpi(self, *_):
result = self.collector.get_kpi()
+ self.assertEqual(1, len(result))
+ self.assertEqual(4, len(result["vnf__1"]))
self.assertEqual(result["vnf__1"]["pkt_in_up_stream"], 100)
self.assertEqual(result["vnf__1"]["pkt_drop_up_stream"], 5)
self.assertEqual(result["vnf__1"]["pkt_in_down_stream"], 50)
self.assertEqual(result["vnf__1"]["pkt_drop_down_stream"], 40)
- self.assertIn('node2', result)
diff --git a/yardstick/tests/unit/network_services/libs/__init__.py b/yardstick/tests/unit/network_services/libs/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/network_services/libs/__init__.py
diff --git a/yardstick/tests/unit/network_services/libs/ixia_libs/__init__.py b/yardstick/tests/unit/network_services/libs/ixia_libs/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/network_services/libs/ixia_libs/__init__.py
diff --git a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py b/yardstick/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
index 2a97048aa..7ca2f0f19 100644
--- a/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
+++ b/yardstick/tests/unit/network_services/libs/ixia_libs/test_IxNet.py
@@ -13,34 +13,38 @@
# limitations under the License.
#
-# Unittest for yardstick.network_services.libs.ixia_libs.IxNet
-
-from __future__ import absolute_import
-import unittest
import mock
+import IxNetwork
+import unittest
from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IxNextgen
from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_4
from yardstick.network_services.libs.ixia_libs.IxNet.IxNet import IP_VERSION_6
-
UPLINK = "uplink"
DOWNLINK = "downlink"
+
class TestIxNextgen(unittest.TestCase):
def test___init__(self):
ixnet_gen = IxNextgen()
self.assertIsNone(ixnet_gen._bidir)
- @mock.patch("yardstick.network_services.libs.ixia_libs.IxNet.IxNet.sys")
- def test_connect(self, *args):
-
+ @mock.patch.object(IxNetwork, 'IxNet')
+ def test_connect(self, mock_ixnet):
+ ixnet_instance = mock.Mock()
+ mock_ixnet.return_value = ixnet_instance
ixnet_gen = IxNextgen()
- ixnet_gen.get_config = mock.MagicMock()
- ixnet_gen.get_ixnet = mock.MagicMock()
+ with mock.patch.object(ixnet_gen, 'get_config') as mock_config:
+ mock_config.return_value = {'machine': 'machine_fake',
+ 'port': 'port_fake',
+ 'version': 12345}
+ ixnet_gen._connect(mock.ANY)
- self.assertRaises(ImportError, ixnet_gen._connect, {"py_lib_path": "/tmp"})
+ ixnet_instance.connect.assert_called_once_with(
+ 'machine_fake', '-port', 'port_fake', '-version', '12345')
+ mock_config.assert_called_once()
def test_clear_ixia_config(self):
ixnet = mock.MagicMock()
@@ -628,11 +632,9 @@ class TestIxNextgen(unittest.TestCase):
def test_set_random_ip_multi_attributes_bad_ip_version(self):
bad_ip_version = object()
ixnet_gen = IxNextgen(mock.Mock())
- mock1 = mock.Mock()
- mock2 = mock.Mock()
- mock3 = mock.Mock()
with self.assertRaises(ValueError):
- ixnet_gen.set_random_ip_multi_attributes(mock1, bad_ip_version, mock2, mock3)
+ ixnet_gen.set_random_ip_multi_attributes(
+ mock.Mock(), bad_ip_version, mock.Mock(), mock.Mock())
def test_get_config(self):
tg_cfg = {
@@ -659,13 +661,11 @@ class TestIxNextgen(unittest.TestCase):
"version": "test3",
"ixchassis": "test4",
"tcl_port": "test5",
- "py_lib_path": "test6",
},
}
}
expected = {
- 'py_lib_path': 'test6',
'machine': 'test1',
'port': 'test5',
'chassis': 'test4',
diff --git a/tests/unit/network_services/test_utils.py b/yardstick/tests/unit/network_services/test_utils.py
index bf98a4474..2b2eb7109 100644
--- a/tests/unit/network_services/test_utils.py
+++ b/yardstick/tests/unit/network_services/test_utils.py
@@ -13,8 +13,6 @@
# limitations under the License.
#
-# Unittest for yardstick.network_services.utils
-
import os
import unittest
import mock
diff --git a/tests/unit/network_services/test_yang_model.py b/yardstick/tests/unit/network_services/test_yang_model.py
index 0b29da701..a7eb36b8a 100644
--- a/tests/unit/network_services/test_yang_model.py
+++ b/yardstick/tests/unit/network_services/test_yang_model.py
@@ -13,14 +13,8 @@
# limitations under the License.
#
-# Unittest for yardstick.network_services.utils
-
-from __future__ import absolute_import
-
-import unittest
import mock
-
-import yaml
+import unittest
from yardstick.network_services.yang_model import YangModel
@@ -95,9 +89,9 @@ class YangModelTestCase(unittest.TestCase):
y._get_entries()
self.assertEqual(y._rules, '')
- @mock.patch('yardstick.network_services.yang_model.yaml_load')
@mock.patch('yardstick.network_services.yang_model.open')
- def test__read_config(self, mock_open, mock_safe_load):
+ @mock.patch('yardstick.network_services.yang_model.yaml_load')
+ def test__read_config(self, mock_safe_load, *args):
cfg = "yang.yaml"
y = YangModel(cfg)
mock_safe_load.return_value = expected = {'key1': 'value1', 'key2': 'value2'}
diff --git a/yardstick/tests/unit/orchestrator/test_heat.py b/yardstick/tests/unit/orchestrator/test_heat.py
index aae2487aa..3ec59a3c2 100644
--- a/yardstick/tests/unit/orchestrator/test_heat.py
+++ b/yardstick/tests/unit/orchestrator/test_heat.py
@@ -17,6 +17,7 @@ import shade
import unittest
from yardstick.benchmark.contexts import node
+from yardstick.common import constants
from yardstick.common import exceptions
from yardstick.orchestrator import heat
@@ -53,6 +54,14 @@ class HeatStackTestCase(unittest.TestCase):
self._mock_stack_get.stop()
heat._DEPLOYED_STACKS = {}
+ @mock.patch.object(shade, 'openstack_cloud')
+ def test__init(self, mock_openstack_cloud):
+ os_cloud_config = {'key': 'value'}
+ heatstack = heat.HeatStack('name', os_cloud_config=os_cloud_config)
+ self.assertEqual('name', heatstack.name)
+ os_cloud_config.update(constants.OS_CLOUD_DEFAULT_CONFIG)
+ mock_openstack_cloud.assert_called_once_with(**os_cloud_config)
+
def test_create(self):
template = {'tkey': 'tval'}
heat_parameters = {'pkey': 'pval'}
@@ -192,7 +201,9 @@ class HeatStackTestCase(unittest.TestCase):
class HeatTemplateTestCase(unittest.TestCase):
def setUp(self):
- self.template = heat.HeatTemplate('test')
+ self._os_cloud_config = {'key1': 'value1'}
+ self.template = heat.HeatTemplate(
+ 'test', os_cloud_config=self._os_cloud_config)
def test_add_tenant_network(self):
self.template.add_network('some-network')
@@ -337,8 +348,12 @@ class HeatTemplateTestCase(unittest.TestCase):
def test_create_not_block(self):
heat_stack = mock.Mock()
- with mock.patch.object(heat, 'HeatStack', return_value=heat_stack):
+ with mock.patch.object(heat, 'HeatStack', return_value=heat_stack) \
+ as mock_heatstack:
ret = self.template.create(block=False)
+
+ mock_heatstack.assert_called_once_with(
+ self.template.name, os_cloud_config=self.template._os_cloud_config)
heat_stack.create.assert_called_once_with(
self.template._template, self.template.heat_parameters, False,
3600)
@@ -354,13 +369,30 @@ class HeatTemplateTestCase(unittest.TestCase):
3600)
self.assertEqual(heat_stack, ret)
-
def test_create_block_status_no_complete(self):
heat_stack = mock.Mock()
heat_stack.status = 'other status'
+ heat_stack.get_failures.return_value = []
with mock.patch.object(heat, 'HeatStack', return_value=heat_stack):
self.assertRaises(exceptions.HeatTemplateError,
self.template.create, block=True)
heat_stack.create.assert_called_once_with(
self.template._template, self.template.heat_parameters, True,
3600)
+
+ def test_create_block_status_no_complete_with_reasons(self):
+ heat_stack = mock.Mock()
+ heat_stack.status = 'other status'
+ heat_stack.get_failures.return_value = [
+ mock.Mock(resource_status_reason="A reason"),
+ mock.Mock(resource_status_reason="Something else")
+ ]
+ with mock.patch.object(heat, 'HeatStack', return_value=heat_stack):
+ with mock.patch.object(heat, 'log') as mock_log:
+ self.assertRaises(exceptions.HeatTemplateError,
+ self.template.create, block=True)
+ mock_log.error.assert_any_call("%s", "A reason")
+ mock_log.error.assert_any_call("%s", "Something else")
+ heat_stack.create.assert_called_once_with(
+ self.template._template, self.template.heat_parameters, True,
+ 3600)
diff --git a/yardstick/tests/unit/service/__init__.py b/yardstick/tests/unit/service/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/yardstick/tests/unit/service/__init__.py
diff --git a/yardstick/tests/unit/service/test_environment.py b/yardstick/tests/unit/service/test_environment.py
new file mode 100644
index 000000000..4af9a3958
--- /dev/null
+++ b/yardstick/tests/unit/service/test_environment.py
@@ -0,0 +1,49 @@
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+import unittest
+
+import mock
+
+from yardstick.service.environment import Environment
+from yardstick.service.environment import AnsibleCommon
+from yardstick.common.exceptions import UnsupportedPodFormatError
+
+
+class EnvironmentTestCase(unittest.TestCase):
+
+ def test_get_sut_info(self):
+ pod_info = {
+ 'nodes': [
+ {
+ 'name': 'node1',
+ 'host_name': 'host1',
+ 'role': 'Controller',
+ 'ip': '10.1.0.50',
+ 'user': 'root',
+ 'passward': 'root'
+ }
+ ]
+ }
+
+ AnsibleCommon.gen_inventory_ini_dict = mock.MagicMock()
+ AnsibleCommon.get_sut_info = mock.MagicMock(return_value={'node1': {}})
+
+ env = Environment(pod=pod_info)
+ env.get_sut_info()
+
+ def test_get_sut_info_pod_str(self):
+ pod_info = 'nodes'
+
+ env = Environment(pod=pod_info)
+ with self.assertRaises(UnsupportedPodFormatError):
+ env.get_sut_info()
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/yardstick/tests/unit/test_cmd/commands/test_env.py b/yardstick/tests/unit/test_cmd/commands/test_env.py
index 1156b6642..57dacbcd3 100644
--- a/yardstick/tests/unit/test_cmd/commands/test_env.py
+++ b/yardstick/tests/unit/test_cmd/commands/test_env.py
@@ -21,30 +21,30 @@ class EnvCommandTestCase(unittest.TestCase):
def test_do_influxdb(self, check_status_mock, start_async_task_mock):
env = EnvCommand()
env.do_influxdb({})
- self.assertTrue(start_async_task_mock.called)
- self.assertTrue(check_status_mock.called)
+ start_async_task_mock.assert_called_once()
+ check_status_mock.assert_called_once()
@mock.patch('yardstick.cmd.commands.env.EnvCommand._start_async_task')
@mock.patch('yardstick.cmd.commands.env.EnvCommand._check_status')
def test_do_grafana(self, check_status_mock, start_async_task_mock):
env = EnvCommand()
env.do_grafana({})
- self.assertTrue(start_async_task_mock.called)
- self.assertTrue(check_status_mock.called)
+ start_async_task_mock.assert_called_once()
+ check_status_mock.assert_called_once()
@mock.patch('yardstick.cmd.commands.env.EnvCommand._start_async_task')
@mock.patch('yardstick.cmd.commands.env.EnvCommand._check_status')
def test_do_prepare(self, check_status_mock, start_async_task_mock):
env = EnvCommand()
env.do_prepare({})
- self.assertTrue(start_async_task_mock.called)
- self.assertTrue(check_status_mock.called)
+ start_async_task_mock.assert_called_once()
+ check_status_mock.assert_called_once()
@mock.patch('yardstick.cmd.commands.env.HttpClient.post')
def test_start_async_task(self, post_mock):
data = {'action': 'create_grafana'}
EnvCommand()._start_async_task(data)
- self.assertTrue(post_mock.called)
+ post_mock.assert_called_once()
@mock.patch('yardstick.cmd.commands.env.HttpClient.get')
@mock.patch('yardstick.cmd.commands.env.EnvCommand._print_status')
diff --git a/yardstick/tests/unit/test_cmd/commands/test_testcase.py b/yardstick/tests/unit/test_cmd/commands/test_testcase.py
index f6f842e20..922167614 100644
--- a/yardstick/tests/unit/test_cmd/commands/test_testcase.py
+++ b/yardstick/tests/unit/test_cmd/commands/test_testcase.py
@@ -18,4 +18,4 @@ class TestcaseCommandsUT(unittest.TestCase):
def test_do_list(self, mock_client, mock_print):
mock_client.get.return_value = {'result': []}
TestcaseCommands().do_list({})
- self.assertTrue(mock_print.called)
+ mock_print.assert_called_once()