module documentation

Ganeti exception handling.

Exception AddressPoolError Errors related to IP address pools.
Exception BlockDeviceError Block-device related exception.
Exception CommandError External command error.
Exception ConfdClientError A magic fourcc error in Ganeti confd.
Exception ConfdMagicError A magic fourcc error in Ganeti confd.
Exception ConfigurationError Configuration related exception.
Exception ConfigVerifyError Error reported by configuration verification
Exception ConfigVersionMismatch Version mismatch in the configuration file.
Exception DeviceCreationError Error during the creation of a device.
Exception FileStoragePathError Error from file storage path validation.
Exception GenericError Base exception for Ganeti.
Exception HooksAbort A required hook has failed.
Exception HooksFailure A generic hook failure.
Exception HotplugError Hotplug-related exception.
Exception HypervisorError Hypervisor-related exception.
Exception InotifyError Error raised when there is a failure setting up an inotify watcher.
Exception IPAddressError Generic IP address error.
Exception JobCanceled Submitted job was canceled.
Exception JobFileCorrupted Job file could not be properly decoded/restored.
Exception JobLost Submitted job lost.
Exception JobQueueDrainError Job queue is marked for drain error.
Exception JobQueueError Job queue error.
Exception JobQueueFull Job queue full error.
Exception JobSubmittedException Job was submitted, client should exit.
Exception LockError Lock error exception.
Exception LuxiError LUXI error.
Exception NoCtypesError python ctypes module is not found in the system.
Exception OpCodeUnknown Unknown opcode submitted.
Exception OpExecError Error during OpCode execution.
Exception OpPrereqError Prerequisites for the OpCode are not fulfilled.
Exception OpResultError Issue with OpCode result.
Exception OpRetryNotSupportedError This opcode does not support retries
Exception ParameterError A passed parameter to a command is invalid.
Exception ParseError Generic parse error.
Exception PidFileLockError PID file is already locked by another process.
Exception ProgrammerError Programming-related error.
Exception QueryFilterParseError Error while parsing query filter.
Exception QuitGanetiException Signal Ganeti that it must quit.
Exception RapiTestResult Exception containing results from RAPI test utilities.
Exception RemoteError Programming-related error on remote call.
Exception ReservationError Errors reserving a resource.
Exception ResolverError Host name cannot be resolved.
Exception ResultValidationError The iallocation results fails validation.
Exception SignatureError Error authenticating a remote message.
Exception SshUpdateError Error from updating the SSH setup.
Exception StorageError Storage-related exception.
Exception TagError Generic tag error.
Exception TypeEnforcementError Unable to enforce data type.
Exception UdpDataSizeError UDP payload too big.
Exception UnitParseError Unable to parse size unit.
Exception X509CertError Invalid X509 certificate.
Function EncodeException Encodes an exception into a format that MaybeRaise will recognise.
Function GetEncodedError If this looks like an encoded Ganeti exception, return it.
Function GetErrorClass Return the class of an exception.
Function MaybeRaise If this looks like an encoded Ganeti exception, raise it.
def EncodeException(err):

Encodes an exception into a format that MaybeRaise will recognise.

The passed err argument will be formatted as a tuple (exception name, arguments) that the MaybeRaise function will recognise.

Parameters
err:GenericError childusually a child of GenericError (but any exception will be accepted)
Returns
tupletuple of (exception name, exception arguments)
def GetEncodedError(result):

If this looks like an encoded Ganeti exception, return it.

This function tries to parse the passed argument and if it looks like an encoding done by EncodeException, it will return the class object and arguments.

def GetErrorClass(name):

Return the class of an exception.

Given the class name, return the class itself.

Parameters
name:strthe exception name
Returns
classthe actual class, or None if not found
def MaybeRaise(result):

If this looks like an encoded Ganeti exception, raise it.

This function tries to parse the passed argument and if it looks like an encoding done by EncodeException, it will re-raise it.