From f3cae5191bb3c944fd08780d8a8940d2aa60c4d0 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 4 Jul 2018 17:54:05 +0100 Subject: Create a SampleVNF MQ consumer class 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 --- yardstick/common/messaging/consumer.py | 1 + 1 file changed, 1 insertion(+) (limited to 'yardstick/common/messaging') diff --git a/yardstick/common/messaging/consumer.py b/yardstick/common/messaging/consumer.py index c99d7ed27..7ce9bdaf7 100644 --- a/yardstick/common/messaging/consumer.py +++ b/yardstick/common/messaging/consumer.py @@ -30,6 +30,7 @@ class NotificationHandler(object): """Abstract class to define a endpoint object for a MessagingConsumer""" def __init__(self, _id, ctx_ids, queue): + super(NotificationHandler, self).__init__() self._id = _id self._ctx_ids = ctx_ids self._queue = queue -- cgit 1.2.3-korg