Refactored teh sync_volume_slice step with new style of deletion
authorSapan Bhatia <gwsapan@gmail.com>
Wed, 23 Jul 2014 14:51:16 +0000 (10:51 -0400)
committerSapan Bhatia <gwsapan@gmail.com>
Wed, 23 Jul 2014 14:51:16 +0000 (10:51 -0400)
planetstack/syndicate_observer/steps/sync_volumeslice.py

index 8941b97..0fc6d4d 100644 (file)
@@ -48,9 +48,6 @@ class SyncVolumeSlice(SyncStep):
     def __init__(self, **args):
         SyncStep.__init__(self, **args)
 
-    def fetch_pending(self):
-        return VolumeSlice.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
-
     def sync_record(self, vs):
         
         logger.info("Sync VolumeSlice for (%s, %s)" % (vs.volume_id.name, vs.slice_id.name))
@@ -132,6 +129,10 @@ class SyncVolumeSlice(SyncStep):
             raise e
         
         return True
+    
+    # This method will simply cause the object to be purged from OpenCloud
+    def delete_record(self, volume_slice):
+        pass
 
 
 if __name__ == "__main__":