module documentation

Module for query operations

How it works:

  • Add field definitions
  • Instantiate Query with prepared field list definition and selected fields
  • Call Query.RequestedData to determine what data to collect/compute
  • Call Query.Query or Query.OldStyleQuery with collected data and use result
    • Data container must support iteration using __iter__
    • Items are passed to retrieval functions and can have any format
  • Call Query.GetFields to get list of definitions for selected fields
Unknown Field: attention
Retrieval functions must be idempotent. They can be called multiple times, in any order and any number of times.
Class ClusterQueryData No class docstring; 0/4 instance variable, 1/2 method documented
Class ExtStorageInfo Undocumented
Class GroupQueryData Data container for node group data queries.
Class InstanceQueryData Data container for instance data queries.
Class LockQueryData Data container for lock data queries.
Class NetworkQueryData Data container for network data queries.
Class NodeQueryData Data container for node data queries.
Class OsInfo Undocumented
Class Query No class docstring; 0/5 instance variable, 6/6 methods documented
Function GetAllFields Extract objects.QueryFieldDefinition from field definitions.
Function GetQueryResponse Prepares the response for a query.
Function QueryFields Returns list of available fields.
Constant ALL_FIELD_LISTS Undocumented
Constant ALL_FIELDS Undocumented
Constant CLUSTER_FIELDS Undocumented
Constant CQ_CONFIG Undocumented
Constant CQ_QUEUE_DRAINED Undocumented
Constant CQ_WATCHER_PAUSE Undocumented
Constant DOC_RE Undocumented
Constant EXPORT_FIELDS Undocumented
Constant EXTSTORAGE_FIELDS Undocumented
Constant FIELD_NAME_RE Undocumented
Constant FILTER_FIELDS Undocumented
Constant GQ_CONFIG Undocumented
Constant GQ_DISKPARAMS Undocumented
Constant GQ_INST Undocumented
Constant GQ_NODE Undocumented
Constant GROUP_FIELDS Undocumented
Constant INSTANCE_FIELDS Undocumented
Constant IQ_CONFIG Undocumented
Constant IQ_CONSOLE Undocumented
Constant IQ_DISKUSAGE Undocumented
Constant IQ_LIVE Undocumented
Constant IQ_NETWORKS Undocumented
Constant IQ_NODES Undocumented
Constant JOB_FIELDS Undocumented
Constant JQ_ARCHIVED Undocumented
Constant LOCK_FIELDS Undocumented
Constant LQ_MODE Undocumented
Constant LQ_OWNER Undocumented
Constant LQ_PENDING Undocumented
Constant NETQ_CONFIG Undocumented
Constant NETQ_GROUP Undocumented
Constant NETQ_INST Undocumented
Constant NETQ_STATS Undocumented
Constant NETWORK_FIELDS Undocumented
Constant NODE_FIELDS Undocumented
Constant NQ_CONFIG Undocumented
Constant NQ_GROUP Undocumented
Constant NQ_INST Undocumented
Constant NQ_LIVE Undocumented
Constant NQ_OOB Undocumented
Constant OS_FIELDS Undocumented
Constant QFF_ALL Undocumented
Constant QFF_HOSTNAME Undocumented
Constant QFF_IP_ADDRESS Undocumented
Constant QFF_JOB_ID Undocumented
Constant QFF_SPLIT_TIMESTAMP Undocumented
Constant TITLE_RE Undocumented
Class _FilterCompilerHelper Converts a query filter to a callable usable for filtering.
Class _FilterHints Class for filter analytics.
Function _BuildClusterFields Builds list of fields for cluster information.
Function _BuildExportFields Builds list of fields for exports.
Function _BuildExtStorageFields Builds list of fields for extstorage provider queries.
Function _BuildFilterFields Builds list of fields for job filter queries.
Function _BuildGroupFields Builds list of fields for node group queries.
Function _BuildInstanceFields Builds list of fields for instance queries.
Function _BuildJobFields Builds list of fields for job queries.
Function _BuildLockFields Builds list of fields for lock queries.
Function _BuildNDFields Builds all the ndparam fields.
Function _BuildNetworkFields Builds list of fields for network queries.
Function _BuildNodeFields Builds list of fields for node queries.
Function _BuildOsFields Builds list of fields for operating system queries.
Function _ClusterWatcherPause Returns until when watcher is paused (if available).
Function _CompileFilter Converts a query filter into a callable function.
Function _ConvWrap Convenience wrapper for _ConvWrapInner.
Function _ConvWrapInner Wrapper for converting values.
Function _FieldDictKey Generates key for field dictionary.
Function _GetDeadInstStatus Undocumented
Function _GetExportName Returns an export name if available.
Function _GetGroup Build function for calling another function with an node group.
Function _GetInstAllNicBridges Get all network bridges for an instance.
Function _GetInstAllNicNetworkNames Get all network names for an instance.
Function _GetInstAllNicVlans Get all network VLANs for an instance.
Function _GetInstanceConsole Get console information for instance.
Function _GetInstanceDiskFields Get instance fields involving disks.
Function _GetInstanceNetworkFields Get instance fields involving network interfaces.
Function _GetInstanceParameterFields Get instance fields involving parameters.
Function _GetInstDeviceName Get a Device's Name.
Function _GetInstDeviceUUID Get a Device's UUID.
Function _GetInstDisk Build function for calling another function with an instance Disk.
Function _GetInstDiskSize Get a Disk's size.
Function _GetInstDiskSpindles Get a Disk's spindles.
Function _GetInstDiskUsage Get disk usage for an instance.
Function _GetInstLiveData Build function for retrieving live data.
Function _GetInstNic Build function for calling another function with an instance NIC.
Function _GetInstNicBridge Get a NIC's bridge.
Function _GetInstNicIp Get a NIC's IP address.
Function _GetInstNicNetwork Get a NIC's Network.
Function _GetInstNicNetworkName Get a NIC's Network.
Function _GetInstNicParam Build function for retrieving a NIC parameter.
Function _GetInstNicVLan Get a NIC's VLAN.
Function _GetInstNodeGroup Gets group UUID of an instance node.
Function _GetInstNodeGroupName Gets group name of an instance node.
Function _GetInstOperState Get instance's operational status.
Function _GetInstStatus Get instance status.
Function _GetItemAttr Returns a field function to return an attribute of the item.
Function _GetItemMaybeAttr Returns a field function to return a not-None attribute of the item.
Function _GetItemTimestamp Returns function for getting timestamp of item.
Function _GetItemTimestampFields Returns common timestamp fields.
Function _GetLiveInstStatus Undocumented
Function _GetLiveNodeField Gets the value of a "live" field from NodeQueryData.
Function _GetLockOwners Returns a sorted list of a lock's current owners.
Function _GetLockPending Returns a sorted list of a lock's pending acquires.
Function _GetNDParam Return a field function to return an ND parameter out of the context.
Function _GetNdParams Returns the ndparams for this node.
Function _GetNetworkStatsField Gets the value of a "stats" field from NetworkQueryData.
Function _GetNodeDiskState Converts node's disk state for query result.
Function _GetNodeGroup Returns the name of a node's group.
Function _GetNodeHvState Converts node's hypervisor state for query result.
Function _GetNodeName Gets node name of a node.
Function _GetNodePower Returns the node powered state
Function _GetNodeRole Determine node role.
Function _GetQueryFields Calculates the internal list of selected fields.
Function _GetStatsField Gets a value from live statistics.
Function _GetUnknownField Gets the contents of an unknown field.
Function _JobTimestamp Wrapper for _JobTimestampInner.
Function _JobTimestampInner Converts unavailable timestamp to _FS_UNAVAIL.
Function _JobUnavail Wrapper for _JobUnavailInner.
Function _JobUnavailInner Return _FS_UNAVAIL if job is None.
Function _MakeComparisonChecks Prepares flag-specific comparisons using a comparison function.
Function _MakeField Wrapper for creating objects.QueryFieldDefinition instances.
Function _MakeSplitTimestampComparison Compares split timestamp values after converting to float.
Function _PerJobOp Wrapper for _PerJobOpInner.
Function _PerJobOpInner Executes a function per opcode in a job.
Function _PrepareFieldList Prepares field list for use by Query.
Function _PrepareRegex Compiles a regular expression.
Function _PrepareSplitTimestamp Prepares a value for comparison by _MakeSplitTimestampComparison.
Function _ProcessResult Converts result values into externally-visible ones.
Function _StaticValue Prepares a function to return a static value.
Function _StaticValueInner Returns a static value.
Function _VerifyResultRow Verifies the contents of a query result row.
Function _WrapBinaryOp Wrapper for binary operator functions.
Function _WrapLogicOp Wrapper for logic operator functions.
Function _WrapNot Negates the result of a wrapped function.
Function _WrapUnaryOp Wrapper for unary operator functions.
Constant _CLUSTER_SIMPLE_FIELDS Undocumented
Constant _CLUSTER_VERSION_FIELDS Undocumented
Constant _FILTER_SIMPLE_FIELDS Undocumented
Constant _FS_ALL Undocumented
Constant _FS_NODATA Undocumented
Constant _FS_OFFLINE Undocumented
Constant _FS_UNAVAIL Undocumented
Constant _FS_UNKNOWN Undocumented
Constant _GROUP_SIMPLE_FIELDS Undocumented
Constant _INST_SIMPLE_FIELDS Undocumented
Constant _NETWORK_SIMPLE_FIELDS Undocumented
Constant _NETWORK_STATS_FIELDS Undocumented
Constant _NODE_LIVE_FIELDS Undocumented
Constant _NODE_SIMPLE_FIELDS Undocumented
Constant _SERIAL_NO_DOC Undocumented
Constant _VERIFY_FN Undocumented
Variable _VTToQFT Undocumented
def GetAllFields(fielddefs):

