Update backend messages to match new scheme (backend_status and
backend_code instead of backend_status alone)
Change-Id: Idb8b6e1f6b4f993e262491238e98018b4f603399
diff --git a/xos/synchronizer/steps/sync_controller_images.py b/xos/synchronizer/steps/sync_controller_images.py
index 6837d7a..798e198 100644
--- a/xos/synchronizer/steps/sync_controller_images.py
+++ b/xos/synchronizer/steps/sync_controller_images.py
@@ -50,5 +50,6 @@
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.backend_status = 'OK'
+ controller_image.backend_code = 1
controller_image.save()
diff --git a/xos/synchronizer/steps/sync_controller_networks.py b/xos/synchronizer/steps/sync_controller_networks.py
index 64601cf..8f8f358 100644
--- a/xos/synchronizer/steps/sync_controller_networks.py
+++ b/xos/synchronizer/steps/sync_controller_networks.py
@@ -114,7 +114,8 @@
controller_network.net_id = network_id
controller_network.subnet = self.cidr
controller_network.subnet_id = subnet_id
- controller_network.backend_status = '1 - OK'
+ controller_network.backend_status = 'OK'
+ controller_network.backend_code = 1
if not controller_network.segmentation_id:
controller_network.segmentation_id = str(self.get_segmentation_id(controller_network))
controller_network.save()
diff --git a/xos/synchronizer/steps/sync_controller_sites.py b/xos/synchronizer/steps/sync_controller_sites.py
index 257ae76..f12f477 100644
--- a/xos/synchronizer/steps/sync_controller_sites.py
+++ b/xos/synchronizer/steps/sync_controller_sites.py
@@ -52,7 +52,8 @@
def map_sync_outputs(self, controller_site, res):
controller_site.tenant_id = res[0]['project']['id']
- controller_site.backend_status = '1 - OK'
+ controller_site.backend_status = 'OK'
+ controller_site.backend_code = 1
controller_site.save()
def delete_record(self, controller_site):
diff --git a/xos/synchronizer/steps/sync_controller_slices.py b/xos/synchronizer/steps/sync_controller_slices.py
index a4cfd40..663ded8 100644
--- a/xos/synchronizer/steps/sync_controller_slices.py
+++ b/xos/synchronizer/steps/sync_controller_slices.py
@@ -71,7 +71,8 @@
raise Exception('Could not update quota for %s'%controller_slice.slice.name)
controller_slice.tenant_id = tenant_id
- controller_slice.backend_status = '1 - OK'
+ controller_slice.backend_status = 'OK'
+ controller_slice.backend_code = 1
controller_slice.save()
diff --git a/xos/synchronizer/steps/sync_controller_users.py b/xos/synchronizer/steps/sync_controller_users.py
index 1892b0b..72f67da 100644
--- a/xos/synchronizer/steps/sync_controller_users.py
+++ b/xos/synchronizer/steps/sync_controller_users.py
@@ -63,7 +63,8 @@
def map_sync_outputs(self, controller_user, res):
controller_user.kuser_id = res[0]['user']['id']
- controller_user.backend_status = '1 - OK'
+ controller_user.backend_status = 'OK'
+ controller_user.backend_code = 1
controller_user.save()
def delete_record(self, controller_user):