]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix check_for_export() in non-exporting drivers
authorJosh Durgin <josh.durgin@inktank.com>
Mon, 13 Aug 2012 17:42:27 +0000 (10:42 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Mon, 13 Aug 2012 17:57:19 +0000 (10:57 -0700)
This overrides the default check_for_export so that drivers that don't
need to export block devices on the host like Sheepdog and RBD don't
raise a NotImplemented exception when this is called.

Reported-by: Mark Moseley <moseleymark@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Change-Id: Icf72f51904e7bdc368bfaf0a91dd0433ce3b1cf6

cinder/volume/driver.py

index 4ec73db75faab88891da765e5a79628de659e081..69bb5cad9092105c681e215f21b6ad2a999e022d 100644 (file)
@@ -549,6 +549,10 @@ class RBDDriver(VolumeDriver):
         """Removes an export for a logical volume"""
         pass
 
+    def check_for_export(self, context, volume_id):
+        """Make sure volume is exported."""
+        pass
+
     def initialize_connection(self, volume, connector):
         return {
             'driver_volume_type': 'rbd',
@@ -626,6 +630,10 @@ class SheepdogDriver(VolumeDriver):
         """Removes an export for a logical volume"""
         pass
 
+    def check_for_export(self, context, volume_id):
+        """Make sure volume is exported."""
+        pass
+
     def initialize_connection(self, volume, connector):
         return {
             'driver_volume_type': 'sheepdog',