aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/common
AgeCommit message (Collapse)AuthorFilesLines
2019-07-17Leverage on PBRCédric Ollivier1-2/+2
It fixes requirements and constraints by switching to PBR [1]. It synchronizes requirements with OpenStack stable/stein and then adds constraints to pip calls. It also updates flask-restful-swagger to conform with OpenStack upper-constraints [2] and the pip API calls. It updates the unit tests verifying a few package versions. It stops checking unicodecsv in py3 env which is against the requirements defined in OpenStack. It also skips one test indirectly highlighting that the pip usage is incorrect [3] [1] http://testresults.opnfv.org/functest/dockerslicing/ [2] https://github.com/rantav/flask-restful-swagger/commit/fd418b50723fe1e79f495aa400a8e9f055a5be27 [3] https://github.com/pypa/pip/issues/3889 Change-Id: I635bdb9d7411e619cee911b633fa8ad591a393a0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-19Log VM OS version, Sample VNF branch/commit IDStepan Andrushko1-0/+28
Added debug logs to track VM, Sample VNF details during testing: - Virtual machine OS, kernel version; - Sample VNF branch, commit ID. JIRA: YARDSTICK-1499 Change-Id: I243c435809d4541dfdb8c7c3466f50c5d524ac00 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-12-27Add IxNetwork L3 scenario implementationMyron Sosyak1-0/+9
Protocol interfaces are creating with config from pod file Static IP configuration are creating from testcase flow options JIRA: YARDSTICK-1570 Change-Id: I74cde67b5084d5b65d09934fe8fce7760b5ea461 Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com>
2018-10-27Setup hugepages on SA host(sriov, ovs_dpdk)Serhiy Pshyk1-0/+17
JIRA: YARDSTICK-1461 Change-Id: Ia1f5026eee989672aac57775ec9dd182df658fa4 Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
2018-08-21Convert IXIA latency statistics to integerRodolfo Alonso Hernandez1-0/+16
JIRA: YARDSTICK-1385 Change-Id: Id50c393da7ded4b3c8e127f7d7a6501832a68446 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-08-07Merge "Separate out test_parse_to_value_exception()"Rex Lee1-4/+9
2018-08-02Merge "Replace assert statements in PipelineRules"Abhijit Sinha1-0/+13
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 Koistinen1-0/+13
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 Koistinen1-0/+32
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-31Merge "Check for network already created k8"Emma Foley1-5/+73
2018-07-30Change assert statement to raise in common/utilsMiikka Koistinen1-0/+8
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-26Merge "Enable "wait_until_true" when used ouf the main thread"Rodolfo Alonso Hernandez1-3/+18
2018-07-26Enable "wait_until_true" when used ouf the main threadRodolfo Alonso Hernandez1-3/+18
"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-25kubernetes_utils: avoid 404 error code in delete_config_map()Mytnyk, Volodymyr1-0/+30
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, Volodymyr1-0/+36
JIRA: YARDSTICK-1319 Change-Id: I8370c5ef4e43e58a8bb9c3aac60a089b0981dda0 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-24Merge changes from topics 'YARDSTICK-1351', 'YARDSTICK-1339'Rodolfo Alonso Hernandez1-0/+14
* changes: Add IP mask to IxNetwork configuration Improve NetworkServiceTestCase._get_ip_flow_range() function
2018-07-24Merge "kubernetes_utils: avoid 404 error code in delete_network()"Rodolfo Alonso Hernandez1-4/+17
2018-07-24kubernetes_utils: avoid 404 error code in delete_network()Mytnyk, Volodymyr1-4/+17
JIRA: YARDSTICK-1316 Change-Id: I792c873b42aba80be62ff7a93f6d02ea89e42356 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-24Merge "Cleanup Ansible common unit tests"Rodolfo Alonso Hernandez1-114/+91
2018-07-24Add IP mask to IxNetwork configurationRodolfo Alonso Hernandez1-0/+14
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-23Cleanup Ansible common unit testsRodolfo Alonso Hernandez1-114/+91
Removed unneeded output, use proper exception checks and remove filesystem access. JIRA: YARDSTICK-1341 Change-Id: I5c56e7b34d0e96946211e6172290bce24a156d68 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-23Merge "kubernetes_utils: avoid 404 error code in ↵Rodolfo Alonso Hernandez1-0/+17
delete_custom_resource_definition()"
2018-07-20kubernetes_utils: avoid 404 error code in delete_custom_resource_definition()Mytnyk, Volodymyr1-0/+17
JIRA: YARDSTICK-1317 Change-Id: I2dc924334199761d63dce9aebe9ce200ca0fddf8 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-20Check for network already created k8John O Loughlin1-5/+73
When creating a network the host should be checked to see if the network is already created. If the required network is already there it should be used. JIRA: YARDSTICK-1315 Change-Id: I09b114a728364ee56397af70cc48f1b7904f06cc Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-19kubernetes_utils: avoid 404 error code in delete_service()Mytnyk, Volodymyr1-0/+31
JIRA: YARDSTICK-1321 Change-Id: Id0f3a5d93f11674fd3908a7f5cf7214afcfa3600 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-18kubernetes_utils: avoid 404 error code in delete_pod()Mytnyk, Volodymyr1-0/+28
JIRA: YARDSTICK-1320 Change-Id: I5b762d4732440008630093e1d0952f7e41a8a191 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-10Merge "Add send socket commands function"Rodolfo Alonso Hernandez1-0/+27
2018-07-09Merge changes from topics 'YARDSTICK-1286', 'YARDSTICK-1127'Rodolfo Alonso Hernandez2-0/+43
* 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 "Add new Kubernetes resource kind: "Network""Rodolfo Alonso Hernandez1-0/+119
2018-07-06Merge "Add new Kubernetes resource kind: "CustomResourceDefinition""Rodolfo Alonso Hernandez1-0/+105
2018-07-05Make "IterationIPC" MQ producer for VNF control messagesRodolfo Alonso Hernandez1-0/+17
"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>
2018-07-05Enable traffic generator PID in "NSPerf" scenario setupRodolfo Alonso Hernandez1-0/+7
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-07-05Add "IterationIPC" runnerRodolfo Alonso Hernandez1-0/+19
"IterationIPC" is a runner that runs a configurable number of times before it returns. Each iteration has a configurable timeout. The loop control depends on the feedback received from the running VNFs. The context PIDs from the VNFs to listen the messages from are given in the scenario "setup" method. The MQ consumer, "RunnerIterationIPCConsumer", is subscribed to messages sent to topic "messaging.TOPIC_TG". The endpoints are defined in the class "RunnerIterationIPCEndpoint". Three are implemented: "messaging.TG_METHOD_STARTED", "messaging.TG_METHOD_FINISHED" and "messaging.TG_METHOD_ITERATION". JIRA: YARDSTICK-1127 Change-Id: I4b2f11a15ef41e6f3c70bd64188d5c7fbcdb7eed Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-28Merge "Cleanup process test cases"Rodolfo Alonso Hernandez1-4/+6
2018-06-28Merge "Cleanup OpenStack utils test cases"Rodolfo Alonso Hernandez1-32/+35
2018-06-26NSB NFVi BNG test fails to run - stops after one stepDanielMartinBuckley1-0/+1
JIRA: YARDSTICK-1244 When sending the start or stop command to PROX. We sould not send the same core. We should not send "start 1,1" instead we should send "start 1" Change-Id: Ie600dc3ed808fd00341e92f13bd52199e68dc51f Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-06-26Merge "Extended Context class with get_physical_nodes functionality"Rodolfo Alonso Hernandez1-0/+6
2018-06-26Merge "Refactor "utils.parse_ini_file" testing"Rodolfo Alonso Hernandez1-17/+93
2018-06-26Extended Context class with get_physical_nodes functionalityChornyi, TarasX1-0/+6
JIRA: YARDSTICK-1255 Change-Id: I446d715dc6cf716a4fcbc1b809c1b1d6303071e0 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-18Refactor RFC2455 TRex traffic profile injectionRodolfo Alonso Hernandez1-0/+11
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-14Add send socket commands functionRodolfo Alonso Hernandez1-0/+27
Pktgen provides a TCP socket connection to allow the user to control it from a remote console or program [1]. This new method will provide Yardstick the ability to send string commands to a port in a remote host. [1] http://pktgen-dpdk.readthedocs.io/en/latest/socket.html JIRA: YARDSTICK-1186 Change-Id: I9d64ccad662fa3599de65654c5dab02833fcc91d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "Network"Rodolfo Alonso Hernandez1-0/+119
Add a new Kubernetes resource kind: "Network" [1] [2] Kubernetes network plugins (alpha definition): [3] Network definition example in Kubernetes: apiVersion: "kubernetes.com/v1" kind: Network metadata: name: flannel plugin: flannel args: '[ {delegate": {"isDefaultGateway": true}} ]' Proposed Kubernetes context network definition: context: networks: - name: flannel plugin: flannel args: (string) - name: sriov_upload plugin: sriov args: (string) [1]https://builders.intel.com/docs/networkbuilders/multiple-network-interfaces-in-kubernetes-application-note.pdf [2]http://cdn.opensourcecloud.cn/zt/k8s/01.pdf [3]https://kubernetes.io/docs/concepts/cluster-administration/network-plugins/ JIRA: YARDSTICK-1160 Change-Id: I71a49ac14e3d28ded91d2ed3cd9cc527e40303f7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "CustomResourceDefinition"Rodolfo Alonso Hernandez1-0/+105
Custom resource definition example in Kubernetes: apiVersion: "apiextensions.k8s.io/v1beta" kind: CustomResourceDefinition metadata: name: networks.kubernetes.com spec: group: kubernetes.com version: v1 scope: Namespaced names: plural: networks singular: network kind: Network Proposed Kubernetes context network definition: context: custom_resources:     - name: network        # name of the resource (singular)       version: v1          # optional, "v1" by default       scope: Namespaced    # optional, "Namespaced" by default From this definition, we will extract the Kubernetes parameters: - metadata.name: custom_resources.name + "s" + context_name + ".com" - spec.group: context_name + ".com" - spec.scope: custom_resources.scope - spec.version: custom_resources.version - spec.names.plural: custom_resources.name + "s" - spec.names.singular: custom_resources.name - spec.names.kind: custom_resources.name with first capital letter [1] https://kubernetes.io/docs/concepts/api-extension/custom-resources/ JIRA: YARDSTICK-1163 Change-Id: If8980dc3f6ddf9c6949bf15be8011aa98482ddc9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-12Merge changes from topics 'YARDSTICK-1218', 'YARDSTICK-1216', ↵Rodolfo Alonso Hernandez2-9/+28
'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-11Cleanup process test casesRodolfo Alonso Hernandez1-4/+6
Remove logging console output during test execution. JIRA: YARDSTICK-1234 Change-Id: I8ecab0219ffd1919f2fa97a90d5be11018b11322 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-11Cleanup OpenStack utils test casesRodolfo Alonso Hernandez1-32/+35
Remove logging console output during test execution. JIRA: YARDSTICK-1230 Change-Id: I1b61f0f18bfb6e5a63c9027537cfb736261c4926 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-08Refactor "utils.parse_ini_file" testingRodolfo Alonso Hernandez1-17/+93
JIRA: YARDSTICK-1218 Change-Id: I5136b22110d215beb7af72998ad47a8dba27f63b Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
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-01Move IncorrectConfig, IncorrectSetup and IncorrectNodeSetup to exceptionsRodolfo Alonso Hernandez1-1/+0
JIRA: YARDSTICK-1218 Change-Id: I804065e9bce3e728f5bf9e756a78df8fd28f74ac Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>