Trees | Indices | Help |
|
---|
|
Module for query operations
How it works:
NQ_*
QFF_*
__iter__
Attention: Retrieval functions must be idempotent. They can be called multiple times, in any order and any number of times.
|
|||
_FilterHints Class for filter analytics. |
|||
_FilterCompilerHelper Converts a query filter to a callable usable for filtering. |
|||
Query | |||
NodeQueryData Data container for node data queries. |
|||
InstanceQueryData Data container for instance data queries. |
|||
LockQueryData Data container for lock data queries. |
|||
GroupQueryData Data container for node group data queries. |
|||
OsInfo |
|
|||
|
|||
|
|||
list of objects.QueryFieldDefinition |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
callable |
|
||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
QFF_HOSTNAME = 0x01
|
|||
QFF_IP_ADDRESS = 0x02
|
|||
QFF_ALL = QFF_HOSTNAME | QFF_IP_ADDRESS
|
|||
FIELD_NAME_RE = re.compile(r"^[a-z0-9/._]+$")
|
|||
TITLE_RE = re.compile(r"^[^\s]+$")
|
|||
DOC_RE = re.compile(r"^[A-Z].*[^.,?!]$")
|
|||
_VERIFY_FN = {QFT_UNKNOWN: ht.TNone, QFT_TEXT: ht.TString, QFT Verification function for each field type |
|||
_FS_UNKNOWN = object()
|
|||
_FS_NODATA = object()
|
|||
_FS_UNAVAIL = object()
|
|||
_FS_OFFLINE = object()
|
|||
_FS_ALL = frozenset([_FS_UNKNOWN, _FS_NODATA, _FS_UNAVAIL, _FS List of all special status |
|||
_VTToQFT = {constants.VTYPE_STRING: QFT_OTHER, constants.VTYPE VType to QFT mapping |
|||
_SERIAL_NO_DOC = "%s object serial number, incremented on each
|
|||
_NODE_SIMPLE_FIELDS = {"drained":("Drained", QFT_BOOL, 0, "Whe Fields that are direct attributes of an objects.Node object |
|||
_NODE_LIVE_FIELDS = {"bootid":("BootID", QFT_TEXT, "bootid", " Fields requiring talking to the node |
|||
_INST_SIMPLE_FIELDS = {"disk_template":("Disk_template", QFT_T
|
|||
_GROUP_SIMPLE_FIELDS = {"alloc_policy":("AllocPolicy", QFT_TEX
|
|||
NODE_FIELDS = _BuildNodeFields() Fields available for node queries |
|||
INSTANCE_FIELDS = _BuildInstanceFields() Fields available for instance queries |
|||
LOCK_FIELDS = _BuildLockFields() Fields available for lock queries |
|||
GROUP_FIELDS = _BuildGroupFields() Fields available for node group queries |
|||
OS_FIELDS = _BuildOsFields() Fields available for operating system queries |
|||
ALL_FIELDS = {constants.QR_INSTANCE: INSTANCE_FIELDS, constant All available resources |
|||
ALL_FIELD_LISTS = ALL_FIELDS.values() All available field lists |
Imports: logging, operator, re, constants, errors, utils, compat, objects, ht, qlang, QFT_UNKNOWN, QFT_TEXT, QFT_BOOL, QFT_NUMBER, QFT_UNIT, QFT_TIMESTAMP, QFT_OTHER, RS_NORMAL, RS_UNKNOWN, RS_NODATA, RS_UNAVAIL, RS_OFFLINE
|
Calculates the internal list of selected fields. Unknown fields are returned as constants.QFT_UNKNOWN.
|
Converts a query filter into a callable function. See _FilterCompilerHelper for details.
|
Verifies the contents of a query result row.
|
Prepares field list for use by Query. Converts the list to a dictionary and does some verification.
|
Prepares the response for a query.
|
Returns list of available fields.
|
Wrapper for creating objects.QueryFieldDefinition instances.
|
Determine node role.
|
Returns a field function to return an attribute of the item.
|
Wrapper for converting values.
|
Convenience wrapper for _ConvWrapInner.
|
Returns function for getting timestamp of item.
|
Returns common timestamp fields.
|
Build function for calling another function with an node group.
|
Returns the name of a node's group.
|
Returns the node powered state
|
Returns the ndparams for this node.
|
Gets the value of a "live" field from NodeQueryData.
|
Get instance's operational status.
|
Build function for retrieving live data.
|
Get instance status.
|
Build function for retrieving disk size.
|
Build function for calling another function with an instance NIC.
|
Get a NIC's IP address.
|
Get a NIC's bridge.
|
Get all network bridges for an instance.
|
Build function for retrieving a NIC parameter.
|
Get instance fields involving network interfaces.
|
Get disk usage for an instance.
|
Get console information for instance.
|
Get instance fields involving disks.
|
Get instance fields involving parameters.
|
Gets group UUID of an instance node.
|
Gets group name of an instance node.
|
|
_VERIFY_FNVerification function for each field type
|
_FS_ALLList of all special status
|
_VTToQFTVType to QFT mapping
|
_SERIAL_NO_DOC
|
_NODE_SIMPLE_FIELDSFields that are direct attributes of an objects.Node object
|
_NODE_LIVE_FIELDSFields requiring talking to the node
|
_INST_SIMPLE_FIELDS
|
_GROUP_SIMPLE_FIELDS
|
ALL_FIELDSAll available resources
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 24 16:51:19 2012 | http://epydoc.sourceforge.net |