Fixing OLTDevice pull step

Change-Id: I2b7d0b68f0db61d3b1da93fdf7c582c3240b8a77
diff --git a/xos/synchronizer/steps/sync_olt_device.py b/xos/synchronizer/steps/sync_olt_device.py
index cb2d4c6..4aaebdf 100644
--- a/xos/synchronizer/steps/sync_olt_device.py
+++ b/xos/synchronizer/steps/sync_olt_device.py
@@ -146,20 +146,6 @@
                 print request.text
         return model
 
-    def hack_to_get_onos_to_load_the_proper_driver(self, model):
-        # Remove the device from ONOS
-        log.info("Updating ONOS driver")
-        onos_voltha = Helpers.get_onos_voltha_info(model.volt_service)
-        onos_voltha_basic_auth = HTTPBasicAuth(onos_voltha['user'], onos_voltha['pass'])
-        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")
-
     def sync_record(self, model):
         log.info("Synching device", object=str(model), **model.tologdict())
 
@@ -173,10 +159,6 @@
 
         self.configure_onos(model)
 
-        # FIXME this is need to solve a bug in ONOS
-        self.hack_to_get_onos_to_load_the_proper_driver(model)
-        # FIXME END
-
     def delete_record(self, o):
         log.info("Deleting OLT device", object=str(o), **o.tologdict())
 
diff --git a/xos/synchronizer/steps/test_sync_olt_device.py b/xos/synchronizer/steps/test_sync_olt_device.py
index e73b249..55d477e 100644
--- a/xos/synchronizer/steps/test_sync_olt_device.py
+++ b/xos/synchronizer/steps/test_sync_olt_device.py
@@ -65,7 +65,14 @@
         # END setting up the config module
 
         from synchronizers.new_base.mock_modelaccessor_build import build_mock_modelaccessor
-        build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto")])
+        # build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto")])
+
+        # FIXME this is to get jenkins to pass the tests, somehow it is running tests in a different order
+        # and apparently it is not overriding the generated model accessor
+        build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto"),
+                                                         get_models_fn("vsg", "vsg.xproto"),
+                                                         get_models_fn("../profiles/rcord", "rcord.xproto")])
+
         import synchronizers.new_base.modelaccessor
         from sync_olt_device import SyncOLTDevice
         self.sync_step = SyncOLTDevice
@@ -181,9 +188,6 @@
 
         m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code = 200, additional_matcher=match_onos_req, json={})
 
-        # FIXME this is part of the block in the syncstep
-        m.delete("http://onos_voltha_url:4321/onos/v1/network/configuration/devices/0001000ce2314000", status_code=200)
-
         self.sync_step().sync_record(self.o)
         self.assertEqual(self.o.admin_state, "ACTIVE")
         self.assertEqual(self.o.oper_status, "ENABLED")
@@ -201,9 +205,6 @@
 
         m.post("http://onos_voltha_url:4321/onos/v1/network/configuration/", status_code = 200, additional_matcher=match_onos_req, json={})
 
-        # FIXME this is part of the block in the syncstep
-        m.delete("http://onos_voltha_url:4321/onos/v1/network/configuration/devices/0001000ce2314000", status_code=200)
-
         self.sync_step().sync_record(self.o)
         self.o.save.assert_not_called()
 
@@ -212,7 +213,7 @@
         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=200)
+        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)
 
diff --git a/xos/synchronizer/steps/test_sync_volt_service_instance.py b/xos/synchronizer/steps/test_sync_volt_service_instance.py
index 85138d5..60d2d7d 100644
--- a/xos/synchronizer/steps/test_sync_volt_service_instance.py
+++ b/xos/synchronizer/steps/test_sync_volt_service_instance.py
@@ -60,7 +60,13 @@
 
         from synchronizers.new_base.syncstep import DeferredException
         from synchronizers.new_base.mock_modelaccessor_build import build_mock_modelaccessor
-        build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto")])
+        # build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto")])
+
+        # FIXME this is to get jenkins to pass the tests, somehow it is running tests in a different order
+        # and apparently it is not overriding the generated model accessor
+        build_mock_modelaccessor(xos_dir, services_dir, [get_models_fn("olt-service", "volt.xproto"),
+                                                         get_models_fn("vsg", "vsg.xproto"),
+                                                         get_models_fn("../profiles/rcord", "rcord.xproto")])
         import synchronizers.new_base.modelaccessor
         from sync_volt_service_instance import SyncVOLTServiceInstance, model_accessor