Trees | Indices | Help |
|
---|
|
Module for query operations
How it works:
NQ_*
__iter__
Attention: Retrieval functions must be idempotent. They can be called multiple times, in any order and any number of times. This is important to keep in mind for implementing filters in the future.
|
|||
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. |
|
|||
|
|||
|
|||
list of objects.QueryFieldDefinition |
|
||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
FIELD_NAME_RE = re.compile(r"^[a-z0-9/._]+$")
|
|||
TITLE_RE = re.compile(r"^[^\s]+$")
|
|||
_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()
|
|||
_VTToQFT = {constants.VTYPE_STRING: QFT_OTHER, constants.VTYPE VType to QFT mapping |
|||
_NODE_SIMPLE_FIELDS = {"drained":("Drained", QFT_BOOL), "maste 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 |
|||
ALL_FIELD_LISTS = [NODE_FIELDS, INSTANCE_FIELDS, LOCK_FIELDS, All available field lists |
Imports: logging, operator, re, constants, errors, utils, compat, objects, ht, 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.
|
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.
|
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.
|
|
_VERIFY_FNVerification function for each field type
|
_VTToQFTVType to QFT mapping
|
_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_FIELD_LISTSAll available field lists
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Oct 27 14:18:49 2011 | http://epydoc.sourceforge.net |