CORD-1677: Update OpenStack synchronizer to match synchronizer core refactoring

Change-Id: I515c8b10f3649507b8b9cf08f3cb166ca12c6240
diff --git a/xos/synchronizer/model-deps b/xos/synchronizer/model-deps
index 59bbe25..e78c641 100644
--- a/xos/synchronizer/model-deps
+++ b/xos/synchronizer/model-deps
@@ -1,117 +1,290 @@
-{
-    "Slice": [
-        "Site", 
-        "User"
-    ], 
-    "ImageDeployments": [
-        "Image", 
-        "Deployment"
-    ], 
-    "ControllerImages": [
-        "Image"
-    ], 
-    "ReservedResource": [
-        "Instance"
-    ], 
-    "ControllerNetwork": [
-        "Network", 
-        "Controller"
-    ], 
-    "NetworkSlice": [
-        "Network", 
-        "Slice"
-    ], 
-    "Charge": [
-        "Account", 
-        "Slice", 
-        "Invoice"
-    ], 
-    "ControllerSite": [
-        "Site", 
-        "Controller"
-    ], 
-    "Node": [
-        "Site"
-    ], 
-    "ControllerSlice": [
-        "Controller", 
-        "Slice"
-    ], 
-    "ControllerSitePrivilege": [
-        "Controller"
-    ], 
-    "ControllerUser": [
-        "User", 
-        "Controller"
-    ], 
-    "UserCredential": [
-        "User"
-    ], 
-    "UserDashboardView": [
-        "User", 
-        "DashboardView"
-    ], 
-    "Controller": [
-        "Deployment"
-    ], 
-    "User": [
-        "Site"
-    ], 
-    "SliceTag": [
-        "Slice"
-    ], 
-    "Reservation": [
-        "Slice"
-    ], 
-    "Instance": [
-        "Image", 
-        "User", 
-        "Slice"
-    ], 
-    "Payment": [
-        "Account"
-    ], 
-    "Account": [
-        "Site"
-    ], 
-    "ControllerSlicePrivilege": [
-        "Controller"
-    ], 
-    "SiteDeployment": [
-        "Site", 
-        "Deployment", 
-        "Controller"
-    ], 
-    "SlicePrivilege": [
-        "User", 
-        "Slice", 
-        "Role"
-    ], 
-    "Port": [
-        "Network", 
-        "Instance"
-    ], 
-    "SitePrivilege": [
-        "User", 
-        "Site", 
-        "Role"
-    ], 
-    "SiteCredential": [
-        "Site"
-    ], 
-    "DeploymentPrivilege": [
-        "User", 
-        "Deployment", 
-        "Role"
-    ], 
-    "ControllerDashboardView": [
-        "Controller", 
-        "DashboardView"
-    ], 
-    "Invoice": [
-        "Account"
-    ], 
-    "SliceCredential": [
-        "Slice"
+{ "XOSBase": [
+        
+    ], "User": [
+        ["ControllerSite", "site", "site"],
+        
+        ["Site", "site", ""],
+        ["ControllerDashboardView", "dashboards", "dashboard_view"],
+        
+        ["DashboardView", "dashboards", ""]
+        
+    ], "Privilege": [
+        
+    ], "AddressPool": [
+        
+        ["Service", "service", ""]
+        
+    ], "ControllerDashboardView": [
+        
+        ["ControllerDashboardView", "dashboardView", "dashboard_view"],
+        
+        ["DashboardView", "dashboardView", ""]
+        
+    ], "ControllerImages": [
+        
+        ["Image", "image", ""]
+        
+    ], "ControllerNetwork": [
+        ["ControllerNetwork", "network", "network"],
+        
+        ["Network", "network", ""]
+    ], "ControllerRole": [
+        
+    ], "ControllerSite": [
+        ["ControllerSite", "site", "site"],
+        
+        ["Site", "site", ""]
+        
+    ], "ControllerPrivilege": [
+        
+        ["ControllerPrivilege", "privilege", "privilege"],
+        
+        ["Privilege", "privilege", ""]
+        
+    ], "ControllerSitePrivilege": [
+        
+        ["ControllerSitePrivilege", "site_privilege", "site_privilege"],
+        
+        ["SitePrivilege", "site_privilege", ""]
+        
+    ], "ControllerSlice": [
+        
+        ["ControllerSlice", "slice", "slice"],
+        
+        ["Slice", "slice", ""]
+        
+    ], "ControllerSlicePrivilege": [
+        
+        ["ControllerSlicePrivilege", "slice_privilege", "slice_privilege"],
+        
+        ["SlicePrivilege", "slice_privilege", ""]
+        
+    ], "ControllerUser": [
+        ["ControllerUser", "user", "user"],
+        
+        ["User", "user", ""]
+        
+        
+    ], "DashboardView": [
+        
+        
+        ["Deployment", "deployments", ""]
+        
+    ], "Deployment": [
+        
+    ], "DeploymentPrivilege": [
+        ["ControllerUser", "user", "user"],
+        
+        ["User", "user", ""],
+        
+        ["Deployment", "deployment", ""],
+        
+        ["DeploymentRole", "role", ""]
+        
+    ], "DeploymentRole": [
+        
+    ], "Diag": [
+        
+    ], "Flavor": [
+        
+    ], "Image": [
+        
+    ], "ImageDeployments": [
+        
+        ["Image", "image", ""],
+        
+        ["Deployment", "deployment", ""]
+        
+    ], "Instance": [
+        
+        ["Image", "image", ""],
+        ["ControllerUser", "creator", "user"],
+        
+        ["User", "creator", ""],
+        ["ControllerSlice", "slice", "slice"],
+        
+        ["Slice", "slice", ""],
+        
+        ["Deployment", "deployment", ""],
+        
+        ["Node", "node", ""],
+        
+        ["Flavor", "flavor", ""],
+        
+        ["Instance", "parent", ""]
+        
+    ], "Network": [
+        
+        ["NetworkTemplate", "template", ""],
+        ["ControllerSlice", "owner", "slice"],
+        
+        ["Slice", "owner", ""],
+        ["ControllerSlice", "permitted_slices", "slice"],
+        
+        ["Slice", "permitted_slices", ""],
+        ["ControllerSlice", "slices", "slice"],
+        
+        ["Slice", "slices", ""],
+        
+        ["Instance", "instances", ""]
+        
+    ], "NetworkParameter": [
+        
+        ["NetworkParameterType", "parameter", ""]
+        
+    ], "NetworkParameterType": [
+        
+    ], "NetworkSlice": [
+        ["ControllerNetwork", "network", "network"],
+        
+        ["Network", "network", ""],
+        ["ControllerSlice", "slice", "slice"],
+        
+        ["Slice", "slice", ""]
+        
+    ], "NetworkTemplate": [
+        
+    ], "Node": [
+        
+        ["SiteDeployment", "site_deployment", ""]
+        
+    ], "NodeLabel": [
+        
+        ["Node", "node", ""]
+        
+    ], "Port": [
+        ["ControllerNetwork", "network", "network"],
+        
+        ["Network", "network", ""],
+        
+        ["Instance", "instance", ""]
+        
+    ], "Role": [
+        
+    ], "Service": [
+        
+    ], "ServiceAttribute": [
+        
+        ["Service", "service", ""]
+        
+    ], "ServiceDependency": [
+        
+        ["Service", "provider_service", ""],
+        
+        ["Service", "subscriber_service", ""]
+        
+    ], "ServiceMonitoringAgentInfo": [
+        
+        ["Service", "service", ""]
+        
+    ], "ServicePrivilege": [
+        ["ControllerUser", "user", "user"],
+        
+        ["User", "user", ""],
+        
+        ["Service", "service", ""],
+        
+        ["ServiceRole", "role", ""]
+        
+    ], "ServiceRole": [
+        
+    ], "Site": [
+        
+        ["Deployment", "deployments", ""]
+        
+    ], "SiteDeployment": [
+        ["ControllerSite", "site", "site"],
+        
+        ["Site", "site", ""],
+        
+        ["Deployment", "deployment", ""]
+        
+        
+    ], "SitePrivilege": [
+        ["ControllerUser", "user", "user"],
+        
+        ["User", "user", ""],
+        ["ControllerSite", "site", "site"],
+        
+        ["Site", "site", ""],
+        
+        ["SiteRole", "role", ""]
+        
+    ], "SiteRole": [
+        
+    ], "Slice": [
+        ["ControllerSite", "site", "site"],
+        
+        ["Site", "site", ""],
+        
+        ["Service", "service", ""],
+        ["ControllerUser", "creator", "user"],
+        
+        ["User", "creator", ""],
+        
+        ["Flavor", "default_flavor", ""],
+        
+        ["Image", "default_image", ""],
+        
+        ["Node", "default_node", ""]
+        
+    ], "SlicePrivilege": [
+        ["ControllerUser", "user", "user"],
+        
+        ["User", "user", ""],
+        ["ControllerSlice", "slice", "slice"],
+        
+        ["Slice", "slice", ""],
+        
+        ["SliceRole", "role", ""]
+        
+    ], "SliceRole": [
+        
+    ], "Tag": [
+        
+        ["Service", "service", ""]
+        
+    ], "InterfaceType": [
+        
+    ], "ServiceInterface": [
+        
+        ["Service", "service", ""],
+        
+        ["InterfaceType", "interface_type", ""]
+        
+    ], "ServiceInstance": [
+        
+        ["Service", "owner", ""]
+        
+    ], "ServiceInstanceLink": [
+        
+        ["ServiceInstance", "provider_service_instance", ""],
+        
+        ["ServiceInterface", "provider_service_interface", ""],
+        
+        ["ServiceInstance", "subscriber_service_instance", ""],
+        
+        ["Service", "subscriber_service", ""],
+        ["ControllerNetwork", "subscriber_network", "network"],
+        
+        ["Network", "subscriber_network", ""]
+        
+    ], "ServiceInstanceAttribute": [
+        
+        ["ServiceInstance", "service_instance", ""]
+        
+    ], "TenantWithContainer": [
+        
+        ["Service", "owner", ""],
+        
+        ["Instance", "instance", ""],
+        ["ControllerUser", "creator", "user"],
+        
+        ["User", "creator", ""]
+        
+    ], "XOS": [
+        
+    ], "XOSGuiExtension": [
+        
     ]
 }
diff --git a/xos/synchronizer/model_policies/model_policy_ControllerSite.py b/xos/synchronizer/model_policies/model_policy_ControllerSite.py
index 5037474..9f16a32 100644
--- a/xos/synchronizer/model_policies/model_policy_ControllerSite.py
+++ b/xos/synchronizer/model_policies/model_policy_ControllerSite.py
@@ -24,9 +24,9 @@
         return self.handle_update(controller_site)
 
     def handle_update(self, controller_site):
-        my_status_code = int(controller_site.backend_status[0])
+        my_status_code = int(controller_site.backend_code)
         try:
-            his_status_code = int(controller_site.site.backend_status[0])
+            his_status_code = int(controller_site.backend_code)
         except:
             his_status_code = 0
 
diff --git a/xos/synchronizer/model_policies/model_policy_ControllerSlice.py b/xos/synchronizer/model_policies/model_policy_ControllerSlice.py
index 125bb7d..4890459 100644
--- a/xos/synchronizer/model_policies/model_policy_ControllerSlice.py
+++ b/xos/synchronizer/model_policies/model_policy_ControllerSlice.py
@@ -24,9 +24,9 @@
         return self.handle_update(controller_slice)
 
     def handle_update(self, controller_slice):
-        my_status_code = int(controller_slice.backend_status[0])
+        my_status_code = int(controller_slice.backend_code)
         try:
-            his_status_code = int(controller_slice.slice.backend_status[0])
+            his_status_code = int(controller_slice.slice.backend_code)
         except:
             his_status_code = 0
  
diff --git a/xos/synchronizer/model_policies/model_policy_ControllerUser.py b/xos/synchronizer/model_policies/model_policy_ControllerUser.py
index e6440c8..83a3886 100644
--- a/xos/synchronizer/model_policies/model_policy_ControllerUser.py
+++ b/xos/synchronizer/model_policies/model_policy_ControllerUser.py
@@ -24,9 +24,9 @@
         return self.handle_update(controller_user)
 
     def handle_update(self, controller_user):
-        my_status_code = int(controller_user.backend_status[0])
+        my_status_code = int(controller_user.backend_code)
         try:
-            his_status_code = int(controller_user.user.backend_status[0])
+            his_status_code = int(controller_user.user.backend_code)
         except:
             his_status_code = 0
  
diff --git a/xos/synchronizer/openstack_config.yaml b/xos/synchronizer/openstack_config.yaml
index e25a437..00d2c1a 100644
--- a/xos/synchronizer/openstack_config.yaml
+++ b/xos/synchronizer/openstack_config.yaml
@@ -37,4 +37,4 @@
   - Role
 nova:
   ca_ssl_cert: "/etc/ssl/certs/ca-certificates.crt"
-  enabled: True
\ No newline at end of file
+  enabled: True