From: Josh Durgin Date: Mon, 13 Aug 2012 17:42:27 +0000 (-0700) Subject: Fix check_for_export() in non-exporting drivers X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4f7f295c09a498006be6d8a007698432b1c792d8;p=openstack-build%2Fcinder-build.git Fix check_for_export() in non-exporting drivers 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 Signed-off-by: Josh Durgin Change-Id: Icf72f51904e7bdc368bfaf0a91dd0433ce3b1cf6 --- diff --git a/cinder/volume/driver.py b/cinder/volume/driver.py index 4ec73db75..69bb5cad9 100644 --- a/cinder/volume/driver.py +++ b/cinder/volume/driver.py @@ -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',