aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py
AgeCommit message (Collapse)AuthorFilesLines
2018-07-13Create a SampleVNF MQ consumer classRodolfo Alonso Hernandez1-9/+20
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-12Fix "id" retrieval from MQ producer in GenericTrafficGenRodolfo Alonso Hernandez1-1/+1
"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-05Enable traffic generator PID in "NSPerf" scenario setupRodolfo Alonso Hernandez1-3/+30
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 Hernandez1-0/+49
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 Hernandez1-1/+26
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-06-11Move tests: unit/network_services/vnf_genericEmma Foley1-0/+236
* 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