diff --git a/cinder/backup/drivers/ceph.py b/cinder/backup/drivers/ceph.py index 020150acea4..305590b89c6 100644 --- a/cinder/backup/drivers/ceph.py +++ b/cinder/backup/drivers/ceph.py @@ -1290,7 +1290,3 @@ class CephBackupDriver(driver.BackupDriver): LOG.debug("Delete of backup '%(backup)s' for volume " "'%(volume)s' finished.", {'backup': backup.id, 'volume': backup.volume_id}) - - -def get_backup_driver(context): - return CephBackupDriver(context) diff --git a/cinder/backup/drivers/gcs.py b/cinder/backup/drivers/gcs.py index 2831cb31c24..11a86f9f230 100644 --- a/cinder/backup/drivers/gcs.py +++ b/cinder/backup/drivers/gcs.py @@ -394,7 +394,3 @@ class GoogleMediaIoBaseDownload(http.MediaIoBaseDownload): else: raise http.HttpError(resp, content, uri=self._uri) - - -def get_backup_driver(context): - return GoogleBackupDriver(context) diff --git a/cinder/backup/drivers/glusterfs.py b/cinder/backup/drivers/glusterfs.py index 0260fbfd2d0..36420a7595d 100644 --- a/cinder/backup/drivers/glusterfs.py +++ b/cinder/backup/drivers/glusterfs.py @@ -93,7 +93,3 @@ class GlusterfsBackupDriver(posix.PosixBackupDriver): run_as_root=True) return mount_path - - -def get_backup_driver(context): - return GlusterfsBackupDriver(context) diff --git a/cinder/backup/drivers/nfs.py b/cinder/backup/drivers/nfs.py index 63f3bdb6f87..9aa2656458f 100644 --- a/cinder/backup/drivers/nfs.py +++ b/cinder/backup/drivers/nfs.py @@ -103,7 +103,3 @@ class NFSBackupDriver(posix.PosixBackupDriver): run_as_root=True) return mount_path - - -def get_backup_driver(context): - return NFSBackupDriver(context) diff --git a/cinder/backup/drivers/posix.py b/cinder/backup/drivers/posix.py index ddc873cd314..4004f8cb621 100644 --- a/cinder/backup/drivers/posix.py +++ b/cinder/backup/drivers/posix.py @@ -148,7 +148,3 @@ class PosixBackupDriver(chunkeddriver.ChunkedBackupDriver): def get_extra_metadata(self, backup, volume): return None - - -def get_backup_driver(context): - return PosixBackupDriver(context) diff --git a/cinder/backup/drivers/swift.py b/cinder/backup/drivers/swift.py index 6118b5f74b9..f0430db5137 100644 --- a/cinder/backup/drivers/swift.py +++ b/cinder/backup/drivers/swift.py @@ -396,13 +396,3 @@ class SwiftBackupDriver(chunkeddriver.ChunkedBackupDriver): LOG.exception("Can not get Swift capabilities during backup " "driver initialization.") raise - - -def get_backup_driver(context): - # NOTE(mdovgal): at the moment of backup service start we need to - # get driver class instance and for swift at that moment - # we can't get all necessary information like endpoints - # from context, so we have exception as a result. - if context.user is None: - return SwiftBackupDriver(None) - return SwiftBackupDriver(context) diff --git a/cinder/backup/drivers/tsm.py b/cinder/backup/drivers/tsm.py index 5454417901c..c0d1db58d09 100644 --- a/cinder/backup/drivers/tsm.py +++ b/cinder/backup/drivers/tsm.py @@ -541,7 +541,3 @@ class TSMBackupDriver(driver.BackupDriver): 'err': err}) LOG.debug('Delete %s finished.', backup['id']) - - -def get_backup_driver(context): - return TSMBackupDriver(context) diff --git a/cinder/tests/unit/backup/fake_service.py b/cinder/tests/unit/backup/fake_service.py index 7a1f6287fe2..9ffac668953 100644 --- a/cinder/tests/unit/backup/fake_service.py +++ b/cinder/tests/unit/backup/fake_service.py @@ -32,7 +32,3 @@ class FakeBackupService(driver.BackupDriver): # otherwise we return without error if backup['display_name'] == 'fail_on_delete': raise IOError('fake') - - -def get_backup_driver(context): - return FakeBackupService(context) diff --git a/cinder/tests/unit/backup/fake_service_with_verify.py b/cinder/tests/unit/backup/fake_service_with_verify.py index ae6401cd7e3..7dff476f5b0 100644 --- a/cinder/tests/unit/backup/fake_service_with_verify.py +++ b/cinder/tests/unit/backup/fake_service_with_verify.py @@ -21,7 +21,3 @@ class FakeBackupServiceWithVerify(driver.BackupDriverWithVerify, fake_service.FakeBackupService): def verify(self, backup): pass - - -def get_backup_driver(context): - return FakeBackupServiceWithVerify(context)