]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Allow snapshot_delete for NFS/GlusterFS drivers
authorEric Harney <eharney@redhat.com>
Mon, 18 Mar 2013 16:21:40 +0000 (12:21 -0400)
committerJohn Griffith <john.griffith@solidfire.com>
Fri, 22 Mar 2013 03:58:56 +0000 (21:58 -0600)
RemoteFsDriver should allow snapshot_delete, since snapshot_create
for NFS and GlusterFS volumes will create a snapshot in the error
state which cannot be deleted afterward.

snapshot_delete() should allow this to be removed rather than
throwing NotImplementedError.

Fixes bug: 1156686

Change-Id: I4307878fa97fbce5bd733a83fa172509e2fba8ce
(cherry picked from commit ea10f1b8291cb07962577699abe13648a4bdca58)

cinder/volume/drivers/nfs.py

index 0c1df91daceb40386b52020a5dd4e58cb79a3c8d..73f3d10c165dbc1dd20fd00ab8fcb60ee7118d29 100755 (executable)
@@ -66,6 +66,11 @@ class RemoteFsDriver(driver.VolumeDriver):
     def delete_volume(self, volume):
         raise NotImplementedError()
 
+    def delete_snapshot(self, snapshot):
+        """Do nothing for this driver, but allow manager to handle deletion
+           of snapshot in error state."""
+        pass
+
     def ensure_export(self, ctx, volume):
         raise NotImplementedError()