Extract objects.QueryFieldDefinition from field definitions.

Returns
list of objects.QueryFieldDefinitionUndocumented
def GetQueryResponse(query, ctx, sort_by_name=True):

Prepares the response for a query.

Parameters
query:QueryUndocumented
ctxData container, see Query.Query
sort_by_name:booleanWhether to sort by name or keep the input data's ordering
def QueryFields(fielddefs, selected):

Returns list of available fields.

Parameters
fielddefs:dictField definitions
selected:list of stringsList of selected fields
Returns
List of objects.QueryFieldDefinition
ALL_FIELD_LISTS =

Undocumented

Value
list(ALL_FIELDS.values())
CLUSTER_FIELDS =

Undocumented

Value
_BuildClusterFields()
CQ_CONFIG =

Undocumented

CQ_QUEUE_DRAINED =

Undocumented

CQ_WATCHER_PAUSE =

Undocumented

DOC_RE =

Undocumented

Value
re.compile(r'^[A-Z].*[^\.,\?!]$')
EXPORT_FIELDS =

Undocumented

Value
_BuildExportFields()
EXTSTORAGE_FIELDS =

Undocumented

Value
_BuildExtStorageFields()
FIELD_NAME_RE =

Undocumented

Value
re.compile(r'^[a-z0-9/\._]+$')
FILTER_FIELDS =

