diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/model-deps b/lib/xos-synchronizer/xos-synchronizer-tests/model-deps
index 247a190..559fa4c 100644
--- a/lib/xos-synchronizer/xos-synchronizer-tests/model-deps
+++ b/lib/xos-synchronizer/xos-synchronizer-tests/model-deps
@@ -7,19 +7,7 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerUser", "controllerusers", "user"],
-        
-        
-        ["Site", "site", "users"],
-        ["DashboardView", "dashboards", "user"]
+        ["Site", "site", "users"]
         
     ], 
     
@@ -29,17 +17,6 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerPrivilege", "controllerprivileges", "privilege"]
-        
-        
         
     ], 
     
@@ -52,165 +29,17 @@
         ["Service", "service", "addresspools"]
         
     ], 
-     
     
-    "ControllerDashboardView": [
+    "ComputeServiceInstance": [
         
         
         
         
         
-        ["Controller", "controller", "controllerdashboardviews"],
-        ["DashboardView", "dashboardView", "controllerdashboardviews"]
-        
-    ], 
-    
-    "ControllerImages": [
-        
-        
-        
-        
-        
-        ["Image", "image", "controllerimages"],
-        ["Controller", "controller", "controllerimages"]
-        
-    ], 
-    
-    "ControllerNetwork": [
-        
-        
-        
-        
-        
-        ["Network", "network", "controllernetworks"],
-        ["Controller", "controller", "controllernetworks"]
-        
-    ], 
-    
-    "ControllerRole": [
-        
-        
-        
-        
-        
-        
-    ], 
-    
-    "ControllerSite": [
-        
-        
-        
-        
-        
-        ["Site", "site", "controllersite"],
-        ["Controller", "controller", "controllersite"]
-        
-    ], 
-    
-    "ControllerPrivilege": [
-        
-        
-        
-        
-        
-        ["Controller", "controller", "controllerprivileges"],
-        ["Privilege", "privilege", "controllerprivileges"]
-        
-    ], 
-    
-    "ControllerSitePrivilege": [
-        
-        
-        
-        
-        
-        ["Controller", "controller", "controllersiteprivileges"],
-        ["SitePrivilege", "site_privilege", "controllersiteprivileges"]
-        
-    ], 
-    
-    "ControllerSlice": [
-        
-        
-        
-        
-        
-        ["Controller", "controller", "controllerslices"],
-        ["Slice", "slice", "controllerslices"]
-        
-    ], 
-    
-    "ControllerSlicePrivilege": [
-        
-        
-        
-        
-        
-        ["Controller", "controller", "controllersliceprivileges"],
-        ["SlicePrivilege", "slice_privilege", "controllersliceprivileges"]
-        
-    ], 
-    
-    "ControllerUser": [
-        
-        
-        
-        
-        
-        ["User", "user", "controllerusers"],
-        ["Controller", "controller", "controllersusers"]
-        
-    ], 
-    
-    "DashboardView": [
-        
-        
-        
-        
-        
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerDashboardView", "controllerdashboardviews", "dashboardView"],
-        
-        
-        ["Controller", "controllers", "dashboardviews"],
-        ["Deployment", "deployments", "dashboardviews"]
-        
-    ], 
-    
-    "Deployment": [
-        
-        
-        
-        
-        
-        
-    ], 
-    
-    "DeploymentPrivilege": [
-        
-        
-        
-        
-        
-        ["User", "user", "deploymentprivileges"],
-        ["Deployment", "deployment", "deploymentprivileges"],
-        ["DeploymentRole", "role", "deploymentprivileges"]
-        
-    ], 
-    
-    "DeploymentRole": [
-        
-        
-        
-        
-        
+        ["Service", "owner", "service_instances"],
+        ["ServiceInstance", "master_serviceinstance", "child_serviceinstances"],
+        ["Slice", "slice", "computeserviceinstances"],
+        ["Image", "image", "computeserviceinstances"]
         
     ], 
     
@@ -229,44 +58,6 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerImages", "controllerimages", "image"]
-        
-        
-        
-    ], 
-    
-    "ImageDeployments": [
-        
-        
-        
-        
-        
-        ["Image", "image", "imagedeployments"],
-        ["Deployment", "deployment", "imagedeployments"]
-        
-    ], 
-    
-    "Instance": [
-        
-        
-        
-        
-        
-        ["Image", "image", "instances"],
-        ["User", "creator", "instances"],
-        ["Slice", "slice", "instances"],
-        ["Deployment", "deployment", "instance_deployment"],
-        ["Node", "node", "instances"],
-        ["Flavor", "flavor", "instance"],
-        ["Instance", "parent", "instance"]
         
     ], 
     
@@ -276,20 +67,10 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerNetwork", "controllernetworks", "network"],
-        
-        
         ["NetworkTemplate", "template", "network"],
         ["Slice", "owner", "ownedNetworks"],
         ["Slice", "permitted_slices", "availableNetworks"]
+        
     ], 
     
     "NetworkParameter": [
@@ -337,7 +118,7 @@
         
         
         
-        ["SiteDeployment", "site_deployment", "nodes"]
+        ["Site", "site", "nodes"]
         
     ], 
     
@@ -358,7 +139,17 @@
         
         
         ["Network", "network", "links"],
-        ["Instance", "instance", "ports"]
+        ["ServiceInstance", "service_instance", "ports"]
+        
+    ], 
+    
+    "Principal": [
+        
+        
+        
+        
+        
+        ["TrustDomain", "trust_domain", "principals"]
         
     ], 
     
@@ -368,11 +159,6 @@
         
         
         
-         
-        
-        
-        
-        
         
     ], 
     
@@ -385,6 +171,16 @@
         
     ], 
     
+    "ServicePort": [
+        
+        
+        
+        
+        
+        ["Service", "service", "serviceports"]
+        
+    ], 
+    
     "ServiceAttribute": [
         
         
@@ -406,67 +202,12 @@
         
     ], 
     
-    "ServiceMonitoringAgentInfo": [
-        
-        
-        
-        
-        
-        ["Service", "service", "servicemonitoringagents"]
-        
-    ], 
-    
-    "ServicePrivilege": [
-        
-        
-        
-        
-        
-        ["User", "user", "serviceprivileges"],
-        ["Service", "service", "serviceprivileges"],
-        ["ServiceRole", "role", "serviceprivileges"]
-        
-    ], 
-    
-    "ServiceRole": [
-        
-        
-        
-        
-        
-        
-    ], 
-    
     "Site": [
         
         
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerSite", "controllersite", "site"],
-        
-        
-        ["Deployment", "deployments", "sites"]
-        
-    ], 
-    
-    "SiteDeployment": [
-        
-        
-        
-        
-        
-        ["Site", "site", "sitedeployments"],
-        ["Deployment", "deployment", "sitedeployments"],
-        ["Controller", "controller", "sitedeployments"]
         
     ], 
     
@@ -476,17 +217,6 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerSitePrivilege", "controllersiteprivileges", "site_privilege"],
-        
-        
         ["User", "user", "siteprivileges"],
         ["Site", "site", "siteprivileges"],
         ["SiteRole", "role", "siteprivileges"]
@@ -508,23 +238,14 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerSlice", "controllerslices", "slice"],
-        
-        
         ["Site", "site", "slices"],
         ["Service", "service", "slices"],
         ["User", "creator", "slices"],
         ["Flavor", "default_flavor", "slices"],
         ["Image", "default_image", "slices"],
-        ["Node", "default_node", "slices"]
+        ["Node", "default_node", "slices"],
+        ["TrustDomain", "trust_domain", "slices"],
+        ["Principal", "principal", "slices"]
         
     ], 
     
@@ -534,17 +255,6 @@
         
         
         
-         
-        
-        
-        
-        
-        
-        
-        
-        ["ControllerSlicePrivilege", "controllersliceprivileges", "slice_privilege"],
-        
-        
         ["User", "user", "sliceprivileges"],
         ["Slice", "slice", "sliceprivileges"],
         ["SliceRole", "role", "sliceprivileges"]
@@ -596,7 +306,8 @@
         
         
         
-        ["Service", "owner", "service_instances"]
+        ["Service", "owner", "service_instances"],
+        ["ServiceInstance", "master_serviceinstance", "child_serviceinstances"]
         
     ], 
     
@@ -624,19 +335,17 @@
         
     ], 
     
