Set backend status when saving backend version of object
Sapan Bhatia [Tue, 27 Jan 2015 03:52:43 +0000 (03:52 +0000)]
planetstack/openstack_observer/steps/sync_controller_images.py
planetstack/openstack_observer/steps/sync_controller_networks.py
planetstack/openstack_observer/steps/sync_controller_sites.py
planetstack/openstack_observer/steps/sync_controller_slices.py
planetstack/openstack_observer/steps/sync_controller_users.py

index 00f2a7d..fa0cad1 100644 (file)
@@ -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()
index f87a58d..1071ef7 100644 (file)
@@ -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()
 
 
index 2a34437..2dc13da 100644 (file)
@@ -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):
index 5440ac9..9e47669 100644 (file)
@@ -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()
 
 
index d97e647..d7d79f7 100644 (file)
@@ -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):