summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadoslav Gerganov <rgerganov@vmware.com>2014-09-11 14:57:56 +0300
committerRadoslav Gerganov <rgerganov@vmware.com>2014-09-11 15:20:11 +0300
commitf36cd7f281bbc0b9933ea338cac02ccac1ab194a (patch)
tree2056436cecca139c9effc4e297b300e5d690edcb
parent81ef9d49c887c623b531064bd8fb32ab57e517f0 (diff)
downloadoslo-vmware-f36cd7f281bbc0b9933ea338cac02ccac1ab194a.tar.gz
Add DuplicateName exception
Change-Id: I0bbe7cfc3efc7031b84aa50bda1c661feecb146c
-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 06d0dd6..ae49150 100644
--- a/oslo/vmware/exceptions.py
+++ b/oslo/vmware/exceptions.py
@@ -36,6 +36,7 @@ INVALID_PROPERTY = 'InvalidProperty'
NO_PERMISSION = 'NoPermission'
NOT_AUTHENTICATED = 'NotAuthenticated'
TASK_IN_PROGRESS = 'TaskInProgress'
+DUPLICATE_NAME = 'DuplicateName'
class VimException(Exception):
@@ -205,6 +206,10 @@ class TaskInProgress(VMwareDriverException):
msg_fmt = _("Entity has another operation in process.")
+class DuplicateName(VMwareDriverException):
+ msg_fmt = _("Duplicate name.")
+
+
# Populate the fault registry with the exceptions that have
# special treatment.
_fault_classes_registry = {
@@ -219,6 +224,7 @@ _fault_classes_registry = {
NO_PERMISSION: NoPermissionException,
NOT_AUTHENTICATED: NotAuthenticatedException,
TASK_IN_PROGRESS: TaskInProgress,
+ DUPLICATE_NAME: DuplicateName,
}