Package ganeti :: Package storage :: Module base
[hide private]
[frames] | no frames]

Module base

source code

Block device abstraction - base class and utility functions

Classes [hide private]
  BlockDev
Block device abstract class.
Functions [hide private]
 
ThrowError(msg, *args)
Log an error to the node daemon and the raise an exception.
source code
boolean
IgnoreError(fn, *args, **kwargs)
Executes the given function, ignoring BlockDeviceErrors.
source code

Imports: logging, objects, constants, utils, errors


Function Details [hide private]

ThrowError(msg, *args)

source code 

Log an error to the node daemon and the raise an exception.

Parameters:
  • msg (string) - the text of the exception @raise errors.BlockDeviceError

IgnoreError(fn, *args, **kwargs)

source code 

Executes the given function, ignoring BlockDeviceErrors.

This is used in order to simplify the execution of cleanup or rollback functions.

Returns: boolean
True when fn didn't raise an exception, False otherwise