aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/contexts
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08Merge "Update to support using external heat template"Volodymyr Mytnyk1-0/+45
2019-04-04Update to support using external heat templatetreyad1-0/+45
Modify the _get_server() function when using external heat template. The server attrs should be read from stack.outputs. JIRA: YARDSTICK-1453 Change-Id: I00eda7476e77fc0a5c15ef8db7d057fa1cf267e6 Signed-off-by: treyad <treyad@viosoft.com>
2019-02-28Support using existing private key when using external heat template filetreyad1-0/+37
Currently, the private key is auto-generated from Yardstick. This patch will allow user use their existing private key when they use external heat template file. JIRA: YARDSTICK-1447 Change-Id: I45a0ab4ac08e7ccedd770867ed43de92040b6a10 Signed-off-by: treyad <treyad@viosoft.com>
2018-11-29Merge "Distribute dpdk/vhostuser between CPUs for SA OVS"Volodymyr Mytnyk1-0/+7
2018-11-22Fix OvS-DPDK context mem allocation problemMytnyk, Volodymyr1-1/+2
The hugepages allocated for OvS-DPDK context is not correct, thus it is causing an issue to allocate the required amount of memory for VM. JIRA: YARDSTICK-1538 Change-Id: I1a34199d4f78c999476603fa86d79ffc1fbf27c8 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-11-20Make VM machine type as a user configurationMytnyk, Volodymyr1-2/+3
For backward compatibility, the default value of this option has been left unchanged. JIRA: YARDSTICK-1528 Change-Id: I42ceca96501f1136cba27d85c2d82240bd45c10c Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-11-13Distribute dpdk/vhostuser between CPUs for SA OVSStepan Andrushko1-0/+7
Update Yardstick with ability to distribute DPDK/vhost-user ports/queues between CPU cores. Extended OVS add vhost-user interface command with option "n_rxq", provided in the test case. Ordered ports added to OVS. JIRA: YARDSTICK-1490 Change-Id: I71f5d878a9ee3a11f636762fc16b04ee6bc79e14 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-11-07Merge "Setup hugepages on SA host(sriov, ovs_dpdk)"Abhijit Sinha2-15/+22
2018-11-07Merge "Make OvS max_idle & queues configuration optional"Abhijit Sinha2-2/+2
2018-11-02Make OvS max_idle & queues configuration optionalMytnyk, Volodymyr2-2/+2
Remove hardcoded rx queue value JIRA: YARDSTICK-1493 Change-Id: Ia4944db21d94399c724bcabf4e0eae809518e7e9 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-10-30Update: assign static IP to VM for standaloneStepan Andrushko1-0/+2
Updated cloud-init network file to be used on Ubuntu 16.04 and Ubuntu 18.04. Fields 'macaddress' and 'prefix' modified in network-config file. JIRA: YARDSTICK-1402 Change-Id: Ibe7fb9dbf23326a0a6106f98d3b2b9fedf81f79a Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-10-27Setup hugepages on SA host(sriov, ovs_dpdk)Serhiy Pshyk2-15/+22
JIRA: YARDSTICK-1461 Change-Id: Ia1f5026eee989672aac57775ec9dd182df658fa4 Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
2018-08-29Assign static IP to VM for standalone contextStepan Andrushko3-10/+27
During VM spawning IP address should be assigned by DHCP server in the local network. Sometimes DHCP server is not capable to assign IP address. So, need to add static IP address. JIRA: YARDSTICK-1402 Change-Id: Ie59c340eb88eddcaff043496fc20aa48b49205ec Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-08-27Merge "Make security group configurable - dovetail"Jing Lu1-1/+2
2018-08-23Provide access to VM in Standalone contextStepan Andrushko3-35/+127
Add possibility to access VM with SampleVNF image, which is spawned on baremetal server using password or key pairs (provided or generated). Changes provided for OVS-DPDK and SRIOV cases. JIRA: YARDSTICK-1260 Change-Id: I89cf17dc83f02abe23d206b24b9d0ec1298d3231 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
2018-08-20Make security group configurable - dovetailrexlee87761-1/+2
Make sercurity group can be configured via the context. The format would be: context: name: demo image: yardstick-image flavor: yardstick-flavor user: ubuntu security_group: rules: - remote_ip_prefix: "0.0.0.0/0" protocol: "tcp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "udp" port_range_min: 1 port_range_max: 65535 - remote_ip_prefix: "0.0.0.0/0" protocol: "icmp" JIRA: YARDSTICK-1360 Change-Id: I00c45767ee2d70b790590e824599d5a4c274bced Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-19NodePort information returned in context should be a dictionaryRodolfo Alonso Hernandez1-3/+13
In Kubernetes context, NodePort information returned in context should be a dictionary. In [1], the node information is dumped in a yaml file. The NodePort object doesn't have a serialize implementation; instead of returning the object, an equivalent dictionary should be returned. [1]https://github.com/opnfv/yardstick/blob/f6fa0d7422f0669d049dbf07a51eb39b1dc25830/yardstick/benchmark/scenarios/networking/vnf_generic.py#L293 JIRA: YARDSTICK-1323 Change-Id: If4844c9b074920a7a7d8c1a424b681f9f8a4b0c5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-13Add service NodePort information in server descriptionRodolfo Alonso Hernandez1-32/+48
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 Hernandez1-13/+65
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-12Merge "Improve "get_server" function in Kubernetes context"Rodolfo Alonso Hernandez1-3/+5
2018-07-12Improve "get_server" function in Kubernetes contextJohn O Loughlin1-3/+5
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-12Merge "Make context types constants"Rodolfo Alonso Hernandez3-3/+6
2018-07-06Merge "Create user defined "NodePort" services per pod"Rodolfo Alonso Hernandez1-2/+2
2018-07-05Make context types constantsRodolfo Alonso Hernandez3-3/+6
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 "Move "read_yaml_file" to common.yaml_loader"Rodolfo Alonso Hernandez3-7/+12
2018-07-05Merge "Cleanup OvsDpdkContextTestCase unit tests"Rodolfo Alonso Hernandez1-0/+6
2018-06-29Cleanup NodeContextTestCase unit testsRodolfo Alonso Hernandez1-2/+2
Removed deprecated functions. JIRA: YARDSTICK-1273 Change-Id: I055b8393e6b25eb08f718cd8a915c6ea684786d8 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-29NFVI support for standalone, baremetal and heat contextsChornyi, TarasX1-0/+2
JIRA: YARDSTICK-1257 Change-Id: I6733bd49ac91985e8f3d7722e6990e8733bb430e Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-29Move "read_yaml_file" to common.yaml_loaderRodolfo Alonso Hernandez3-7/+12
JIRA: YARDSTICK-1265 Change-Id: Ic2813dca7fc9a3230632f6e8bd75aeacc7e951b0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-28Cleanup OvsDpdkContextTestCase unit testsRodolfo Alonso Hernandez1-0/+6
Removed unneeded output. JIRA: YARDSTICK-1264 Change-Id: Ic804d5ebd5bc1c0fc8c98c058e8dd76a9ea565fa Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-26Extended Context class with get_physical_nodes functionalityChornyi, TarasX8-27/+265
JIRA: YARDSTICK-1255 Change-Id: I446d715dc6cf716a4fcbc1b809c1b1d6303071e0 Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com>
2018-06-25Merge "Add "volumes" parameter in Kubernetes context"Rodolfo Alonso Hernandez1-7/+19
2018-06-18Refactor RFC2455 TRex traffic profile injectionRodolfo Alonso Hernandez1-2/+2
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-14Merge "Add "host_name_separator" variable to Context class"Rodolfo Alonso Hernandez1-3/+46
2018-06-14Create user defined "NodePort" services per podRodolfo Alonso Hernandez1-2/+2
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-14Add "volumes" parameter in Kubernetes contextRodolfo Alonso Hernandez1-7/+19
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-12Improve IXIA IxNetwork library and traffic profile (4)Rodolfo Alonso Hernandez1-2/+2
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-11Move tests: unit/network_services/vnf_genericEmma Foley6-19/+37
* 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 __init__ method overriding in HeatContextTestCase"Rodolfo Alonso Hernandez1-7/+4
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-22Error when adding SR-IOV interfaces in SR-IOV contextRodolfo Alonso Hernandez1-9/+15
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-21Add "host_name_separator" variable to Context classRodolfo Alonso Hernandez1-3/+46
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-03Add "os_cloud_config" as a new context flag parameterRodolfo Alonso Hernandez2-6/+10
This new parameter will contain the OpenStack cloud specific configuration used by Shade client. This new flag is used only in Heat context. By default, this new parameter (dict) will contain this content: 'os_cloud_config': {'verify': False} This field will be used by HeatStack [1] to create a Shade cloud. Shade retrieves, if not defined, the OpenStack configuration from "os_client_config". This configuration is used to generate the cloud configuration, which is the description of the OpenStackCloud returned. The default parameter defined, "verify", refers to the related bug. By default, in case of using SSL certificate it will not be verified. [1] https://github.com/opnfv/yardstick/blob/b338d3091bb0beb89d4ad9f7c144f43a31a19a74/yardstick/orchestrator/heat.py#L47 JIRA: YARDSTICK-1139 Change-Id: I875a7018401b84e51dab775b8194174645d27e06 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-25Fix "os.path" mock problems during testsRoss Brattain2-6/+5
This patch removes the global mocking applied on "os.path". Change-Id: Ia18d2c90195c5408a1852792bdf05b6f0c1ad21f Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-21Merge "Improve "Libvirt.create_snapshot_qemu" function"Rodolfo Alonso Hernandez1-10/+66
2018-04-17fix unittest test_deploy_try_retrieve_context_does_not_existRoss Brattain1-1/+1
unittest is failing due to mock being called multiple times. I assume this is due to parallelization of tests in Jenkins somehow ====================================================================== FAIL: test_deploy_try_retrieve_context_does_not_exist (benchmark.contexts.test_heat.HeatContextTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/mock/mock.py", line 1305, in patched return func(*args, **keywargs) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/yardstick/tests/unit/benchmark/contexts/test_heat.py", line 309, in test_deploy_try_retrieve_context_does_not_exist mock_path_exists.assert_called_once_with(key_filename) File "/home/jenkins/opnfv/slave_root/workspace/yardstick-verify-master/.tox/py3/lib/python3.5/site-packages/mock/mock.py", line 947, in assert_called_once_with raise AssertionError(msg) AssertionError: Expected 'exists' to be called once. Called 3 times. ---------------------------------------------------------------------- Change-Id: I696c63ef9f7943b841e2d3d533c92f18aa7044da Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2018-04-16Improve "Libvirt.create_snapshot_qemu" functionRodolfo Alonso Hernandez1-10/+66
Improved "Libvirt.create_snapshot_qemu" function: - Check if the base image is present in the remote host. If not, try to copy from the execution host. - Check the execution status. In case the command fails, raise an exception. JIRA: YARDSTICK-944 Change-Id: I78bd0d3ed6a1f35ed772c0d192bb240009a580ed Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-21Improve "Libvirt.virsh_destroy_vm" functionRodolfo Alonso Hernandez1-7/+13
Read the command exit code and log a warning in case the VM destroy process went wrong. JIRA: YARDSTICK-943 Change-Id: I2750b8d4a8f67af081c1988510cf5aca848a2cf1 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-21Improve "Libvirt.virsh_create_vm" functionRodolfo Alonso Hernandez1-6/+18
Read the command exit code and raise an exception in case the VM boot process went wrong. JIRA: YARDSTICK-941 Change-Id: Ibabaae8983213a33799ad00fa4d9541bbabea857 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-21Improve NSB Standalone XML generationRodolfo Alonso Hernandez3-139/+144
Delayed the generation of the XML file until the last step. The following functions will return a XML string insted: - Libvirt.build_vm_xml - SriovContext._enable_interfaces - OvsDpdkContext._enable_interfaces The XML file will be written just before copying the file to the compute hosting the VMs. JIRA: YARDSTICK-939 Change-Id: Icc80f4741903bbe335db4ebccab395b72fa87e82 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>