Revert "Move pkt-in/out kafka topic deletion into openolt_packet"
This reverts commit d0319884921b9800b4c783b683fa7fe474997a5d.
Change-Id: I7efd36211adda17c7bdeca867b4fb6733b929325
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 1931c45..eec0f2c 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -143,6 +143,12 @@
self.data_model.olt_create(self.device_info)
+ # FIXME
+ self._kadmin.delete_topics([
+ 'voltha.pktout-{}'.format(self.data_model.logical_device_id)])
+ self._kadmin.delete_topics(['openolt.pktin-{}'.format(
+ self.host_and_port.split(':')[0])])
+
self._packet = OpenoltPacket(self)
self._packet.start()
diff --git a/voltha/adapters/openolt/openolt_packet.py b/voltha/adapters/openolt/openolt_packet.py
index 7c3c5f1..318456e 100644
--- a/voltha/adapters/openolt/openolt_packet.py
+++ b/voltha/adapters/openolt/openolt_packet.py
@@ -28,7 +28,6 @@
from voltha.core.flow_decomposer import OUTPUT
from voltha.protos.device_pb2 import Port
from voltha.adapters.openolt.protos import openolt_pb2
-from voltha.adapters.openolt.openolt_kafka_admin import KAdmin
class OpenoltPacket(object):
@@ -36,8 +35,6 @@
self.log = structlog.get_logger()
self.device = device
- self._kadmin = KAdmin()
-
self.packet_out_thread_handle = threading.Thread(
target=self.packet_out_thread)
self.packet_out_thread_handle.setDaemon(True)
@@ -46,24 +43,12 @@
target=self.packet_in_thread)
self.packet_in_thread_handle.setDaemon(True)
- self._kadmin.delete_topics([
- 'voltha.pktout-{}'.format(
- self.device.data_model.logical_device_id)])
- self._kadmin.delete_topics(['openolt.pktin-{}'.format(
- self.device.host_and_port.split(':')[0])])
-
def start(self):
self.packet_out_thread_handle.start()
self.packet_in_thread_handle.start()
def stop(self):
- self._kadmin.delete_topics([
- 'voltha.pktout-{}'.format(
- self.device.data_model.logical_device_id)])
- self._kadmin.delete_topics(['openolt.pktin-{}'.format(
- self.device.host_and_port.split(':')[0])])
-
- # FIXME - kill threads
+ pass
def packet_out_thread(self):
self.log.debug('openolt packet-out thread starting')