-    "TenantWithContainer": [
+    "TrustDomain": [
         
         
         
         
         
-        ["Service", "owner", "service_instances"],
-        ["Instance", "instance", "+"],
-        ["User", "creator", "+"]
+        ["Service", "owner", "owned_trust_domains"]
         
     ], 
     
-    "XOS": [
+    "XOSCore": [
         
         
         
@@ -652,5 +361,14 @@
         
         
         
+    ], 
+    
+    "ServiceGraphConstraint": [
+        
+        
+        
+        
+        
+        
     ]
-}
+}
\ No newline at end of file
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_controller_dependencies.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_controller_dependencies.py
deleted file mode 100644
index 47d55f0..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_controller_dependencies.py
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import unittest
-from mock import patch
-import mock
-import pdb
-import networkx as nx
-
-import os
-import sys
-
-test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-sync_lib_dir = os.path.join(test_path, "..", "xossynchronizer")
-xos_dir = os.path.join(test_path, "..", "..", "..", "xos")
-
-
-class TestControllerDependencies(unittest.TestCase):
-
-    def setUp(self):
-        global mock_enumerator, event_loop
-
-        self.sys_path_save = sys.path
-        self.cwd_save = os.getcwd()
-
-        config = os.path.join(test_path, "test_config.yaml")
-        from xosconfig import Config
-
-        Config.clear()
-        Config.init(config, "synchronizer-config-schema.yaml")
-
-        from xossynchronizer.mock_modelaccessor_build import (
-            build_mock_modelaccessor,
-        )
-
-        build_mock_modelaccessor(sync_lib_dir, xos_dir, services_dir=None, service_xprotos=[])
-
-        os.chdir(os.path.join(test_path, ".."))  # config references xos-synchronizer-tests/model-deps
-
-        import xossynchronizer.event_loop
-        reload(xossynchronizer.event_loop)
-        event_loop = xossynchronizer.event_loop
-
-        import xossynchronizer.backend
-        reload(xossynchronizer.backend)
-
-        from xossynchronizer.modelaccessor import model_accessor
-
-        from mock_modelaccessor import mock_enumerator
-
-        # import all class names to globals
-        for (k, v) in model_accessor.all_model_classes.items():
-            globals()[k] = v
-
-        b = xossynchronizer.backend.Backend(model_accessor=model_accessor)
-        steps_dir = Config.get("steps_dir")
-        self.steps = b.load_sync_step_modules(steps_dir)
-        self.synchronizer = xossynchronizer.event_loop.XOSObserver(self.steps, model_accessor)
-
-    def tearDown(self):
-        sys.path = self.sys_path_save
-        os.chdir(self.cwd_save)
-
-    def test_multi_controller_path(self):
-        csl = ControllerSlice()
-        csi = ControllerSite()
-        site = Site()
-        slice = Slice()
-        slice.site = site
-        csl.slice = slice
-        csi.site = site
-        slice.controllerslices = mock_enumerator([csl])
-        site.controllersite = mock_enumerator([csi])
-
-        verdict, edge_type = self.synchronizer.concrete_path_exists(csl, csi)
-        self.assertTrue(verdict)
-
-        # TODO(smbaker): event_loop.PROXY_EDGE is set to the wrong thing
-        # self.assertEqual(edge_type, event_loop.PROXY_EDGE)
-
-    def test_controller_path_simple(self):
-        p = Instance()
-        s = Slice()
-        t = Site()
-        ct = ControllerSite()
-        p.slice = s
-        s.site = t
-        ct.site = t
-        t.controllersite = mock_enumerator([ct])
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, ct], False)
-        self.assertEqual([ct, p], cohorts[0])
-        cohorts = self.synchronizer.compute_dependent_cohorts([ct, p], False)
-        self.assertEqual([ct, p], cohorts[0])
-
-    def test_controller_deletion_path(self):
-        p = Instance()
-        s = Slice()
-        t = Site()
-        ct = ControllerSite()
-        ct.site = t
-        p.slice = s
-        s.site = t
-
-        t.controllersite = mock_enumerator([ct])
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, s, t, ct], False)
-        self.assertIn(t, cohorts[0])
-        self.assertIn(ct, cohorts[0])
-        self.assertIn(s, cohorts[0])
-        self.assertIn(p, cohorts[0])
-        # TODO(smbaker): This assert was found to be failing. Understand whether the library or the test is at fault.
-        #self.assertEqual([t, ct, s, p], cohorts[0])
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, s, t, ct], True)
-        self.assertIn(t, cohorts[0])
-        self.assertIn(ct, cohorts[0])
-        self.assertIn(s, cohorts[0])
-        self.assertIn(p, cohorts[0])
-        # TODO(smbaker): This assert was found to be failing. Understand whether the library or the test is at fault.
-        #self.assertEqual([p, s, ct, t], cohorts[0])
-
-    def test_multi_controller_schedule(self):
-        csl = ControllerSlice()
-        csi = ControllerSite()
-        site = Site()
-        slice = Slice()
-        slice.site = site
-        csl.slice = slice
-        csi.site = site
-        slice.controllerslices = mock_enumerator([csl])
-        site.controllersite = mock_enumerator([csi])
-        i = Instance()
-        i.slice = slice
-
-        cohorts = self.synchronizer.compute_dependent_cohorts(
-            [i, slice, site, csl, csi], False
-        )
-        self.assertIn(site, cohorts[0])
-        self.assertIn(csi, cohorts[0])
-        self.assertIn(slice, cohorts[0])
-        self.assertIn(csl, cohorts[0])
-        self.assertIn(i, cohorts[0])
-
-        # TODO(smbaker): This assert was found to be failing. Understand whether the library or the test is at fault.
-        #self.assertEqual([site, csi, slice, csl, i], cohorts[0])
-
-    def test_multi_controller_path_negative(self):
-        csl = ControllerSlice()
-        csi = ControllerSite()
-        site = Site()
-        slice = Slice()
-        slice.site = site
-        csl.slice = slice
-        csi.site = site
-        slice.controllerslices = mock_enumerator([])
-        site.controllersite = mock_enumerator([])
-
-        verdict, edge_type = self.synchronizer.concrete_path_exists(csl, csi)
-        self.assertFalse(verdict)
-        self.assertEqual(edge_type, None)
-
-    def test_controller_path_simple_negative(self):
-        p = Instance()
-        s = Slice()
-        t = Site()
-        ct = ControllerSite()
-        p.slice = s
-        s.site = t
-        ct.site = t
-        t.controllersite = mock_enumerator([])
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, ct], False)
-        self.assertIn([ct], cohorts)
-        self.assertIn([p], cohorts)
-
-    def test_controller_deletion_path_negative(self):
-        p = Instance()
-        s = Slice()
-        t = Site()
-        ct = ControllerSite()
-        s.site = t
-
-        t.controllersite = mock_enumerator([])
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, s, t, ct], False)
-        self.assertIn([t, s], cohorts)
-        self.assertIn([p], cohorts)
-        self.assertIn([ct], cohorts)
-        cohorts = self.synchronizer.compute_dependent_cohorts([p, s, t, ct], True)
-        self.assertIn([s, t], cohorts)
-        self.assertIn([p], cohorts)
-        self.assertIn([ct], cohorts)
-
-    def DISABLED_test_multi_controller_deletion_schedule(self):
-        # TODO(smbaker): `csi` is undefined, test is broken as written.
-
-        csl = ControllerSlice()
-        cn = ControllerNetwork()
-        site = Site()
-        slice = Slice()
-        slice.site = site
-        slice.controllerslices = mock_enumerator([])
-        site.controllersite = mock_enumerator([])
-        i = Instance()
-        i.slice = slice
-
-        cohorts = self.synchronizer.compute_dependent_cohorts(
-            [i, slice, site, csl, csi], False
-        )
-        self.assertIn([site, slice, i], cohorts)
-        self.assertIn([csl], cohorts)
-        self.assertIn([csi], cohorts)
-
-    def test_multi_controller_schedule_negative(self):
-        csl = ControllerSlice()
-        csi = ControllerSite()
-        site = Site()
-        slice = Slice()
-        slice.site = site
-        slice.controllerslices = mock_enumerator([])
-        site.controllersite = mock_enumerator([])
-        i = Instance()
-        i.slice = slice
-
-        cohorts = self.synchronizer.compute_dependent_cohorts(
-            [i, slice, site, csl, csi], False
-        )
-        self.assertIn([site, slice, i], cohorts)
-        self.assertIn([csl], cohorts)
-        self.assertIn([csi], cohorts)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_load.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_load.py
index e2bbbb0..774bc97 100644
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_load.py
+++ b/lib/xos-synchronizer/xos-synchronizer-tests/test_load.py
@@ -65,39 +65,22 @@
 
     def test_load_steps(self):
         step_names = [s.__name__ for s in self.steps]
