Change in vdsm[master]: Misc storage exception class name style

shuming at linux.vnet.ibm.com shuming at linux.vnet.ibm.com
Fri Oct 26 07:17:24 UTC 2012


Shu Ming has uploaded a new change for review.

Change subject: Misc storage exception class name style
......................................................................

Misc storage exception class name style

All the misc storage exception class name should
be prefixed with "Misc"

Change-Id: I2f6f279d13b92bbb8f573a0d772d7504860bbbe3
Signed-off-by: Shu Ming <shuming at linux.vnet.ibm.com>
---
M vdsm/storage/sp.py
M vdsm/storage/storage_exception.py
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/8847/1

diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 4aa63c0..7622556 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -220,7 +220,7 @@
         .. note::
             if the SPM is already started the function will fail silently.
 
-        :raises: :exc:`storage_exception.OperationInProgress` if called during an already running connection attempt.
+        :raises: :exc:`storage_exception.MiscOperationInProgress` if called during an already running connection attempt.
                  (makes the fact that it fails silently does not matter very much).
         """
         with self.lock:
@@ -228,7 +228,7 @@
                 return True
             # Since we added the lock the following should NEVER happen
             if self.spmRole == SPM_CONTEND:
-                raise se.OperationInProgress("spm start %s" % self.spUUID)
+                raise se.MiscOperationInProgress("spm start %s" % self.spUUID)
 
             self.updateMonitoringThreads()
             self.invalidateMetadata()
@@ -1934,7 +1934,7 @@
         self.log.error("TODO: Implement")
         self._maxHostID
         self.spmMailer.setMaxHostID(maxID)
-        raise se.NotImplementedException
+        raise se.MiscNotImplementedException
 
 
     def detachAllDomains(self):
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index 54e64e6..a25a588 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -125,7 +125,7 @@
 # Misc Exceptions
 #################################################
 
-class NotImplementedException(GeneralException):
+class MiscNotImplementedException(GeneralException):
     code = 2000
     message = "Method not implemented"
 
@@ -154,7 +154,7 @@
     message = "Internal block device write failure"
 
 
-class OperationInProgress(StorageException):
+class MiscOperationInProgress(StorageException):
     code = 2005
     message = "Operation is already in progress"
 


--
To view, visit http://gerrit.ovirt.org/8847
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f6f279d13b92bbb8f573a0d772d7504860bbbe3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shu Ming <shuming at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list