aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/functional
AgeCommit message (Collapse)AuthorFilesLines
2019-07-17Leverage on PBRCédric Ollivier1-5/+6
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-03Use baro and yardstick metrics in dynamic HTML reportEmma Foley1-13/+213
_combine_metrics combines metrics from different sources. This is for use with the ``yardstick report generate-nsb`` command, which will combine yardstick and barometer metrics in the dynamic HTML report. JIRA: YARDSTICK-1593 Change-Id: I87002948ebb4cc88fb0932380bcb9920eb53db58 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2019-01-29NSB sync: clean-up draft IPC implementation (part 1)Mytnyk, Volodymyr4-103/+0
The existing implementation of IPC is not finished and isn't used by any of the VNFs/TG implementation. It is used in the code but does nothing from functionality perspective. New syncronization mechanism is going to be implemented by using different approach than it was designed before. Thus, the current IPC mechanism is not going to be re-used. So, removing it. The IPC consumer/producer implementation is left as it may be required for other purposes. - Remove SampleVNF MQ consumer class - Remove IterationIPC MQ producer for VNF control messages - Remove MQ producer from SampleVNFTrafficGen class - Remove TrafficGeneratorProducer class - Remove IterationIPC runner - Remove unused task_id form VNF Generic initialization as it is not required for synchronization of VNFs/TGs anymore. - Fix UT JIRA: YARDSTICK-1592 Change-Id: I65fe51bcbd1bfeea0c43eb79ca6fb2aab5b65ae7 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-12-21Additional rework of NSB reportPatrice Buriez1-13/+27
- Make format_for_jstree expect a list of metric names - Avoid displaying timestamps twice in initial data table - Sort metrics in initial data table - Display testcase name - Fix styling - Make better use of JS and jQuery features - Move event handler to JS file - Avoid adding multiple tbody elements into data table - Adjust unit tests and functional tests accordingly JIRA: YARDSTICK-1367 Topic: report/html_table (12 of 12) Change-Id: I85d853f8e392953cace67e94fa0af2e2492a2b86 Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-12-21Add functional tests for HTML reportPatrice Buriez2-0/+100
JIRA: YARDSTICK-1367 Topic: report/html_table (9 of 12) Change-Id: I987203c4b3f49fb0f205e9b4c71bcbf4618041a0 Signed-off-by: Emma Foley <emma.l.foley@intel.com> Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
2018-10-26fix yardstick verify jobrexlee87761-2/+7
The regex is not compatible with pip version 18. JIRA: INFRA-310 Change-Id: I6eaf1e3fac183f85c277934929e9065efa88d877 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez4-0/+103
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-10Merge "Add send socket commands function"Rodolfo Alonso Hernandez1-0/+38
2018-07-05Enable traffic generator PID in "NSPerf" scenario setupRodolfo Alonso Hernandez1-11/+11
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-06-14Add send socket commands functionRodolfo Alonso Hernandez1-0/+38
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-04-19MessagingConsumer accepts messages from multiple producersRodolfo Alonso Hernandez1-20/+25
The messaging consumer now can store a list of PID of several producers. The notification handler can compare the procedence of a message from a list of PID. JIRA: YARDSTICK-1074 Change-Id: I193f83c2b471e5bf1298ac728be52533aded0c1a Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-13Add MQ consumer, producer and payload base classesRodolfo Alonso Hernandez2-0/+94
Added MessagingProducer base class. A class implementing this base class can send a cast message using the MQ service installed in the Yardstick jumphost (RabbitMQ by default, other MQ could be implemented). The producer will send messages to an specific topic. Added MessagingConsumer base class. A class implementing this base class will be able to receive any message sent by a MessagingPorducer class publishing messages in the topic subscribed. By default both Producer and Consumer "fanout" is True. That means every Consumer will create a fanout Queue attached to the MQ Exchange topic. All Consumers attached to this topic will receive the message sent by the Producer [1]. Added Payload base class. To send data through the message queue service, a Payload derived object should be created. This base class allows to define the attributes container in the class, convert the object to a dict and retrieve the object from a dict. Added a new library, "oslo.messaging", to implement the RPC client and server. [1]http://blog.thedigitalcatonline.com/blog/2013/08/21/some-tips-about-amqp-direct-exchanges/ JIRA: YARDSTICK-1074 Change-Id: I63932b5fb3de2bdc1270fc83295630a2a349e2a6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-01Merge "vFW scale-up template."Ross Brattain1-3/+88
2018-03-01Merge "Add arguments to the traffic profile render"Ross Brattain4-0/+110
2018-03-01vFW scale-up template.Mytnyk, Volodymyr1-3/+88
Added topology and traffic profile templates Added support for using JinJa2 templates in topology definition Added support for static pipeline configs for SampleVNFs JIRA: YARDSTICK-1043 Change-Id: Iab99fd5b5ad69ca32ee70b9fe47779387ad27e7f Signed-off-by: Chornyi, TarasX <tarasx.chornyi@intel.com> Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-03-01Add arguments to the traffic profile renderRodolfo Alonso Hernandez4-0/+110
In order to render configurable traffic profiles in NSB test cases, a new variable is introduced: "extra_arg". The content of this variable is added to the VNFD render data, under a key called "extra_args". This will allow the user to define Jinja templates for traffic profiles. E.g.: $ cat test_case_definition.yml scenarios: - type: NSPerf traffic_profile: traffic_profile.yml extra_args: vports: 10 $ cat traffic_profile.yml {% set vports = get(extra_args, 'vports', '0') or 4 %} {% for vport in range(vports|int) %} uplink_{{vport}}: data... {% endfor %} JIRA: YARDSTICK-946 Change-Id: Ib3c1f2d89efa012772edf2156e97d5f4742a6b80 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-09Module to manage pip packagesRodolfo Alonso Hernandez10-0/+211
This new module provides methods to manage Python PIP packages from a URL, from a local directory or from a build PIP package. The implemented commands are: - Install package. - Remove package. - List all installed packages in the system. JIRA: YARDSTICK-910 Change-Id: I8f7d1b77c0c384b801cc6f5e67d8b45ce7c6bfdf Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-19Replace "oslo_utils.importutils" with standard library "importlib"Rodolfo Alonso Hernandez4-0/+51
The current implementation of dynamic library importation is prone to failure [1]: - "sys.modules" is modified manually, which is something not recommended [2]. - When a module is imported is added to "sys.modules"; that means there is no need to manually create an entry in this object. - "importlib" library is part of the standard library and is now available in PY3 and PY2 (backported). This library contains a function called "import_module" to import a module in runtime. [1]https://github.com/opnfv/yardstick/blob/d2c7cc4e9768ed003257a95c92cdb278d516761b/yardstick/common/utils.py#L72-L93 [2]http://justus.science/blog/2015/04/19/sys.modules-is-dangerous.html JIRA: YARDSTICK-949 Change-Id: Ide3b74f98858d06fa275fb6c9b78ceeaa64feed5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-11Move tests: functional/Emma Foley3-0/+146
All tests in tests/functional have been moved to yardstick/tests/functional JIRA: YARDSTICK-837 Change-Id: I89276b36635de74dd7b8f70e961c71aa0d2c494e Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-01-11Run tests in yardstick/tests/Emma Foley1-0/+0
* Edit .testr.conf and tools/run_tests.sh * Run functional and unit tests in tests/ and yardstick/tests/ * Add yardstick/tests/unit/__init__.py and yardstick/tests/__init__.py * Update pylintrc rules to disable: * missing-docstring * fixme * protected-access Test will run in both tests/ and yardstick/tests/ initially Change-Id: Iccd0df0d1b85b5d08f7faa56669bc32687925f7e JIRA: YARDSTICK-837 Signed-off-by: Emma Foley <emma.l.foley@intel.com>