diff --git a/xos/synchronizer/model_policies/test_config.yaml b/xos/synchronizer/model_policies/test_config.yaml
index 270d0a9..1560049 100644
--- a/xos/synchronizer/model_policies/test_config.yaml
+++ b/xos/synchronizer/model_policies/test_config.yaml
@@ -28,3 +28,4 @@
     'multistructlog':
       handlers:
           - console
+#      level: DEBUG
diff --git a/xos/synchronizer/pull_steps/pull_olts.py b/xos/synchronizer/pull_steps/pull_olts.py
index 7db872a..f603da6 100644
--- a/xos/synchronizer/pull_steps/pull_olts.py
+++ b/xos/synchronizer/pull_steps/pull_olts.py
@@ -54,7 +54,7 @@
         raise Exception("Can't find a logical device for device id: %s" % o.device_id)
 
     def pull_records(self):
-        log.info("pulling OLT devices from VOLTHA")
+        log.info("[OLT pull step] pulling OLT devices from VOLTHA")
 
         try:
             self.volt_service = VOLTService.objects.all()[0]
@@ -69,23 +69,24 @@
             r = requests.get("%s:%s/api/v1/devices" % (voltha_url, voltha_port))
 
             if r.status_code != 200:
-                log.info("It was not possible to fetch devices from VOLTHA")
+                log.info("[OLT pull step] It was not possible to fetch devices from VOLTHA")
 
             # keeping only OLTs
             devices = [d for d in r.json()["items"] if "olt" in d["type"]]
 
-            log.debug("received devices", olts=devices)
+            log.debug("[OLT pull step] received devices", olts=devices)
 
-            # TODO
-            # [ ] delete OLTS as OLTDevice.objects.all() - updated OLTs
 
             olts_in_voltha = self.create_or_update_olts(devices)
 
+            self.delete_olts(olts_in_voltha)
+
+
         except ConnectionError, e:
-            log.warn("It was not possible to connect to VOLTHA", reason=e)
+            log.warn("[OLT pull step] It was not possible to connect to VOLTHA", reason=e)
             return
         except InvalidURL, e:
-            log.warn("VOLTHA url is invalid, is it configured in the VOLTService?", reason=e)
+            log.warn("[OLT pull step] VOLTHA url is invalid, is it configured in the VOLTService?", reason=e)
             return
 
     def create_or_update_olts(self, olts):
@@ -98,17 +99,19 @@
                     [host, port] = ["172.17.0.1", "50060"]
                 else:
                     [host, port] = olt["host_and_port"].split(":")
+
                 model = OLTDevice.objects.filter(device_type=olt["type"], host=host, port=port)[0]
 
-                log.debug("OLTDevice already exists, updating it", device_type=olt["type"], host=host, port=port)
+                log.debug("[OLT pull step] OLTDevice already exists, updating it", device_type=olt["type"], host=host, port=port)
 
                 if model.enacted < model.updated:
-                    log.info("Skipping pull on OLTDevice %s as enacted < updated" % model.name, name=model.name, id=model.id, enacted=model.enacted, updated=model.updated)
+                    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)
-                    return
+                    continue
 
             except IndexError:
+
                 model = OLTDevice()
                 model.device_type = olt["type"]
 
@@ -120,7 +123,7 @@
                     model.host = host
                     model.port = int(port)
 
-                log.debug("OLTDevice is new, creating it", device_type=olt["type"], host=host, port=port)
+                log.debug("[OLT pull step] OLTDevice is new, creating it", device_type=olt["type"], host=host, port=port)
 
             # Adding feedback state to the device
             model.device_id = olt["id"]
@@ -149,19 +152,19 @@
             r = requests.get("%s:%s/api/v1/devices/%s/ports" % (voltha_url, voltha_port, olt.device_id))
 
             if r.status_code != 200:
-                log.info("It was not possible to fetch ports from VOLTHA for device %s" % olt.device_id)
+                log.info("[OLT pull step] It was not possible to fetch ports from VOLTHA for device %s" % olt.device_id)
 
             ports = r.json()['items']
 
-            log.debug("received ports", ports=ports, olt=olt.device_id)
+            log.debug("[OLT pull step] received ports", ports=ports, olt=olt.device_id)
 
             self.create_or_update_ports(ports, olt)
 
         except ConnectionError, e:
-            log.warn("It was not possible to connect to VOLTHA", reason=e)
+            log.warn("[OLT pull step] It was not possible to connect to VOLTHA", reason=e)
             return
         except InvalidURL, e:
-            log.warn("VOLTHA url is invalid, is it configured in the VOLTService?", reason=e)
+            log.warn("[OLT pull step] VOLTHA url is invalid, is it configured in the VOLTService?", reason=e)
             return
         return
 
@@ -179,13 +182,13 @@
         for port in pon_ports:
             try:
                 model = PONPort.objects.filter(port_no=port["port_no"], olt_device_id=olt.id)[0]
-                log.debug("PONPort already exists, updating it", port_no=port["port_no"], olt_device_id=olt.id)
+                log.debug("[OLT pull step] PONPort already exists, updating it", port_no=port["port_no"], olt_device_id=olt.id)
             except IndexError:
                 model = PONPort()
                 model.port_no = port["port_no"]
                 model.olt_device_id = olt.id
                 model.name = port["label"]
