From 267606314830fbc5deb9e28dc0d47e8cbf8d68b1 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 27 Jan 2015 03:52:43 +0000 Subject: [PATCH] Set backend status when saving backend version of object --- planetstack/openstack_observer/steps/sync_controller_images.py | 1 + planetstack/openstack_observer/steps/sync_controller_networks.py | 1 + planetstack/openstack_observer/steps/sync_controller_sites.py | 1 + planetstack/openstack_observer/steps/sync_controller_slices.py | 1 + planetstack/openstack_observer/steps/sync_controller_users.py | 1 + 5 files changed, 5 insertions(+) diff --git a/planetstack/openstack_observer/steps/sync_controller_images.py b/planetstack/openstack_observer/steps/sync_controller_images.py index 00f2a7d..fa0cad1 100644 --- a/planetstack/openstack_observer/steps/sync_controller_images.py +++ b/planetstack/openstack_observer/steps/sync_controller_images.py @@ -37,4 +37,5 @@ class SyncControllerImages(OpenStackSyncStep): image_id = res[0]['id'] controller_image.glance_image_id = image_id + controller_image.backend_status = '1 - OK' controller_image.save() diff --git a/planetstack/openstack_observer/steps/sync_controller_networks.py b/planetstack/openstack_observer/steps/sync_controller_networks.py index f87a58d..1071ef7 100644 --- a/planetstack/openstack_observer/steps/sync_controller_networks.py +++ b/planetstack/openstack_observer/steps/sync_controller_networks.py @@ -59,6 +59,7 @@ class SyncControllerNetworks(OpenStackSyncStep): controller_network.net_id = network_id controller_network.subnet = cidr controller_network.subnet_id = subnet_id + controller_network.backend_status = '1 - OK' controller_network.save() diff --git a/planetstack/openstack_observer/steps/sync_controller_sites.py b/planetstack/openstack_observer/steps/sync_controller_sites.py index 2a34437..2dc13da 100644 --- a/planetstack/openstack_observer/steps/sync_controller_sites.py +++ b/planetstack/openstack_observer/steps/sync_controller_sites.py @@ -29,6 +29,7 @@ class SyncControllerSites(OpenStackSyncStep): res = run_template('sync_controller_sites.yaml', tenant_fields, path='controller_sites', expected_num=1) controller_site.tenant_id = res[0]['id'] + controller_site.backend_status = '1 - OK' controller_site.save() def delete_record(self, controller_site): diff --git a/planetstack/openstack_observer/steps/sync_controller_slices.py b/planetstack/openstack_observer/steps/sync_controller_slices.py index 5440ac9..9e47669 100644 --- a/planetstack/openstack_observer/steps/sync_controller_slices.py +++ b/planetstack/openstack_observer/steps/sync_controller_slices.py @@ -62,6 +62,7 @@ class SyncControllerSlices(OpenStackSyncStep): 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.save() diff --git a/planetstack/openstack_observer/steps/sync_controller_users.py b/planetstack/openstack_observer/steps/sync_controller_users.py index d97e647..d7d79f7 100644 --- a/planetstack/openstack_observer/steps/sync_controller_users.py +++ b/planetstack/openstack_observer/steps/sync_controller_users.py @@ -70,6 +70,7 @@ class SyncControllerUsers(OpenStackSyncStep): res = run_template('sync_controller_users.yaml', user_fields,path='controller_users', expected_num=expected_length) controller_user.kuser_id = res[0]['id'] + controller_user.backend_status = '1 - OK' controller_user.save() def delete_record(self, controller_user): -- 2.43.0