SEBA-360 Pass logger to AttHelper rather than reinitialize
Change-Id: I41c0c1b75ba1c28b69a162b498ced039650db762
diff --git a/xos/synchronizer/event_steps/dhcp_event.py b/xos/synchronizer/event_steps/dhcp_event.py
index 74a7696..1b3033a 100644
--- a/xos/synchronizer/event_steps/dhcp_event.py
+++ b/xos/synchronizer/event_steps/dhcp_event.py
@@ -31,8 +31,8 @@
def process_event(self, event):
value = json.loads(event.value)
- onu_sn = AttHelpers.get_onu_sn(value)
- si = AttHelpers.get_si_by_sn(onu_sn)
+ onu_sn = AttHelpers.get_onu_sn(self.log, value)
+ si = AttHelpers.get_si_by_sn(self.log, onu_sn)
if not si:
self.log.exception("dhcp.events: Cannot find att-workflow-driver service instance for this event", kafka_event=value)
@@ -40,8 +40,8 @@
self.log.info("dhcp.events: Got event for subscriber", event_value=value, onu_sn=onu_sn, si=si)
- si.dhcp_state = value["messageType"];
- si.ip_address = value["ipAddress"];
- si.mac_address = value["macAddress"];
+ si.dhcp_state = value["messageType"]
+ si.ip_address = value["ipAddress"]
+ si.mac_address = value["macAddress"]
si.save_changed_fields(always_update_timestamp=True)