Add support for unmanaging snapshot of rbd driver

When introducing managing existing snapshot to rbd driver, I think
it should inherit from ManageableSnapshotsVD.
On the other hand, I did one of the simplest implementations like
unmanage volume.

Change-Id: I61f2a63ac559be71f293fca685fd12bdac6bd032
This commit is contained in:
yenai 2018-03-08 15:54:22 +08:00
parent 01bf2c385f
commit 3a5bb76428
1 changed files with 7 additions and 2 deletions

View File

@ -183,8 +183,9 @@ class RADOSClient(object):
@interface.volumedriver
class RBDDriver(driver.CloneableImageVD,
driver.MigrateVD, driver.ManageableVD, driver.BaseVD):
class RBDDriver(driver.CloneableImageVD, driver.MigrateVD,
driver.ManageableVD, driver.ManageableSnapshotsVD,
driver.BaseVD):
"""Implements RADOS block device (RBD) volume commands."""
VERSION = '1.2.0'
@ -1720,3 +1721,7 @@ class RBDDriver(driver.CloneableImageVD,
snapshot_name = existing_ref['source-name']
volume.rename_snap(utils.convert_str(snapshot_name),
utils.convert_str(snapshot.name))
def unmanage_snapshot(self, snapshot):
"""Removes the specified snapshot from Cinder management."""
pass