aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/scenarios
AgeCommit message (Collapse)AuthorFilesLines
2018-11-05Merge "Test case override of traffic profile settings."Abhijit Sinha1-1/+17
2018-10-11Test case override of traffic profile settings.DanielMartinBuckley1-1/+17
JIRA: YARDSTICK-1298 Allow the test case file e.g. "tc_prox_baremetal_l2fwd-4.yaml" settings to override the values in the traffic_profile file e.g. "prox_binsearch.yaml" This is done by adding the "traffic_config" section to the "options" section in the "test case file". See below :- options: interface_speed_gbps: 10 traffic_config: tolerated_loss: 0.001 test_precision: 0.1 packet_sizes: [64] duration: 30 lower_bound: 0.0 upper_bound: 100.0 vnf__0: prox_path: /opt/nsb_bin/prox prox_config: "configs/handle_l2fwd-4.cfg" prox_args: "-t": "" tg__0: prox_path: /opt/nsb_bin/prox prox_config: "configs/gen_l2fwd-4.cfg" prox_args: "-e": "" "-t": "" Precedence of the traffic settings. 1. Values provided in the "traffic_config" section, inside the "options" section, of the test case file 2. values provided in the "traffic_profile" section of the traffic_profile file Change-Id: I6b4e123e865c9dab548f9ad28647f95b53410e8f Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-09-13Merge "Cleanup unittests for test_lmbench"Abhijit Sinha1-29/+27
2018-08-23Merge "Fix setting `flow` configuration in TC yaml"Rodolfo Alonso Hernandez1-6/+4
2018-08-21Merge "the recovery action of "baremetal down" should be triggered mandatory"Rex Lee2-0/+53
2018-08-16Cleanup unittests for test_lmbenchEmma Foley1-29/+27
unused-arg check was re-enabled after being disabled at a file level. Changes were made so that the file conforms to our testing conventions. Change-Id: Ie34a0088258c1aaff6cb0fdf0b86b37920d35bd6 JIRA: YARDSTICK-1384 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-08-16Fix setting `flow` configuration in TC yamlMytnyk, Volodymyr1-6/+4
The `flow` configuration is not applied to the traffic profile if `seed` or `count` option is missing in the TC definition. - Fix `seed` backward compatibility. JIRA: YARDSTICK-1383 Change-Id: Ic874fb2be1c13009f94eb3a80194bfe81d7a923b Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-08-10Disk Initialization and Custom Workloadmbeierl1-30/+310
Removes the deprecated nowarm and nosdd parameters from the call to StorPerf. Adds a call to initialize the disk right after the stack creation is complete so that the results from the performance run are valid and not skewed by a disk that is not operating at a consistent level of performance. Adds the jobs API v2.0 when the custom parameter 'workloads' is used instead of workload. Improves documentation and adds more info about the workload and workloads parameters. Co-Authored-By: Ameed Ashour <Ameed.Ashour.Ext@nokia.com> Change-Id: I17e96028f6a82e2c800c8f73c7be866e1cab6ad8 JIRA: YARDSTICK-1322 Signed-off-by: mbeierl <mark.beierl@dell.com>
2018-08-07Merge "Change assert statements to raises in CheckValue"Rex Lee1-18/+46
2018-08-07Merge "Bugfix: HA test case baremetal down ipmi power off failed - dovetail"Rex Lee1-2/+2
2018-07-31Cleanup pktgen_dpdk unit testsMiikka Koistinen1-128/+69
* Improve test execution * Use common functionality in setUp() * Disable logging * Remove tests that test common/utils code. These tests are moved to common/utils's unit tests in a follow-up patch. JIRA: YARDSTICK-1239 Change-Id: I88d047fe25c4c13bea446c9fc9bda92306420296 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-31Change assert statements to raises in CheckValueMiikka Koistinen1-18/+46
* Instead of using assert statements, raise a custom exception. * Modify the unit tests so that they do not test unused parameters for equality. * Fix pylint and pep8 errors. JIRA: YARDSTICK-966 Change-Id: I41e13a5a22086827792eaf9de8da2e4ed6dd42de Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-31Merge "Cleanup pktgen unit tests"Emma Foley1-490/+274
2018-07-31the recovery action of "baremetal down" should be triggered mandatoryrexlee87762-0/+53
YARDSTICK-1222 has made attacker recover only when the sla not pass. But for baremetal down test case, the node need to power on even the sla pass. TODO: Make attacker can support mandatory recover in some situation. JIRA: YARDSTICK-1337 Change-Id: Ib567b9b9025e5ee421ea47140c468537ad16f090 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-30Cleanup pktgen unit testsMiikka Koistinen1-490/+274
* Improve test execution * Use common functionality in setUp() * Disable logging JIRA: YARDSTICK-1238 Change-Id: I0904bf99f0e151b437d506bf322da83f706dcf8f Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-27Refactor remote command execution in vsperf_dpdkMiikka Koistinen1-20/+14
* Remove unneeded variables * Do not raise RuntimeError when a remote command fails, instead leave it for the yardstick ssh module to handle. * Prevent CsvReader from raising StopIteration if csv output cannot be parsed. The SLA validation will take care of errors in that case. JIRA: YARDSTICK-1166 Change-Id: I9e353d39dfd3bd27407dde32744ce71b5762e84e Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-27Refactor remote command execution in vsperfMiikka Koistinen1-24/+15
* Remove unneeded variables * Do not raise RuntimeError when a remote command fails, instead leave it for the yardstick ssh module to handle. * Prevent CsvReader from raising StopIteration if csv output cannot be parsed. The SLA validation will take care of errors in that case. JIRA: YARDSTICK-1166 Change-Id: I6cf550bd7bc8f511b3c0f25c67f8caab18bccd28 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-24Merge changes from topics 'YARDSTICK-1351', 'YARDSTICK-1339'Rodolfo Alonso Hernandez1-21/+35
* changes: Add IP mask to IxNetwork configuration Improve NetworkServiceTestCase._get_ip_flow_range() function
2018-07-23Merge "Clean-up tests in test_vsperf_dpdk.py:VsperfDPDKTestCase"Rex Lee1-99/+27
2018-07-23Improve NetworkServiceTestCase._get_ip_flow_range() functionRodolfo Alonso Hernandez1-21/+35
Improve the method to calculate the CIDR IP address range (first one, last one). IPv4Network or IPv6Network hosts() is an iterator throught the list of valid IPs. If the network is too big, the generation of a list [1] can be very expensive. [1]https://github.com/opnfv/yardstick/blob/master/yardstick/benchmark/scenarios/networking/vnf_generic.py#L90 JIRA: YARDSTICK-1339 Change-Id: I9352b2e7ff4925c246df8b40ecf43e8dc96c42d2 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-20Bugfix: HA test case baremetal down ipmi power off failed - dovetailrexlee87761-2/+2
Test case tc025 baremetal down failed to ipmi power off the node. This patch target to solve: ipmi_password is not correctly fetched JIRA: YARDSTICK-1326 Change-Id: Ia915cd07cba420643fa9a679975178328be55700 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-16Clean-up tests in test_vsperf_dpdk.py:VsperfDPDKTestCaseEmma Foley1-99/+27
* Move some common mocking into the setUp() The same return values was being set for moch_ssh in each test method. * Remove duplicate statements in test_vsperf_dpdk.py:VsperfDPDKTestCase The same assert* were being called for multiple methods, which were checking that setup worked as expected. These checks are not required each time. Change-Id: I325fc98ee569dcf7988951c82da0c02d5e465a16 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-0/+1
This new class is designed to be used in a ``GenericVNF`` object (VNF or traffic generator) in a builder pattern. This consumer class will be instantiated when initializing the ``GenericVNF`` derived object. The ``GenericVNFConsumer`` endpoint is the ``GenericVNF``derived object itself. ``GenericVNFEndpoint`` is an interface class to be inherited in a ``GenericVNF`` child object; the VNF object will implement the endpoints methods. NewVNF(GenericVNF, GenericVNFEndpoint): def __init__(self, name, vnfd, task_id): ... self._consumer = vnf_base.GenericVNFConsumer([task_id], self) self._consumer.start_rpc_server() JIRA: YARDSTICK-1293 Change-Id: I1bcd980352099e9ebefdab0c96d51aa46f6a1e54 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-09Merge changes from topics 'YARDSTICK-1286', 'YARDSTICK-1127'Rodolfo Alonso Hernandez1-1/+4
* changes: Make "IterationIPC" MQ producer for VNF control messages Enable traffic generator PID in "NSPerf" scenario setup Enable the MQ producer in "SampleVNFTrafficGen" class Add "TrafficGeneratorProducer" for "GenericTrafficGen" instances Add "IterationIPC" runner
2018-07-05Merge "Cleanup ScenarioGeneral unit tests"Rodolfo Alonso Hernandez1-4/+7
2018-07-05Enable traffic generator PID in "NSPerf" scenario setupRodolfo Alonso Hernandez1-1/+4
Now "NSPerf" scenario will inform about the traffic generator PIDs after setup process. With this information, IterationIPC runner will be able to receive the messages sent by those traffic generators and control the main iteration loop. The following example, using vFW as VNF and OpenStack as context, makes use of this new runner implementation: /samples/vnf_samples/nsut/vfw/ tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_iterationipc.yaml JIRA: YARDSTICK-1127 Change-Id: I46b1368bc209680b88ff9fb5c3b9beadf6271ac9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-29Cleanup Iperf3 unit testsRodolfo Alonso Hernandez1-13/+9
Removed unneeded output. JIRA: YARDSTICK-1275 Change-Id: I75fe1f7f048714ba5d2fdfa586ad69ebb7b56c88 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-29Cleanup VsperfDPDKTestCase unit testsRodolfo Alonso Hernandez1-4/+5
Removed unneeded output. JIRA: YARDSTICK-1267 Change-Id: I0a3f25db2c5ef8ed71fd087b6b35641075c121e7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-28Cleanup ScenarioGeneral unit testsRodolfo Alonso Hernandez1-4/+7
Removed unneeded output. JIRA: YARDSTICK-1263 Change-Id: I2ca738a7234cfffb3fd3d3e9566ad043b2d132dc Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-26Merge "Bugfix: HA kill process recovery has a conflict"Abhijit Sinha1-0/+22
2018-06-26Merge "Refactor remote command execution in pktgen_dpdk"Emma Foley1-1/+17
2018-06-26Merge "Refactor remote command execution in pktgen"Rex Lee1-45/+46
2018-06-26Bugfix: HA kill process recovery has a conflictrexlee87761-0/+22
It happens in Nokia SUT when running in the Plugfest. The problem happens when the start_process start to recover the killed process (like nova-api), but the self-cured mechanism already recovered. And somehow it lead to a conflict and has problems. So the recover of the HA attack-recover should be improved to only recover it when it needs to. JIRA: YARDSTICK-1222 Change-Id: I1acb5a7d59d6fe4e0de0b0c5942fa89e051dd1ff Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-06-19Refactor remote command execution in pktgen_dpdkMiikka Koistinen1-1/+17
PktgenDPDKLatency.run will raise a RuntimeError if a remote command fails. This commit makes it use the already existing exception raising mechanism in yardstick's ssh client. JIRA: YARDSTICK-1166 Change-Id: I3a3c7691399044b174f5d040c015c9b907b2fe5d Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-19Refactor remote command execution in pktgenMiikka Koistinen1-45/+46
Some remote commands in Pktgen are executed without checking the exit status. This patch makes all remote commands check exit value, and removes unused variables that are captured from remote command executions. JIRA: YARDSTICK-1166 Change-Id: I42a667ebd22d086887d61e1671bc569b03c59d33 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-18Add "duration" parameter to test case definitionRodolfo Alonso Hernandez1-1/+2
Add "duration" parameter to test case definition, in scenario:options section. This parameter will be rendered in the traffic profile. If the parameter is not present in the test case scenario options, the default time written in the traffic profile options will be 30 seconds (TrafficProfile.DEFAULT_DURATION = 30). If the traffic profile injection time is not defined, the default injection time will be 30 seconds. testcase:scenario:options:duration (default = 30) render --> traffic_profile:duration parse --> TrafficProfile.duration (default = 30) Target traffic profiles (RFC2544): - RFC2544Profile - IXIARFC2544Profile JIRA: YARDSTICK-1194 Change-Id: I968922e6bb882d7ee15aa1c4db4037face7a3492 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-18Merge changes from topic 'convert-sla-asserts-to-raises'Abhijit Sinha2-60/+184
* changes: Replace MagicMocks with Mocks from SearchRunner UTs Add vsperf_dpdk SLA validation unit test cases Cleanup vsperf unit tests
2018-06-18Merge "Convert SLA asserts to raises"Abhijit Sinha16-25/+65
2018-06-18Cleanup BaseMonitor unit testsRodolfo Alonso Hernandez1-7/+11
Stop multiprocessing queues to avoid BrokenPipe exception. Assert correctly the raise of exceptions. JIRA: YARDSTICK-1229 Change-Id: I1a1c92c49a439283a35c9a69b59d6866f35ec09a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-15Convert SLA asserts to raisesMiikka Koistinen16-25/+65
This commit converts Python assertions to a custom exception in all places where SLA validation is checked with an assertion. This commit also fixes all emerged pylint errors. JIRA: YARDSTICK-966 Change-Id: If771ed03b2cbc0a43a57fcfb9293f18740b3ff80 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-15Add vsperf_dpdk SLA validation unit test casesMiikka Koistinen1-0/+45
JIRA: YARDSTICK-1228 Change-Id: Ic32f2bcd7f8bdf718c9c266666409d32ecab4924 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-15Cleanup vsperf unit testsMiikka Koistinen1-60/+139
Remove unneeded mock return values and improve the test execution. Add unit test cases about SLA validation. JIRA: YARDSTICK-1227 Change-Id: I90b8b9c4cb6a57ae4b0869e84af0da43ee22a670 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-01Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptionsRodolfo Alonso Hernandez1-7/+7
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-31Replace glance delete image with shade client.Shobhi Jain1-14/+37
Remove get_image_id function. Function delete_image now uses shade client. JIRA: YARDSTICK-892 Change-Id: I6e8510dfa49aa14786ed7ac3382b85c4e699fb9e Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-29Replace glance create image with shade client.Shobhi Jain1-21/+41
Function create_image now uses shade client. JIRA: YARDSTICK-892 Change-Id: Ia41d9ce702a1f24031080f8a365c1b2bd9ac9faa Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-08Replace cinder detach volume with shade client.Shobhi Jain1-11/+42
Function detach volume now uses shade client. JIRA: YARDSTICK-891 Change-Id: Ie437ccf1172cb82dc869963f0d62e31a5ab23ebb Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-08Replace cinder delete volume with shade client.Shobhi Jain1-12/+37
Function delete volume now uses shade client. JIRA: YARDSTICK-891 Change-Id: I016e1d3bf5972879cad176b56c7282e35413945e Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-08Replace cinder create volume with shade client.Shobhi Jain1-81/+39
Adds get_volume function. Function create volume now uses shade client. JIRA: YARDSTICK-891 Change-Id: I0b2fae5f2cf52eaf2e4a0062c858d49bc4ce9ccd Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-03Replace nova get flavor with shade client.Shobhi Jain1-10/+42
Rename get_flavor_by_name with get_flavor. Function get_flavor now uses shade client. JIRA: YARDSTICK-1088 Change-Id: Ic82127e475baf39643be0a254b177f3058b85748 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-03Replace nova get server with shade client.Shobhi Jain1-27/+42
Rename get_server_by_name with get_server. Function get_server now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I69c59145cefdb565f3ece27baaaf932905e1b757 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>