Undocumented

Value
_BuildFilterFields()
GQ_CONFIG =

Undocumented

GQ_DISKPARAMS =

Undocumented

GQ_INST =

Undocumented

GQ_NODE =

Undocumented

GROUP_FIELDS =

Undocumented

Value
_BuildGroupFields()
INSTANCE_FIELDS =

Undocumented

Value
_BuildInstanceFields()
IQ_CONFIG =

Undocumented

IQ_CONSOLE =

Undocumented

IQ_DISKUSAGE =

Undocumented

IQ_LIVE =

Undocumented

IQ_NETWORKS =

Undocumented

IQ_NODES =

Undocumented

JOB_FIELDS =

Undocumented

Value
_BuildJobFields()
JQ_ARCHIVED =

Undocumented

LOCK_FIELDS =

Undocumented

Value
_BuildLockFields()
LQ_MODE =

Undocumented

LQ_OWNER =

Undocumented

LQ_PENDING =

Undocumented

NETQ_CONFIG =

Undocumented

NETQ_GROUP =

Undocumented

NETQ_INST =

Undocumented

NETQ_STATS =

Undocumented

NETWORK_FIELDS =

Undocumented

Value
_BuildNetworkFields()
NODE_FIELDS =

Undocumented

Value
_BuildNodeFields()
NQ_CONFIG =

