aboutsummaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-22Merge "Clean unit tests in "benchmark.scenarios.lib.test_create_volume.py"Ross Brattain1-16/+67
2018-01-22Merge "Move tests: unit/dispatcher"Ross Brattain3-183/+0
2018-01-22Merge "Move tests: unit/orchestrator/"Ross Brattain3-453/+0
2018-01-22Clean unit tests in "benchmark.scenarios.lib.test_create_volume.pyEmma Foley1-16/+67
* Use mock_object.assert_called_with instead of self.assertTrue(mock_object.called) * Remove an unneeded if clause in CreateVolume * Add individual tests for each method in CreateVolume Change-Id: I54cc56434d316f059b3822879145e6a299866fcb Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-17Move tests: unit/orchestrator/Emma Foley3-453/+0
* Fix pylint errors * Add notes where additional action is needed. Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged for follow-up, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: Idbf56d0cd3b29b70691acd6af4d5ac3c400d2ccc
2018-01-16Fix Cirros image name in CI scriptRodolfo Alonso Hernandez1-1/+1
Fixed the name of Cirros image used in OpenStack. The image name is written in lowercase letters. JIRA: YARDSTICK-842 Change-Id: Iff0b494125be61a055da753eaf57903b64f18509 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-16bugfix: Fix duplicate 'address' in standlone SRIOVDino Madarang1-3/+24
* Add unit test per Rodolfo's comment Creating a VM using generted xml file /tmp/vm_sriov_0.xml returns an XML error: missing source address type. This fix modifies generted xml from: <source> <address> <address bus="0x1a" domain="0x0000" function="0x0" slot="0x10" type="pci" /> </address> </source> to: <source> <address bus="0x1a" domain="0x0000" function="0x0" slot="0x10" type="pci" /> </source> Change-Id: I694153e7468986bacb19ba3e09e761993aad7184 Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Emma Foley <emma.l.foley@intel.com>
2018-01-12Move tests: unit/dispatcherEmma Foley3-183/+0
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: I1f8a6041424c4c69f46ef30bd5c66d2d51d24347
2018-01-11Move tests: unit/commonEmma Foley9-1665/+0
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Change-Id: I2847c380556985fae2c92bb8a7da9c47e91e1338 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-11Merge "Move tests: functional/"Ross Brattain4-150/+0
2018-01-11Merge "Move tests: unit/apiserver/"Ross Brattain4-153/+0
2018-01-11Move tests: unit/apiserver/Emma Foley4-153/+0
* Fix pylint errors * Add TODOs Some errors are ignored locally, as they were a symptom of other problems. These issues have been flagged with a TODO, and should be fixed later. JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Change-Id: I30d3f61e5ea479758f9a2f39cf415da18e49b9d6
2018-01-11Move tests: unit/test_ssh.pyEmma Foley1-572/+0
Change-Id: I0eabdd5d7e918dcf0df747119a104dedf125606f Jira: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-11Move tests: functional/Emma Foley4-150/+0
All tests in tests/functional have been moved to yardstick/tests/functional JIRA: YARDSTICK-837 Change-Id: I89276b36635de74dd7b8f70e961c71aa0d2c494e Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-08Merge "Rename test/unit/cmd directory"Ross Brattain5-2/+7
2018-01-08Merge "ansible image build improvement"Rex Lee1-4/+1
2018-01-04Merge "SPEC cpu2006 test case for VM"Jing Lu2-0/+151
2018-01-04Remove tool provisioning in PROX helperRodolfo Alonso Hernandez3-81/+74
Tool provisioning in PROX setup environment helper is not needed [1]. The tool (PROX traffic injector) is already provided during the VNF building: ./ansible/nsb_setup.yml --> ./ansible/build_yardstick_image.yml --> ./ansible/ubuntu_server_cloudimg_modify_samplevnfs.yml --> ./ansible/roles/install_samplevnf [1]https://github.com/opnfv/yardstick/blob/master/yardstick/network_services/vnf_generic/vnf/prox_helpers.py#L641 JIRA: YARDSTICK-872 Change-Id: I0f925a7967a35a97901fbe5053793a791a7b1b01 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-03Make GenericVNF an abstract classRodolfo Alonso Hernandez13-397/+255
GenericVNF class is now an abstract class. Only optional methods are implemented. Mandatory methods: - instantiate - wait_for_instantiate - terminate - scale - collect_kpi. JIRA: YARDSTICK-866 Change-Id: Ia8766f9f98816e11894d1e72b0f3bd573d091d99 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-28ansible image build improvementAce Lee1-4/+1
JIRA: YARDSTICK-879 Add some image build vars Add automatic image build of nsb yardstick_image: ansible-playbook -e img_property="normal" -vvv -i inventory.ini build_yardstick_image.yml nsb_image_build: ansible-playbook -e img_property="nsb" -vvv -i inventory.ini build_yardstick_image.yml prepare for yardstick image uploading Change-Id: I9fdf30084511ca9a008df3b53887b06273bbd549 Signed-off-by: Ace Lee <liyin11@huawei.com>
2017-12-25SPEC cpu2006 test case for VMJingLu52-0/+151
JIRA: YARDSTICK-906 This test case is for benchmarking VM(VNF) compute performance using SPEC CPU2006. Change-Id: Ida87aa4d394e38b398acb0af3176dd1b4c858c35 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-12-25Add get function in ssh.pyJingLu51-0/+9
JIRA: YARDSTICK-904 This task is about to implement a get function in ssh.py to fetch desired files/folder in a remote VM to a local path. In some test cases, test tools will produce results in files. We want retain the original result files and archive them in Yardstick docker for future usage. Change-Id: Ifd333eb044ce31cffa6f5b2a8f6a46648a8858d1 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-12-22Replace subprocess "check_output" with "Popen"Rodolfo Alonso Hernandez3-41/+142
"check_output" is a blocking wrapper for "Popen" which returns the output of the command execution or raises an exception in case of error. "Popen" is a non-blocking function that allows to create asynchronous tasks. It returns any possible execution error but doesn't raise an exception; this is delegated to the developer. This code is used in the Yardstick CLI base test class. Change-Id: Ie3e1228b2d40cb306354447653678bf581bc9697 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-21Rename test/unit/cmd directoryRoss Brattain5-2/+7
Renamed test/unit/cmd directory to test/unit/test_cmd, in order to avoid importing errors during the execution of unit tests. This directory name collides with Python "cmd" library. Change-Id: Ie06d58d4faace33df684c8e511a398aa0667b098 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-19Variable local_iface_name is read before it is setJiri Prokes1-4/+4
Moving variable setting before reading Verified via TC: yardstick/samples/vnf_samples/nsut/ping/tc_ping_heat_context.yaml JIRA: YARDSTICK-899 Change-Id: Ia2feac1ed4e67dccd02446ba27afc9d40e87be35 Signed-off-by: Jiri Prokes <jirix.x.prokes@intel.com>
2017-12-16Merge "bugfix: tc078 fails in some situations"Ross Brattain1-6/+10
2017-12-16Merge "bugfix: kill process do not accurately kill "nova-api""Ross Brattain10-19/+29
2017-12-16samples: Add generic L3 forwarder testsDino Madarang1-0/+267
A generic throughput test case that can be used as a stub code for a Linux-based VNF configured as an L3 forwarder. Supported context: * Standalone OVSDPDK and SRIOV * Baremetal Code changes: * Allow pmd-cpu-mask and lcore mask for OVS DPDK * router_vnf.py - configures interface IP addresses and static arp entries using ip command * NFVi KPIs * Allow cputune tag for standalone context to be able to PIN on NUMA 1 cpus SRIOV Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2,4 and 6 ports * 2 and 3 vcpus per port * OVSDPDK Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2 and 4 ports * 2 vcpus per port * 2 PMD threads per port TODO: * Documentation * Add 6 ports tests References: * router_vnf.py is based on sample_vnf.py * tc_*.yaml files are based on acl/vfw test case files Added unitests Added get_stats to parse ip -s link Change-Id: Id1b969d5420dfcab7c1e695acbd2cd1655747efe Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Signed-off-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Emma Foley <emma.l.foley@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Dhaval Patel <dhaval.r.patel@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-12-15NSB: Fix standalone.model.Libvirt SR-IOV modelingDino Madarang3-118/+282
Fixed standalone.model.Libvirt SR-IOV XML interface modeling, acording to [1]: - All PCI attributes now are printed in hexadecimal format. - The PCI address is now added in the correct section, 'interface'. network_services.utils.PciAddress was refactored to accept both 'domain: bus:slot:function' and 'bus:slot:function' format inputs. This class is used as input in the previous class, Libvirt, to print in XML the PCI address of a SR-IOV interface. network_services.utils.PciAddress.parse_address is now deprecated. Instead the class standard instantiation must be used: libvirt_obj = utils.PciAddress(text_with_address) A deprecation decorator is implemented along with this patch. This decorator is used for the first time in the previously mentioned function. This decorator stores every decorated function name and deprecation message and raises a logging warning message the first time this function is used. [1] https://goo.gl/so2Mrp Change-Id: I22e95c488e27d6e2a8fdf6c1a07faab275fa6bba Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-15bugfix: kill process do not accurately kill "nova-api"rexlee877610-19/+29
JIRA: YARDSTICK-849 1. update the kill process RegEx pattern to be more accurate 2. make attack_process to be parameter so it can be customized if the SUT is using a different name of attack_process Change-Id: I569730ced6c24aafbffcf2fc5752d3560d0adac5 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-12-14Change testcases 'cirros' image to 'yardstick-image'Rodolfo Alonso Hernandez1-2/+2
The default OpenStack 'cirros-0.3.5' image doesn't exist anymore. The image included by default in any testing OpenStack deployment is now called 'cirros-0.3.5-x86_64-disk', but this name can change. Because Yardstick, during the installation, deploys a customized image, 'yardstick-image', it makes sense to use it as the default image. JIRA: YARDSTICK-873 Change-Id: I8fd7cbc01d4fa52e9107f2fac7d2d9ff5d1091c7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-14Merge "Ansible: fix lowercasing issue with ConfigParser"Ross Brattain1-21/+56
2017-12-13bugfix: tc078 fails in some situationsrexlee87761-6/+10
1. make "SPECint_benchmark, runspec_iterations, runspec_tune, runspec_size, runspec_rate" parameterized and change the default value "int^429" to "int" 2. remove "become: true" in some roles since it does not need root privilege JIRA: YARDSTICK-852 Change-Id: Icb384bddc12911e2681a981d0504e0e142d1a8ec Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-12-11heat: allow overriding Heat/Neutron private IP for DPDK testsRoss Brattain2-2/+178
For some L2/L3 DPDK testcases we need to use a custom IP address space different from what Heat provides. These testcases require port_security_enabled = False so Neutron should allow for unrestricted L2 traffic. This will work because we bind the ports to DPDK and thus don't need DHCP. vnf_0: floating_ip: true placement: "pgrp1" network_ports: mgmt: - mgmt uplink_0: - xe0: local_ip: 10.44.0.20 netmask: 255.255.255.0 downlink_0: - xe1: local_ip: 10.44.0.30 netmask: 255.255.255.0 Also fixup flake8 errors in unittests Change-Id: Id29dfffa692f16fb1f526d208db43e476e2f7830 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-12-01Merge "bugfix: tc023 miss description and tc050-58 wrong description"Ross Brattain16-29/+34
2017-12-01Merge "KVMFORNFV: Reverting LiveMigration changes"Jing Lu1-10/+9
2017-11-30KVMFORNFV: Reverting LiveMigration changesNavya Bathula1-10/+9
This patch consists of reverting the changes of patch 45227 and incudes redirecting the console output of the LiveMigration execution to /dev/null as the stdout contains only the statistics, i.e., totaltime, downtime and setuptime. This reverts commit 5a1f65d3e7d67488ee6f558dccfa5ca5581ddb65. Change-Id: I252b5a4045657cfa8362e9aae755249480cd3b77 Signed-off-by: Navya <navyax.bathula@intel.com>
2017-11-29Merge "Move test scripts to tools/"Ross Brattain2-146/+0
2017-11-20Merge "update docker version to 16.04"Ross Brattain1-6/+9
2017-11-20bugfix: tc023 miss description and tc050-58 wrong descriptionrexlee877616-29/+34
also modify tc019,025,045-49 descrition to be unified JIRA: YARDSTICK-850 Change-Id: I3f775f1ebff4063edc53b9bc26d7ba10b8af8a9d Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-11-17Move test scripts to tools/Emma Foley2-146/+0
Move the scripts that tox uses for running tests to the tools/ directory: * run_tests.sh -> tools/run_tests.sh * tests/ci/cover.{sh,awk} -> tools/ JIRA: YARDSTICK-837 Change-Id: I817c9e5f58c06b45f1de3f369318f4bb24168677 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-17Make GenericTrafficGen class abstractRodolfo Alonso Hernandez2-74/+33
GenericTrafficGen class is now an abstract class. Only optional methods are implemented. - 'run_traffic' and 'terminate' are mandatory. - 'listen_traffic', 'verify_traffic' and 'wait_for_instance' are optional. By default these methods doesn't execute any action. JIRA: YARDSTICK-853 Change-Id: I2befdaa337af79cc2364bdd7c66183c31c5ab69a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-11-17Merge "Clean functional tests in "test_cli_scenario""Ross Brattain1-13/+7
2017-11-17Merge "Create get_description and get_scenario_type for Scenario"Ross Brattain1-0/+53
2017-11-17update docker version to 16.04Ace Lee1-6/+9
JIRA: YARDSTICK-690 This patch is for Yardstick Docker base image upgrade to 16.04 This patch will enable ansible build image in yardstick env prepare. Add qemu-img convert to ansible build image. Change-Id: I43127b6020bd20bd9f4aac4fca0df75353b24346 Signed-off-by: Ace Lee <liyin11@huawei.com>
2017-11-16NSB "Prox" : Cleanup duplicated traffic profileAbhijit Sinha1-95/+0
JIRA: YARDSTICK-848 The NSB PROX MPLS test uses Binsearch traffic profile and the mpls traffic profile is a duplicate. Change-Id: Ie2124cebf306fd6917b70ecd7c23ae12ef4850dc Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-11-14NSB TRex: convert DPDK port number to logical TRex port numberRoss Brattain1-0/+54
when we create TRex config we sort based on PCI bus address and create a logical port ordering. We need to save this port ordering and re-use it everywhere. redirect vnfd_helper.port_num() to resource_helper.port_num() to use the logical mapping Change-Id: Ibff628556d5e11e686e15716a66a3210758c4ff0 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-10Merge "Remove ↵Ross Brattain1-14/+0
network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper.rx_stats"
2017-11-10Merge "Heat: add availability_zone"Ross Brattain1-11/+37
2017-11-10Merge "pmu: remove event_download_local workaround script"Ross Brattain1-4/+0