diff options
author | Gary Kotton <gkotton@vmware.com> | 2014-07-16 02:53:55 -0700 |
---|---|---|
committer | Gary Kotton <gkotton@vmware.com> | 2014-08-30 22:47:30 -0700 |
commit | 6c5e449a05075137dabb6bb3f2918872d89e1538 (patch) | |
tree | b1fc87ab878c6dd5fa1f655a2117c851ac224737 | |
parent | 390fedb666a22f0116c1cb660f3bbceb5bbd95f8 (diff) | |
download | oslo-vmware-6c5e449a05075137dabb6bb3f2918872d89e1538.tar.gz |
Add exception for TaskInProgress
Add support for handling the aforementioned exception
Change-Id: I2ea5efbd0e37ebada963d9dcce6ff1cf3f229b23
-rw-r--r-- | oslo/vmware/exceptions.py | 6 |
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, } |