Remove obsolete get_backup_driver functions

With [1], backup driver modules are no longer expected to provide a
get_backup_driver function. This patch removes them all, as the
backup manager no longer calls them.

[1] https://review.opendev.org/595372

Change-Id: Ic2562b98c00cbf567503edf275b6d7d97820058c
This commit is contained in:
Alan Bishop 2019-04-26 08:16:38 -04:00
parent ae5f41e776
commit 06bd566bb4
9 changed files with 0 additions and 42 deletions

View File

@ -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)

View File

@ -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)

View File

@ -93,7 +93,3 @@ class GlusterfsBackupDriver(posix.PosixBackupDriver):
run_as_root=True)
return mount_path
def get_backup_driver(context):
return GlusterfsBackupDriver(context)

View File

@ -103,7 +103,3 @@ class NFSBackupDriver(posix.PosixBackupDriver):
run_as_root=True)
return mount_path
def get_backup_driver(context):
return NFSBackupDriver(context)

View File

@ -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)

View File

@ -392,13 +392,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)

View File

@ -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)

View File

@ -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)

View File

@ -21,7 +21,3 @@ class FakeBackupServiceWithVerify(driver.BackupDriverWithVerify,
fake_service.FakeBackupService):
def verify(self, backup):
pass
def get_backup_driver(context):
return FakeBackupServiceWithVerify(context)