summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-09-05 02:07:35 +0000
committerGerrit Code Review <review@openstack.org>2014-09-05 02:07:35 +0000
commitde19d5b654ca2ab1382104aa24e07008cb3de56a (patch)
tree60ef81efb4ba6c6275b1457e53a1dedf8705b344
parent76c3f502e835bd841d28014e815ee55f92c03399 (diff)
parent6c5e449a05075137dabb6bb3f2918872d89e1538 (diff)
downloadoslo-vmware-de19d5b654ca2ab1382104aa24e07008cb3de56a.tar.gz
Merge "Add exception for TaskInProgress"
-rw-r--r--oslo/vmware/exceptions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/oslo/vmware/exceptions.py b/oslo/vmware/exceptions.py
index cfd330d..8622c0f 100644
--- a/oslo/vmware/exceptions.py
+++ b/oslo/vmware/exceptions.py
@@ -35,6 +35,7 @@ INVALID_POWER_STATE = 'InvalidPowerState'
INVALID_PROPERTY = 'InvalidProperty'
NO_PERMISSION = 'NoPermission'
NOT_AUTHENTICATED = 'NotAuthenticated'
+TASK_IN_PROGRESS = 'TaskInProgress'
class VimException(Exception):
@@ -199,6 +200,10 @@ class NotAuthenticatedException(VMwareDriverException):
code = 403
+class TaskInProgress(VMwareDriverException):
+ msg_fmt = _("Entity has another operation in process.")
+
+
# Populate the fault registry with the exceptions that have
# special treatment.
_fault_classes_registry = {
@@ -212,6 +217,7 @@ _fault_classes_registry = {
INVALID_PROPERTY: InvalidPropertyException,
NO_PERMISSION: NoPermissionException,
NOT_AUTHENTICATED: NotAuthenticatedException,
+ TASK_IN_PROGRESS: TaskInProgress,
}