-        self.assertIn("SyncControllerSlices", step_names)
+        self.assertIn("SyncPort", step_names)
 
     def test_load_deps(self):
         self.synchronizer.load_dependency_graph()
         graph = self.synchronizer.model_dependency_graph
-        self.assertTrue(graph[False].has_edge("Instance", "Slice"))
-        self.assertTrue(graph[True].has_edge("Slice", "Instance"))
-        self.assertTrue(graph[False].has_edge("Slice", "ControllerSlice"))
-        self.assertTrue(graph[True].has_edge("ControllerSlice", "Slice"))
-
-    def test_load_dep_accessors(self):
-        self.synchronizer.load_dependency_graph()
-        graph = self.synchronizer.model_dependency_graph
-        self.assertDictContainsSubset(
-            {"src_accessor": "controllerslices"},
-            graph[False]["Slice"]["ControllerSlice"],
-        )
-        self.assertDictContainsSubset(
-            {"src_accessor": "slice", "dst_accessor": "controllerslices"},
-            graph[True]["Slice"]["ControllerSlice"],
-        )
+        self.assertTrue(graph[False].has_edge("Slice", "Site"))
+        self.assertTrue(graph[True].has_edge("Site", "Slice"))
 
     def test_load_sync_steps(self):
         self.synchronizer.load_sync_steps()
         model_to_step = self.synchronizer.model_to_step
         step_lookup = self.synchronizer.step_lookup
         self.assertIn(
-            ("ControllerSlice", ["SyncControllerSlices"]), model_to_step.items()
-        )
-        self.assertIn(
             ("Port", ["SyncPort"]), model_to_step.items()
         )