-                log.debug("PONPort is new, creating it", port_no=port["port_no"], olt_device_id=olt.id)
+                log.debug("[OLT pull step] PONPort is new, creating it", port_no=port["port_no"], olt_device_id=olt.id)
 
             model.admin_state = port["admin_state"]
             model.oper_status = port["oper_status"]
@@ -200,14 +203,14 @@
             try:
                 model = NNIPort.objects.filter(port_no=port["port_no"], olt_device_id=olt.id)[0]
                 model.xos_managed = False
-                log.debug("NNIPort already exists, updating it", port_no=port["port_no"], olt_device_id=olt.id)
+                log.debug("[OLT pull step] NNIPort already exists, updating it", port_no=port["port_no"], olt_device_id=olt.id)
             except IndexError:
                 model = NNIPort()
                 model.port_no = port["port_no"]
                 model.olt_device_id = olt.id
                 model.name = port["label"]
                 model.xos_managed = False
-                log.debug("NNIPort is new, creating it", port_no=port["port_no"], olt_device_id=olt.id)
+                log.debug("[OLT pull step] NNIPort is new, creating it", port_no=port["port_no"], olt_device_id=olt.id)
 
             model.admin_state = port["admin_state"]
             model.oper_status = port["oper_status"]
@@ -215,7 +218,20 @@
             update_ports.append(model)
         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()
 
+        deleted_in_voltha = [o for o in xos_olts if o.device_id not in olts_id_in_voltha]
 
+        for model in deleted_in_voltha:
 
+            if model.enacted < model.updated:
+                # DO NOT delete a model that is being processed
+                log.info("[OLT pull step] device is not present in VOLTHA, skipping deletion as sync is in progress", device_id=o.device_id,
+                         name=o.name)
+                continue
+
+            log.info("[OLT pull step] deleting device as it's not present in VOLTHA", device_id=o.device_id, name=o.name)
+            model.delete()
diff --git a/xos/synchronizer/pull_steps/pull_onus.py b/xos/synchronizer/pull_steps/pull_onus.py
index 69d9ef8..8c9efe9 100644
--- a/xos/synchronizer/pull_steps/pull_onus.py
+++ b/xos/synchronizer/pull_steps/pull_onus.py
@@ -162,7 +162,7 @@
                 log.info("It was not possible to fetch ports from VOLTHA for logical_device %s" % logical_device_id)
 
             logical_ports = r.json()['items']
-            log.info("logical device ports for ONUDevice %s" % onu.device_id, logical_ports=logical_ports)
+            log.debug("logical device ports for ONUDevice %s" % onu.device_id, logical_ports=logical_ports)
 
             ports = [p['ofp_port']['port_no'] for p in logical_ports if p['device_id'] == onu.device_id]
             # log.info("Port_id for port %s on ONUDevice %s: %s" % (port['label'], onu.device_id, ports), logical_ports=logical_ports)
diff --git a/xos/synchronizer/pull_steps/test_pull_olts.py b/xos/synchronizer/pull_steps/test_pull_olts.py
index 91b64e3..0e8d262 100644
--- a/xos/synchronizer/pull_steps/test_pull_olts.py
+++ b/xos/synchronizer/pull_steps/test_pull_olts.py
@@ -215,5 +215,26 @@
             mock_pon_save.assert_called()
             mock_nni_save.assert_called()
 
+    @requests_mock.Mocker()
+    def test_pull_deleted_object(self, m):
+        existing_olt = Mock()
+        existing_olt.enacted = 2
+        existing_olt.updated = 1
+        existing_olt.device_id = "test_id"
+
+        m.get("http://voltha_url:1234/api/v1/devices", status_code=200, json={"items": []})
+
+        with patch.object(VOLTService.objects, "all") as olt_service_mock, \
+                patch.object(OLTDevice.objects, "get_items") as mock_get, \
+                patch.object(existing_olt, "delete") as mock_olt_delete:
+
+            olt_service_mock.return_value = [self.volt_service]
+            mock_get.return_value = [existing_olt]
+
+            self.sync_step().pull_records()
+
+            mock_olt_delete.assert_called()
+
+
 if __name__ == "__main__":
     unittest.main()
\ No newline at end of file
diff --git a/xos/synchronizer/steps/sync_olt_device.py b/xos/synchronizer/steps/sync_olt_device.py
index 056a62c..b65dfef 100644
--- a/xos/synchronizer/steps/sync_olt_device.py
+++ b/xos/synchronizer/steps/sync_olt_device.py
@@ -124,41 +124,6 @@
 
         return model
 
