aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-06-22Merge "Configure ACL via static file"Abhijit Sinha14-436/+403
2018-06-21Configure ACL via static fileMytnyk, Volodymyr14-436/+403
This patch allows user to configure ACL/vFW SampleVNF ACL via configuration file provided in TC definition. The Yardstick applies the rules to SampleVNF from specified config file + rules generated by Yardstick (default rules). The example of SampleVNF ACL CLI commands generated/applied by Yardstick can be found at (using default ACL config file): ACL VNF ACL CLI commands: acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723303/ vFW VNF ACL CLI commands: vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723304/ Change-Id: I76a630261a982083b628e3985fc3bec14ca495db Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-06-21Merge "Cleanup EnvCommand test cases"Rodolfo Alonso Hernandez1-33/+37
2018-06-18Cleanup EnvCommand test casesRodolfo Alonso Hernandez1-33/+37
Refactor exception testing and remove console output. JIRA: YARDSTICK-1235 Change-Id: I6376c3637ffb6476a2578ef963cd2420b63bab52 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-18Refactor RFC2455 TRex traffic profile injectionRodolfo Alonso Hernandez17-1042/+855
The TRex RFC2455 traffic profile configures the duration of the traffic injection. Once the traffic is started, the traffic profile should poll the traffic injector client for the injection status. When the injection is finished, the traffic execution should end. Instead of this, the traffic profile waits a fixed time (using time.sleep method) and then stops the traffic. This approach is not accurate and may cause shorter injection periods. JIRA: YARDSTICK-1197 Change-Id: I5090df81ef4ec7945ff6c1aff070656b48e0fe77 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-18Add "duration" parameter to test case definitionRodolfo Alonso Hernandez7-92/+107
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 Sinha3-87/+200
* 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 Sinha46-156/+220
2018-06-18Stop running tests from tests/unitEmma Foley2-3/+3
Since all tests have been moved into yardstick/tests, temperary code to run tests in both tests and yardstick/tests should be removed. JIRA: YARDSTICK-837 Change-Id: I3bf3c9ece9bc8457d992e53ee8cc5cadb1dec8f0 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-18Merge "Cleanup BaseMonitor unit tests"Rodolfo Alonso Hernandez1-7/+11
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-15Replace MagicMocks with Mocks from SearchRunner UTsMiikka Koistinen1-27/+16
This patch replaces unneeded MagicMocks with Mocks from TestSearchRunner and TestSearchRunnerHelper. JIRA: YARDSTICK-1169 Change-Id: I30a7bbc71c0b1062e6c0dfe634a5a8f1ecb7c684 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-15Convert SLA asserts to raisesMiikka Koistinen46-156/+220
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-15Merge "assert[Greater,Equal] -> assert_{,not_}called"Rodolfo Alonso Hernandez10-51/+52
2018-06-14Merge "Add "host_name_separator" variable to Context class"Rodolfo Alonso Hernandez9-39/+78
2018-06-14Stop time.sleep mocks in unit testsRodolfo Alonso Hernandez2-2/+12
tVpeApproxVnf and TestProxSocketHelper classes mock "time.sleep" in the setUp method without deleting it at the end of the test execution. JIRA: YARDSTICK-1243 Change-Id: Iff31d9c7b400ad8a47f37792aeb0d20328b9d9e1 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-13assert[Greater,Equal] -> assert_{,not_}calledEmma Foley10-51/+52
assertEqual(mock_xxx.call_count, 1) -> mock_xxx.assert_called_once assertEqual(mock_xxx.call_count, 0) -> mock_xxx.assert_not_called assertGreater(mock.call_count, 0) -> mock.assert_called() assertGreaterEqual(mock.call_count, 1) -> mock.assert_called() JIRA: YARDSTICK-1069 Change-Id: I890084d120c8e78304e169e2a0e5d30011a41525 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-12Improve IXIA IxNetwork library and traffic profile (4)Rodolfo Alonso Hernandez9-276/+317
This patch implements an active wait for the traffic injection. Once the traffic is started, the traffic generator class will poll periodically the IXIA traffic generator chassis to retrieve the status of the traffic ("started", "stopped"). Now the latency statistics are retrieved and reported for each injection period. JIRA: YARDSTICK-1116 Change-Id: I4422e2c88b4fc97b7cac3de8a82b2d75467c4117 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-12Improve IXIA IxNetwork library and traffic profile (3)Rodolfo Alonso Hernandez3-96/+157
This patch modifies IP packet parameters. "IxNextgen.update_ip_packet" modifies the L3 packet according to the test case and setup the IP addresses. JIRA: YARDSTICK-1116 Change-Id: I46ff75ab1989d0e6f5cc876418a015386717e06f Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-12Improve IXIA IxNetwork library and traffic profile (2)Rodolfo Alonso Hernandez7-1158/+621
This patch modifies the way the packet frame and the flow is configured before the injection. "IxNextgen.update_frame" modifies the L2 frame according to the test case and setup the frame rate, frame size, traffic injection duration and MAC addresses. JIRA: YARDSTICK-1116 Change-Id: Ife08f15a4eda24d7835c92c4172b450854d112ee Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-12Improve IXIA IxNetwork library and traffic profile (1)Rodolfo Alonso Hernandez4-244/+432
This patch introduces a new way to configure the TCL IxNetwork server. All the configuration is done using the TCL API, removing the need of using the pre-saved configuration file. "IxNextgen.assign_ports" creates and assigns the virtual ports for each physical port defined in the test case. "IxNextgen.create_traffic_item" creates one traffic item and two flow groups per pair of ports, in both directions. "IxNextgen.gt_statistics" retrieves only the required statistics to generate the samples blob in the traffic generator. JIRA: YARDSTICK-1116 Change-Id: I8f1c0c55e99c274b2ed8276ed9a385c502e16d93 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-06-12Merge changes from topics 'YARDSTICK-1218', 'YARDSTICK-1216', ↵Rodolfo Alonso Hernandez14-178/+161
'YARDSTICK-1215', 'YARDSTICK-1214' * changes: Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptions Move ErrorClass definition to exceptions module Convert SSH custom exceptions to Yardstick exceptions Remove AnsibleCommon class method mock
2018-06-11Move tests: unit/network_services/vnf_genericEmma Foley29-27/+10475
* 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: I3d95537a64bde923703421510d27bac0d6dd92bd
2018-06-08Merge "Remove print out of logger exception in TestUtils"Rodolfo Alonso Hernandez1-7/+10
2018-06-08Merge "Cleanup TestYardstickNSCli class"Rodolfo Alonso Hernandez1-18/+32
2018-06-08Merge "Remove __init__ method overriding in HeatContextTestCase"Rodolfo Alonso Hernandez1-7/+4
2018-06-08Merge "Standalone XML machine type is not longer valid"Rodolfo Alonso Hernandez1-1/+1
2018-06-08Merge "Error when adding SR-IOV interfaces in SR-IOV context"Rodolfo Alonso Hernandez2-12/+18
2018-06-08Remove print out of logger exception in TestUtilsRodolfo Alonso Hernandez1-7/+10
Remove print out of logger exception while executing "TestUtils.test_parse_ini_file_missing_section_header" test case. JIRA: YARDSTICK-1225 Change-Id: I2a4e447c5d119fb9585b477d74f3d0a002c8278e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-07Cleanup TestYardstickNSCli classRodolfo Alonso Hernandez1-18/+32
Remove the console output during the test execution. Refactor the "parse_arguments" test case. JIRA: YARDSTICK-1224 Change-Id: I68954b986dbea70752adb121e0445e162bdfddcb Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-07Merge "Remove instantiated contexts in "test_task""Rodolfo Alonso Hernandez1-0/+9
2018-06-05Fix NSB NFVi metrics accuracyXavier Simonart5-43/+60
JIRA: YARDSTICK-1212 Change-Id: Ic4d4a3c00e4e278f4de06cc176ff663892895569 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
2018-06-01Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptionsRodolfo Alonso Hernandez7-67/+50
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-01Move ErrorClass definition to exceptions moduleRodolfo Alonso Hernandez6-39/+46
JIRA: YARDSTICK-1216 Change-Id: I82556e1d1b0c723221a58e188067cbce560b8338 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-01Convert SSH custom exceptions to Yardstick exceptionsRodolfo Alonso Hernandez7-62/+59
JIRA: YARDSTICK-1215 Change-Id: I5ecfd3dccd91b07cd8de5309dfa1a372eff16ed0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-01Remove AnsibleCommon class method mockRodolfo Alonso Hernandez1-12/+8
In [1], several methods in "AnsibleCommon" class are mocked, but those mocks are not removed after the test execution. Depending on the test execution order, this affects other results. [1] https://github.com/opnfv/yardstick/blob/stable/fraser/yardstick/tests/unit/service/test_environment.py#L20 JIRA: YARDSTICK-1214 Change-Id: I85ef702b3b5b2fda5cf453a21b9f0bec61b155f0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-01Remove __init__ method overriding in HeatContextTestCaseRodolfo Alonso Hernandez1-7/+4
Unit test case clases should implement setUp() method instead of overriding __init__() method. JIRA: YARDSTICK-1210 Change-Id: I0f9a10575f9aeebf76dfa84619e59589b3ea83f6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-31Remove instantiated contexts in "test_task"Rodolfo Alonso Hernandez1-0/+9
During unit testing, all contexts instantiated must be deleted at the end of the test to avoid clashes with other tests. JIRA: YARDSTICK-1209 Change-Id: I1994b915001b4a518e096833a0c5d33febbd8de6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-31Replace glance delete image with shade client.Shobhi Jain5-44/+93
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 Jain5-78/+171
Function create_image now uses shade client. JIRA: YARDSTICK-892 Change-Id: Ia41d9ce702a1f24031080f8a365c1b2bd9ac9faa Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-22Standalone XML machine type is not longer validRodolfo Alonso Hernandez1-1/+1
Current XML machine type definition [1] is not longer valid. According to [2], the default machine type should be "pc-i440fx-xenial". NOTE: StandAlone physical nodes are deployed using Ubuntu OS. [1]https://github.com/opnfv/yardstick/blob/master/yardstick/benchmark/contexts/standalone/model.py#L48 [2]https://wiki.ubuntu.com/QemuKVMMigration#Upgrade_machine_type JIRA: YARDSTICK-1192 Change-Id: I77b1379aaf416b1225e91af2c3ac746cb101f774 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-22Error when adding SR-IOV interfaces in SR-IOV contextRodolfo Alonso Hernandez2-12/+18
Method "add_sriov_interfaces" in Libvirt class throws an error when trying to add SR-IOV interfaces in the XML file. Function "setup_sriov_context" in SriovContext if passing to "_enable_interfaces" method the XML file name instead of passing the XML string. JIRA: YARDSTICK-1189 Change-Id: If021c102311ecb98cb26934f78067dfc720e4291 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-22Bugfix: openrc api dump should be safe_dumprexlee87762-0/+27
1. fix safe_dump 2. fix pep8 problem, use flask_restapi custom error handling [1] [1] https://flask-restful.readthedocs.io/en/latest/extending.html#custom-error-handlers JIRA: YARDSTICK-1165 RestApi openrc dump clouds.yaml error it now use yarml.dump, should be yaml.safe_dump. dump would gererate !!python/unicode and cause error when upload openrc file in gui Change-Id: Id3e85f7ba7d4967277ef79109b07d7552179e5db Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-05-21Add "host_name_separator" variable to Context classRodolfo Alonso Hernandez9-39/+78
This feature will provide Kubernetes context the ability to handle the context name inside the class itself, providing to the developer an abstraction of the possible naming limitations in Kubernetes. E.g.: "dot" character in Pod names is no allowed [1]. [1] https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter/issues/58 JIRA: YARDSTICK-1188 Change-Id: I82121f970b550170357a443b6340be7900602a57 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-05-17Merge changes from topics 'YARDSTICK-1154', 'YARDSTICK-1160'Rodolfo Alonso Hernandez3-6/+11
* changes: Kubernetes API "delete_service" missing parameter Bump Kubernetes Python client to version 6.0.0 Avoid "volumeMounts" with "configMap" fixed permissions
2018-05-17Merge "Parse "dispatcher" options correctly from InfluxDB client"Rodolfo Alonso Hernandez4-27/+73
2018-05-17Merge "Fix PEP8 errors in prox_binseach"Abhijit Sinha1-5/+5
2018-05-16Merge "Add --hwlb options as a command line argument for SampleVNF"Rodolfo Alonso Hernandez5-5/+14