aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-06-26Stop running tests from tests/unitEmma Foley2-12/+6
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> (cherry-picked from commit 64add9a435e9455b3bff6971d2717857cdce8193)
2018-06-26Refactor "utils.parse_ini_file" testingRodolfo Alonso Hernandez1-16/+93
JIRA: YARDSTICK-1218 Change-Id: I5136b22110d215beb7af72998ad47a8dba27f63b Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit 4a186ef7fde978f89f4332990f70e396966f69e3)
2018-06-26Fix "os.path" mock problems during testsEmma Foley4-15/+7
This patch removes the global mocking applied on "os.path". Change-Id: Ia18d2c90195c5408a1852792bdf05b6f0c1ad21f Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com> (cherry picked from commit d7f8717c3beb1854976e77d56823f482497ffff3)
2018-06-26Merge "Refactor RFC2455 TRex traffic profile injection" into stable/fraserEmma Foley17-1041/+855
2018-06-26Change IxNextgen library loadRodolfo Alonso Hernandez2-23/+8
Changed IxNextgen library load in IXIA RFC2544 traffic generator call. JIRA: YARDSTICK-1116 Change-Id: Icbdc5f1255dd2676584f3a1be767287e55e71f4a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit 9d84f5ad73e9689d3131e4ce09fe7262697c5817)
2018-06-26Stop 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> (cherry picked from commit 9b22f5b23050a0be67f8237e4d0b412f58b43472)
2018-06-26Refactor RFC2455 TRex traffic profile injectionRodolfo Alonso Hernandez17-1041/+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> (cherry picked from commit 340be73be5fd20067c23a7ddce9073639e355d3a)
2018-06-26Move tests: unit/network_services/helpersEmma Foley6-0/+2074
* 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: If0b77a6e0b102071ecfb212362647c62a621e4f9 (cherry-picked from commit 065c00d3147d12c692d43179d9c1c9afadb97825)
2018-06-26Merge "Move tests: unit/network_services/vnf_generic" into stable/fraserEmma Foley29-28/+10636
2018-06-26Merge "Standalone XML machine type is not longer valid" into stable/fraserEmma Foley1-1/+1
2018-06-26Move tests: unit/network_services/vnf_genericEmma Foley29-28/+10636
* 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 (cherry-picked from commit 98294f2c8153f663c3b3a4e4cb98910e9d5cb602)
2018-06-26Merge "Remove instantiated contexts in "test_task"" into stable/fraserEmma Foley1-0/+9
2018-06-25Remove 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> (cherry picked from commit 5e4d95ba299ce92588701d9481657c343b8ef609)
2018-06-25Merge "Move tests: unit/network_services/nfvi" into stable/fraserEmma Foley3-0/+449
2018-06-25Merge "Add "duration" parameter to test case definition" into stable/fraserRodolfo Alonso Hernandez7-92/+107
2018-06-25Merge "Remove print out of logger exception in TestUtils" into stable/fraserRodolfo Alonso Hernandez1-7/+10
2018-06-25Merge "Cleanup TestYardstickNSCli class" into stable/fraserRodolfo Alonso Hernandez1-18/+32
2018-06-25Move tests: unit/network_services/nfviEmma Foley3-0/+449
* 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: Id330ee1c89d54ef487edb7fe160e5a31d9a3094f (cherry-picked from commit e12f98c2bbed5191714bdc553e7b269b1437cecd)
2018-06-25Add "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> (cherry picked from commit 1517319fd210d71db72c5e4bfa00fc49ae4fa877)
2018-06-25Improve IXIA IxNetwork library and traffic profile (4)Rodolfo Alonso Hernandez8-284/+322
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> (cherry picked from commit a3399d07b83ce0e50d9c0144d00a7ba83a73390f)
2018-06-25Improve 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> (cherry picked from commit e5c78ae3ec1bcf0cb44646c6031fb9c04dd63e4a)
2018-06-25Improve 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> (cherry picked from commit 8d10a6a8447fc2798491a6f3856e21b85fa309ba)
2018-06-25Improve IXIA IxNetwork library and traffic profile (1)Rodolfo Alonso Hernandez3-218/+399
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> (cherry picked from commit ee721fd3e8b77ccfe4252a107a9af8dc41ccc389)
2018-06-22Add active wait functionRodolfo Alonso Hernandez3-1/+83
Added function "wait_until_true". This function will make an active wait until the predicate passed as an argument returns True. If the timeout expires, the function will raise a generic exception or a user defined one passed as an argument. This function will be used in YARDSTICK-1127. JIRA: YARDSTICK-1128 Change-Id: I9854e465ac6b586bf4be39ab4b266d5625b39e30 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from 099108aab37d1fae1b27f4e2e20136c234df1a52)
2018-06-22Add IxNetwork API Python Binding packageRodolfo Alonso Hernandez2-26/+20
Add IxNetwork python package to the requirements list. This module is needed for the "NSPerf" scenarios using IXIA as traffic generator, when IxNetwork is the program used to handle the IXIA generator. The latest version of this module is 8.40.1124.9 [1]. The license type is MIT. [1] https://pypi.python.org/pypi/ixnetwork JIRA: YARDSTICK-1106 Change-Id: I279933c95994f5120930256a104c4192a0b9900d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-22Merge "Configure ACL via static file" into stable/fraserEmma Foley9-372/+249
2018-06-22Merge "Move tests: unit/network_services/traffic_profile" into stable/fraserEmma Foley12-0/+2193
2018-06-22Merge "Cleanup BaseMonitor unit tests" into stable/fraserEmma Foley1-7/+11
2018-06-22Move tests: unit/network_services/traffic_profileEmma Foley12-0/+2193
* 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: Id983a2e415d66633331e7fea96a377e2a7589980 (cherry-picked from commit cfc40ad1bb36889e54bc99cb779cfcfa1f3b04dd)
2018-06-22Merge "MQ startup process refactor" into stable/fraserAbhijit Sinha3-30/+37
2018-06-22Merge "Add "host_name_separator" variable to Context class" into stable/fraserEmma Foley9-39/+78
2018-06-22Merge "Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to ↵Emma Foley6-61/+46
exceptions" into stable/fraser
2018-06-22Configure ACL via static fileMytnyk, Volodymyr9-372/+249
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> (cherry picked from commit 3fdca97ff5053770161059a34a95fd39463eaecd)
2018-06-22MQ startup process refactorChornyi, TarasX3-30/+37
JIRA: YARDSTICK-1112 Change-Id: Id30236e190bae9fb0f5b5ebd4c5e04798e4fd443 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> (cherry picked from commit d38bd854fb2c3eb6c0c4dd34ace2a52af7cf892d)
2018-06-22Merge "Do not start collectd twice when SampleVNF is running on Baremetal" ↵Rodolfo Alonso Hernandez5-72/+112
into stable/fraser
2018-06-22Merge "Add --hwlb options as a command line argument for SampleVNF" into ↵Rodolfo Alonso Hernandez5-5/+14
stable/fraser
2018-06-21Standalone 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> (cherry picked from commit 6414a61a988a73ee1b939e2d5de2f0afdde4319a)
2018-06-21Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptionsRodolfo Alonso Hernandez6-61/+46
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit dc0e675f47f4dbf1b54ce9c22878e2e876bc26e8)
2018-06-21Move 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> (cherry picked from commit 2bdda85878ed1507d1a91f69c3489bb9ba9d447d)
2018-06-21Merge "Convert SSH custom exceptions to Yardstick exceptions" into stable/fraserRodolfo Alonso Hernandez5-54/+50
2018-06-21Merge "Remove AnsibleCommon class method mock" into stable/fraserRodolfo Alonso Hernandez1-12/+8
2018-06-21Error 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> (cherry picked from commit 72df0eaac4a2a1f23439af7f249c2b5d18d1b819)
2018-06-21Remove __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> (cherry picked from commit 619bed631f064a94ab20ac296802d467ebe32318)
2018-06-20Convert SSH custom exceptions to Yardstick exceptionsRodolfo Alonso Hernandez5-54/+50
JIRA: YARDSTICK-1215 Change-Id: I5ecfd3dccd91b07cd8de5309dfa1a372eff16ed0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit dde8fa628483deec352e176cea8decdbf6bed7e8)
2018-06-20Add --hwlb options as a command line argument for SampleVNFChornyi, TarasX5-5/+14
To enable HWLB queues in samplevnf on supported hardware (e.g Intel Fortville) --hwlb option needs to be passed as a VNF command line argument. JIRA: YARDSTICK-1159 Change-Id: I6e5c098dc71a711252b545c7622ee52085fa81f0 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> (cherry picked from commit 1c8bfeb11a620c63ffd9fcd7f8735ded4521e077)
2018-06-20Do not start collectd twice when SampleVNF is running on BaremetalChornyi, TarasX5-72/+112
JIRA: YARDSTICK-1167 Change-Id: I7591bbb2a84ee4039a20c5da2914f1e374299015 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> (cherry picked from commit ba2ca2819a8b0312627742d126030c3dac15052f)
2018-06-20Cleanup 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> (cherry picked from commit 94d56c9f7cd99baea08629eaf3e580d020494383)
2018-06-20Add "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> (cherry picked from commit a2ee61016721386b40caa4e2d72f61be8adec94a)
2018-06-20Remove 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> (cherry picked from commit 99d51230daac3452f5295b4ea39890d8920e6ca3)
2018-06-20Cleanup 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> (cherry picked from commit a8ddeef62ee1f9795881994380f49ce88a760102)