-        self.assertIn(("SiteRole", ["SyncRoles"]), model_to_step.items())
+        self.assertIn(("Image", ["SyncImages"]), model_to_step.items())
 
         for k, v in model_to_step.items():
             val = v[0]
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_model_policy_tenantwithcontainer.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_model_policy_tenantwithcontainer.py
deleted file mode 100644
index e2659c3..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_model_policy_tenantwithcontainer.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import unittest
-from mock import patch
-import mock
-import pdb
-
-import os
-import sys
-from xosconfig import Config
-
-test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-sync_lib_dir = os.path.join(test_path, "..", "xossynchronizer")
-xos_dir = os.path.join(test_path, "..", "..", "..", "xos")
-
-class TestModelPolicyTenantWithContainer(unittest.TestCase):
-    def setUp(self):
-        global TenantWithContainerPolicy, LeastLoadedNodeScheduler, MockObjectList
-
-        self.sys_path_save = sys.path
-        self.cwd_save = os.getcwd()
-
-        config = basic_conf = os.path.abspath(
-            os.path.dirname(os.path.realpath(__file__)) + "/test_config.yaml"
-        )
-        Config.clear()  # in case left unclean by a previous test case
-        Config.init(config, "synchronizer-config-schema.yaml")
-
-        from xossynchronizer.mock_modelaccessor_build import (
-            build_mock_modelaccessor,
-        )
-
-        build_mock_modelaccessor(sync_lib_dir, xos_dir, services_dir=None, service_xprotos=[])
-
-        import xossynchronizer.model_policies.model_policy_tenantwithcontainer
-        from xossynchronizer.model_policies.model_policy_tenantwithcontainer import (
-            TenantWithContainerPolicy,
-            LeastLoadedNodeScheduler,
-        )
-
-        from mock_modelaccessor import MockObjectList
-
-        # import all class names to globals
-        for (
-            k,
-            v,
-        ) in xossynchronizer.model_policies.model_policy_tenantwithcontainer.model_accessor.all_model_classes.items():
-            globals()[k] = v
-
-        from xossynchronizer.modelaccessor import model_accessor
-
-        self.policy = TenantWithContainerPolicy(model_accessor=model_accessor)
-        self.user = User(email="testadmin@test.org")
-        self.tenant = TenantWithContainer(creator=self.user)
-        self.flavor = Flavor(name="m1.small")
-
-    def tearDown(self):
-        Config.clear()
-        sys.path = self.sys_path_save
-        os.chdir(self.cwd_save)
-
-    def test_manage_container_no_slices(self):
-        with patch.object(TenantWithContainer, "owner") as owner:
-            owner.slices.count.return_value = 0
-            with self.assertRaises(Exception) as e:
-                self.policy.manage_container(self.tenant)
-            self.assertEqual(e.exception.message, "The service has no slices")
-
-    def test_manage_container(self):
-        with patch.object(TenantWithContainer, "owner") as owner, patch.object(
-            TenantWithContainer, "save"
-        ) as tenant_save, patch.object(
-            Node, "site_deployment"
-        ) as site_deployment, patch.object(
-            Instance, "save"
-        ) as instance_save, patch.object(
-            Instance, "delete"
-        ) as instance_delete, patch.object(
-            TenantWithContainerPolicy, "get_image"
-        ) as get_image, patch.object(
-            LeastLoadedNodeScheduler, "pick"
-        ) as pick:
-            # setup mocks
-            node = Node(hostname="my.node.com")
-            slice = Slice(
-                name="mysite_test1", default_flavor=self.flavor, default_isolation="vm"
-            )
-            image = Image(name="trusty-server-multi-nic")
-            deployment = Deployment(name="testdeployment")
-            owner.slices.count.return_value = 1
-            owner.slices.all.return_value = [slice]
-            owner.slices.first.return_value = slice
-            get_image.return_value = image
-            pick.return_value = (node, None)
-            site_deployment.deployment = deployment
-            # done setup mocks
-
-            # call manage_container
-            self.policy.manage_container(self.tenant)
-
-            # make sure manage_container did what it is supposed to do
-            self.assertNotEqual(self.tenant.instance, None)
-            self.assertEqual(self.tenant.instance.creator.email, "testadmin@test.org")
-            self.assertEqual(self.tenant.instance.image.name, "trusty-server-multi-nic")
-            self.assertEqual(self.tenant.instance.flavor.name, "m1.small")
-            self.assertEqual(self.tenant.instance.isolation, "vm")
-            self.assertEqual(self.tenant.instance.node.hostname, "my.node.com")
-            self.assertEqual(self.tenant.instance.slice.name, "mysite_test1")
-            self.assertEqual(self.tenant.instance.parent, None)
-            instance_save.assert_called()
-            instance_delete.assert_not_called()
-            tenant_save.assert_called()
-
-    def test_manage_container_delete(self):
-        self.tenant.deleted = True
-
-        # call manage_container
-        self.policy.manage_container(self.tenant)
-
-        # make sure manage_container did what it is supposed to do
-        self.assertEqual(self.tenant.instance, None)
-
-    def test_manage_container_no_m1_small(self):
-        with patch.object(TenantWithContainer, "owner") as owner, patch.object(
-            Node, "site_deployment"
-        ) as site_deployment, patch.object(
-            Flavor, "objects"
-        ) as flavor_objects, patch.object(
-            TenantWithContainerPolicy, "get_image"
-        ) as get_image, patch.object(
-            LeastLoadedNodeScheduler, "pick"
-        ) as pick:
-            # setup mocks
-            node = Node(hostname="my.node.com")
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            image = Image(name="trusty-server-multi-nic")
-            deployment = Deployment(name="testdeployment")
-            owner.slices.count.return_value = 1
-            owner.slices.all.return_value = [slice]
-            owner.slices.first.return_value = slice
-            get_image.return_value = image
-            pick.return_value = (node, None)
-            site_deployment.deployment = deployment
-            flavor_objects.filter.return_value = []
-            # done setup mocks
-
-            with self.assertRaises(Exception) as e:
-                self.policy.manage_container(self.tenant)
-            self.assertEqual(e.exception.message, "No m1.small flavor")
-
-    def test_least_loaded_node_scheduler(self):
-        with patch.object(Node.objects, "get_items") as node_objects:
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            node = Node(hostname="my.node.com", id=4567)
-            node.instances = MockObjectList(initial=[])
-            node_objects.return_value = [node]
-
-            sched = LeastLoadedNodeScheduler(slice)
-            (picked_node, parent) = sched.pick()
-
-            self.assertNotEqual(picked_node, None)
-            self.assertEqual(picked_node.id, node.id)
-
-    def test_least_loaded_node_scheduler_two_nodes(self):
-        with patch.object(Node.objects, "get_items") as node_objects:
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            instance1 = Instance(id=1)
-            node1 = Node(hostname="my.node.com", id=4567)
-            node1.instances = MockObjectList(initial=[])
-            node2 = Node(hostname="my.node.com", id=8910)
-            node2.instances = MockObjectList(initial=[instance1])
-            node_objects.return_value = [node1, node2]
-
-            # should pick the node with the fewest instance (node1)
-
-            sched = LeastLoadedNodeScheduler(slice)
-            (picked_node, parent) = sched.pick()
-
-            self.assertNotEqual(picked_node, None)
-            self.assertEqual(picked_node.id, node1.id)
-
-    def test_least_loaded_node_scheduler_two_nodes_multi(self):
-        with patch.object(Node.objects, "get_items") as node_objects:
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            instance1 = Instance(id=1)
-            instance2 = Instance(id=2)
-            instance3 = Instance(id=3)
-            node1 = Node(hostname="my.node.com", id=4567)
-            node1.instances = MockObjectList(initial=[instance2, instance3])
-            node2 = Node(hostname="my.node.com", id=8910)
-            node2.instances = MockObjectList(initial=[instance1])
-            node_objects.return_value = [node1, node2]
-
-            # should pick the node with the fewest instance (node2)
-
-            sched = LeastLoadedNodeScheduler(slice)
-            (picked_node, parent) = sched.pick()
-
-            self.assertNotEqual(picked_node, None)
-            self.assertEqual(picked_node.id, node2.id)
-
-    def test_least_loaded_node_scheduler_with_label(self):
-        with patch.object(Node.objects, "get_items") as node_objects:
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            instance1 = Instance(id=1)
-            node1 = Node(hostname="my.node.com", id=4567)
-            node1.instances = MockObjectList(initial=[])
-            node2 = Node(hostname="my.node.com", id=8910)
-            node2.instances = MockObjectList(initial=[instance1])
-            # Fake out the existence of a NodeLabel object. TODO: Extend the mock framework to support the model__field
-            # syntax.
-            node1.nodelabels__name = None
-            node2.nodelabels__name = "foo"
-            node_objects.return_value = [node1, node2]
-
-            # should pick the node with the label, even if it has a greater number of instances
-
-            sched = LeastLoadedNodeScheduler(slice, label="foo")
-            (picked_node, parent) = sched.pick()
-
-            self.assertNotEqual(picked_node, None)
-            self.assertEqual(picked_node.id, node2.id)
-
-    def test_least_loaded_node_scheduler_create_label(self):
-        with patch.object(Node.objects, "get_items") as node_objects, patch.object(
-            NodeLabel, "save", autospec=True
-        ) as nodelabel_save, patch.object(NodeLabel, "node") as nodelabel_node_add:
-            slice = Slice(
-                name="mysite_test1", default_flavor=None, default_isolation="vm"
-            )
-            instance1 = Instance(id=1)
-            node1 = Node(hostname="my.node.com", id=4567)
-            node1.instances = MockObjectList(initial=[])
-            node2 = Node(hostname="my.node.com", id=8910)
-            node2.instances = MockObjectList(initial=[instance1])
-            # Fake out the existence of a NodeLabel object. TODO: Extend the mock framework to support the model__field
-            # syntax.
-            node1.nodelabels__name = None
-            node2.nodelabels__name = None
-            node_objects.return_value = [node1, node2]
-
-            # should pick the node with the least number of instances
-
-            sched = LeastLoadedNodeScheduler(
-                slice, label="foo", constrain_by_service_instance=True
-            )
-            (picked_node, parent) = sched.pick()
-
-            self.assertNotEqual(picked_node, None)
-            self.assertEqual(picked_node.id, node1.id)
-
-            # NodeLabel should have been created and saved
-
-            self.assertEqual(nodelabel_save.call_count, 1)
-            self.assertEqual(nodelabel_save.call_args[0][0].name, "foo")
-
-            # The NodeLabel's node field should have been added to
-
-            NodeLabel.node.add.assert_called_with(node1)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_payload.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_payload.py
deleted file mode 100644
index ab861c8..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_payload.py
+++ /dev/null
@@ -1,342 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import json
-import unittest
-from mock import patch
-import mock
-import pdb
-import networkx as nx
-
-import os
-import sys
-
-test_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
-sync_lib_dir = os.path.join(test_path, "..", "xossynchronizer")
-xos_dir = os.path.join(test_path, "..", "..", "..", "xos")
-
-ANSIBLE_FILE = "/tmp/payload_test"
-
-log = None
-
-
-def run_fake_ansible_template(*args, **kwargs):
-    opts = args[1]
-    open(ANSIBLE_FILE, "w").write(json.dumps(opts))
-    return [{"rc": 0}]
-
-
-def run_fake_ansible_template_fail(*args, **kwargs):
-    opts = args[1]
-    open(ANSIBLE_FILE, "w").write(json.dumps(opts))
-    return [{"rc": 1}]
-
-
-def get_ansible_output():
-    ansible_str = open(ANSIBLE_FILE).read()
-    return json.loads(ansible_str)
-
-
-class TestPayload(unittest.TestCase):
-    @classmethod
-    def setUpClass(cls):
-
-        global log
-
-        config = os.path.join(test_path, "test_config.yaml")
-        from xosconfig import Config
-
-        Config.clear()
-        Config.init(config, "synchronizer-config-schema.yaml")
-
-        if not log:
-            from multistructlog import create_logger
-
-            log = create_logger(Config().get("logging"))
-
-    def setUp(self):
-
-        global log, test_steps, event_loop
-
-        self.sys_path_save = sys.path
-        self.cwd_save = os.getcwd()
-
-        config = os.path.join(test_path, "test_config.yaml")
-        from xosconfig import Config
-
-        Config.clear()
-        Config.init(config, "synchronizer-config-schema.yaml")
-
-        from xossynchronizer.mock_modelaccessor_build import (
-            build_mock_modelaccessor,
-        )
-
-        build_mock_modelaccessor(sync_lib_dir, xos_dir, services_dir=None, service_xprotos=[])
-
-        os.chdir(os.path.join(test_path, ".."))  # config references xos-synchronizer-tests/model-deps
-
-        import xossynchronizer.event_loop
-
-        reload(xossynchronizer.event_loop)
-        import xossynchronizer.backend
-
-        reload(xossynchronizer.backend)
-        import test_steps.sync_instances
-        import test_steps.sync_controller_slices
-        from xossynchronizer.modelaccessor import model_accessor
-
-        # import all class names to globals
-        for (k, v) in model_accessor.all_model_classes.items():
-            globals()[k] = v
-        b = xossynchronizer.backend.Backend(model_accessor = model_accessor)
-        steps_dir = Config.get("steps_dir")
-        self.steps = b.load_sync_step_modules(steps_dir)
-        self.synchronizer = xossynchronizer.event_loop.XOSObserver(self.steps, model_accessor)
-
-    def tearDown(self):
-        sys.path = self.sys_path_save
-        os.chdir(self.cwd_save)
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_delete_record(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save:
-            o = Instance()
-            o.name = "Sisi Pascal"
-
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor = self.synchronizer.model_accessor)
-            self.synchronizer.delete_record(o, log)
-
-            a = get_ansible_output()
-            self.assertDictContainsSubset({"delete": True, "name": o.name}, a)
-            o.save.assert_called_with(update_fields=["backend_need_reap"])
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template_fail,
-    )
-    def test_delete_record_fail(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save:
-            o = Instance()
-            o.name = "Sisi Pascal"
-
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor = self.synchronizer.model_accessor)
-
-            with self.assertRaises(Exception) as e:
-                self.synchronizer.delete_record(o, log)
-
-            self.assertEqual(
-                e.exception.message, "Nonzero rc from Ansible during delete_record"
-            )
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_sync_record(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save:
-            o = Instance()
-            o.name = "Sisi Pascal"
-
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor = self.synchronizer.model_accessor)
-            self.synchronizer.sync_record(o, log)
-
-            a = get_ansible_output()
-            self.assertDictContainsSubset({"delete": False, "name": o.name}, a)
-            o.save.assert_called_with(
-                update_fields=[
-                    "enacted",
-                    "backend_status",
-                    "backend_register",
-                    "backend_code",
-                ]
-            )
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_sync_cohort(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save, mock.patch.object(
-            ControllerSlice, "save"
-        ) as controllerslice_save:
-            cs = ControllerSlice()
-            s = Slice(name="SP SP")
-            cs.slice = s
-
-            o = Instance()
-            o.name = "Sisi Pascal"
-            o.slice = s
-
-            cohort = [cs, o]
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor = self.synchronizer.model_accessor)
-            cs.synchronizer_step = test_steps.sync_controller_slices.SyncControllerSlices(
-                model_accessor = self.synchronizer.model_accessor
-            )
-
-            self.synchronizer.sync_cohort(cohort, False)
-
-            a = get_ansible_output()
-            self.assertDictContainsSubset({"delete": False, "name": o.name}, a)
-            o.save.assert_called_with(
-                update_fields=[
-                    "enacted",
-                    "backend_status",
-                    "backend_register",
-                    "backend_code",
-                ]
-            )
-            cs.save.assert_called_with(
-                update_fields=[
-                    "enacted",
-                    "backend_status",
-                    "backend_register",
-                    "backend_code",
-                ]
-            )
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_deferred_exception(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save:
-            cs = ControllerSlice()
-            s = Slice(name="SP SP")
-            cs.slice = s
-            cs.force_defer = True
-
-            o = Instance()
-            o.name = "Sisi Pascal"
-            o.slice = s
-
-            cohort = [cs, o]
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor=self.synchronizer.model_accessor)
-            cs.synchronizer_step = test_steps.sync_controller_slices.SyncControllerSlices(
-                model_accessor=self.synchronizer.model_accessor
-            )
-
-            self.synchronizer.sync_cohort(cohort, False)
-            o.save.assert_called_with(
-                always_update_timestamp=True,
-                update_fields=["backend_status", "backend_register"],
-            )
-            self.assertEqual(cs.backend_code, 0)
-
-            self.assertIn("Force", cs.backend_status)
-            self.assertIn("Failed due to", o.backend_status)
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_backend_status(self, mock_run_template):
-        with mock.patch.object(Instance, "save") as instance_save:
-            cs = ControllerSlice()
-            s = Slice(name="SP SP")
-            cs.slice = s
-            cs.force_fail = True
-
-            o = Instance()
-            o.name = "Sisi Pascal"
-            o.slice = s
-
-            cohort = [cs, o]
-            o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor=self.synchronizer.model_accessor)
-            cs.synchronizer_step = test_steps.sync_controller_slices.SyncControllerSlices(
-                model_accessor=self.synchronizer.model_accessor)
-
-            self.synchronizer.sync_cohort(cohort, False)
-            o.save.assert_called_with(
-                always_update_timestamp=True,
-                update_fields=["backend_status", "backend_register"],
-            )
-            self.assertIn("Force", cs.backend_status)
-            self.assertIn("Failed due to", o.backend_status)
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_fetch_pending(self, mock_run_template):
-        pending_objects, pending_steps = self.synchronizer.fetch_pending()
-        pending_objects2 = list(pending_objects)
-
-        any_cs = next(
-            obj for obj in pending_objects if obj.leaf_model_name == "ControllerSlice"
-        )
-        any_instance = next(
-            obj for obj in pending_objects2 if obj.leaf_model_name == "Instance"
-        )
-
-        slice = Slice()
-        any_instance.slice = slice
-        any_cs.slice = slice
-
-        self.synchronizer.external_dependencies = []
-        cohorts = self.synchronizer.compute_dependent_cohorts(pending_objects, False)
-        flat_objects = [item for cohort in cohorts for item in cohort]
-
-        self.assertEqual(set(flat_objects), set(pending_objects))
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_fetch_pending_with_external_dependencies(
-        self, mock_run_template,
-    ):
-        pending_objects, pending_steps = self.synchronizer.fetch_pending()
-        pending_objects2 = list(pending_objects)
-
-        any_cn = next(
-            obj for obj in pending_objects if obj.leaf_model_name == "ControllerNetwork"
-        )
-        any_user = next(
-            obj for obj in pending_objects2 if obj.leaf_model_name == "User"
-        )
-
-        cohorts = self.synchronizer.compute_dependent_cohorts(pending_objects, False)
-
-        flat_objects = [item for cohort in cohorts for item in cohort]
-        self.assertEqual(set(flat_objects), set(pending_objects))
-
-        # These cannot be None, but for documentation purposes
-        self.assertIsNotNone(any_cn)
-        self.assertIsNotNone(any_user)
-
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_external_dependency_exception(self, mock_run_template):
-        cs = ControllerSlice()
-        s = Slice(name="SP SP")
-        cs.slice = s
-
-        o = Instance()
-        o.name = "Sisi Pascal"
-        o.slice = s
-
-        cohort = [cs, o]
-        o.synchronizer_step = None
-        o.synchronizer_step = test_steps.sync_instances.SyncInstances(model_accessor=self.synchronizer.model_accessor)
-
-        self.synchronizer.sync_cohort(cohort, False)
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_run.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_run.py
index fdbff3c..a9c6c19 100644
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_run.py
+++ b/lib/xos-synchronizer/xos-synchronizer-tests/test_run.py
@@ -86,24 +86,11 @@
         sys.path = self.sys_path_save
         os.chdir(self.cwd_save)
 
