aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2017-12-25Add get function in ssh.pyJingLu51-0/+6
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-5/+125
"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-19Variable local_iface_name is read before it is setJiri Prokes1-2/+1
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-18Merge "pretty cli format: runner/scenario/testcase list"Rex Lee5-50/+29
2017-12-16bugfix: tc078 have no data stored or dashboard to show resultsrexlee87761-0/+8
JIRA: YARDSTICK-867 1.print result in the log, showing the txt format result Change-Id: I6deeb4cf44895ef7a6c6d231c77b3843eec285d7 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-12-16Merge "bugfix: tc078 fails in some situations"Ross Brattain1-3/+7
2017-12-16Merge "bugfix: kill process do not accurately kill "nova-api""Ross Brattain1-1/+1
2017-12-16samples: Add generic L3 forwarder testsDino Madarang3-3/+199
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-15pretty cli format: runner/scenario/testcase listrexlee87765-50/+29
JIRA: YARDSTICK-855 1. using prettytable to reformat cli below: yardstick runner list yardstick scenario list yardstick testcase list 2. remove redundant function print_hbar 3. fix pep8 problems, the framework using do_list dynamicly, so disable unused-argument check for now. Change-Id: I79e1226e21fca4624bf4436414917bd07ecabca0 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-12-15NSB: Fix standalone.model.Libvirt SR-IOV modelingDino Madarang4-72/+125
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"rexlee87761-1/+1
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-14Merge "Ansible: fix lowercasing issue with ConfigParser"Ross Brattain1-1/+4
2017-12-13bugfix: tc078 fails in some situationsrexlee87761-3/+7
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-12Merge "NSB: Fix IndexError in pin_vcpu_for_perf"Ross Brattain1-1/+1
2017-12-11heat: allow overriding Heat/Neutron private IP for DPDK testsRoss Brattain2-3/+30
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 "KVMFORNFV: Reverting LiveMigration changes"Jing Lu2-13/+11
2017-11-30KVMFORNFV: Reverting LiveMigration changesNavya Bathula2-13/+11
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-20NSB: Fix IndexError in pin_vcpu_for_perfDino Madarang1-1/+1
This addresses the IndexError in Standalone SRIOV/OVSDPDK context. The correct sys_cpu number should be sys_cpu-1 Error: threads = "%s-%s" % (soc_cpu[socket][sys_cpu], soc_cpu[socket][-1]) IndexError: list index out of range Tested platform: (Hyper-Threading disabled) NUMA node0 CPU(s): 0-21 NUMA node1 CPU(s): 22-43 With socket equal to 0, sys_cpu value was 22 which resulted to IndexError. Change-Id: I36b045cacce4caff4b5ddafaa9b6737f1c6df0a1 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: Edward MacGillivray <edward.s.macgillivray@intel.com>
2017-11-17Make GenericTrafficGen class abstractRodolfo Alonso Hernandez7-66/+32
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 "Create get_description and get_scenario_type for Scenario"Ross Brattain2-4/+17
2017-11-16NSB "Prox" : Cleanup duplicated traffic profileAbhijit Sinha1-99/+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 Brattain3-7/+33
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-5/+0
network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper.rx_stats"
2017-11-10Merge "tc053 kill haproxy wrong mismatch"Ross Brattain1-0/+5
2017-11-10Merge "Heat: add availability_zone"Ross Brattain2-11/+11
2017-11-10Merge "pmu: remove event_download_local workaround script"Ross Brattain1-15/+0
2017-11-09Addition of IPv6 icpm, udp and tcp to Neutron Security GroupDanielMartinBuckley1-2/+15
When creating a Neutron security group for a heat template. Add IPv6 security group rules to access the resouces. Change-Id: I0b541dfe400121e35908a70778665ee1576f0622 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2017-11-09Merge "NSB Prox LW_AFTR Test"Ross Brattain1-1/+189
2017-11-08Remove network_services.vnf_generic.vnf.prox_helpers.ProxSocketHelper.rx_statsEmma Foley1-5/+0
* Remove the method which is unused and is marked as deprecated. Change-Id: Ie64084fcd26985283c664445b173a757d3d908ab JIRA: YARDSTICK-838 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2017-11-08pmu: remove event_download_local workaround scriptRoss Brattain1-15/+0
intel_pmu needs to download a config file based on the CPU model. When generating VNF images we don't have access to the actual vCPU that will be used, so we can't predownload. This code was meant to be a fix for that by downloading all the configs and then selecting one that matched the vCPU. However we have license issues with intel_pmu enven GPLv2 code, so remove it for now. Change-Id: I5257ff7c4ddc1d40537dadb29efa40d1d68cb852 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-07Create get_description and get_scenario_type for ScenarioRodolfo Alonso Hernandez2-4/+17
Created two new class functions for Scenario class: * "get_description" will return the first line of the docstring, if exists. * "get_scenario_type" will return the value of "__scenario_type__" variable. Change-Id: I8e3b47e33e0bae101b874c3975bb9c383397d188 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-11-07NSB Prox LW_AFTR TestDanielMartinBuckley1-1/+189
JIRA: YARDSTICK-802 Addition of PROX LW_AFTR basked on PROX/DATS v037 test_104_lw_aftr.py - This support BM and Openstack Heat - This supports 4 Ports ONLY - Grafana Dashboards included - Code Coverage / Unit testing Change-Id: If2170ab458bf687256d5f1a1e840a3b9d2788ef7 Signed-off-by: Daniel MArtin Buckley <daniel.m.buckley@intel.com> Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-11-02Ansible: fix lowercasing issue with ConfigParserRoss Brattain1-1/+4
by default ConfigParser will lowercase everything, unless you override optionxform. also sort key value in inventory line for consistency https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.optionxform Transforms the option name option as found in an input file or as passed in by client code to the form that should be used in the internal structures. The default implementation returns a lower-case version of option; subclasses may override this or client code can set an attribute of this name on instances to affect this behavior. You don’t need to subclass the parser to use this method, you can also set it on an instance, to a function that takes a string argument and returns a string. Setting it to str, for example, would make option names case sensitive: cfgparser = ConfigParser() cfgparser.optionxform = str Note that when reading configuration files, whitespace around the option names is stripped before optionxform() is called. YARDSTICK-833 Change-Id: Ia1810b0c77922d84e11c9e538540b38816338593 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-01Heat: add availability_zoneRoss Brattain2-11/+11
Users would like to ensure placement of VMs on specific compute nodes so that the measurements are meaningful. Examples: Measure network performance in different scenarios (VMs in same host, in different hosts, across fabric, across tenants) Example: context: name: yardstick placement_groups: pgrp1: policy: "availability" servers: tg_0: floating_ip: true placement: "pgrp1" availability_zone: "zone2" vnf_0: floating_ip: true placement: "pgrp1" availability_zone: "zone1" Change-Id: I28a757c25ae3f5b3571ab3edd82d51ceba32c302 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-31NSB: remove validate_cpu_cfg and all app cpu methodsRoss Brattain1-41/+0
We don't really know what core we are going to use for the VNF before we generate the MultiPortConfig, so these methods are incorrect. We may need some more advanced method to validate the vCPU topology, but that will probably happen in the MultiPortConfig Change-Id: Ifee7ae4589ce0fce67771fb8d8b8dce0a0f06409 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-28tc053 kill haproxy wrong mismatchrexlee87761-0/+5
JIRA: YARDSTICK-831 Change-Id: I587c486572f439952b8a31da664d1e2c1fb8dc27 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-10-27resource: remove cores argsRoss Brattain2-5/+2
We used to try to probe all the cores that the VNF was using and only dump CPU stats for those cores. We can't really detect those core accurately and we would rather dump all the core information and let influxdb and grafana filter the information. We do end up with excessive KPI output, especially on systems with 88 cores, but this is manageable. The core logic was partially removed, this finishes the removal. Change-Id: I5cbb694fd982519e2df54db49a21ed5948e13537 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-25KVMFORNFV: To avoid livemigration result update to jsonNavya1-2/+2
This patch is used to remove the livemigration testcase result loaded to json as there is no dashboard implemented for the testcase Change-Id: I7a9589a0bbc5f2a28587c2878da042fc50af18e0 Signed-off-by: Navya Bathula <navyax.bathula@intel.com>
2017-10-19Merge "NSB: fix trex config to use dpdk port number"Ross Brattain2-12/+16
2017-10-19Merge "BugFix: Negative dropped packets in Prox tests"Ross Brattain1-3/+3
2017-10-19BugFix: Negative dropped packets in Prox testsAbhijit Sinha1-3/+3
Removed the abs function which can potentially mask negative dropped packets. Dropped packets in Prox workload VNF = rx_packets - tx_packets Change-Id: I510a351e899cdf9a1f366d632b9f0528b1d9dcce Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-10-19Merge "Create the ovs-vswitchd logging directory"Ross Brattain1-0/+1
2017-10-19Merge "add CheckConnectivity scenario"Jing Lu1-0/+99
2017-10-19add CheckConnectivity scenarioJingLu51-0/+99
Change-Id: I9d246828790467c2a57ba410826ee9751fff89c5 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2017-10-18NSB: fix trex config to use dpdk port numberRoss Brattain2-12/+16
From some reason Heat/Neutron is now creating interfaces such that xe0 and xe1 are swapped. xe0 fa:16:3e:38:c7:66 0000:00:05.0 xe1 fa:16:3e:2f:f3:e2 0000:00:03.0 this causes the DPDK port numbering to be swapped. xe0 is DPDK port 1 because it has higher PCI address xe1 is DPDK port 0 because it has lower PCI address. The VNF is configured correctly because it uses DPDK port numbers, whereas TRex was using interface list ordering. Modify trex_cfg.yaml to use DPDK port ordering. This also requires running generate_cfg() after setup() in instantiate() +------------------------------------+-------------------+------------------------------+--------+ | Name | MAC Address | Fixed IP Addresses | Status | +------------------------------------+-------------------+------------------------------+--------+ | vnf_0.yardstick-af5ccb47-xe0-port | fa:16:3e:66:a5:e4 | ip_address='10.1.0.7', | ACTIVE | | vnf_0.yardstick-af5ccb47-mgmt-port | fa:16:3e:fa:98:fe | ip_address='10.0.1.10', | ACTIVE | | tg_0.yardstick-af5ccb47-xe1-port | fa:16:3e:2f:f3:e2 | ip_address='10.1.1.9', | ACTIVE | | vnf_0.yardstick-af5ccb47-xe1-port | fa:16:3e:f3:1d:f5 | ip_address='10.1.1.4', | ACTIVE | | | fa:16:3e:e3:8c:65 | ip_address='10.0.1.1', | ACTIVE | | | fa:16:3e:ff:d1:b7 | ip_address='11.191.14.110', | N/A | | tg_0.yardstick-af5ccb47-xe0-port | fa:16:3e:38:c7:66 | ip_address='10.1.0.8', | ACTIVE | | | fa:16:3e:ff:53:5f | ip_address='11.191.14.101', | DOWN | | | fa:16:3e:23:5d:2c | ip_address='10.0.1.2', | ACTIVE | | tg_0.yardstick-af5ccb47-mgmt-port | fa:16:3e:7a:df:4e | ip_address='10.0.1.5', | ACTIVE | | | fa:16:3e:22:65:36 | ip_address='11.191.14.109', | N/A | +------------------------------------+-------------------+------------------------------+--------+ /sys/devices/pci0000:00/0000:00:03.0/virtio0/net/ens3/address:fa:16:3e:2f:f3:e2 /sys/devices/pci0000:00/0000:00:05.0/virtio2/net/ens5/address:fa:16:3e:38:c7:66 Change-Id: Iaef2c7d9a5af7f45bd805a8ad6ee545ce0495cb1 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-10-19Merge "Disable spoof check on vfs in sriov setup"Ross Brattain1-0/+3
2017-10-19Merge "Adding cpu set to enable affinity for given vcpu"Ross Brattain3-43/+17
2017-10-18Create the ovs-vswitchd logging directoryMartin Banszel1-0/+1
Change-Id: Id7f55f7fcb2fec2866b76821595776908ac30c04 Signed-off-by: Martin Banszel <martinx.banszel@intel.com>
2017-10-18Merge "Fio: support input job file configuration"Jing Lu1-1/+16
2017-10-17NSB: MultiPortConfig adjust start_coreRoss Brattain1-1/+1
Change-Id: I8f4b6af898c9d3783f7b45471088a69e51c8baba Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>