Replaces direct use of aiokafka with osm_common message bus in agent and 76/7176/4
authorBenjamin Diaz <bdiaz@whitestack.com>
Fri, 1 Feb 2019 16:31:47 +0000 (13:31 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Mon, 4 Feb 2019 19:45:11 +0000 (16:45 -0300)
commita14cf16181c8b39f12c872c486e0b292c0068944
treec6ed5db8409f354b944bd73a9cd0d0993b768d45
parenta96898dfaf088ac15560d15a7dcaf982c671ac2f
Replaces direct use of aiokafka with osm_common message bus in agent and
lcmclient

Changes config handling to comply with the way it is handled in other modules,
by using a config file and overriding it with env vars.

Adds unit tests for message_bus_client.

Mon client remains using aiokafka directly, as there is no support yet for
auto_offset_reset configuration in osm_common.

Change-Id: I99615287cc934ce310105e86544a6bfe26bc0673
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
19 files changed:
MANIFEST.in
debian/python3-osm-policy-module.postinst
docker/Dockerfile
osm_policy_module/cmd/policy_module_agent.py
osm_policy_module/common/common_db_client.py
osm_policy_module/common/lcm_client.py
osm_policy_module/common/message_bus_client.py [new file with mode: 0644]
osm_policy_module/common/mon_client.py
osm_policy_module/core/agent.py
osm_policy_module/core/config.py
osm_policy_module/core/database.py
osm_policy_module/core/pol.yaml [new file with mode: 0644]
osm_policy_module/core/singleton.py [deleted file]
osm_policy_module/tests/integration/test_kafka_messages.py
osm_policy_module/tests/integration/test_policy_agent.py
osm_policy_module/tests/unit/common/__init__.py [new file with mode: 0644]
osm_policy_module/tests/unit/common/test_message_bus_client.py [new file with mode: 0644]
osm_policy_module/tests/unit/core/test_policy_agent.py
setup.py