Undocumented

NQ_GROUP =

Undocumented

NQ_INST =

Undocumented

NQ_LIVE =

Undocumented

NQ_OOB =

Undocumented

OS_FIELDS =

Undocumented

Value
_BuildOsFields()
QFF_HOSTNAME: int =

Undocumented

Value
1
QFF_IP_ADDRESS: int =

Undocumented

Value
2
QFF_JOB_ID: int =

Undocumented

Value
4
QFF_SPLIT_TIMESTAMP: int =

Undocumented

Value
8
TITLE_RE =

Undocumented

Value
re.compile(r'^[^\s]+$')
def _BuildClusterFields():

Builds list of fields for cluster information.

def _BuildExportFields():

Builds list of fields for exports.

def _BuildExtStorageFields():

Builds list of fields for extstorage provider queries.

def _BuildFilterFields():

Builds list of fields for job filter queries.

def _BuildGroupFields():

Builds list of fields for node group queries.

def _BuildInstanceFields():

Builds list of fields for instance queries.

def _BuildJobFields():

Builds list of fields for job queries.

def _BuildLockFields():

Builds list of fields for lock queries.

def _BuildNDFields(is_group):

Builds all the ndparam fields.

Parameters
is_groupwhether this is called at group or node level
def _BuildNetworkFields():

Builds list of fields for network queries.

def _BuildNodeFields():

Builds list of fields for node queries.

def _BuildOsFields():

Builds list of fields for operating system queries.

def _ClusterWatcherPause(ctx, _):

Returns until when watcher is paused (if available).

def _CompileFilter(fields, hints, qfilter):

Converts a query filter into a callable function.

See _FilterCompilerHelper for details.

Returns
callableUndocumented
def _ConvWrap(convert, fn):

Convenience wrapper for _ConvWrapInner.

Parameters
convertConversion function receiving value as single parameter
fnRetrieval function
def _ConvWrapInner(convert, fn, ctx, item):

Wrapper for converting values.

Parameters
convertConversion function receiving value as single parameter
fnRetrieval function
ctxUndocumented
itemUndocumented
def _FieldDictKey(field):

Generates key for field dictionary.

def _GetDeadInstStatus(inst):

Undocumented

def _GetExportName(_, node_export_name):

Returns an export name if available.

def _GetGroup(cb):

Build function for calling another function with an node group.

Parameters
cbThe callback to be called with the nodegroup
def _GetInstAllNicBridges(ctx, inst):

Get all network bridges for an instance.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstAllNicNetworkNames(ctx, inst):

Get all network names for an instance.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstAllNicVlans(ctx, inst):

Get all network VLANs for an instance.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstanceConsole(ctx, inst):

Get console information for instance.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstanceDiskFields():

Get instance fields involving disks.

Returns
List of field definitions used as input for _PrepareFieldList
def _GetInstanceNetworkFields():

Get instance fields involving network interfaces.

Returns
Tuple containing list of field definitions used as input for _PrepareFieldList and a list of aliases
def _GetInstanceParameterFields():

Get instance fields involving parameters.

Returns
List of field definitions used as input for _PrepareFieldList
def _GetInstDeviceName(ctx, _, device):

Get a Device's Name.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
device:objects.NIC or objects.DiskThe NIC or Disk object
def _GetInstDeviceUUID(ctx, _, device):

Get a Device's UUID.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
device:objects.NIC or objects.DiskThe NIC or Disk object
def _GetInstDisk(index, cb):

Build function for calling another function with an instance Disk.

Parameters
index:intDisk index
cb:callableCallback
def _GetInstDiskSize(ctx, _, disk):

Get a Disk's size.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
disk:objects.DiskThe Disk object
def _GetInstDiskSpindles(ctx, _, disk):

Get a Disk's spindles.

Parameters
ctxUndocumented
_Undocumented
disk:objects.DiskThe Disk object
def _GetInstDiskUsage(ctx, inst):