-    @mock.patch(
-        "test_steps.sync_instances.ansiblesyncstep.run_template",
-        side_effect=run_fake_ansible_template,
-    )
-    def test_run_once(self, mock_run_template):
+    def test_run_once(self):
         pending_objects, pending_steps = self.synchronizer.fetch_pending()
         pending_objects2 = list(pending_objects)
 
-        any_cs = next(
-            obj for obj in pending_objects if obj.leaf_model_name == "ControllerSlice"
-        )
-        any_instance = next(
-            obj for obj in pending_objects2 if obj.leaf_model_name == "Instance"
-        )
-
         slice = Slice()
-        any_instance.slice = slice
-        any_cs.slice = slice
 
         self.synchronizer.run_once()
 
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_scheduler.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_scheduler.py
index 0164c5a..0aa5334 100644
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_scheduler.py
+++ b/lib/xos-synchronizer/xos-synchronizer-tests/test_scheduler.py
@@ -83,36 +83,6 @@
         same, t = self.synchronizer.same_object(s, t)
         self.assertFalse(same)
 
-    def test_same_object_lst(self):
-        s = Slice(pk=5)
-        t = ControllerSlice(slice=s)
-        u = ControllerSlice(slice=s)
-
-        s.controllerslices = mock_enumerator([t, u])
-
-        same, et = self.synchronizer.same_object(s.controllerslices, u)
-        self.assertTrue(same)
-        self.assertEqual(et, event_loop.PROXY_EDGE)
-
-        same, et = self.synchronizer.same_object(s.controllerslices, t)
-
-        self.assertTrue(same)
-        self.assertEqual(et, event_loop.PROXY_EDGE)
-
-    def test_same_object_lst_dc(self):
-        r = Slice(pk=4)
-        s = Slice(pk=5)
-        t = ControllerSlice(slice=r)
-        u = ControllerSlice(slice=s)
-
-        s.controllerslices = mock_enumerator([u])
-
-        same, et = self.synchronizer.same_object(s.controllerslices, t)
-        self.assertFalse(same)
-
-        same, et = self.synchronizer.same_object(s.controllerslices, u)
-        self.assertTrue(same)
-
     def test_concrete_path_no_model_path(self):
         p = Port()
         n = NetworkParameter()
@@ -120,60 +90,24 @@
         self.assertFalse(verdict)
 
     def test_concrete_no_object_path_adjacent(self):
-        p = Instance()
-        s1 = Slice()
-        s2 = Slice()
-        p.slice = s2
-        verdict, _ = self.synchronizer.concrete_path_exists(p, s1)
-
+        slice = Slice()
+        site1 = Site()
+        site2 = Site()
+        slice.site = site2
+        verdict, _ = self.synchronizer.concrete_path_exists(slice, site1)
         self.assertFalse(verdict)
 
     def test_concrete_object_path_adjacent(self):
