Add MQ consumer, producer and payload base classes 01/53901/10
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Wed, 14 Mar 2018 11:27:25 +0000 (11:27 +0000)
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Fri, 13 Apr 2018 16:51:18 +0000 (16:51 +0000)
commitaed4e1e61e4e808ec5b6ef594fb2db34dfaeddf4
tree0f0aa0421284f6a83589931ee4538b8bcdc351b7
parent5be3ad75d9c46e7b816418d4ddf410b1f67110c6
Add MQ consumer, producer and payload base classes

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>
12 files changed:
requirements.txt
yardstick/common/exceptions.py
yardstick/common/messaging/__init__.py [new file with mode: 0644]
yardstick/common/messaging/consumer.py [new file with mode: 0644]
yardstick/common/messaging/payloads.py [new file with mode: 0644]
yardstick/common/messaging/producer.py [new file with mode: 0644]
yardstick/tests/functional/common/messaging/__init__.py [new file with mode: 0644]
yardstick/tests/functional/common/messaging/test_messaging.py [new file with mode: 0644]
yardstick/tests/unit/common/messaging/__init__.py [new file with mode: 0644]
yardstick/tests/unit/common/messaging/test_consumer.py [new file with mode: 0644]
yardstick/tests/unit/common/messaging/test_payloads.py [new file with mode: 0644]
yardstick/tests/unit/common/messaging/test_producer.py [new file with mode: 0644]