diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2019-01-24 17:46:04 +0200 |
---|---|---|
committer | Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com> | 2019-01-29 12:57:25 +0000 |
commit | 679b6d94288d801e84c0f22c6c0d712c08eb8458 (patch) | |
tree | 031cfad1c1a3d495af07a6222f73afa3d9437e3e /yardstick/network_services/vnf_generic/vnf/tg_pktgen.py | |
parent | e3871dda8a4deb1a0f7e72050cd9fbba6cc0ecb9 (diff) |
NSB sync: clean-up draft IPC implementation (part 1)
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>
Diffstat (limited to 'yardstick/network_services/vnf_generic/vnf/tg_pktgen.py')
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/tg_pktgen.py | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_pktgen.py b/yardstick/network_services/vnf_generic/vnf/tg_pktgen.py index 9d452213f..e73cebc40 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_pktgen.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_pktgen.py @@ -13,9 +13,7 @@ # limitations under the License. import logging -import multiprocessing import time -import uuid from yardstick.common import constants from yardstick.common import exceptions @@ -26,8 +24,7 @@ from yardstick.network_services.vnf_generic.vnf import base as vnf_base LOG = logging.getLogger(__name__) -class PktgenTrafficGen(vnf_base.GenericTrafficGen, - vnf_base.GenericVNFEndpoint): +class PktgenTrafficGen(vnf_base.GenericTrafficGen): """DPDK Pktgen traffic generator Website: http://pktgen-dpdk.readthedocs.io/en/latest/index.html @@ -35,15 +32,8 @@ class PktgenTrafficGen(vnf_base.GenericTrafficGen, TIMEOUT = 30 - def __init__(self, name, vnfd, task_id): - vnf_base.GenericTrafficGen.__init__(self, name, vnfd, task_id) - self.queue = multiprocessing.Queue() - self._id = uuid.uuid1().int - self._mq_producer = self._setup_mq_producer(self._id) - vnf_base.GenericVNFEndpoint.__init__(self, self._id, [task_id], - self.queue) - self._consumer = vnf_base.GenericVNFConsumer([task_id], self) - self._consumer.start_rpc_server() + def __init__(self, name, vnfd): + vnf_base.GenericTrafficGen.__init__(self, name, vnfd) self._traffic_profile = None self._node_ip = vnfd['mgmt-interface'].get('ip') self._lua_node_port = self._get_lua_node_port( @@ -71,7 +61,7 @@ class PktgenTrafficGen(vnf_base.GenericTrafficGen, def wait_for_instantiate(self): # pragma: no cover pass - def runner_method_start_iteration(self, ctxt, **kwargs): + def runner_method_start_iteration(self): # pragma: no cover LOG.debug('Start method') # NOTE(ralonsoh): 'rate' should be modified between iterations. The @@ -81,11 +71,6 @@ class PktgenTrafficGen(vnf_base.GenericTrafficGen, self._traffic_profile.rate(self._rate) time.sleep(4) self._traffic_profile.stop() - self._mq_producer.tg_method_iteration(1, 1, {}) - - def runner_method_stop_iteration(self, ctxt, **kwargs): # pragma: no cover - # pragma: no cover - LOG.debug('Stop method') @staticmethod def _get_lua_node_port(service_ports): |