]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Cleanup orphaned code from ceph backup driver
authorSean McGinnis <sean_mcginnis@dell.com>
Fri, 27 Nov 2015 05:25:31 +0000 (23:25 -0600)
committerSean McGinnis <sean_mcginnis@dell.com>
Fri, 27 Nov 2015 05:25:31 +0000 (23:25 -0600)
The method _num_backup_snaps was not being called anywhere in the source.
This removes the unused call from the driver.

Change-Id: Ib094edff6c26a21177405a988f132c3c6c8c9646

cinder/backup/drivers/ceph.py

index 26d6f7c1a9be07914a3a2577c431cd6a9f025a51..6ff94950c4c851f3201e83d8999b054cf5172f82 100644 (file)
@@ -980,21 +980,6 @@ class CephBackupDriver(driver.BackupDriver):
         LOG.debug("Restore transfer completed in %.4fs",
                   (time.time() - before))
 
-    def _num_backup_snaps(self, backup_base_name):
-        """Return the number of snapshots that exist on the base image."""
-        with rbd_driver.RADOSClient(self, self._ceph_backup_pool) as client:
-            base_rbd = self.rbd.Image(client.ioctx, backup_base_name,
-                                      read_only=True)
-            try:
-                snaps = self.get_backup_snaps(base_rbd)
-            finally:
-                base_rbd.close()
-
-        if snaps:
-            return len(snaps)
-        else:
-            return 0
-
     def _get_restore_point(self, base_name, backup_id):
         """Get restore point snapshot name for incremental backup.