aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common
AgeCommit message (Collapse)AuthorFilesLines
2018-10-17Merge "Added traffic update capability to Ixload TG"Abhijit Sinha1-0/+4
2018-10-11Added traffic update capability to Ixload TGMyron Sosyak1-0/+4
Allow yardstick to update IP/MAX of Net traffic - Implemented functionality for updating traffics IP/MAC address in ixloadconfiguration. - Extended http_ixload.py with functions for update IP/MAC address of netTraffic. - In HTTP-vFW_IPv4_2Ports_Concurrency.rxf changed name's of networks from "client network" to "uplink_0 and the same for server JIRA: YARDSTICK-1418 Change-Id: I28ef68b77466fff15af589954e3ef63e8099428f Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com> Signed-off-by: Taras Chornyi <tarasx.chornyi@intel.com>
2018-09-08Added Landslide Resource Helper implementationEmma Foley1-0/+6
Class "LandslideResourceHelper" provides API for operations needed - to configure Landslide test session - manage test session execution (start/stop/abort) - collect measurements during test run This helper class API is responsible to for configure Landslide test runs: - create test user - create test servers (for emulation of specific vEPC blocks) - create SUTs (actual tested VNFs performing specific vEPC roles) - create test session (contains actual test cases) - create DMFs (pre-defined traffic flows in traffic profile) - operate traffic run execution (start, stop, abort) - monitor test run status - collect KPIs on TG side Some of these features use Landslide REST API. Other ones use Landslide TCL API. JIRA: YARDSTICK-1356 Change-Id: I8fc8a7d85301121da465d054b8d38ae09a541c36 Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com>
2018-09-05Add TclClients for Spirent Landslide TGOrest Voznyy1-0/+6
Add class "LandslideTclClient" which holds TCL calls wrappers for operations on the LandSlide TG. It also introduces several new parameters in - test case YAML file structure: * session_profile: YAML file holding a template of Landslide test session for specific vEPC test scenario * dmf: test case options member holding traffic flow specific parameters for designated test scenario, that override ones in traffic_profile YAML file * test_cases: test case options member holding parameters specific to designated vEPC test case, overriding those in session_profile template file - pod YAML file structure: * tas_manager: holds parameters used to connect to Spirent Landslide TAS * config: list of entries describing Landslide test servers access, their network interfaces configuration, information of vEPC elements emulated by specific test server Class "LandslideProfile" implements access to traffic profile template from "LandslideResourceHelper" class. JIRA: YARDSTICK-1356 Change-Id: Ia6428072b1e72025be17c94e5141bd23f7993247 Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Orest Voznyy <orestx.voznyy@intel.com>
2018-08-23Make TRex IMIX traffic mode configurableRodolfo Alonso Hernandez1-0/+4
Enable TRex IMIX generation using two modes: - Distribution in packages. - Distribution in byes. The default one will be distribution in packages, like the default one in IxNetwork. JIRA: YARDSTICK-1397 Change-Id: I86b2527968496218b0515349fc0a2680a84261e5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-08-21Convert IXIA latency statistics to integerRodolfo Alonso Hernandez2-0/+26
JIRA: YARDSTICK-1385 Change-Id: Id50c393da7ded4b3c8e127f7d7a6501832a68446 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-08-07Merge "Change assert statements to raises in CheckValue"Rex Lee1-0/+4
2018-08-03Merge "Add UDP ports configuration to IXIA traffic profile"Abhijit Sinha1-0/+4
2018-08-02Add UDP ports configuration to IXIA traffic profileMyron Sosyak1-0/+4
- Implemented handling of UDP source and destination ports from IXIA traffic profile. - UDP ports can be defined as a single value or as a random range. Ports range is configured with two parameters 'fixed_bits' and 'mask_bits'. - For example '8-48' range definition will create a repeatable pattern of four values that fall within the range of 8 and 56. JIRA: YARDSTICK-1363 Change-Id: I0ace722f6be843ea79c3d3f4de22cb8fa5669d4f Signed-off-by: Myron Sosyak <myronx.sosyak@intel.com> Signed-off-by: Pshyk Serhiy <serhiyx.pshyk@intel.com> Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-08-02Merge "Replace assert statements in PipelineRules"Abhijit Sinha1-0/+4
2018-07-31Replace assert statements in PipelineRulesMiikka Koistinen1-0/+4
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-6/+2
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-31Change assert statements to raises in CheckValueMiikka Koistinen1-0/+4
* Instead of using assert statements, raise a custom exception. * Modify the unit tests so that they do not test unused parameters for equality. * Fix pylint and pep8 errors. JIRA: YARDSTICK-966 Change-Id: I41e13a5a22086827792eaf9de8da2e4ed6dd42de Signed-off-by: Miikka Koistinen <miikka.koistinen@nokia.com>
2018-07-31Merge "Check for network already created k8"Emma Foley1-1/+21
2018-07-30Change assert statement to raise in common/utilsMiikka Koistinen2-2/+10
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-4/+21
2018-07-26Enable "wait_until_true" when used ouf the main threadRodolfo Alonso Hernandez1-4/+21
"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-4/+9
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-4/+9
JIRA: YARDSTICK-1319 Change-Id: I8370c5ef4e43e58a8bb9c3aac60a089b0981dda0 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-25Merge "Fix typo in classname AclUknownActionTemplate"Rodolfo Alonso Hernandez1-1/+1
2018-07-24Fix typo in classname AclUknownActionTemplateEmma Foley1-1/+1
AclUknownActionTemplate -> AclUnknownActionTemplate JIRA: YARDSTICK-1334 Change-Id: I796e080078c657c5e0e59144d24ec797e244a8f7 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-07-24Merge changes from topics 'YARDSTICK-1351', 'YARDSTICK-1339'Rodolfo Alonso Hernandez1-0/+8
* changes: Add IP mask to IxNetwork configuration Improve NetworkServiceTestCase._get_ip_flow_range() function
2018-07-24Merge changes from topics 'YARDSTICK-1346', 'YARDSTICK-1345', 'YARDSTICK-1344'Rodolfo Alonso Hernandez2-0/+5
* changes: Add pktgen test case base files Add pktgen traffic profile Add DPDK pktgen traffic generator
2018-07-24Merge "kubernetes_utils: avoid 404 error code in delete_network()"Rodolfo Alonso Hernandez1-4/+8
2018-07-24kubernetes_utils: avoid 404 error code in delete_network()Mytnyk, Volodymyr1-4/+8
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-19/+17
2018-07-24Add IP mask to IxNetwork configurationRodolfo Alonso Hernandez1-0/+8
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-23Add DPDK pktgen traffic generatorRodolfo Alonso Hernandez2-0/+5
Add DPDK pktgen traffic generator. This traffic generator is designed only to work in with a MQ aware runner. Implements two consumer methods: - runner_method_start_iteration - runner_method_stop_iteration "run_traffic" method will only initialize the traffic profile object. This traffic generator uses a socket port (LUA port, default 22022) to send the command messages. Link: http://pktgen-dpdk.readthedocs.io/en/latest/index.html JIRA: YARDSTICK-1344 Change-Id: I89bba0f462fa1c22b33f1253f67f7c41e6e721a5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-23Cleanup Ansible common unit testsRodolfo Alonso Hernandez1-19/+17
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 "Accept line rate percentage or fps a initial rate for IXIA RFC2544"Rodolfo Alonso Hernandez1-2/+4
2018-07-23Merge "kubernetes_utils: avoid 404 error code in ↵Rodolfo Alonso Hernandez1-4/+8
delete_custom_resource_definition()"
2018-07-23Merge "kubernetes_utils: avoid 404 error code in delete_service()"Rodolfo Alonso Hernandez1-5/+8
2018-07-20kubernetes_utils: avoid 404 error code in delete_custom_resource_definition()Mytnyk, Volodymyr1-4/+8
JIRA: YARDSTICK-1317 Change-Id: I2dc924334199761d63dce9aebe9ce200ca0fddf8 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-20Accept line rate percentage or fps a initial rate for IXIA RFC2544Rodolfo Alonso Hernandez1-2/+4
Accept line rate percentage or fps a initial rate for IXIA RFC2544 traffic profile: traffic_profile: traffic_type : IXIARFC2544Profile frame_rate : 100% traffic_profile: traffic_type : IXIARFC2544Profile frame_rate : 5000fps JIRA: YARDSTICK-1336 Change-Id: I85b3dd0daf563bb7af098a3aa5bb872961fb009b Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-20Check for network already created k8John O Loughlin1-1/+21
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-5/+8
JIRA: YARDSTICK-1321 Change-Id: Id0f3a5d93f11674fd3908a7f5cf7214afcfa3600 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-19Accept strings and lists as container "args" and "commands"Rodolfo Alonso Hernandez1-0/+4
Accept strings and list of strings as "args" and "commands" in a Kubernetes container. JIRA: YARDSTICK-1329 Change-Id: I56470741072fb7f9a62d695c51fcb0cc3f3ff1b9 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-19Merge "Add "imagePullPolicy" parameter in Kubernetes container"Rodolfo Alonso Hernandez1-0/+4
2018-07-19Add "imagePullPolicy" parameter in Kubernetes containerRodolfo Alonso Hernandez1-0/+4
The configuration parameter "imagePullPolicy" defines how Kubernetes retrieves de image. By default, Kubernetes will always try to pull the latest image from the repository [1]. Three possible arguments are accepted: - Always - IfNotPresent - Never Example of Kubernetes pod definition: containers: - name: vcmts-pktgen-pod-0 image: openretriever/yardstick imagePullPolicy: IfNotPresent Example of Yardstick definition: context: name: k8syardstick type: Kubernetesservers: vnf: image: openretriever/yardstick imagePullPolicy: IfNotPresent [1] https://kubernetes.io/docs/concepts/containers/images/ JIRA: YARDSTICK-1328 Change-Id: I83bfb01670eef22218b1affd7d37af14e32a622e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-07-19Kubernetes NodePort must have 'name' if multiple createdRodolfo Alonso Hernandez1-0/+10
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, Volodymyr1-3/+8
JIRA: YARDSTICK-1320 Change-Id: I5b762d4732440008630093e1d0952f7e41a8a191 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-0/+1
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-13Merge "Make uwsgi app to not demonize"Rex Lee1-1/+3
2018-07-12Improve "get_server" function in Kubernetes contextJohn O Loughlin2-4/+12
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-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 "ports" parameters in Kubernetes contextJohn O'Loughlin1-0/+4
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 Loughlin1-0/+4
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 send socket commands function"Rodolfo Alonso Hernandez1-0/+22
2018-07-09Merge changes from topics 'YARDSTICK-1286', 'YARDSTICK-1127'Rodolfo Alonso Hernandez5-24/+55
* 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 Hernandez2-0/+56