Get disk usage for an instance.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstLiveData(name):

Build function for retrieving live data.

Parameters
name:stringLive data field name
def _GetInstNic(index, cb):

Build function for calling another function with an instance NIC.

Parameters
index:intNIC index
cb:callableCallback
def _GetInstNicBridge(ctx, index, _):

Get a NIC's bridge.

Parameters
ctx:InstanceQueryDataUndocumented
index:intNIC index
_Undocumented
def _GetInstNicIp(ctx, _, nic):

Get a NIC's IP address.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
nic:objects.NICNIC object
def _GetInstNicNetwork(ctx, _, nic):

Get a NIC's Network.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
nic:objects.NICNIC object
def _GetInstNicNetworkName(ctx, _, nic):

Get a NIC's Network.

Parameters
ctx:InstanceQueryDataUndocumented
_Undocumented
nic:objects.NICNIC object
def _GetInstNicParam(name):

Build function for retrieving a NIC parameter.

Parameters
name:stringParameter name
def _GetInstNicVLan(ctx, index, _):

Get a NIC's VLAN.

Parameters
ctx:InstanceQueryDataUndocumented
index:intNIC index
_Undocumented
def _GetInstNodeGroup(ctx, default, node_uuid):

Gets group UUID of an instance node.

Parameters
ctx:InstanceQueryDataUndocumented
defaultDefault value
node_uuid:stringNode UUID
def _GetInstNodeGroupName(ctx, default, node_uuid):

Gets group name of an instance node.

Parameters
ctx:InstanceQueryDataUndocumented
defaultDefault value
node_uuid:stringNode UUID
def _GetInstOperState(ctx, inst):

Get instance's operational status.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetInstStatus(ctx, inst):

Get instance status.

Parameters
ctx:InstanceQueryDataUndocumented
inst:objects.InstanceInstance object
def _GetItemAttr(attr):

Returns a field function to return an attribute of the item.

Parameters
attrAttribute name
def _GetItemMaybeAttr(attr):

Returns a field function to return a not-None attribute of the item.

If the value is None, then _FS_UNAVAIL will be returned instead.

Parameters
attrAttribute name
def _GetItemTimestamp(getter):

Returns function for getting timestamp of item.

Parameters
getter:callableFunction to retrieve timestamp attribute
def _GetItemTimestampFields(datatype):

Returns common timestamp fields.

Parameters
datatypeField data type for use by Query.RequestedData
def _GetLiveInstStatus(ctx, instance, instance_state):

Undocumented

def _GetLiveNodeField(field, kind, ctx, node):

Gets the value of a "live" field from NodeQueryData.

Parameters
fieldLive field name
kindData kind, one of constants.QFT_ALL
ctx:NodeQueryDataUndocumented
node:objects.NodeNode object
def _GetLockOwners(_, data):

Returns a sorted list of a lock's current owners.

def _GetLockPending(_, data):

Returns a sorted list of a lock's pending acquires.

def _GetNDParam(name):

Return a field function to return an ND parameter out of the context.

def _GetNdParams(ctx, node, ng):

Returns the ndparams for this node.

Parameters
ctx:NodeQueryDataUndocumented
node:objects.NodeNode object
ng:objects.NodeGroupThe node group this node belongs to
def _GetNetworkStatsField(field, kind, ctx, _):

Gets the value of a "stats" field from NetworkQueryData.

Parameters
fieldField name
kindData kind, one of constants.QFT_ALL
ctx:NetworkQueryDataUndocumented
_Undocumented
def _GetNodeDiskState(_, node):

Converts node's disk state for query result.

def _GetNodeGroup(ctx, node, ng):

Returns the name of a node's group.

Parameters
ctx:NodeQueryDataUndocumented
node:objects.NodeNode object
ng:objects.NodeGroupThe node group this node belongs to
def _GetNodeHvState(_, node):

Converts node's hypervisor state for query result.

def _GetNodeName(ctx, default, node_uuid):

Gets node name of a node.

Parameters
ctx:InstanceQueryDataUndocumented
defaultDefault value
node_uuid:stringNode UUID
def _GetNodePower(ctx, node):

