The karbor.exception
Module¶
karbor base exception handling.
Includes decorator for re-raising karbor-type exceptions.
SHOULD include dedicated exception logging.
-
exception
karbor.exception.
AcquireLeaseFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Acquire Lease in Failed: %(reason)s’¶
-
-
exception
karbor.exception.
AdminRequired
(message=None, **kwargs)¶ Bases:
karbor.exception.NotAuthorized
-
message
= u’User does not have admin privileges’¶
-
-
exception
karbor.exception.
AuthorizationFailure
(message=None, **kwargs)¶ Bases:
karbor.exception.NotAuthorized
-
message
= u’Authorization for %(obj)s is failed ‘¶
-
-
exception
karbor.exception.
BankCreateObjectFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Create Object in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
BankDeleteObjectFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Delete Object %(key)s in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
BankGetObjectFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Get Object %(key)s in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
BankListObjectsFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Get Object in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
BankReadonlyViolation
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Bank read-only violation’¶
-
-
exception
karbor.exception.
BankUpdateObjectFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Update Object %(key)s in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
CheckpointNotAvailable
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’The checkpoint %(checkpoint_id)s is not available’¶
-
-
exception
karbor.exception.
CheckpointNotBeDeleted
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’The checkpoint %(checkpoint_id)s can not be deleted.’¶
-
-
exception
karbor.exception.
CheckpointNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Checkpoint %(checkpoint_id)s could not be found.’¶
-
-
exception
karbor.exception.
CheckpointRecordNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’CheckpointRecord %(id)s could not be found.’¶
-
-
exception
karbor.exception.
ClassNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Class %(class_name)s could not be found: %(exception)s’¶
-
-
exception
karbor.exception.
ConfigNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Could not find config at %(path)s’¶
-
-
exception
karbor.exception.
ConvertedException
(code=500, title=”, explanation=”)¶ Bases:
webob.exc.WSGIHTTPException
-
exception
karbor.exception.
CreateBackupFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Create Backup failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
CreateContainerFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Create Container in Bank Failed: %(reason)s’¶
-
-
exception
karbor.exception.
CreateResourceFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Create %(name)s failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
DeleteBackupFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Delete Backup failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
DeleteResourceFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Delete %(name)s failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
DeleteTriggerNotAllowed
(message=None, **kwargs)¶ Bases:
karbor.exception.NotAuthorized
-
message
= u’Can not delete trigger %(trigger_id)s’¶
-
-
exception
karbor.exception.
Error
¶ Bases:
exceptions.Exception
-
exception
karbor.exception.
FlowError
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Flow: %(flow)s, Error: %(error)s’¶
-
-
exception
karbor.exception.
GetBackupFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Get Backup failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
HostBinaryNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Could not find binary %(binary)s on host %(host)s.’¶
-
-
exception
karbor.exception.
Invalid
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
code
= 400¶
-
message
= u’Unacceptable parameters.’¶
-
-
exception
karbor.exception.
InvalidContentType
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Invalid content type %(content_type)s.’¶
-
-
exception
karbor.exception.
InvalidInput
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Invalid input received: %(reason)s’¶
-
-
exception
karbor.exception.
InvalidOperationDefinition
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Invalid operation definition, reason:%(reason)s’¶
-
-
exception
karbor.exception.
InvalidOperationObject
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’The operation %(operation_id)s is invalid’¶
-
-
exception
karbor.exception.
InvalidOriginalId
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’The original_id: %(original_id)s is invalid.’¶
-
-
exception
karbor.exception.
InvalidParameterValue
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’%(err)s’¶
-
-
exception
karbor.exception.
InvalidPlan
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Invalid plan: %(reason)s’¶
-
-
exception
karbor.exception.
InvalidProtectableInstance
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Invalid protectable instance.’¶
-
-
exception
karbor.exception.
InvalidTaskFlowObject
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’The task flow is invalid: %(reason)s’¶
-
-
exception
karbor.exception.
KarborException
(message=None, **kwargs)¶ Bases:
exceptions.Exception
Base karbor Exception
To correctly use this class, inherit from it and define a ‘message’ property. That message will get printf’d with the keyword arguments provided to the constructor.
-
code
= 500¶
-
headers
= {}¶
-
message
= u’An unknown exception occurred.’¶
-
safe
= False¶
-
-
exception
karbor.exception.
ListProtectableResourceFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’List protectable resources of type %(type)s failed: %(reason)s’¶
-
-
exception
karbor.exception.
MalformedRequestBody
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Malformed message body: %(reason)s’¶
-
-
exception
karbor.exception.
NotAuthorized
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
code
= 403¶
-
message
= u’Not authorized.’¶
-
-
exception
karbor.exception.
NotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
code
= 404¶
-
message
= u’Resource could not be found.’¶
-
safe
= True¶
-
-
exception
karbor.exception.
OperationLogNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’OperationLog %(restore_id)s could not be found.’¶
-
-
exception
karbor.exception.
PasteAppNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u”Could not load paste app ‘%(name)s’ from %(path)s”¶
-
-
exception
karbor.exception.
PlanNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Plan %(plan_id)s could not be found.’¶
-
-
exception
karbor.exception.
PolicyNotAuthorized
(message=None, **kwargs)¶ Bases:
karbor.exception.NotAuthorized
-
message
= u”Policy doesn’t allow %(action)s to be performed.”¶
-
-
exception
karbor.exception.
ProtectableResourceInvalidStatus
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’The resource %(id)s of type %(type)s has a invalid status: %(status)s’¶
-
-
exception
karbor.exception.
ProtectableResourceNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’The resource %(id)s of type %(type)s could not be found: %(reason)s’¶
-
-
exception
karbor.exception.
ProtectableTypeNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’ProtectableType %(protectable_type)s could not be found.’¶
-
-
exception
karbor.exception.
ProtectionPluginNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Protection Plugin for %(type)s could not be found.’¶
-
-
exception
karbor.exception.
ProviderNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Provider %(provider_id)s could not be found.’¶
-
-
exception
karbor.exception.
RestoreBackupFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Restore Backup failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
RestoreNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Restore %(restore_id)s could not be found.’¶
-
-
exception
karbor.exception.
RestoreResourceFailed
(message=None, **kwargs)¶ Bases:
karbor.exception.KarborException
-
message
= u’Restore %(name)s failed: %(reason)s, id=%(resource_id)s, type=%(resource_type)s’¶
-
-
exception
karbor.exception.
ScheduledOperationExist
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Scheduled Operation%(op_id)s exists’¶
-
-
exception
karbor.exception.
ScheduledOperationLogNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Scheduled Operation Log %(log_id)s could not be found.’¶
-
-
exception
karbor.exception.
ScheduledOperationNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Scheduled Operation %(id)s could not be found.’¶
-
-
exception
karbor.exception.
ScheduledOperationStateNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Scheduled Operation State %(op_id)s could not be found.’¶
-
-
exception
karbor.exception.
ServiceNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Service %(service_id)s could not be found.’¶
-
-
exception
karbor.exception.
TriggerIsInvalid
(message=None, **kwargs)¶ Bases:
karbor.exception.Invalid
-
message
= u’Trigger%(trigger_id)s is invalid.’¶
-
-
exception
karbor.exception.
TriggerNotFound
(message=None, **kwargs)¶ Bases:
karbor.exception.NotFound
-
message
= u’Trigger %(id)s could not be found.’¶
-