summaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-08-07Merge "Separate out test_parse_to_value_exception()"Rex Lee1-4/+9
2018-08-07Merge "Bugfix: HA test case baremetal down ipmi power off failed - dovetail"Rex Lee2-29/+5
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-08-03Merge "IXIA: Add IP random range `seed` configuration option"Abhijit Sinha3-2/+6
2018-08-03Merge "Add UDP ports configuration to IXIA traffic profile"Abhijit Sinha6-5/+161
2018-08-03Merge "Change AutoConnectSSH to return error code by default"Abhijit Sinha2-1/+24
2018-08-03IXIA: Add IP random range `seed` configuration optionMyron Sosyak3-2/+6
Added IP random range `seed` configuration option into IXIA traffic profile. JIRA: YARDSTICK-1364 Change-Id: Ic050b6cc48ea75ac6d0470bf7ec1b188649811e1 Signed-off-by: Sosyak, Myronx <myronx.sosyak@intel.com> Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-08-02Add UDP ports configuration to IXIA traffic profileMyron Sosyak6-5/+161
- Implemented handling of UDP source and destination ports from IXIA traffic profile. - UDP ports can be defined as a single value or as a random range. Ports range is configured with two parameters 'fixed_bits' and 'mask_bits'. - For example '8-48' range definition will create a repeatable pattern of four values that fall within the range of 8 and 56. JIRA: YARDSTICK-1363 Change-Id: I0ace722f6be843ea79c3d3f4de22cb8fa5669d4f Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com> Signed-off-by: Pshyk Serhiy <serhiyx.pshyk@intel.com> Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-08-02Merge "Replace assert statements in PipelineRules"Abhijit Sinha3-6/+22
2018-08-02Change AutoConnectSSH to return error code by defaultMytnyk, Volodymyr2-1/+24
AutoConnectSSH execute method always returns exception when remote command returns non 0 ret code. This behavior has been introduced by https://gerrit.opnfv.org/gerrit/#/c/58579/ changes which break the NSB functionality. There are 200+ places where return code (event non zoro) is expected to be returned by AutoConnectSSH.execute() method. Right now the method returns always exception in case of remote command return not zero which causes the problem. Changed execute() method to have previous behavior (raise_on_error is always False by default) and the exception is raised only in case if raise_on_error=True is set explicitly. Added UT. JIRA: YARDSTICK-1365 Change-Id: Ib067583ea5eb704b9174084b45b920c24eb307ac Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-08-02Separate out test_parse_to_value_exception()John O'Loughlin1-4/+9
Separate out test_parse_to_value_exception(self) into 3 different methods:     test_parse_scanner(self)     test_parse_parser(self)     test_parse_reader(self) This ensures that each side effect is tested, even if one fails. JIRA: YARDSTICK-940 Change-Id: Ifdc84284c633fe1ddc1acf9cd985c5144030b430 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-31Replace assert statements in PipelineRulesMiikka Koistinen3-6/+22
The class PipelineRules uses assert statements to check the correctness of an input parameter IP address. This commit will modify these lines to use a dedicated function "common.utils.make_ipv4_address". JIRA: YARDSTICK-966 Change-Id: I1c4cc439a7716d36548125c87dfb0bc200714a56 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-31Fix remote command execution in common.utilsMiikka Koistinen3-8/+37
yardstick.common.utils get_port_mac and get_port_ip both raise a RuntimeError on positive remote command exit status. This commit fixes them to use the error raising mechanism in yardstick.ssh.SSH. Additionally, the class AutoConnectSSH class needed an additional argument to allow the raising mechanism to work correctly. JIRA: YARDSTICK-1240 Change-Id: Idad125ebbd668cef10a6149eb3e601a437a8d40d Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
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 Koistinen3-29/+56
* 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 "Check for network already created k8"Emma Foley4-8/+97
2018-07-31Merge "Cleanup pktgen unit tests"Emma Foley1-490/+274
2018-07-31Merge "Change assert statement to raise in common/utils"Rex Lee3-2/+18
2018-07-31Merge "Refactor remote command execution in vsperf_dpdk"Rex Lee2-42/+26
2018-07-31Merge "Refactor remote command execution in vsperf"Rex Lee2-34/+22
2018-07-31the recovery action of "baremetal down" should be triggered mandatoryrexlee87765-4/+60
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-30Change assert statement to raise in common/utilsMiikka Koistinen3-2/+18
This modification utilises a custom exception to be raised if an invalid mac address is passed to the function "mac_address_to_hex_list". JIRA: YARDSTICK-966 Change-Id: Ic2940276f500e9710c54963a445a137e73bd6b25 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-30Make ixnet a class attribute in TestIxNextgenEmma Foley1-151/+85
Change-Id: Iad8e8397f4ef339f70c6eef80ef58b1b045ef3fa Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-07-27Refactor remote command execution in vsperf_dpdkMiikka Koistinen2-42/+26
* 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 Koistinen2-34/+22
* 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-26Merge "Enable "wait_until_true" when used ouf the main thread"Rodolfo Alonso Hernandez2-7/+39
2018-07-26Merge "NSB TREX RFC2544 scenario fails with correlated traffic"Rodolfo Alonso Hernandez2-1/+2
2018-07-26Merge "Make injection time configurable for IXIA RFC2544 test cases"Rodolfo Alonso Hernandez4-8/+15
2018-07-26Enable "wait_until_true" when used ouf the main threadRodolfo Alonso Hernandez2-7/+39
"util.wait_until_true" uses "util.Timer" to create an active wait for a condition. "Timer" class uses "signal" to create a watchdog to track the time lapsed. When used out of the main thread, "Timer" raises the following error: ValueError: signal only works in main thread To make "util.wait_until_true" usable always, a new waitting method is implemented. JIRA: YARDSTICK-1358 Change-Id: Ifb5ba0b17b5beca0af5ceab4f6431d58b7928762 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-26NSB TREX RFC2544 scenario fails with correlated trafficMytnyk, Volodymyr2-1/+2
When correlated traffic TC is running, the traffic is running only on uplink ports instead of both type of ports (yardstick/network_services/traffic_profile/rfc2544.py +113). Trex TG fails to get samples on downlink ports. JIRA: YARDSTICK-1357 Change-Id: I66d78b73f2dc5bb531fe8607d0e46f60b828953e Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-26Make injection time configurable for IXIA RFC2544 test casesRodolfo Alonso Hernandez4-8/+15
JIRA: YARDSTICK-1196 Change-Id: I77b4772b9224ff5cd21fd9fc67eb7e4b821fcf77 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-25kubernetes_utils: avoid 404 error code in delete_config_map()Mytnyk, Volodymyr3-5/+40
JIRA: YARDSTICK-1318 Change-Id: I0c04bd2928d5a4166b483f0c4f9f75fa9e5e00d2 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-25kubernetes_utils: avoid 404 error code in delete_replication_controller()Mytnyk, Volodymyr3-5/+46
JIRA: YARDSTICK-1319 Change-Id: I8370c5ef4e43e58a8bb9c3aac60a089b0981dda0 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-25Merge "Fix typo in classname AclUknownActionTemplate"Rodolfo Alonso Hernandez3-4/+4
2018-07-24IxNetwork IPv4 mask format is x.x.x.xRodolfo Alonso Hernandez2-4/+7
When updating the IP packet in IxNextgen library, the IPv4 mask should be defined in the following format: x.x.x.x This mask defines the number of lower bits used to generate a random IP. For example: - mask length: 16 - mask string: 0.0.255.255 JIRA: YARDSTICK-1351 Change-Id: Ie3cbf0205aac83aea8d7f665bc068e8566238055 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-24Fix typo in classname AclUknownActionTemplateEmma Foley3-4/+4
AclUknownActionTemplate -> AclUnknownActionTemplate JIRA: YARDSTICK-1334 Change-Id: I796e080078c657c5e0e59144d24ec797e244a8f7 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-07-24Merge changes from topics 'YARDSTICK-1351', 'YARDSTICK-1339'Rodolfo Alonso Hernandez8-94/+134
* changes: Add IP mask to IxNetwork configuration Improve NetworkServiceTestCase._get_ip_flow_range() function
2018-07-24Merge changes from topics 'YARDSTICK-1346', 'YARDSTICK-1345', 'YARDSTICK-1344'Rodolfo Alonso Hernandez7-0/+312
* changes: Add pktgen test case base files Add pktgen traffic profile Add DPDK pktgen traffic generator
2018-07-24Merge "kubernetes_utils: avoid 404 error code in delete_network()"Rodolfo Alonso Hernandez4-10/+27
2018-07-24kubernetes_utils: avoid 404 error code in delete_network()Mytnyk, Volodymyr4-10/+27
JIRA: YARDSTICK-1316 Change-Id: I792c873b42aba80be62ff7a93f6d02ea89e42356 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-24Merge changes from topics 'YARDSTICK-1343', 'YARDSTICK-1342'Rodolfo Alonso Hernandez3-21/+22
* changes: Cleanup EnvironmentTestCase unit tests Cleanup Testcase unit tests
2018-07-24Merge "Cleanup Ansible common unit tests"Rodolfo Alonso Hernandez2-133/+108
2018-07-24Add IP mask to IxNetwork configurationRodolfo Alonso Hernandez6-48/+75
Assign the IP mask to IxNetwork configuration, depending on the IP range provided by the user in the traffic profile. In case of single IP, a default mask will be provided: - IP_VERSION_4_MASK = 24 - IP_VERSION_6_MASK = 64 JIRA: YARDSTICK-1351 Change-Id: I029473ab8b9966a76cf559ffef53b34ca11462ad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-23Add pktgen traffic profileRodolfo Alonso Hernandez3-0/+125
This new profile is based on the DPDK pktgen traffic generator. The traffic generator is controlled using LUA [1]. Those string commands are sent to the traffic generator using an open socket. Host address and open port are needed parameters. The following actions are implemented: - start injection - stop injection - change injection rate - clear all stats - help message command [1] http://pktgen-dpdk.readthedocs.io/en/latest/lua.html JIRA: YARDSTICK-1345 Change-Id: I560a168d194cedc9fdba312ec84437933efc8d9b Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>