On delete of OLT, openolt adapter now cleans up state correctly
by calling adapter_agent. This ensures that any previous subscriptions
to packet_out in kafka are removed as well.

Change-Id: I4345ec16dcd705442f4d9d3835e67b9284259f3d
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 2cdec29..55fab09 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -663,12 +663,13 @@
 
     def packet_out(self, egress_port, msg):
         pkt = Ether(msg)
-        self.log.info('packet out', egress_port=egress_port,
-                      packet=str(pkt).encode("HEX"))
+        self.log.debug('packet out', egress_port=egress_port,
+                       device_id=self.device_id,
+                       logical_device_id=self.logical_device_id,
+                       packet=str(pkt).encode("HEX"))
 
         # Find port type
         egress_port_type = self.port_type(egress_port)
-
         if egress_port_type == Port.ETHERNET_UNI:
 
             if pkt.haslayer(Dot1Q):
@@ -948,8 +949,8 @@
             # Rebooting to reset the state
             self.reboot()
             # Removing logical device
-            self.proxy.remove('/logical_devices/{}'.
-                              format(self.logical_device_id))
+            ld = self.adapter_agent.get_logical_device(self.logical_device_id)
+            self.adapter_agent.delete_logical_device(ld)
         except Exception as e:
             self.log.error('Failure to delete openolt device', error=e)
             raise e
diff --git a/voltha/core/adapter_agent.py b/voltha/core/adapter_agent.py
index 219fd84..255b2e7 100644
--- a/voltha/core/adapter_agent.py
+++ b/voltha/core/adapter_agent.py
@@ -656,6 +656,8 @@
 
         out_port = get_port_out(ofp_packet_out)
         frame = ofp_packet_out.data
+        self.log.debug('rcv-packet-out', logical_device_id=logical_device_id,
+                       egress_port_no=out_port, adapter_name=self.adapter_name)
         self.adapter.receive_packet_out(logical_device_id, out_port, frame)
 
     def add_logical_port(self, logical_device_id, port):