The syntax for the _CHECK variables and the contents of the PARAMETERS
dict is the same, see the docstring for BaseHypervisor.PARAMETERS.
|
_FILE_CHECK = utils.IsNormAbsPath, "must be an absolute normal...
stub for file checks, without the required flag
|
|
_DIR_CHECK = utils.IsNormAbsPath, "must be an absolute normali...
stub for directory checks, without the required flag
|
|
_CPU_MASK_CHECK = _IsCpuMaskWellFormed, "CPU mask definition i...
|
|
REQ_FILE_CHECK = True,+ _FILE_CHECK
mandatory file parameter
|
|
OPT_FILE_CHECK = False,+ _FILE_CHECK
optional file parameter
|
|
REQ_DIR_CHECK = True,+ _DIR_CHECK
mandatory directory parametr
|
|
OPT_DIR_CHECK = False,+ _DIR_CHECK
optional directory parameter
|
|
NET_PORT_CHECK = True, lambda x: x > 0 and x < 65535, "invalid...
|
|
OPT_CPU_MASK_CHECK = False,+ _CPU_MASK_CHECK
|
|
REQ_CPU_MASK_CHECK = True,+ _CPU_MASK_CHECK
|
|
NO_CHECK = False, None, None, None, None
parameter without any checks at all
|
|
REQUIRED_CHECK = True, None, None, None, None
parameter required to exist (and non-false), but without other
checks; beware that this can't be used for boolean parameters, where
you should use NO_CHECK or a custom checker
|
|
MIGRATION_MODE_CHECK = True, lambda x: x in constants.HT_MIGRA...
|