summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-09-12 17:41:32 +0000
committerGerrit Code Review <review@openstack.org>2014-09-12 17:41:32 +0000
commitb492617f2d0e43a37ec4d71d7fa9369d886d910c (patch)
treee8da6ed3db4a57f04194d5a3e753251bc770f5be
parent5267c1b9534e448ee2e8e31e70fe078adbbb447d (diff)
parentf36cd7f281bbc0b9933ea338cac02ccac1ab194a (diff)
downloadoslo-vmware-b492617f2d0e43a37ec4d71d7fa9369d886d910c.tar.gz
Merge "Add DuplicateName exception"
-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 e177964..ac12134 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,
}