-        p = Instance()
-        s = Slice()
-        p.slice = s
-        verdict, edge_type = self.synchronizer.concrete_path_exists(p, s)
+        slice = Slice()
+        site = Site()
+        slice.site = site
+        verdict, edge_type = self.synchronizer.concrete_path_exists(slice, site)
 
         self.assertTrue(verdict)
         self.assertEqual(edge_type, event_loop.DIRECT_EDGE)
 
-    def test_concrete_object_controller_path_adjacent(self):
-        p = Instance()
-        q = Instance()
-        cs = ControllerSlice()
-        cs2 = ControllerSlice()
-        s1 = Slice()
-        s2 = Slice()
-        p.slice = s1
-        q.slice = s2
-        cs.slice = s1
-        s1.controllerslices = mock_enumerator([cs])
-        s2.controllerslices = mock_enumerator([])
-
-        verdict1, edge_type1 = self.synchronizer.concrete_path_exists(p, cs)
-        verdict2, _ = self.synchronizer.concrete_path_exists(q, cs)
-        verdict3, _ = self.synchronizer.concrete_path_exists(p, cs2)
-
-        self.assertTrue(verdict1)
-        self.assertFalse(verdict2)
-        self.assertFalse(verdict3)
-
-        # TODO(smbaker): This assert was found to be failing. Understand whether the library or the test is at fault.
-        #self.assertEqual(edge_type1, event_loop.PROXY_EDGE)
-
-    def test_concrete_object_controller_path_distant(self):
-        p = Instance()
-        s = Slice()
-        t = Site()
-        ct = ControllerSite()
-        ct.site = t
-        p.slice = s
-        s.site = t
-        verdict = self.synchronizer.concrete_path_exists(p, ct)
-        self.assertTrue(verdict)
-
     def test_concrete_object_path_distant(self):
-        p = Instance()
+        p = ComputeServiceInstance()
         s = Slice()
         t = Site()
         p.slice = s
@@ -181,93 +115,14 @@
         verdict = self.synchronizer.concrete_path_exists(p, t)
         self.assertTrue(verdict)
 
-    def test_concrete_no_object_path_distant(self):
-        p = Instance()
-        s = Slice()
-        s.controllerslice = mock_enumerator([])
-
-        t = Site()
-        t.controllersite = mock_enumerator([])
-
-        ct = ControllerSite()
-        ct.site = Site()
-        p.slice = s
-        s.site = t
-
-        verdict, _ = self.synchronizer.concrete_path_exists(p, ct)
-        self.assertFalse(verdict)
-
     def test_cohorting_independent(self):
         i = Image()
 
         p = Slice()
-        c = Instance()
-        c.slice = None
-        c.image = None
+        c = Site()
 
         cohorts = self.synchronizer.compute_dependent_cohorts([i, p, c], False)
         self.assertEqual(len(cohorts), 3)
 
-    def test_cohorting_related(self):
-        i = Image()
-        p = Port()
-        c = Instance()
-        c.image = i
-        s = ControllerSlice()
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([i, p, c, s], False)
-        self.assertIn([i, c], cohorts)
-        self.assertIn([p], cohorts)
-        self.assertIn([s], cohorts)
-
-    def test_cohorting_related_multi(self):
-        i = Image()
-        p = Port()
-        c = Instance()
-        c.image = i
-        cs = ControllerSlice()
-        s = Slice()
-        cs.slice = s
-        s.controllerslices = mock_enumerator([cs])
-        c.slice = s
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([i, p, c, s, cs], False)
-
-        big_cohort = max(cohorts, key=len)
-        self.assertGreater(big_cohort.index(c), big_cohort.index(i))
-        # TODO(smbaker): This assert was found to be failing. Understand whether the library or the test is at fault.
-        #self.assertGreater(big_cohort.index(cs), big_cohort.index(s))
-        self.assertIn([p], cohorts)
-
-    def test_cohorting_related_multi_delete(self):
-        i = Image()
-        p = Port()
-        c = Instance()
-        c.image = i
-        cs = ControllerSlice()
-        s = Slice()
-        cs.slice = s
-        c.slice = s
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([i, p, c, s, cs], True)
-
-        big_cohort = max(cohorts, key=len)
-        self.assertGreater(big_cohort.index(i), big_cohort.index(c))
-        self.assertGreater(big_cohort.index(s), big_cohort.index(cs))
-        self.assertIn([p], cohorts)
-
-    def test_cohorting_related_delete(self):
-        i = Image()
-        p = Port()
-        c = Instance()
-        c.image = i
-        s = ControllerSlice()
-
-        cohorts = self.synchronizer.compute_dependent_cohorts([i, p, c, s], True)
-        self.assertIn([c, i], cohorts)
-        self.assertIn([p], cohorts)
-        self.assertIn([s], cohorts)
-
-
 if __name__ == "__main__":
     unittest.main()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_container.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_container.py
