]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Quobyte Driver Exception Cleanup
authorSilvan Kaiser <silvan@quobyte.com>
Tue, 23 Dec 2014 16:35:46 +0000 (17:35 +0100)
committerSilvan Kaiser <silvan@quobyte.com>
Tue, 23 Dec 2014 16:35:46 +0000 (17:35 +0100)
Clean up deprecated vendor specific exception code in Quobyte Cinder Driver.
Removes superfluous exceptions, uses standard Cinder exceptions instead.

Change-Id: I3225915a5f90ae22093d3c590fb04fbf28fc2573
Implements: blueprint qb-drv-exception-cleanup

cinder/exception.py
cinder/volume/drivers/quobyte.py

index 6c9273af29890dc3fdb772c984a311ee1b2ffdf1..112d0f912254e0bb219e96f5c09b1580f2660552 100644 (file)
@@ -822,15 +822,6 @@ class NetAppDriverException(VolumeDriverException):
     message = _("NetApp Cinder Driver exception.")
 
 
-# Quobyte USP
-class QuobyteException(VolumeDriverException):
-    message = _("Unknown Quobyte exception")
-
-
-class QuobyteVolumeNotMounted(NotFound):
-    message = _("No mounted Quobyte volumes found")
-
-
 class EMCVnxCLICmdError(VolumeBackendAPIException):
     def __init__(self, cmd=None, rc=None, out='',
                  log_as_error=True, **kwargs):
index f8e85738adc0344b887af8440e28b67d8ce90654..62b9e9fffdb1dc4d38c89171551d008729c0d506 100644 (file)
@@ -424,7 +424,7 @@ class QuobyteDriver(remotefs_drv.RemoteFSSnapDriver):
                 msg = _LE("The mount %(mount_path)s is not a valid"
                           " Quobyte USP volume. Error: %(exc)s") \
                     % {'mount_path': mount_path, 'exc': exc}
-                raise exception.QuobyteException(msg)
+                raise exception.VolumeDriverException(msg)
             if not os.access(mount_path, os.W_OK | os.X_OK):
                 LOG.warn(_LW("Volume is not writable. Please broaden the file"
                              " permissions. Mount: %s"), mount_path)