aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-06-26NSB NFVi BNG test fails to run - stops after one stepDanielMartinBuckley2-4/+17
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-26Decrease Sampling intervalDanielMartinBuckley5-39/+124
JIRA: YARDSTICK-1219 Currently NSB for NFVI using PROX returns sampling information every 13 seconds. This is too slow. It is required to return sampling information form Generator AND VNF at least every 1 second. This change is depandant on JIRA: YARDSTICK-1212 and YARDSTICK-1220 Change-Id: Ica7ab795a2919d191d8cd846d028e15739e33fb7 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-06-26Merge "Addition of Configurable Sampling and Configurable Confirmation Retry"Abhijit Sinha6-43/+663
2018-06-26Merge "Extended Context class with get_physical_nodes functionality"Rodolfo Alonso Hernandez20-70/+464
2018-06-26Addition of Configurable Sampling and Configurable Confirmation RetryDanielMartinBuckley6-43/+663
JIRA: YARDSTICK-1221 In order to increase accuracy of result the following are done :- - Improve Measurement Accuracy (YARDSTICK-1212) - Improve Sampling Interval (YARDSTICK-1219) - Allow 4 PROX ports to be read simultaneously (YARDSTICK-1220) This change does the following :- - Stores LINE Rate statistics of Sample - Requires a confirmation retry before deciding to increase or decrease this is configurable. - Allows the user to disable Sampling or specify a sample interval - Added Code Coverage of ProxDurationRunner based on YARDSTICK-1199 Change-Id: I27242ac1849c9a2712866385b5fbc05977c71516 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
2018-06-26Merge "Bugfix: HA kill process recovery has a conflict"Abhijit Sinha2-8/+33
2018-06-26Merge "Refactor "utils.parse_ini_file" testing"Rodolfo Alonso Hernandez1-17/+93
2018-06-26Merge "Refactor remote command execution in pktgen_dpdk"Emma Foley2-5/+18
2018-06-26Extended Context class with get_physical_nodes functionalityChornyi, TarasX20-70/+464
JIRA: YARDSTICK-1255 Change-Id: I446d715dc6cf716a4fcbc1b809c1b1d6303071e0 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-26Merge "Add unit test file for DurationRunner"Rodolfo Alonso Hernandez1-0/+39
2018-06-26Merge "Refactor remote command execution in pktgen"Rex Lee4-133/+107
2018-06-26Bugfix: HA kill process recovery has a conflictrexlee87762-8/+33
It happens in Nokia SUT when running in the Plugfest. The problem happens when the start_process start to recover the killed process (like nova-api), but the self-cured mechanism already recovered. And somehow it lead to a conflict and has problems. So the recover of the HA attack-recover should be improved to only recover it when it needs to. JIRA: YARDSTICK-1222 Change-Id: I1acb5a7d59d6fe4e0de0b0c5942fa89e051dd1ff Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-06-25Add unit test file for DurationRunnerMiikka Koistinen1-0/+39
JIRA: YARDSTICK-1199 Change-Id: I5526935207ae3661a4cb8b8d25e93bc26adc3ef2 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-25Merge "Cleanup CGNAPT unit tests"Rodolfo Alonso Hernandez1-123/+70
2018-06-25Merge "Add "volumeMounts" parameter in Kubernetes context"Rodolfo Alonso Hernandez2-28/+89
2018-06-25Merge "Add "volumes" parameter in Kubernetes context"Rodolfo Alonso Hernandez6-40/+118
2018-06-25Change 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>
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-19Refactor remote command execution in pktgen_dpdkMiikka Koistinen2-5/+18
PktgenDPDKLatency.run will raise a RuntimeError if a remote command fails. This commit makes it use the already existing exception raising mechanism in yardstick's ssh client. JIRA: YARDSTICK-1166 Change-Id: I3a3c7691399044b174f5d040c015c9b907b2fe5d Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-06-19Refactor remote command execution in pktgenMiikka Koistinen4-133/+107
Some remote commands in Pktgen are executed without checking the exit status. This patch makes all remote commands check exit value, and removes unused variables that are captured from remote command executions. JIRA: YARDSTICK-1166 Change-Id: I42a667ebd22d086887d61e1671bc569b03c59d33 Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
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-14Add send socket commands functionRodolfo Alonso Hernandez3-0/+87
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-14Create user defined "NodePort" services per podRodolfo Alonso Hernandez3-22/+79
This feature will give the user the ability to create user defined "NodePort" services per pod, a part from the default SSH port created, by default, for each pod created. Example of Kubernetes yaml definition: apiVersion: v1 kind: Servicemeta data: name: pod-1-service-nodeport spec: type: NodePort ports: - name: web port: 80 targetPort: 8888 nodePort: 33333 clusterIP: 10.254.0.8 selector: app: pod-1 Example of Yardstick test case definition: context: type: Kubernetes servers: host: containers: - image: ... securityContext: allowPrivilegeEscalation: false - image: ... node_ports: - port: <port number> # Mandatory name: <port name> # Optional targetPort: <port name> # Optional, default: targetPort=port nodePort: <port number> # Optional, assigned by Kubernetes Kubernetes service, type "NodePort" [1] [1] https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport JIRA: YARDSTICK-1181 Change-Id: Ia7730e4569d5526d573402a98c27d55c5c82cdef Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Change "KubernetesObject" class name to "ReplicationController"Rodolfo Alonso Hernandez2-19/+22
The class name "KubernetesObject" is not accurate. This class holds the definition of a Kubernetes replication controller. The suggested name is therefore "ReplicationControllerObject". JIRA: YARDSTICK-1180 Change-Id: I9ee9228f9528cb779e54a9bc178760b6e24c85c2 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Specify the networks to be used per podRodolfo Alonso Hernandez2-1/+28
If CRD "Network" is defined and network items are created, each pod (server) can have access to one or several networks. This is defined in the metadata section, as "annotations.networks" [1]. Example of Kubernetes pod definition with networks: apiVersion: v1 kind: Pod metadata: name: test-pod annotations: networks: '[{"name": "flannel"}]' Example of Yardstick server definition with networks: context: type: Kubernetes servers: host: containers: - name: ... networks: - flannel # These names must be defined in # context.networks ... networks: - name: flannel plugin: flannel Kubernetes annotations [2]. [1]https://github.com/intel/multus-cni/tree/b9446232cdf4f1b6f2bea583291973cc97e963f4#configuring-multus-to-use-kubeconfig-and-a-default-network [2]https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ JIRA: YARDSTICK-1178 Change-Id: I6e7b4bacf10810833ec733c14d44e5db613675e3 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add new Kubernetes resource kind: "Network"Rodolfo Alonso Hernandez6-4/+370
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 Hernandez7-3/+245
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-14Add "securityContext" parameter in Kubernetes contextRodolfo Alonso Hernandez2-5/+60
This new parameter, "securityContext", will allow the user to define the privilege and access control settings for a pod or a container [1]. Example of "securityContext" definition in the pod (if only one container is defined): context:   type: Kubernetes   servers:     host:       image: ...       securityContext:         runAsUser: 1000         fsGroup: 2000  Example of "securityContext" definition in the pod and the container (if several containers are defined):      context:   type: Kubernetes   servers:     host:       securityContext:         runAsUser: 1000         fsGroup: 2000        containers:         - image: ...           securityContext:             allowPrivilegeEscalation: false         - image: ... [1] https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ JIRA: YARDSTICK-1156 Change-Id: I597a300c68cd834522a284b1cca0faa918493342 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Define several containers per pod in a replication controllerRodolfo Alonso Hernandez2-50/+102
Add the ability to define not only one but many containers per pod in a replication controller descriptor. This feature must be backwards compatible; all current test cases using the "single container" server definition must be accepted. Example of single container pod definition: context: type: Kubernetes servers: host: image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory Example of several container pod definition: context: type: Kubernetes servers: host: containers: # if this key is present, all container specific parameters (image, commands, args, volumeMounts, etc.) must be defined per container - image: ... commands: ... - image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory NOTE: other parameters, like "volumes" or "nodeSelector", are common to all containers in the pod. JIRA: YARDSTICK-1155 Change-Id: Ib95668c68e9c09e6de3f1aa41c903cc52e6809ad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "volumeMounts" parameter in Kubernetes contextRodolfo Alonso Hernandez2-28/+89
This new parameter, "volumeMounts", will allow the user to automatically create new volumes mounted inside the container. Example of Kubernetes context definition: context: type: Kubernetes servers: host: volumeMounts: - name: volume1 # mandatory mountPath: /dev/hugepages # mandatory readOnly: True # optional, default=False JIRA: YARDSTICK-1151 Change-Id: Ic00b45e6d603a9f85e3f0e25becdf0bce14e637c Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-14Add "volumes" parameter in Kubernetes contextRodolfo Alonso Hernandez6-40/+118
This new parameter, "volumes", will allow the user to automatically create new volumes. Example of Kubernetes context definition: context: type: Kubernetes servers: host: image: ... commands: ... volumes: - name: volume1 # mandatory <volume type definition> # mandatory The volume type and the definition must be one of the supported ones in Kubernetes [1]. [1] https://kubernetes.io/docs/concepts/storage/volumes/#types-of-volumes JIRA: YARDSTICK-1152 Change-Id: I44a91c605f047de4f286407e28fb5aa2e921b00a 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>