| From 7244e7f90e414a5853959877722f8b35461f5549 Mon Sep 17 00:00:00 2001 |
| From: Peter Penchev <openstack-dev@storpool.com> |
| Date: Mon, 11 May 2020 11:02:53 +0300 |
| Subject: [PATCH 5/8] StorPool driver: remove the obsolete backup_volume() |
| |
| Follow suit with I984de3df803f12dbb95e3309e668b3fbd519e70f. |
| |
| Change-Id: Ia172452fd7c96dccfe54789d868fcf7b748322a3 |
| --- |
| cinder/volume/drivers/storpool.py | 30 +----------------------------- |
| 1 file changed, 1 insertion(+), 29 deletions(-) |
| |
| diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py |
| index 56b4070bc..d76957c88 100644 |
| --- a/cinder/volume/drivers/storpool.py |
| +++ b/cinder/volume/drivers/storpool.py |
| @@ -95,6 +95,7 @@ class StorPoolDriver(driver.VolumeDriver): |
| connector will handle this. |
| - Detach temporary snapshots and volumes after copying data |
| to or from from Glance images. |
| + - Drop backup_volume() |
| """ |
| |
| VERSION = '2.0.0' |
| @@ -318,35 +319,6 @@ class StorPoolDriver(driver.VolumeDriver): |
| 'pools': pools |
| } |
| |
| - def backup_volume(self, context, backup, backup_service): |
| - volume = self.db.volume_get(context, backup['volume_id']) |
| - req_id = context.request_id |
| - volname = self._attach.volumeName(volume['id']) |
| - name = self._attach.volsnapName(volume['id'], req_id) |
| - try: |
| - self._attach.api().snapshotCreate(volname, {'name': name}) |
| - except spapi.ApiError as e: |
| - raise self._backendException(e) |
| - self._attach.add(req_id, { |
| - 'volume': name, |
| - 'type': 'backup', |
| - 'id': req_id, |
| - 'rights': 1, |
| - 'volsnap': True |
| - }) |
| - try: |
| - return super(StorPoolDriver, self).backup_volume( |
| - context, backup, backup_service) |
| - finally: |
| - self._attach.remove(req_id) |
| - try: |
| - self._attach.api().snapshotDelete(name) |
| - except spapi.ApiError as e: |
| - LOG.error( |
| - 'Could not remove the temp snapshot %(name)s for ' |
| - '%(vol)s: %(err)s', |
| - {'name': name, 'vol': volname, 'err': e}) |
| - |
| def copy_volume_to_image(self, context, volume, image_service, image_meta): |
| req_id = context.request_id |
| volname = self._attach.volumeName(volume['id']) |
| -- |
| 2.35.1 |
| |