-
-class vimconnException(Exception):
- '''Common and base class Exception for all vimconnector exceptions'''
-
- def __init__(self, message, http_code=HTTP_Bad_Request):
- Exception.__init__(self, message)
- self.http_code = http_code
-
-
-class vimconnConnectionException(vimconnException):
- '''Connectivity error with the VIM'''
-
- def __init__(self, message, http_code=HTTP_Service_Unavailable):
- vimconnException.__init__(self, message, http_code)
-
-
-class vimconnUnexpectedResponse(vimconnException):
- '''Get an wrong response from VIM'''
-
- def __init__(self, message, http_code=HTTP_Service_Unavailable):
- vimconnException.__init__(self, message, http_code)
-
-
-class vimconnAuthException(vimconnException):
- '''Invalid credentials or authorization to perform this action over the VIM'''
-
- def __init__(self, message, http_code=HTTP_Unauthorized):
- vimconnException.__init__(self, message, http_code)
-
-
-class vimconnNotFoundException(vimconnException):
- '''The item is not found at VIM'''
-
- def __init__(self, message, http_code=HTTP_Not_Found):
- vimconnException.__init__(self, message, http_code)
-
-
-class vimconnConflictException(vimconnException):
- '''There is a conflict, e.g. more item found than one'''
-
- def __init__(self, message, http_code=HTTP_Conflict):
- vimconnException.__init__(self, message, http_code)
-
-
-class vimconnNotImplemented(vimconnException):
- '''The method is not implemented by the connected'''
-
- def __init__(self, message, http_code=HTTP_Not_Implemented):
- vimconnException.__init__(self, message, http_code)
-
-