Trees | Indices | Help |
|
---|
|
Module implementing the parameter types code.
|
|||
_WrapperBase | |||
_DescWrapper Wrapper class for description text. |
|||
_CommentWrapper Wrapper class for comment. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_PAREN_RE = re.compile("^[a-zA-Z0-9_-]+$")
|
|||
NoDefault = object() The without-default default value |
|||
TNonEmptyString = WithDesc("NonEmptyString")(TAnd(TString, TTr a non-empty string |
|||
TMaybeString = TMaybe(TNonEmptyString) a maybe non-empty string |
|||
TNegativeInt = TAnd(TInt, WithDesc("LessThanZero")(compat.part a negative integer (value < 0) |
|||
TNonNegativeFloat = TAnd(TFloat, WithDesc("EqualOrGreaterThanZ a positive float |
|||
TJobId = WithDesc("JobId")(TOr(TNonNegativeInt, TRegex(re.comp Job ID |
|||
TNumber = TOr(TInt, TFloat) Number |
|||
TRelativeJobId = WithDesc("RelativeJobId")(TNegativeInt) Relative job ID |
|||
TMaybeListOf = lambda item_type:
|
|||
TAllocPolicy = TElemOf(constants.VALID_ALLOC_POLICIES)
|
|||
TCVErrorCode = TElemOf(constants.CV_ALL_ECODES_STRINGS)
|
|||
TQueryResultCode = TElemOf(constants.RS_ALL)
|
|||
TExportTarget = TOr(TNonEmptyString, TList)
|
|||
TExportMode = TElemOf(constants.EXPORT_MODES)
|
|||
TDiskIndex = TAnd(TNonNegativeInt, lambda val: val < constants
|
|||
TReplaceDisksMode = TElemOf(constants.REPLACE_MODES)
|
|||
TDiskTemplate = TElemOf(constants.DISK_TEMPLATES)
|
|||
TEvacMode = TElemOf(constants.NODE_EVAC_MODES)
|
|||
TIAllocatorTestDir = TElemOf(constants.VALID_IALLOCATOR_DIRECT
|
|||
TIAllocatorMode = TElemOf(constants.VALID_IALLOCATOR_MODES)
|
|||
TImportExportCompression = TElemOf(constants.IEC_ALL)
|
|||
TAdminStateSource = TElemOf(constants.ADMIN_STATE_SOURCES)
|
|||
TINicParams = Comment("NIC parameters")(TDictOf(TElemOf(consta
|
|||
TIDiskParams = Comment("Disk parameters")(TDictOf(TNonEmptyStr
|
|||
THypervisor = TElemOf(constants.HYPER_TYPES)
|
|||
TMigrationMode = TElemOf(constants.HT_MIGRATION_MODES)
|
|||
TNICMode = TElemOf(constants.NIC_VALID_MODES)
|
|||
TInstCreateMode = TElemOf(constants.INSTANCE_CREATE_MODES)
|
|||
TRebootType = TElemOf(constants.REBOOT_TYPES)
|
|||
TFileDriver = TElemOf(constants.FILE_DRIVER)
|
|||
TOobCommand = TElemOf(constants.OOB_COMMANDS)
|
|||
TQueryTypeOp = TElemOf(set(constants.QR_VIA_OP).union(set(cons
|
|||
TDiskParams = Comment("Disk parameters")(TDictOf(TNonEmptyStri
|
|||
TDiskChanges = TAnd(TIsLength(2), TItems([Comment("Disk index"
|
|||
TRecreateDisksInfo = TOr(TListOf(TNonNegativeInt), TListOf(TDi
|
|||
TTagKind = TElemOf(constants.VALID_TAG_TYPES)
|
|||
TDdmSimple = TElemOf(constants.DDMS_VALUES)
|
|||
TVerifyOptionalChecks = TElemOf(constants.VERIFY_OPTIONAL_CHECKS)
|
|||
TIPv4Address = TAnd(TString, _CheckCIDRAddrNotation)
|
|||
TIPv6Address = TAnd(TString, _CheckCIDR6AddrNotation)
|
|||
TIPv4Network = TAnd(TString, _CheckCIDRNetNotation)
|
|||
TIPv6Network = TAnd(TString, _CheckCIDR6NetNotation)
|
|||
TQueryFieldDef = TObjectCheck(objects.QueryFieldDefinition, {"
|
|||
TQueryRow = TListOf(TAnd(TIsLength(2), TItems([TElemOf(constan
|
|||
TQueryResult = TListOf(TQueryRow)
|
|||
TQueryResponse = TObjectCheck(objects.QueryResponse, {"fields"
|
|||
TQueryFieldsResponse = TObjectCheck(objects.QueryFieldsRespons
|
|||
TJobIdListItem = TAnd(TIsLength(2), TItems([Comment("success")
|
|||
TJobIdList = TListOf(TJobIdListItem)
|
|||
TJobIdListOnly = TStrictDict(True, True, {constants.JOB_IDS_KE
|
|||
TInstanceMultiAllocResponse = TStrictDict(True, True, {constan
|
Imports: re, operator, ipaddr, compat, utils, constants, objects
|
Enclose text in parens if necessary.
|
Builds wrapper class with description text.
|
Builds wrapper for adding comment to description text.
|
Build description for combinating operator.
|
Returns an empty list.
|
Returns an empty dict.
|
Accepts any value.
|
Checks if the given value is not None.
|
Checks if the given value is None.
|
Checks if the given value is constants.VALUE_NONE.
|
Checks if the given value is a boolean.
|
Checks if the given value is an integer.
|
Checks if the given value is a float.
|
Checks if the given value is a string.
|
Checks if a given value evaluates to a boolean True value.
|
Checks if the given value is a list.
|
Checks if the given value is a tuple.
|
Checks if the given value is a dictionary.
|
Checks whether a string matches a specific regular expression.
|
Wrap a test in a TOr(TNone, test). This makes it easier to define TMaybe* types. |
a maybe boolean (bool or none)
|
Maybe a dictionary (dict or None)
|
Maybe a list (list or None)
|
a non-negative integer (value >= 0)
|
a positive integer (value > 0)
|
a maybe positive integer (positive integer or None)
|
Double (== Float)
|
Checks if a given value is an instance of
|
Strict dictionary check with specific keys.
|
Checks individual items of a container. If the verified value and the list of expected items differ in length, this check considers only as many items as are contained in the shorter list. Use TIsLength to enforce a certain length.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Helper to generate type checks for objects.
|
|
TNonEmptyStringa non-empty string
|
TNegativeInta negative integer (value < 0)
|
TNonNegativeFloata positive float
|
TJobIdJob ID
|
TDiskIndex
|
TIAllocatorTestDir
|
TINicParams
|
TIDiskParams
|
TQueryTypeOp
|
TDiskParams
|
TDiskChanges
|
TRecreateDisksInfo
|
TQueryFieldDef
|
TQueryRow
|
TQueryResponse
|
TQueryFieldsResponse
|
TJobIdListItem
|
TJobIdListOnly
|
TInstanceMultiAllocResponse
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jan 11 11:57:44 2016 | http://epydoc.sourceforge.net |