[SEBA-297] Standardized onu.events format
Change-Id: Ie34462c13a5733c871652af0678f538119c187bc
diff --git a/xos/synchronizer/event_steps/onu_event.py b/xos/synchronizer/event_steps/onu_event.py
index 386942f..3a18c26 100644
--- a/xos/synchronizer/event_steps/onu_event.py
+++ b/xos/synchronizer/event_steps/onu_event.py
@@ -28,17 +28,17 @@
def get_tt_si(self, event):
try:
- tt_si = self.model_accessor.TtWorkflowDriverServiceInstance.objects.get(serial_number=event["serial_number"])
+ tt_si = self.model_accessor.TtWorkflowDriverServiceInstance.objects.get(serial_number=event["serialNumber"])
tt_si.no_sync = False;
- tt_si.uni_port_id = event["uni_port_id"]
- tt_si.of_dpid = event["of_dpid"]
+ tt_si.uni_port_id = long(event["portNumber"])
+ tt_si.of_dpid = event["deviceId"]
self.log.debug("onu.events: Found existing TtWorkflowDriverServiceInstance", si=tt_si)
except IndexError:
# create an TtWorkflowDriverServiceInstance, the validation will be triggered in the corresponding sync step
tt_si = self.model_accessor.TtWorkflowDriverServiceInstance(
- serial_number=event["serial_number"],
- of_dpid=event["of_dpid"],
- uni_port_id=event["uni_port_id"],
+ serial_number=event["serialNumber"],
+ of_dpid=event["deviceId"],
+ uni_port_id=long(event["portNumber"]),
owner=self.model_accessor.TtWorkflowDriverService.objects.first() # we assume there is only one TtWorkflowDriverService
)
self.log.debug("onu.events: Created new TtWorkflowDriverServiceInstance", si=tt_si)