aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark
AgeCommit message (Collapse)AuthorFilesLines
2018-10-02NSB PROX NFVi Test does not stop after reaching expected precisionDanielMartinBuckley2-10/+10
JIRA: YARDSTICK-1419 When using prox_binsearch algorithm, a binary search is performed, increasing lower bound when step was successful and decreasing upper bound when the step was a failure. This runs until the test_precision (as specified in the traffic profile) is reached. When the test precision is reached, the test is not completed until the runner duration is reached. As runner duration is usually high (e.g. 1800sec), the tests take much too long to execute. This makes it difficult to create test suites. Change-Id: I6cc503a09fb534a556c61c805e6df4786bb8cc4b Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-09-13Merge "Cleanup unittests for test_lmbench"Abhijit Sinha1-29/+27
2018-09-04Add UT: ArithmeticRunner exception handlingMiikka Koistinen1-1/+227
* Use time.sleep to avoid multiprocessing.Queue broken pipe error. JIRA: YARDSTICK-1245 Change-Id: I1ef1f8e68a553278996b38c226314c13dd974faa Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-08-29Assign static IP to VM for standalone contextStepan Andrushko3-10/+27
During VM spawning IP address should be assigned by DHCP server in the local network. Sometimes DHCP server is not capable to assign IP address. So, need to add static IP address. JIRA: YARDSTICK-1402 Change-Id: Ie59c340eb88eddcaff043496fc20aa48b49205ec Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-08-27Merge "Make security group configurable - dovetail"Jing Lu1-1/+2
2018-08-23Merge "Fix setting `flow` configuration in TC yaml"Rodolfo Alonso Hernandez1-6/+4
2018-08-23Provide access to VM in Standalone contextStepan Andrushko3-35/+127
Add possibility to access VM with SampleVNF image, which is spawned on baremetal server using password or key pairs (provided or generated). Changes provided for OVS-DPDK and SRIOV cases. JIRA: YARDSTICK-1260 Change-Id: I89cf17dc83f02abe23d206b24b9d0ec1298d3231 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-08-21Merge "the recovery action of "baremetal down" should be triggered mandatory"Rex Lee2-0/+53
2018-08-20Make security group configurable - dovetailrexlee87761-1/+2
Make sercurity group can be configured via the context. The format would be: context: name: demo image: yardstick-image flavor: yardstick-flavor user: ubuntu security_group: rules: - remote_ip_prefix: "0.0.0.0/0" protocol: "tcp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "udp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "icmp" JIRA: YARDSTICK-1360 Change-Id: I00c45767ee2d70b790590e824599d5a4c274bced Signed-off-by: rexlee8776 <limingjiang@huawei.com>
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-09Merge "Add UT: DurationRunner worker exception handling"Abhijit Sinha1-1/+131
2018-08-09Merge "Add UT: DurationRunner worker normal operation"Abhijit Sinha1-0/+146
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-08-03Merge "Add UT: ArithmeticRunner worker normal operation"Abhijit Sinha1-0/+182
2018-08-03Merge "Add unit test file for ArithmeticRunner"Abhijit Sinha1-0/+38
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-27Add UT: ArithmeticRunner worker normal operationMiikka Koistinen1-0/+182
* Use time.sleep to avoid multiprocessing.Queue broken pipe error. JIRA: YARDSTICK-1245 Change-Id: I0176c062f44830804ddbeebeb012afc1f9e20d41 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-27Add unit test file for ArithmeticRunnerMiikka Koistinen1-0/+38
* Initial test: test ArithmeticRunner._run_benchmark called arguments JIRA: YARDSTICK-1245 Change-Id: Id18c36bd1345052863ab777bf899c00fe66fd713 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-27Add UT: DurationRunner worker exception handlingMiikka Koistinen1-1/+131
* Use time.sleep to avoid multiprocessing.Queue broken pipe error. JIRA: YARDSTICK-1199 Change-Id: Icd35dad547bfa1ac4fab564c00628ef0d30ac338 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-27Add UT: DurationRunner worker normal operationMiikka Koistinen1-0/+146
* Use time.sleep to avoid multiprocessing.Queue broken pipe error. * Use a real duration in one of the test cases to test that the worker has successfully completed multiple iterations. JIRA: YARDSTICK-1199 Change-Id: I0e14682d9993b69e2aa9fd9340a5a7620e9c0d8e 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-24Merge changes from topics 'YARDSTICK-1343', 'YARDSTICK-1342'Rodolfo Alonso Hernandez1-7/+7
* changes: Cleanup EnvironmentTestCase unit tests Cleanup Testcase unit tests
2018-07-23Merge "Cleanup TaskParseTestCase unit tests"Rodolfo Alonso Hernandez1-3/+6
2018-07-23Merge "Clean-up tests in test_vsperf_dpdk.py:VsperfDPDKTestCase"Rex Lee1-99/+27
2018-07-23Cleanup Testcase unit testsRodolfo Alonso Hernandez1-7/+7
Removed unneeded output. JIRA: YARDSTICK-1342 Change-Id: I45ab14f854cd059625c1a96959b1cbd0a19f52a8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
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-23Cleanup TaskParseTestCase unit testsRodolfo Alonso Hernandez1-3/+6
Removed unneeded output. JIRA: YARDSTICK-1340 Change-Id: I66c0902edfea5fad9282bcb36e57b67cd6c340ab 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-19NodePort information returned in context should be a dictionaryRodolfo Alonso Hernandez1-3/+13
In Kubernetes context, NodePort information returned in context should be a dictionary. In [1], the node information is dumped in a yaml file. The NodePort object doesn't have a serialize implementation; instead of returning the object, an equivalent dictionary should be returned. [1]https://github.com/opnfv/yardstick/blob/f6fa0d7422f0669d049dbf07a51eb39b1dc25830/yardstick/benchmark/scenarios/networking/vnf_generic.py#L293 JIRA: YARDSTICK-1323 Change-Id: If4844c9b074920a7a7d8c1a424b681f9f8a4b0c5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.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-13Add service NodePort information in server descriptionRodolfo Alonso Hernandez1-32/+48
Kubernetes context provides a list of NodePort services to each replication controller. "_get_server" should return this information in the server description dictionary: server: { ... 'service_ports': <list of NodePort objects> } Relevant NodePort object attributes: - port - node_port - target_port - protocol - name JIRA: YARDSTICK-1313 Change-Id: Ie481cdea4761f162e3b3329e4e2c5a982faea9e9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Add interface and network information to Kubernetes contextRodolfo Alonso Hernandez1-13/+65
Add to "Kubernetes" context the "interfaces" information when retrieving a server. This information is needed for NSPerf test cases. The interface information comes from the resource controller network list. Each replication controller will have one port per network defined. JIRA: YARDSTICK-1303 Change-Id: Ifb0e17df295c042a643128c705a93876af999bad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-12Merge "Improve "get_server" function in Kubernetes context"Rodolfo Alonso Hernandez1-3/+5
2018-07-12Improve "get_server" function in Kubernetes contextJohn O Loughlin1-3/+5
When a kubernetes context is returning the node info it is assumed that the first port defined is the ssh port which may not be the case. This patch will address this issue by looking for a defined port 22. JIRA: YARDSTICK-1301 Change-Id: I65dee1bcf62f21ebcaefeaa2666bb0ad53f3876c Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-12Merge "Make context types constants"Rodolfo Alonso Hernandez4-7/+10
2018-07-09Merge changes from topics 'YARDSTICK-1286', 'YARDSTICK-1127'Rodolfo Alonso Hernandez3-1/+196
* 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-06Merge "Create user defined "NodePort" services per pod"Rodolfo Alonso Hernandez1-2/+2
2018-07-05Make context types constantsRodolfo Alonso Hernandez4-7/+10
Make context types constants. These are the current context types: - Dummy - Heat - Kubernetes - Node - StandaloneOvsDpdk - StandaloneSriov Any reference to a context type should use the referred constant. JIRA: YARDSTICK-1292 Change-Id: I1ff0085161f88304d71e3ddad7975f9020e0fc20 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-05Merge "Move "read_yaml_file" to common.yaml_loader"Rodolfo Alonso Hernandez3-7/+12
2018-07-05Make "IterationIPC" MQ producer for VNF control messagesRodolfo Alonso Hernandez1-0/+56
"IterationIPC" runner class is a consumer for MQ aware VNFs. A MQ aware traffic generator can send "started", "finished" and "iteration" messages. This feature implements a MQ producer in the runner in order to send messages to the VNFs. The messages implemented are: - "start_iteration" - "stop_iteration" JIRA: YARDSTICK-1286 Change-Id: I706f9a9dda5e5beed52231be7d71452945a7dbed Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>