-    def configure_onos(self, model):
-
-        log.info("Adding OLT device in onos-voltha", object=str(model), **model.tologdict())
-
-        onos_voltha = Helpers.get_onos_voltha_info(model.volt_service)
-        onos_voltha_basic_auth = HTTPBasicAuth(onos_voltha['user'], onos_voltha['pass'])
-
-        # Add device info to onos-voltha
-        data = {
-          "devices": {
-            model.dp_id: {
-              "basic": {
-                "driver": model.driver
-              },
-              "accessDevice": {
-                "uplink": model.uplink,
-                "vlan": 1
-              }
-            }
-          }
-        }
-
-        url = "%s:%d/onos/v1/network/configuration/" % (onos_voltha['url'], onos_voltha['port'])
-        request = requests.post(url, json=data, auth=onos_voltha_basic_auth)
-
-        if request.status_code != 200:
-            log.error(request.text)
-            raise Exception("Failed to add OLT device %s into ONOS" % model.name)
-        else:
-            try:
-                print request.json()
-            except Exception:
-                print request.text
-        return model
-
     def sync_record(self, model):
         log.info("Synching device", object=str(model), **model.tologdict())
 
@@ -172,19 +137,10 @@
         else:
             log.info("OLT device already exists in VOLTHA", object=str(model), **model.tologdict())
 
-        # TODO configure onos only if we have: Switch datapath id, Switch port, Uplink
-        if model.switch_datapath_id and model.switch_port and model.uplink:
-            log.info("Pushing OLT device to ONOS-VOLTHA", object=str(model), **model.tologdict())
-            self.configure_onos(model)
-        else:
-            raise DeferredException("Not pushing OLTDevice (%s) to ONOS-VOLTHA as parameters are missing" %  model.id)
-
     def delete_record(self, model):
         log.info("Deleting OLT device", object=str(model), **model.tologdict())
 
         voltha = Helpers.get_voltha_info(model.volt_service)
-        onos_voltha = Helpers.get_onos_voltha_info(model.volt_service)
-        onos_voltha_basic_auth = HTTPBasicAuth(onos_voltha['user'], onos_voltha['pass'])
 
         if not model.device_id:
             log.error("OLTDevice %s has no device_id" % model.name)
@@ -202,11 +158,3 @@
             if request.status_code != 200:
                 log.error("Failed to delete OLT device from VOLTHA: %s - %s" % (model.name, model.device_id), rest_response=request.text, rest_status_code=request.status_code)
                 raise Exception("Failed to delete OLT device from VOLTHA")
-
-            # Remove the device from ONOS
-            request = requests.delete("%s:%d/onos/v1/network/configuration/devices/%s" % (
-                onos_voltha['url'], onos_voltha['port'], model.of_id), auth=onos_voltha_basic_auth)
-
-            if request.status_code != 204:
-                log.error("Failed to remove OLT device from ONOS: %s - %s" % (model.name, model.of_id), rest_response=request.text, rest_status_code=request.status_code)
-                raise Exception("Failed to remove OLT device from ONOS")
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index 04cdd0b..670c49c 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -94,10 +94,6 @@
         o.volt_service.voltha_port = 1234
         o.volt_service.voltha_user = "voltha_user"
         o.volt_service.voltha_pass = "voltha_pass"
-        o.volt_service.onos_voltha_url = "onos_voltha_url"
-        o.volt_service.onos_voltha_port = 4321
-        o.volt_service.onos_voltha_user = "onos_voltha_user"
-        o.volt_service.onos_voltha_pass = "onos_voltha_pass"
 
         o.device_type = "ponsim_olt"
         o.host = "172.17.0.1"
@@ -200,8 +196,6 @@
         }
         m.get("http://voltha_url:1234/api/v1/logical_devices", status_code=200, json=logical_devices)
 
-        m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code = 200, additional_matcher=match_onos_req, json={})
-
         self.sync_step().sync_record(self.o)
         self.assertEqual(self.o.admin_state, "ENABLED")
         self.assertEqual(self.o.oper_status, "ACTIVE")
@@ -235,9 +229,6 @@
         }
         m.get("http://voltha_url:1234/api/v1/logical_devices", status_code=200, json=logical_devices)
 
-        m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code=200,
-               additional_matcher=match_onos_req, json={})
-
         self.sync_step().sync_record(self.o)
         self.assertEqual(self.o.admin_state, "ENABLED")
         self.assertEqual(self.o.oper_status, "ACTIVE")
@@ -271,9 +262,6 @@
         }
         m.get("http://voltha_url:1234/api/v1/logical_devices", status_code=200, json=logical_devices)
 
-        m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code=200,
-               additional_matcher=match_onos_req, json={})
-
         with self.assertRaises(Exception) as e:
             self.sync_step().sync_record(self.o)
 
@@ -291,8 +279,6 @@
         self.o.dp_id = "of:0000000ce2314000"
         self.o.of_id = "0001000ce2314000"
 
-        m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code = 200, additional_matcher=match_onos_req, json={})
-
         self.sync_step().sync_record(self.o)
         self.o.save.assert_not_called()
 
@@ -301,7 +287,6 @@
         self.o.of_id = "0001000ce2314000"
         self.o.device_id = "123"
 
-        m.delete("http://onos_voltha_url:4321/onos/v1/network/configuration/devices/0001000ce2314000", status_code=204)
         m.post("http://voltha_url:1234/api/v1/devices/123/disable", status_code=200)
         m.delete("http://voltha_url:1234/api/v1/devices/123/delete", status_code=200)
 
