This commit made some modifications in the way messages over
kafka are consumed, mostly around the initial offset to use.
Change-Id: I6104ef710d9c595034cd4cedc0d58ae774cec719
diff --git a/python/adapters/ponsim_olt/ponsim_olt.py b/python/adapters/ponsim_olt/ponsim_olt.py
index df834e5..95d6590 100644
--- a/python/adapters/ponsim_olt/ponsim_olt.py
+++ b/python/adapters/ponsim_olt/ponsim_olt.py
@@ -304,7 +304,6 @@
reactor.callInThread(self.rcv_grpc)
self.log.info('started-frame-grpc-stream')
- # TODO
# Start collecting stats from the device after a brief pause
self.start_kpi_collection(device.id)
except Exception as e:
@@ -359,6 +358,7 @@
def reconcile(self, device):
self.log.info('reconciling-OLT-device')
+ @inlineCallbacks
def _rcv_frame(self, frame):
pkt = Ether(frame)
@@ -373,7 +373,7 @@
inner_shim.payload
)
self.log.info('sending-packet-in',device_id=self.device_id, port=cvid)
- self.core_proxy.send_packet_in(device_id=self.device_id,
+ yield self.core_proxy.send_packet_in(device_id=self.device_id,
port=cvid,
packet=str(popped_frame))
elif pkt.haslayer(Raw):
@@ -398,7 +398,7 @@
for frame in self.frames:
self.log.info('received-grpc-frame',
frame_len=len(frame.payload))
- self._rcv_frame(frame.payload)
+ yield self._rcv_frame(frame.payload)
except _Rendezvous, e:
log.warn('grpc-connection-lost', message=e.message)