Returns the node powered state

Parameters
ctx:NodeQueryDataUndocumented
node:objects.NodeNode object
def _GetNodeRole(node, master_uuid):

Determine node role.

Parameters
node:objects.NodeNode object
master_uuid:stringMaster node UUID
def _GetQueryFields(fielddefs, selected):

Calculates the internal list of selected fields.

Unknown fields are returned as constants.QFT_UNKNOWN.

Parameters
fielddefs:dictField definitions
selected:list of stringsList of selected fields
def _GetStatsField(field, kind, data):

Gets a value from live statistics.

If the value is not found, _FS_UNAVAIL is returned. If the field kind is numeric a conversion to integer is attempted. If that fails, _FS_UNAVAIL is returned.

Parameters
fieldLive field name
kindData kind, one of constants.QFT_ALL
data:dictStatistics
def _GetUnknownField(ctx, item):

Gets the contents of an unknown field.

def _JobTimestamp(fn):

Wrapper for _JobTimestampInner.

def _JobTimestampInner(fn, job):

Converts unavailable timestamp to _FS_UNAVAIL.

def _JobUnavail(inner):

Wrapper for _JobUnavailInner.

def _JobUnavailInner(fn, ctx, jid_job):

Return _FS_UNAVAIL if job is None.

When listing specifc jobs (e.g. "gnt-job list 1 2 3"), a job may not be found, in which case this function converts it to _FS_UNAVAIL.

def _MakeComparisonChecks(fn):

Prepares flag-specific comparisons using a comparison function.

def _MakeField(name, title, kind, doc):

Wrapper for creating objects.QueryFieldDefinition instances.

Parameters
nameField name as a regular expression
titleHuman-readable title
kindField type
docHuman-readable description
def _MakeSplitTimestampComparison(fn):

Compares split timestamp values after converting to float.

def _PerJobOp(fn):

Wrapper for _PerJobOpInner.

def _PerJobOpInner(fn, job):

Executes a function per opcode in a job.

def _PrepareFieldList(fields, aliases):

Prepares field list for use by Query.

Converts the list to a dictionary and does some verification.

Parameters
fields:list of tuples; (objects.QueryFieldDefinition, data kind, retrieval function)List of fields, see Query.__init__ for a better description
aliases:list of tuples; (alias, target)list of tuples containing aliases; for each alias/target pair, a duplicate will be created in the field list
Returns
dictField dictionary for Query
def _PrepareRegex(pattern):

Compiles a regular expression.

def _PrepareSplitTimestamp(value):

Prepares a value for comparison by _MakeSplitTimestampComparison.

def _ProcessResult(value):

Converts result values into externally-visible ones.

def _StaticValue(value):

Prepares a function to return a static value.

def _StaticValueInner(value, ctx, _):

Returns a static value.

def _VerifyResultRow(fields, row):

Verifies the contents of a query result row.

Parameters
fields:listField definitions for result
row:list of tuplesRow data
def _WrapBinaryOp(op_fn, retrieval_fn, value, ctx, item):

Wrapper for binary operator functions.

def _WrapLogicOp(op_fn, sentences, ctx, item):

Wrapper for logic operator functions.

def _WrapNot(fn, lhs, rhs):

Negates the result of a wrapped function.

def _WrapUnaryOp(op_fn, inner, ctx, item):

Wrapper for unary operator functions.

_CLUSTER_SIMPLE_FIELDS =

Undocumented

Value
{'cluster_name': ('Name', QFT_TEXT, QFF_HOSTNAME, 'Cluster name'),
 'volume_group_name': ('VgName', QFT_TEXT, 0, 'LVM volume group name')}
_CLUSTER_VERSION_FIELDS =

Undocumented

