Fixing ONU deletion step
Change-Id: I29b6206be9963bb9798e5a14a242ad58aa97b5cc
diff --git a/xos/synchronizer/pull_steps/pull_olts.py b/xos/synchronizer/pull_steps/pull_olts.py
index f603da6..acb6a10 100644
--- a/xos/synchronizer/pull_steps/pull_olts.py
+++ b/xos/synchronizer/pull_steps/pull_olts.py
@@ -76,7 +76,6 @@
log.debug("[OLT pull step] received devices", olts=devices)
-
olts_in_voltha = self.create_or_update_olts(devices)
self.delete_olts(olts_in_voltha)
@@ -108,6 +107,7 @@
log.info("[OLT pull step] Skipping pull on OLTDevice %s as enacted < updated" % model.name, name=model.name, id=model.id, enacted=model.enacted, updated=model.updated)
# if we are not updating the device we still need to pull ports
self.fetch_olt_ports(model)
+ updated_olts.append(model)
continue
except IndexError:
@@ -219,6 +219,7 @@
return update_ports
def delete_olts(self, olts_in_voltha):
+
olts_id_in_voltha = [m.device_id for m in olts_in_voltha]
xos_olts = OLTDevice.objects.all()