[VOL-1499] Use precreated topic
This commit migrate from dynamically created kafka topic to
pre-created topic. The changes are made in the rw_core, simulated
onu and olt adapters, and ponsim olt and onu adapters.
TODO: move the python shared library changes into the pyvoltha
repo.
Change-Id: Ia92287ec74009872e694aa22eb896d8a6487d231
diff --git a/python/adapters/kafka/container_proxy.py b/python/adapters/kafka/container_proxy.py
index efcf558..bd873d8 100644
--- a/python/adapters/kafka/container_proxy.py
+++ b/python/adapters/kafka/container_proxy.py
@@ -38,10 +38,10 @@
@implementer(IComponent)
class ContainerProxy(object):
- def __init__(self, kafka_proxy, core_topic, my_listening_topic):
+ def __init__(self, kafka_proxy, remote_topic, my_listening_topic):
self.kafka_proxy = kafka_proxy
self.listening_topic = my_listening_topic
- self.core_topic = core_topic
+ self.remote_topic = remote_topic
self.default_timeout = 3
def start(self):
@@ -92,7 +92,7 @@
to_topic=to_topic,
reply_topic=reply_topic)
if to_topic is None:
- to_topic = self.core_topic
+ to_topic = self.remote_topic
if reply_topic is None:
reply_topic = self.listening_topic
result = yield self.kafka_proxy.send_request(rpc=rpc,
@@ -130,4 +130,4 @@
raise e
retry += 1
if retry == max_retry:
- to_topic = self.core_topic
+ to_topic = self.remote_topic