deleted file mode 100644
index 8cbabcb..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_container.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import hashlib
-import os
-import socket
-import sys
-import base64
-import time
-from xossynchronizer.steps.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
-from xossynchronizer.steps.syncstep import DeferredException
-
-# hpclibrary will be in steps/..
-parentdir = os.path.join(os.path.dirname(__file__), "..")
-sys.path.insert(0, parentdir)
-
-
-class SyncContainer(SyncInstanceUsingAnsible):
-    observes = "Instance"
-    template_name = "sync_container.yaml"
-
-    def __init__(self, *args, **kwargs):
-        super(SyncContainer, self).__init__(*args, **kwargs)
-
-    def fetch_pending(self, deletion=False):
-        i = self.model_accessor.Instance()
-        i.name = "Spectacular Sponge"
-        j = self.model_accessor.Instance()
-        j.name = "Spontaneous Tent"
-        k = self.model_accessor.Instance()
-        k.name = "Embarrassed Cat"
-
-        objs = [i, j, k]
-        return objs
-
-    def sync_record(self, o):
-        pass
-
-    def delete_record(self, o):
-        pass
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_images.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_images.py
deleted file mode 100644
index ef85983..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_images.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-from xossynchronizer.steps.syncstep import SyncStep
-
-class SyncControllerImages(SyncStep):
-    observes = "ControllerImages"
-    requested_interval = 0
-    playbook = "sync_controller_images.yaml"
-
-    def fetch_pending(self, deleted):
-        ci = self.model_accessor.ControllerImages()
-        i = self.model_accessor.Image()
-        i.name = "Lush Loss"
-        ci.i = i
-        return [ci]
-
-    def map_sync_inputs(self, controller_image):
-        image_fields = {
-            "endpoint": controller_image.controller.auth_url,
-            "endpoint_v3": controller_image.controller.auth_url_v3,
-            "admin_user": controller_image.controller.admin_user,
-            "admin_password": controller_image.controller.admin_password,
-            "domain": controller_image.controller.domain,
-            "name": controller_image.image.name,
-            "filepath": controller_image.image.path,
-            # name of ansible playbook
-            "ansible_tag": "%s@%s"
-            % (controller_image.image.name, controller_image.controller.name),
-        }
-
-        return image_fields
-
-    def map_sync_outputs(self, controller_image, res):
-        image_id = res[0]["id"]
-        controller_image.glance_image_id = image_id
-        controller_image.backend_status = "1 - OK"
-        controller_image.save()
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_networks.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_networks.py
deleted file mode 100644
index 55dfe4e..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_networks.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-import struct
-import socket
-from netaddr import IPAddress, IPNetwork
-from xossynchronizer.steps.syncstep import SyncStep
-
-class SyncControllerNetworks(SyncStep):
-    requested_interval = 0
-    observes = "ControllerNetwork"
-    external_dependencies = ["User"]
-    playbook = "sync_controller_networks.yaml"
-
-    def fetch_pending(self, deleted):
-        ci = self.model_accessor.ControllerNetwork()
-        i = self.model_accessor.Network()
-        i.name = "Lush Loss"
-        s = self.model_accessor.Slice()
-        s.name = "Ghastly Notebook"
-        i.owner = s
-        ci.i = i
-        return [ci]
-
-    def map_sync_outputs(self, controller_network, res):
-        network_id = res[0]["network"]["id"]
-        subnet_id = res[1]["subnet"]["id"]
-        controller_network.net_id = network_id
-        controller_network.subnet = self.cidr
-        controller_network.subnet_id = subnet_id
-        controller_network.backend_status = "1 - OK"
-        if not controller_network.segmentation_id:
-            controller_network.segmentation_id = str(
-                self.get_segmentation_id(controller_network)
-            )
-        controller_network.save()
-
-    def map_sync_inputs(self, controller_network):
-        pass
-
-    def map_delete_inputs(self, controller_network):
-        network_fields = {"endpoint": None, "delete": True}
-
-        return network_fields
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_site_privileges.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_site_privileges.py
deleted file mode 100644
index e286ef8..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_site_privileges.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-import json
-from xossynchronizer.steps.syncstep import SyncStep
-
-class SyncControllerSitePrivileges(SyncStep):
-    requested_interval = 0
-    observes = "ControllerSitePrivilege"
-    playbook = "sync_controller_users.yaml"
-
-    def map_sync_inputs(self, controller_site_privilege):
-        controller_register = json.loads(
-            controller_site_privilege.controller.backend_register
-        )
-        if not controller_site_privilege.controller.admin_user:
-            return
-
-        roles = [controller_site_privilege.site_privilege.role.role]
-        # setup user home site roles at controller
-        if not controller_site_privilege.site_privilege.user.site:
-            raise Exception(
-                "Siteless user %s" % controller_site_privilege.site_privilege.user.email
-            )
-        else:
-            # look up tenant id for the user's site at the controller
-            # ctrl_site_deployments = SiteDeployment.objects.filter(
-            #  site_deployment__site=controller_site_privilege.user.site,
-            #  controller=controller_site_privilege.controller)
-
-            # if ctrl_site_deployments:
-            #    # need the correct tenant id for site at the controller
-            #    tenant_id = ctrl_site_deployments[0].tenant_id
-            #    tenant_name = ctrl_site_deployments[0].site_deployment.site.login_base
-            user_fields = {
-                "endpoint": controller_site_privilege.controller.auth_url,
-                "endpoint_v3": controller_site_privilege.controller.auth_url_v3,
-                "domain": controller_site_privilege.controller.domain,
-                "name": controller_site_privilege.site_privilege.user.email,
-                "email": controller_site_privilege.site_privilege.user.email,
-                "password": controller_site_privilege.site_privilege.user.remote_password,
-                "admin_user": controller_site_privilege.controller.admin_user,
-                "admin_password": controller_site_privilege.controller.admin_password,
-                "ansible_tag": "%s@%s"
-                % (
-                    controller_site_privilege.site_privilege.user.email.replace(
-                        "@", "-at-"
-                    ),
-                    controller_site_privilege.controller.name,
-                ),
-                "admin_tenant": controller_site_privilege.controller.admin_tenant,
-                "roles": roles,
-                "tenant": controller_site_privilege.site_privilege.site.login_base,
-            }
-
-            return user_fields
-
-    def map_sync_outputs(self, controller_site_privilege, res):
-        # results is an array in which each element corresponds to an
-        # "ok" string received per operation. If we get as many oks as
-        # the number of operations we issued, that means a grand success.
-        # Otherwise, the number of oks tell us which operation failed.
-        controller_site_privilege.role_id = res[0]["id"]
-        controller_site_privilege.save()
-
-    def delete_record(self, controller_site_privilege):
-        controller_register = json.loads(
-            controller_site_privilege.controller.backend_register
-        )
-        if controller_register.get("disabled", False):
-            raise InnocuousException(
-                "Controller %s is disabled" % controller_site_privilege.controller.name
-            )
-
-        if controller_site_privilege.role_id:
-            driver = self.driver.admin_driver(
-                controller=controller_site_privilege.controller
-            )
-            user = ControllerUser.objects.get(
-                controller=controller_site_privilege.controller,
-                user=controller_site_privilege.site_privilege.user,
-            )
-            site = ControllerSite.objects.get(
-                controller=controller_site_privilege.controller,
-                user=controller_site_privilege.site_privilege.user,
-            )
-            driver.delete_user_role(
-                user.kuser_id,
-                site.tenant_id,
-                controller_site_privilege.site_prvilege.role.role,
-            )
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_sites.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_sites.py
deleted file mode 100644
index 24aa76f..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_sites.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-import json
-from xossynchronizer.steps.syncstep import SyncStep
-
-class SyncControllerSites(SyncStep):
-    requested_interval = 0
-    observes = "ControllerSite"
-    playbook = "sync_controller_sites.yaml"
-
-    def fetch_pending(self, deleted=False):
-        lobjs = super(SyncControllerSites, self).fetch_pending(deleted)
-
-        if not deleted:
-            # filter out objects with null controllers
-            lobjs = [x for x in lobjs if x.controller]
-
-        return lobjs
-
-    def map_sync_inputs(self, controller_site):
-        tenant_fields = {
-            "endpoint": controller_site.controller.auth_url,
-            "endpoint_v3": controller_site.controller.auth_url_v3,
-            "domain": controller_site.controller.domain,
-            "admin_user": controller_site.controller.admin_user,
-            "admin_password": controller_site.controller.admin_password,
-            "admin_tenant": controller_site.controller.admin_tenant,
-            # name of ansible playbook
-            "ansible_tag": "%s@%s"
-            % (controller_site.site.login_base, controller_site.controller.name),
-            "tenant": controller_site.site.login_base,
-            "tenant_description": controller_site.site.name,
-        }
-        return tenant_fields
-
-    def map_sync_outputs(self, controller_site, res):
-        controller_site.tenant_id = res[0]["id"]
-        controller_site.backend_status = "1 - OK"
-        controller_site.save()
-
-    def delete_record(self, controller_site):
-        controller_register = json.loads(controller_site.controller.backend_register)
-        if controller_register.get("disabled", False):
-            raise InnocuousException(
-                "Controller %s is disabled" % controller_site.controller.name
-            )
-
-        if controller_site.tenant_id:
-            driver = self.driver.admin_driver(controller=controller_site.controller)
-            driver.delete_tenant(controller_site.tenant_id)
-
-        """
-        Ansible does not support tenant deletion yet
-
-        import pdb
-        pdb.set_trace()
-        template = os_template_env.get_template('delete_controller_sites.yaml')
-        tenant_fields = {'endpoint':controller_site.controller.auth_url,
-                         'admin_user': controller_site.controller.admin_user,
-                         'admin_password': controller_site.controller.admin_password,
-                         'admin_tenant': 'admin',
-                         'ansible_tag': 'controller_sites/%s@%s'%(controller_site.controller_site.site.login_base,controller_site.controller_site.deployment.name), # name of ansible playbook
-                         'tenant': controller_site.controller_site.site.login_base,
-                         'delete': True}
-
-        rendered = template.render(tenant_fields)
-        res = run_template('sync_controller_sites.yaml', tenant_fields)
-
-        if (len(res)!=1):
-                raise Exception('Could not assign roles for user %s'%tenant_fields['tenant'])
-        """
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slice_privileges.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slice_privileges.py
deleted file mode 100644
index 09b63e6..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slice_privileges.py
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-import json
-from xossynchronizer.steps.syncstep import SyncStep
-
-class SyncControllerSlicePrivileges(SyncStep):
-    requested_interval = 0
-    observes = "ControllerSlicePrivilege"
-    playbook = "sync_controller_users.yaml"
-
-    def map_sync_inputs(self, controller_slice_privilege):
-        if not controller_slice_privilege.controller.admin_user:
-            return
-
-        template = os_template_env.get_template("sync_controller_users.yaml")
-        roles = [controller_slice_privilege.slice_privilege.role.role]
-        # setup user home slice roles at controller
-        if not controller_slice_privilege.slice_privilege.user.site:
-            raise Exception(
-                "Sliceless user %s"
-                % controller_slice_privilege.slice_privilege.user.email
-            )
-        else:
-            user_fields = {
-                "endpoint": controller_slice_privilege.controller.auth_url,
-                "endpoint_v3": controller_slice_privilege.controller.auth_url_v3,
-                "domain": controller_slice_privilege.controller.domain,
-                "name": controller_slice_privilege.slice_privilege.user.email,
-                "email": controller_slice_privilege.slice_privilege.user.email,
-                "password": controller_slice_privilege.slice_privilege.user.remote_password,
-                "admin_user": controller_slice_privilege.controller.admin_user,
-                "admin_password": controller_slice_privilege.controller.admin_password,
-                "ansible_tag": "%s@%s@%s"
-                % (
-                    controller_slice_privilege.slice_privilege.user.email.replace(
-                        "@", "-at-"
-                    ),
-                    controller_slice_privilege.slice_privilege.slice.name,
-                    controller_slice_privilege.controller.name,
-                ),
-                "admin_tenant": controller_slice_privilege.controller.admin_tenant,
-                "roles": roles,
-                "tenant": controller_slice_privilege.slice_privilege.slice.name,
-            }
-            return user_fields
-
-    def map_sync_outputs(self, controller_slice_privilege, res):
-        controller_slice_privilege.role_id = res[0]["id"]
-        controller_slice_privilege.save()
-
-    def delete_record(self, controller_slice_privilege):
-        controller_register = json.loads(
-            controller_slice_privilege.controller.backend_register
-        )
-        if controller_register.get("disabled", False):
-            raise InnocuousException(
-                "Controller %s is disabled" % controller_slice_privilege.controller.name
-            )
-
-        if controller_slice_privilege.role_id:
-            driver = self.driver.admin_driver(
-                controller=controller_slice_privilege.controller
-            )
-            user = ControllerUser.objects.filter(
-                controller_id=controller_slice_privilege.controller.id,
-                user_id=controller_slice_privilege.slice_privilege.user.id,
-            )
-            user = user[0]
-            slice = ControllerSlice.objects.filter(
-                controller_id=controller_slice_privilege.controller.id,
-                user_id=controller_slice_privilege.slice_privilege.user.id,
-            )
-            slice = slice[0]
-            driver.delete_user_role(
-                user.kuser_id,
-                slice.tenant_id,
-                controller_slice_privilege.slice_prvilege.role.role,
-            )
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slices.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slices.py
deleted file mode 100644
index 31c62f1..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_slices.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-from xossynchronizer.steps.syncstep import DeferredException
-from xossynchronizer.steps.ansiblesyncstep import AnsibleSyncStep
-
-class SyncControllerSlices(AnsibleSyncStep):
-    requested_interval = 0
-    observes = "ControllerSlice"
-    playbook = "sync_controller_slices.yaml"
-
-    def map_sync_inputs(self, controller_slice):
-        if getattr(controller_slice, "force_fail", None):
-            raise Exception("Forced failure")
-        elif getattr(controller_slice, "force_defer", None):
-            raise DeferredException("Forced defer")
-
-        tenant_fields = {"endpoint": "endpoint", "name": "Flagrant Haircut"}
-
-        return tenant_fields
-
-    def map_sync_outputs(self, controller_slice, res):
-        controller_slice.save()
-
-    def map_delete_inputs(self, controller_slice):
-        tenant_fields = {
-            "endpoint": "endpoint",
-            "name": "Conscientious Plastic",
-            "delete": True,
-        }
-        return tenant_fields
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_users.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_users.py
deleted file mode 100644
index a039257..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_controller_users.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-from xossynchronizer.steps.syncstep import SyncStep
-
-
-class SyncControllerUsers(SyncStep):
-    requested_interval = 0
-    observes = "ControllerUser"
-    playbook = "sync_controller_users.yaml"
-
-    def map_sync_inputs(self, controller_user):
-        if not controller_user.controller.admin_user:
-            return
-
-        # All users will have at least the 'user' role at their home site/tenant.
-        # We must also check if the user should have the admin role
-
-        roles = ["user"]
-        if controller_user.user.is_admin:
-            driver = self.driver.admin_driver(controller=controller_user.controller)
-            roles.append(driver.get_admin_role().name)
-
-        # setup user home site roles at controller
-        if not controller_user.user.site:
-            raise Exception("Siteless user %s" % controller_user.user.email)
-        else:
-            user_fields = {
-                "endpoint": controller_user.controller.auth_url,
-                "endpoint_v3": controller_user.controller.auth_url_v3,
-                "domain": controller_user.controller.domain,
-                "name": controller_user.user.email,
-                "email": controller_user.user.email,
-                "password": controller_user.user.remote_password,
-                "admin_user": controller_user.controller.admin_user,
-                "admin_password": controller_user.controller.admin_password,
-                "ansible_tag": "%s@%s"
-                % (
-                    controller_user.user.email.replace("@", "-at-"),
-                    controller_user.controller.name,
-                ),
-                "admin_project": controller_user.controller.admin_tenant,
-                "roles": roles,
-                "project": controller_user.user.site.login_base,
-            }
-            return user_fields
-
-    def map_sync_outputs(self, controller_user, res):
-        controller_user.kuser_id = res[0]["user"]["id"]
-        controller_user.backend_status = "1 - OK"
-        controller_user.save()
-
-    def delete_record(self, controller_user):
-        if controller_user.kuser_id:
-            driver = self.driver.admin_driver(controller=controller_user.controller)
-            driver.delete_user(controller_user.kuser_id)
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_instances.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_instances.py
deleted file mode 100644
index 1a70884..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_instances.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-from xossynchronizer.steps import ansiblesyncstep
-
-
-def escape(s):
-    s = s.replace("\n", r"\n").replace('"', r"\"")
-    return s
-
-
-class SyncInstances(ansiblesyncstep.AnsibleSyncStep):
-    requested_interval = 0
-    # This observes is intentionally a list of one string, to test steps where observes is a list of strings.
-    observes = ["Instance"]
-    playbook = "sync_instances.yaml"
-
-    def fetch_pending(self, deletion=False):
-        objs = super(SyncInstances, self).fetch_pending(deletion)
-        objs = [x for x in objs if x.isolation == "vm"]
-        return objs
-
-    def map_sync_inputs(self, instance):
-        inputs = {}
-        metadata_update = {}
-
-        fields = {"name": instance.name, "delete": False}
-        return fields
-
-    def map_sync_outputs(self, instance, res):
-        instance.save()
-
-    def map_delete_inputs(self, instance):
-        input = {
-            "endpoint": "endpoint",
-            "admin_user": "admin_user",
-            "admin_password": "admin_password",
-            "project_name": "project_name",
-            "tenant": "tenant",
-            "tenant_description": "tenant_description",
-            "name": instance.name,
-            "ansible_tag": "ansible_tag",
-            "delete": True,
-        }
-
-        return input
diff --git a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_roles.py b/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_roles.py
deleted file mode 100644
index 1bd2d0f..0000000
--- a/lib/xos-synchronizer/xos-synchronizer-tests/test_steps/sync_roles.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2017-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
-import os
-import base64
-from xossynchronizer.steps.syncstep import SyncStep
-from mock_modelaccessor import *
-
-
-class SyncRoles(SyncStep):
-    requested_interval = 0
-
-    # This observes is intentionally a list of three classes, to test steps where observes is a list of classes.
-    observes = [SiteRole, SliceRole, ControllerRole]
-
-    def sync_record(self, role):
-        if not role.enacted:
-            controllers = Controller.objects.all()
-            for controller in controllers:
-                driver = self.driver.admin_driver(controller=controller)
-                driver.create_role(role.role)
-            role.save()
diff --git a/lib/xos-synchronizer/xossynchronizer/model_policies/model_policy_tenantwithcontainer.py b/lib/xos-synchronizer/xossynchronizer/model_policies/model_policy_tenantwithcontainer.py
index 66ac348..3db1395 100644
--- a/lib/xos-synchronizer/xossynchronizer/model_policies/model_policy_tenantwithcontainer.py
+++ b/lib/xos-synchronizer/xossynchronizer/model_policies/model_policy_tenantwithcontainer.py
@@ -292,7 +292,6 @@
                 assert node is not None
                 assert desired_image is not None
                 assert tenant.creator is not None
-                assert node.site_deployment.deployment is not None
                 assert flavor is not None
 
                 try:
@@ -301,7 +300,6 @@
                         node=node,
                         image=desired_image,
                         creator=tenant.creator,
-                        deployment=node.site_deployment.deployment,
                         flavor=flavor,
                         isolation=slice.default_isolation,
                         parent=parent,
diff --git a/lib/xos-synchronizer/xossynchronizer/synchronizer.py b/lib/xos-synchronizer/xossynchronizer/synchronizer.py
index 30d3ca0..f204785 100644
--- a/lib/xos-synchronizer/xossynchronizer/synchronizer.py
+++ b/lib/xos-synchronizer/xossynchronizer/synchronizer.py
@@ -33,8 +33,7 @@
         wait = False
         while not models_active:
             try:
-                _i = self.model_accessor.Instance.objects.first()
-                _n = self.model_accessor.NetworkTemplate.objects.first()
+                _i = self.model_accessor.Site.objects.first()
                 models_active = True
             except Exception as e:
                 self.log.info("Exception", e=e)
