aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
AgeCommit message (Collapse)AuthorFilesLines
2018-07-19Kubernetes NodePort must have 'name' if multiple createdRodolfo Alonso Hernandez3-14/+64
In Kubernetes context, service NodePort can contain more than one port defined. Actually, by default port SSH (22) is always created. If more than one port is defined in the service template, 'name' parameter is mandatory. Names must be lowercase, containing alphanumeric characters or '-'. Verification regex used by Kubernetes: [a-z0-9]([-a-z0-9]*[a-z0-9])? JIRA: YARDSTICK-1324 Change-Id: I82791761d8eae24196c2f16aee9900af28d44c57 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-18kubernetes_utils: avoid 404 error code in delete_pod()Mytnyk, Volodymyr3-4/+37
JIRA: YARDSTICK-1320 Change-Id: I5b762d4732440008630093e1d0952f7e41a8a191 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez37-258/+384
This new class is designed to be used in a ``GenericVNF`` object (VNF or traffic generator) in a builder pattern. This consumer class will be instantiated when initializing the ``GenericVNF`` derived object. The ``GenericVNFConsumer`` endpoint is the ``GenericVNF``derived object itself. ``GenericVNFEndpoint`` is an interface class to be inherited in a ``GenericVNF`` child object; the VNF object will implement the endpoints methods. NewVNF(GenericVNF, GenericVNFEndpoint): def __init__(self, name, vnfd, task_id): ... self._consumer = vnf_base.GenericVNFConsumer([task_id], self) self._consumer.start_rpc_server() JIRA: YARDSTICK-1293 Change-Id: I1bcd980352099e9ebefdab0c96d51aa46f6a1e54 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Add service NodePort information in server descriptionRodolfo Alonso Hernandez2-39/+59
Kubernetes context provides a list of NodePort services to each replication controller. "_get_server" should return this information in the server description dictionary: server: { ... 'service_ports': <list of NodePort objects> } Relevant NodePort object attributes: - port - node_port - target_port - protocol - name JIRA: YARDSTICK-1313 Change-Id: Ie481cdea4761f162e3b3329e4e2c5a982faea9e9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Add interface and network information to Kubernetes contextRodolfo Alonso Hernandez4-23/+143
Add to "Kubernetes" context the "interfaces" information when retrieving a server. This information is needed for NSPerf test cases. The interface information comes from the resource controller network list. Each replication controller will have one port per network defined. JIRA: YARDSTICK-1303 Change-Id: Ifb0e17df295c042a643128c705a93876af999bad Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Merge "Cleanup TG IxLoad test cases"Rodolfo Alonso Hernandez2-87/+62
2018-07-13Merge "Fix "id" retrieval from MQ producer in GenericTrafficGen"Rodolfo Alonso Hernandez2-2/+2
2018-07-13Merge "Make uwsgi app to not demonize"Rex Lee1-1/+3
2018-07-12Merge "Improve "get_server" function in Kubernetes context"Rodolfo Alonso Hernandez4-15/+34
2018-07-12Improve "get_server" function in Kubernetes contextJohn O Loughlin4-15/+34
When a kubernetes context is returning the node info it is assumed that the first port defined is the ssh port which may not be the case. This patch will address this issue by looking for a defined port 22. JIRA: YARDSTICK-1301 Change-Id: I65dee1bcf62f21ebcaefeaa2666bb0ad53f3876c Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-12Fix "id" retrieval from MQ producer in GenericTrafficGenRodolfo Alonso Hernandez2-2/+2
"GenericTrafficGen.get_mq_producer_id" uses a wrong method to retrieve the MQ producer ID. "MessagingProducer" ID is a property called "id". JIRA: YARDSTICK-1312 Change-Id: Id72836b1cde59059359907bd3a315a1abb55778e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-12Merge "Do not request NFVi metrics from empty nodes"Rodolfo Alonso Hernandez2-18/+36
2018-07-12Merge "Make context types constants"Rodolfo Alonso Hernandez14-43/+77
2018-07-12Cleanup TG IxLoad test casesRodolfo Alonso Hernandez2-87/+62
Refactor SSH handling and library mocks. JIRA: YARDSTICK-1236 Change-Id: I591601f8ea8bf4bbd5c43300ff29d7930af5c3c6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-11Merge "Revert "vPE Sample VNF is missing in the installation scripts""Rodolfo Alonso Hernandez1-2/+2
2018-07-11Revert "vPE Sample VNF is missing in the installation scripts"Volodymyr Mytnyk1-2/+2
SampleVNF source tree doesn't contain vPE VNF sources, thus the installation of the vPE sampleVNF fails because of the changes. Reverting. This reverts commit 5bb855a82d960a4fb796e801ec9a9a22dc40b1ca. Change-Id: I27e929e813a28847c2ca725031ec767633a36954 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-11Do not request NFVi metrics from empty nodesRodolfo Alonso Hernandez2-18/+36
In Collector class [1], the information from the nodes is retrieved to create a ResourceProfile object per node. If the node information is empty, Collector should skip this node. [1] https://github.com/opnfv/yardstick/blob/master/yardstick/network_services/collector/subscriber.py#L34 JIRA: YARDSTICK-1302 Change-Id: I84dff3e20881352263736b682a60a4f382960153 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-10Merge "Add network elements as a dict in Kubernetes context"Rodolfo Alonso Hernandez2-10/+8
2018-07-10Make uwsgi app to not demonizeMytnyk, Volodymyr1-1/+3
Supervisord doesn't support demonize applications, thus we have to make the uwsgi application to run not in background. - Fixed Yardstick API path. - Fixed HttpClient class to raise correct exception when the HTML response (not JSON) like 4xx, 5xx is received. (http://docs.python-requests.org/en/master/user/quickstart/#json-response-content) JIRA: YARDSTICK-1297 Change-Id: I4d1c1bb7266eeed0bd357bd28b91206d1580611f Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-10Add "tolerations" parameter in Kubernetes contextRodolfo Alonso Hernandez2-2/+45
This new parameter, "torelations", is applied to pods and allow (but not require) the pods to schedule onto node with matching tains [1]. Example of "tolerations" definition in a Kubernetes pod: spec: containers: [...] tolerations: - key: <key defined in the taint> value: <key value to match with the taint> effect: <effect in case of match> operator: <matching operator> - key: ... Example of "tolerations" definition in a Yardstick test case: context: type: Kubernetes servers: host: containers: [...] tolerations: - key: ... value: ... effect: ... operator: ... NOTE: if any toleration is defined, a default one will be applied in order to allow any replication controller to create the pods in any Kubernetes node. This default toleration is defined as: spec: tolerations: - operator: "Exists" [1] https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ JIRA: YARDSTICK-1254 Change-Id: I32fb9c7086b4218c323218738057f634eb6ffff4 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-10Add "ports" parameters in Kubernetes contextJohn O'Loughlin3-1/+54
This new parameter, "ports", will allow the user to automatically to add port variables in a pod definition: context: type: Kubernetes servers: host: image: ... commands: ... ports: - containerPort: <port value> # Mandatory hostIP: <host IP> # Optional hostPort: <host port> # Optional name: <port name> # Optional protocol: <protocol name> # Optional The port type and the definition must be one of the supported ones in Kubernetes [1]. Container port definition, V1 API, Kubernetes Python library v6.0.0 [2] [1] https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/ [2] https://github.com/kubernetes-client/python/blob/6.0.0/kubernetes/client/models/v1_container_port.py JIRA: YARDSTICK-1183 Change-Id: I3673dbeec8d380cb2f8b1dacf6c25c7cdbc37e28 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-10Add "restartPolicy" parameter in Kubernetes policyJohn O Loughlin3-3/+23
This new parameter, "restartPolicy", will allow define the restart policy per pod. Example of yaml definition in Kubernetes: apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: db ... restartPolicy: Always # Possible values: "Always", "OnFailure" and "Never" Example of definition in a Yardstick context: context: type: Kubernetes servers: host: containers: - name: ... restartPolicy: Always # Default value: "Always" Restart policy [1]. [1] https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy JIRA: YARDSTICK-1175 Change-Id: Id4317b909f98422e89d6d4553e8cfb0e1f593355 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-10Merge "Add "resources" parameter in Kubernetes context"Rodolfo Alonso Hernandez2-0/+25
2018-07-10Merge "Add send socket commands function"Rodolfo Alonso Hernandez3-0/+87
2018-07-09Fix IXIA IxNetwork IMIX configurationRodolfo Alonso Hernandez2-11/+8
IxNet library is not setting correctly the IMIX definition per traffic item. The correct input for "weightedRangePairs" parameter is: [[64, 64, 10], [128, 128, 15], [512, 512, 5]] JIRA: YARDSTICK-1296 Change-Id: Idb4034ce817250da5b9a434230b1be6dae0d3ba3 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-09Merge changes from topics 'YARDSTICK-1286', 'YARDSTICK-1127'Rodolfo Alonso Hernandez25-83/+794
* 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-06Add network elements as a dict in Kubernetes contextRodolfo Alonso Hernandez2-10/+8
Like in Heat context, network elements should be defined in a dictionary, using the network name as the entry key. Previous implementation: context: networks: - name: ... plugin: ... args: ... New implementation: context: networks: net_name_1: plugin: ... args: ... net_name_2: ... JIRA: YARDSTICK-1160 Change-Id: I786b06555af509440604305e2c3c2c9fe521bef8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-06Add "resources" parameter in Kubernetes contextJohn O Loughlin2-0/+25
This new parameter, "resources", will allow the user to automatically add resources in a pod definition per container. Example of yaml definition in Kubernetes: apiVersion: v1 kind: Pod metadata: name: frontend spec: containers: - name: db image: mysql resources: requests: memory: "64Mi" cpu: "250m" limits: memory: "128Mi" cpu: "500m" Example of definition in a Yardstick context: context: type: Kubernetes servers: host: resources: # There are two possible keys in this dict: # "requests" and "limits". limits: <dictionary> requests: <dictionary> Resources in containers [1]. [1] https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ JIRA:YARDSTICK-1171 Change-Id: I163d72d9d3e88b538fca73eb4dbf38613aa23ff4 Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-06Add "env" parameter in Kubernetes contextJohn O Loughlin2-0/+23
This new parameter, "env", will allow the user to automatically to add environment variables in a pod definition Example of definition in a context: context: type: Kubernetes servers: host: image: ... commands: ... env: - <variable name>: <variable value> - <variable name>: <variable value> 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-1161 Change-Id: Icf372a98c090063f10c9217755519ab92ba9b0ba Signed-off-by: John O Loughlin <john.oloughlin@intel.com>
2018-07-06Merge "Create user defined "NodePort" services per pod"Rodolfo Alonso Hernandez3-22/+79
2018-07-06Merge "Change "KubernetesObject" class name to "ReplicationController""Rodolfo Alonso Hernandez2-19/+22
2018-07-06Merge "Specify the networks to be used per pod"Rodolfo Alonso Hernandez2-1/+28
2018-07-06Merge "Add new Kubernetes resource kind: "Network""Rodolfo Alonso Hernandez6-4/+370
2018-07-06Merge "Add new Kubernetes resource kind: "CustomResourceDefinition""Rodolfo Alonso Hernandez7-3/+245
2018-07-06Merge "Add "securityContext" parameter in Kubernetes context"Rodolfo Alonso Hernandez2-5/+60
2018-07-06Merge "[Bug fix] Execute teardown if SLA is set to "assert""Rex Lee1-0/+1
2018-07-05[Bug fix] Execute teardown if SLA is set to "assert"Dimitrios Markou1-0/+1
In Duration runner if SLA is set to "assert" and a SLAValidationError happens then a teardown is needed to avoid garbages in the environment. JIRA: YARDSTICK-1291 Change-Id: I9056b0da3e7e496171ed42430ffc340b5c68f108 Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-07-05Make context types constantsRodolfo Alonso Hernandez14-43/+77
Make context types constants. These are the current context types: - Dummy - Heat - Kubernetes - Node - StandaloneOvsDpdk - StandaloneSriov Any reference to a context type should use the referred constant. JIRA: YARDSTICK-1292 Change-Id: I1ff0085161f88304d71e3ddad7975f9020e0fc20 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-05Merge "vPE Sample VNF is missing in the installation scripts"Rodolfo Alonso Hernandez1-2/+2
2018-07-05Merge "Move "read_yaml_file" to common.yaml_loader"Rodolfo Alonso Hernandez7-25/+26
2018-07-05Make "IterationIPC" MQ producer for VNF control messagesRodolfo Alonso Hernandez6-27/+125
"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-05Merge "Cleanup TestProxSocketHelper unit tests"Rodolfo Alonso Hernandez1-164/+182
2018-07-05Merge "Cleanup OvsDpdkContextTestCase unit tests"Rodolfo Alonso Hernandez1-0/+6
2018-07-05Merge "Cleanup ScenarioGeneral unit tests"Rodolfo Alonso Hernandez1-4/+7
2018-07-05Enable traffic generator PID in "NSPerf" scenario setupRodolfo Alonso Hernandez12-56/+109
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-05Enable the MQ producer in "SampleVNFTrafficGen" classRodolfo Alonso Hernandez10-14/+150
Now all traffic generators using the default implementation of "ClientResourceHelper.run_traffic" will update the status of the traffic injection using the MQ. The available methods are listed in common.messsaging (VNF_METHOD_*): - tg_method_started: VNF app started - tg_method_finished: VNF app finished - tg_method_iteration: VNF app execution loop started JIRA: YARDSTICK-1127 Change-Id: I12829e1762fc20cc95da3b50767a66f031e25ee8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-05Add "TrafficGeneratorProducer" for "GenericTrafficGen" instancesRodolfo Alonso Hernandez2-1/+47
Added "TrafficGeneratorProducer" class, a message producer specific for "GenericTrafficGen" derived classes. JIRA: YARDSTICK-1127 Change-Id: Icc87a6920155612e759a1d4d2f29028940c2e040 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-05Add "IterationIPC" runnerRodolfo Alonso Hernandez6-4/+382
"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-07-04Cleanup ActionTestCase unit testsRodolfo Alonso Hernandez1-19/+23
Removed unneeded output and applied the correct mocks. JIRA: YARDSTICK-1290 Change-Id: Ib8dbf582d81f7de0fadce7ddb215360abb2d16a4 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-03IXIA IxNetwork TP first rate is not populatedRodolfo Alonso Hernandez2-2/+12
IXIA IxNetwork traffic profile defines an initial injection frame rate for RFC2544 test cases: schema: "isb:traffic_profile:0.1" traffic_profile: frame_rate : 20000 This value should be assigned to IXIARFC2544Profile.rate before the initial injection period. JIRA: YARDSTICK-1288 Change-Id: I29a334c7dbb863f680e45a1d3ab880aaf1fe166d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>