Value
{'software_version': ('SoftwareVersion',
                      QFT_TEXT,
                      constants.RELEASE_VERSION,
                      'Software version'),
 'protocol_version': ('ProtocolVersion',
                      QFT_NUMBER,
                      constants.PROTOCOL_VERSION,
...
_FILTER_SIMPLE_FIELDS =

Undocumented

Value
{'watermark': ('Watermark', QFT_NUMBER, 0, 'Watermark'),
 'priority': ('Priority', QFT_NUMBER, 0, 'Priority'),
 'predicates': ('Predicates', QFT_OTHER, 0, 'Predicates'),
 'action': ('Action', QFT_OTHER, 0, 'Action'),
 'reason_trail': ('ReasonTrail', QFT_OTHER, 0, 'Reason trail'),
 'uuid': ('UUID', QFT_TEXT, 0, 'Network UUID')}
_FS_NODATA =

Undocumented

Value
object()
_FS_OFFLINE =

Undocumented

Value
object()
_FS_UNAVAIL =

Undocumented

Value
object()
_FS_UNKNOWN =

Undocumented

Value
object()
_GROUP_SIMPLE_FIELDS =

Undocumented

Value
{'alloc_policy': ('AllocPolicy', QFT_TEXT, 'Allocation policy for group'),
 'name': ('Group', QFT_TEXT, 'Group name'),
 'serial_no': ('SerialNo', QFT_NUMBER, _SERIAL_NO_DOC%'Group'),
 'uuid': ('UUID', QFT_TEXT, 'Group UUID')}
_INST_SIMPLE_FIELDS =

Undocumented

Value
{'disk_template': ('Disk_template', QFT_TEXT, 0, 'Instance disk template'),
 'hypervisor': ('Hypervisor', QFT_TEXT, 0, 'Hypervisor name'),
 'name': ('Instance', QFT_TEXT, QFF_HOSTNAME, 'Instance name'),
 'network_port': ('Network_port',
                  QFT_OTHER,
                  0,
                  'Instance network port if available (e.g. for VNC console)'),
...
_NETWORK_SIMPLE_FIELDS =

Undocumented

Value
{'name': ('Network', QFT_TEXT, 0, 'Name'),
 'network': ('Subnet', QFT_TEXT, 0, 'IPv4 subnet'),
 'gateway': ('Gateway', QFT_OTHER, 0, 'IPv4 gateway'),
 'network6': ('IPv6Subnet', QFT_OTHER, 0, 'IPv6 subnet'),
 'gateway6': ('IPv6Gateway', QFT_OTHER, 0, 'IPv6 gateway'),
 'mac_prefix': ('MacPrefix', QFT_OTHER, 0, 'MAC address prefix'),
 'serial_no': ('SerialNo', QFT_NUMBER, 0, _SERIAL_NO_DOC%'Network'),
...
_NETWORK_STATS_FIELDS =

Undocumented

Value
{'free_count': ('FreeCount', QFT_NUMBER, 0, 'Number of available addresses'),
 'reserved_count': ('ReservedCount',
                    QFT_NUMBER,
                    0,
                    'Number of reserved addresses'),
 'map': ('Map', QFT_TEXT, 0, 'Actual mapping'),
 'external_reservations': ('ExternalReservations', QFT_TEXT, 0, 'External reserv
...
_NODE_LIVE_FIELDS =

Undocumented

Value
{'bootid': ('BootID',
            QFT_TEXT,
            'bootid',
            'Random UUID renewed for each system reboot, can be used for detecti
ng reboots by tracking changes'),
 'cnodes': ('CNodes',
            QFT_NUMBER,
...
_NODE_SIMPLE_FIELDS =

Undocumented

Value
{'drained': ('Drained', QFT_BOOL, 0, 'Whether node is drained'),
 'master_candidate': ('MasterC',
                      QFT_BOOL,
                      0,
                      'Whether node is a master candidate'),
 'master_capable': ('MasterCapable',
                    QFT_BOOL,
...
_SERIAL_NO_DOC: str =

Undocumented

Value
'%s object serial number, incremented on each modification'
_VERIFY_FN =

Undocumented

Value
{QFT_UNKNOWN: ht.TNone,
 QFT_TEXT: ht.TString,
 QFT_BOOL: ht.TBool,
 QFT_NUMBER: ht.TInt,
 QFT_NUMBER_FLOAT: ht.TFloat,
 QFT_UNIT: ht.TInt,
 QFT_TIMESTAMP: ht.TNumber,
...
_VTToQFT =

Undocumented