Package ganeti :: Module query
[hide private]
[frames] | no frames]

Module query

source code

Module for query operations

How it works:


Attention: Retrieval functions must be idempotent. They can be called multiple times, in any order and any number of times.

Classes [hide private]
  _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
  ExtStorageInfo
  ClusterQueryData
  NetworkQueryData
Data container for network data queries.
Functions [hide private]
 
_GetUnknownField(ctx, item)
Gets the contents of an unknown field.
source code
 
_GetQueryFields(fielddefs, selected)
Calculates the internal list of selected fields.
source code
list of objects.QueryFieldDefinition
GetAllFields(fielddefs)
Extract objects.QueryFieldDefinition from field definitions.
source code
 
_WrapLogicOp(op_fn, sentences, ctx, item)
Wrapper for logic operator functions.
source code
 
_WrapUnaryOp(op_fn, inner, ctx, item)
Wrapper for unary operator functions.
source code
 
_WrapBinaryOp(op_fn, retrieval_fn, value, ctx, item)
Wrapper for binary operator functions.
source code
 
_WrapNot(fn, lhs, rhs)
Negates the result of a wrapped function.
source code
 
_PrepareRegex(pattern)
Compiles a regular expression.
source code
 
_PrepareSplitTimestamp(value)
Prepares a value for comparison by _MakeSplitTimestampComparison.
source code
 
_MakeSplitTimestampComparison(fn)
Compares split timestamp values after converting to float.
source code
 
_MakeComparisonChecks(fn)
Prepares flag-specific comparisons using a comparison function.
source code
callable
_CompileFilter(fields, hints, qfilter)
Converts a query filter into a callable function.
source code
 
_ProcessResult(value)
Converts result values into externally-visible ones.
source code
 
_VerifyResultRow(fields, row)
Verifies the contents of a query result row.
source code
 
_FieldDictKey((fdef, _, flags, fn))
Generates key for field dictionary.
source code
dict
_PrepareFieldList(fields, aliases)
Prepares field list for use by Query.
source code
 
GetQueryResponse(query, ctx, sort_by_name=True)
Prepares the response for a query.
source code
 
QueryFields(fielddefs, selected)
Returns list of available fields.
source code
 
_MakeField(name, title, kind, doc)
Wrapper for creating objects.QueryFieldDefinition instances.
source code
 
_StaticValueInner(value, ctx, _)
Returns a static value.
source code
 
_StaticValue(value)
Prepares a function to return a static value.
source code
 
_GetNodeRole(node, master_uuid)
Determine node role.
source code
 
_GetItemAttr(attr)
Returns a field function to return an attribute of the item.
source code
 
_GetItemMaybeAttr(attr)
Returns a field function to return a not-None attribute of the item.
source code
 
_GetNDParam(name)
Return a field function to return an ND parameter out of the context.
source code
 
_BuildNDFields(is_group)
Builds all the ndparam fields.
source code
 
_ConvWrapInner(convert, fn, ctx, item)
Wrapper for converting values.
source code
 
_ConvWrap(convert, fn)
Convenience wrapper for _ConvWrapInner.
source code
 
_GetItemTimestamp(getter)
Returns function for getting timestamp of item.
source code
 
_GetItemTimestampFields(datatype)
Returns common timestamp fields.
source code
 
_GetGroup(cb)
Build function for calling another function with an node group.
source code
 
_GetNodeGroup(ctx, node, ng)
Returns the name of a node's group.
source code
 
_GetNodePower(ctx, node)
Returns the node powered state
source code
 
_GetNdParams(ctx, node, ng)
Returns the ndparams for this node.
source code
 
_GetLiveNodeField(field, kind, ctx, node)
Gets the value of a "live" field from NodeQueryData.
source code
 
_GetStatsField(field, kind, data)
Gets a value from live statistics.
source code
 
_GetNodeHvState(_, node)
Converts node's hypervisor state for query result.
source code
 
_GetNodeDiskState(_, node)
Converts node's disk state for query result.
source code
 
_BuildNodeFields()
Builds list of fields for node queries.
source code
 
_GetInstOperState(ctx, inst)
Get instance's operational status.
source code
 
_GetInstLiveData(name)
Build function for retrieving live data.
source code
 
_GetLiveInstStatus(ctx, instance, instance_state) source code
 
_GetDeadInstStatus(inst) source code
 
_GetInstStatus(ctx, inst)
Get instance status.
source code
 
_GetInstDisk(index, cb)
Build function for calling another function with an instance Disk.
source code
 
_GetInstDiskSize(ctx, _, disk)
Get a Disk's size.
source code
 
_GetInstDiskSpindles(ctx, _, disk)
Get a Disk's spindles.
source code
 
_GetInstDeviceName(ctx, _, device)
Get a Device's Name.
source code
 
_GetInstDeviceUUID(ctx, _, device)
Get a Device's UUID.
source code
 
_GetInstNic(index, cb)
Build function for calling another function with an instance NIC.
source code
 
_GetInstNicNetworkName(ctx, _, nic)
Get a NIC's Network.
source code
 
_GetInstNicNetwork(ctx, _, nic)
Get a NIC's Network.
source code
 
_GetInstNicIp(ctx, _, nic)
Get a NIC's IP address.
source code
 
_GetInstNicBridge(ctx, index, _)
Get a NIC's bridge.
source code
 
_GetInstNicVLan(ctx, index, _)
Get a NIC's VLAN.
source code
 
_GetInstAllNicNetworkNames(ctx, inst)
Get all network names for an instance.
source code
 
_GetInstAllNicVlans(ctx, inst)
Get all network VLANs for an instance.
source code
 
_GetInstAllNicBridges(ctx, inst)
Get all network bridges for an instance.
source code
 
_GetInstNicParam(name)
Build function for retrieving a NIC parameter.
source code
 
_GetInstanceNetworkFields()
Get instance fields involving network interfaces.
source code
 
_GetInstDiskUsage(ctx, inst)
Get disk usage for an instance.
source code
 
_GetInstanceConsole(ctx, inst)
Get console information for instance.
source code
 
_GetInstanceDiskFields()
Get instance fields involving disks.
source code
 
_GetInstanceParameterFields()
Get instance fields involving parameters.
source code
 
_GetNodeName(ctx, default, node_uuid)
Gets node name of a node.
source code
 
_GetInstNodeGroup(ctx, default, node_uuid)
Gets group UUID of an instance node.
source code
 
_GetInstNodeGroupName(ctx, default, node_uuid)
Gets group name of an instance node.
source code
 
_BuildInstanceFields()
Builds list of fields for instance queries.
source code
 
_GetLockOwners(_, data)
Returns a sorted list of a lock's current owners.
source code
 
_GetLockPending(_, data)
Returns a sorted list of a lock's pending acquires.
source code
 
_BuildLockFields()
Builds list of fields for lock queries.
source code
 
_BuildGroupFields()
Builds list of fields for node group queries.
source code
 
_BuildOsFields()
Builds list of fields for operating system queries.
source code
 
_BuildExtStorageFields()
Builds list of fields for extstorage provider queries.
source code
 
_JobUnavailInner(fn, ctx, (job_id, job))
Return _FS_UNAVAIL if job is None.
source code
 
_JobUnavail(inner)
Wrapper for _JobUnavailInner.
source code
 
_PerJobOpInner(fn, job)
Executes a function per opcode in a job.
source code
 
_PerJobOp(fn)
Wrapper for _PerJobOpInner.
source code
 
_JobTimestampInner(fn, job)
Converts unavailable timestamp to _FS_UNAVAIL.
source code
 
_JobTimestamp(fn)
Wrapper for _JobTimestampInner.
source code
 
_BuildJobFields()
Builds list of fields for job queries.
source code
 
_GetExportName(_, (node_name, expname))
Returns an export name if available.
source code
 
_BuildExportFields()
Builds list of fields for exports.
source code
 
_ClusterWatcherPause(ctx, _)
Returns until when watcher is paused (if available).
source code
 
_BuildClusterFields()
Builds list of fields for cluster information.
source code
 
_GetNetworkStatsField(field, kind, ctx, _)
Gets the value of a "stats" field from NetworkQueryData.
source code
 
_BuildNetworkFields()
Builds list of fields for network queries.
source code
 
_BuildFilterFields()
Builds list of fields for job filter queries.
source code
Variables [hide private]
  QFF_HOSTNAME = 0x01
  QFF_IP_ADDRESS = 0x02
  QFF_JOB_ID = 0x04
  QFF_SPLIT_TIMESTAMP = 0x08
  QFF_ALL = QFF_HOSTNAME | QFF_IP_ADDRESS | QFF_JOB_ID | QFF_SPL...
  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 = compat.UniqueFrozenset([_FS_UNKNOWN, _FS_NODATA, _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...
  _CLUSTER_VERSION_FIELDS = {"software_version":("SoftwareVersio...
  _CLUSTER_SIMPLE_FIELDS = {"cluster_name":("Name", QFT_TEXT, QF...
  _NETWORK_SIMPLE_FIELDS = {"name":("Network", QFT_TEXT, 0, "Nam...
  _NETWORK_STATS_FIELDS = {"free_count":("FreeCount", QFT_NUMBER...
  _FILTER_SIMPLE_FIELDS = {"watermark":("Watermark", QFT_NUMBER,...
  CLUSTER_FIELDS = _BuildClusterFields()
Fields for cluster information
  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
  EXTSTORAGE_FIELDS = _BuildExtStorageFields()
Fields available for extstorage provider queries
  JOB_FIELDS = _BuildJobFields()
Fields available for job queries
  EXPORT_FIELDS = _BuildExportFields()
Fields available for exports
  NETWORK_FIELDS = _BuildNetworkFields()
Fields available for network queries
  FILTER_FIELDS = _BuildFilterFields()
Fields available for job filter queries
  ALL_FIELDS = {constants.QR_CLUSTER: CLUSTER_FIELDS, constants....
All available resources
  ALL_FIELD_LISTS = ALL_FIELDS.values()
All available field lists

Imports: logging, operator, re, constants, errors, utils, compat, objects, ht, runtime, qlang, jstore, hv_base, QFT_UNKNOWN, QFT_TEXT, QFT_BOOL, QFT_NUMBER, QFT_NUMBER_FLOAT, QFT_UNIT, QFT_TIMESTAMP, QFT_OTHER, RS_NORMAL, RS_UNKNOWN, RS_NODATA, RS_UNAVAIL, RS_OFFLINE


Function Details [hide private]

_GetQueryFields(fielddefs, selected)

source code 

Calculates the internal list of selected fields.

Unknown fields are returned as constants.QFT_UNKNOWN.

Parameters:
  • fielddefs (dict) - Field definitions
  • selected (list of strings) - List of selected fields

_CompileFilter(fields, hints, qfilter)

source code 

Converts a query filter into a callable function.

See _FilterCompilerHelper for details.

Returns: callable

_VerifyResultRow(fields, row)

source code 

Verifies the contents of a query result row.

Parameters:
  • fields (list) - Field definitions for result
  • row (list of tuples) - Row data

_PrepareFieldList(fields, aliases)

source code 

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: dict
Field dictionary for Query

GetQueryResponse(query, ctx, sort_by_name=True)

source code 

Prepares the response for a query.

Parameters:
  • ctx - Data container, see Query.Query
  • sort_by_name (boolean) - Whether to sort by name or keep the input data's ordering
  • query (Query)

QueryFields(fielddefs, selected)

source code 

Returns list of available fields.

Parameters:
  • fielddefs (dict) - Field definitions
  • selected (list of strings) - List of selected fields
Returns:
List of objects.QueryFieldDefinition

_MakeField(name, title, kind, doc)

source code 

Wrapper for creating objects.QueryFieldDefinition instances.

Parameters:
  • name - Field name as a regular expression
  • title - Human-readable title
  • kind - Field type
  • doc - Human-readable description

_GetNodeRole(node, master_uuid)

source code 

Determine node role.

Parameters:
  • node (objects.Node) - Node object
  • master_uuid (string) - Master node UUID

_GetItemAttr(attr)

source code 

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

Parameters:
  • attr - Attribute name

_GetItemMaybeAttr(attr)

source code 

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:
  • attr - Attribute name

_BuildNDFields(is_group)

source code 

Builds all the ndparam fields.

Parameters:
  • is_group - whether this is called at group or node level

_ConvWrapInner(convert, fn, ctx, item)

source code 

Wrapper for converting values.

Parameters:
  • convert - Conversion function receiving value as single parameter
  • fn - Retrieval function

_ConvWrap(convert, fn)

source code 

Convenience wrapper for _ConvWrapInner.

Parameters:
  • convert - Conversion function receiving value as single parameter
  • fn - Retrieval function

_GetItemTimestamp(getter)

source code 

Returns function for getting timestamp of item.

Parameters:
  • getter (callable) - Function to retrieve timestamp attribute

_GetItemTimestampFields(datatype)

source code 

Returns common timestamp fields.

Parameters:

_GetGroup(cb)

source code 

Build function for calling another function with an node group.

Parameters:
  • cb - The callback to be called with the nodegroup

_GetNodeGroup(ctx, node, ng)

source code 

Returns the name of a node's group.

Parameters:

_GetNodePower(ctx, node)

source code 

Returns the node powered state

Parameters:

_GetNdParams(ctx, node, ng)

source code 

Returns the ndparams for this node.

Parameters:

_GetLiveNodeField(field, kind, ctx, node)

source code 

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

Parameters:

_GetStatsField(field, kind, data)

source code 

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:
  • field - Live field name
  • kind - Data kind, one of constants.QFT_ALL
  • data (dict) - Statistics

_GetInstOperState(ctx, inst)

source code 

Get instance's operational status.

Parameters:

_GetInstLiveData(name)

source code 

Build function for retrieving live data.

Parameters:
  • name (string) - Live data field name

_GetInstStatus(ctx, inst)

source code 

Get instance status.

Parameters:

_GetInstDisk(index, cb)

source code 

Build function for calling another function with an instance Disk.

Parameters:
  • index (int) - Disk index
  • cb (callable) - Callback

_GetInstDiskSize(ctx, _, disk)

source code 

Get a Disk's size.

Parameters:

_GetInstDiskSpindles(ctx, _, disk)

source code 

Get a Disk's spindles.

Parameters:

_GetInstDeviceName(ctx, _, device)

source code 

Get a Device's Name.

Parameters:

_GetInstDeviceUUID(ctx, _, device)

source code 

Get a Device's UUID.

Parameters:

_GetInstNic(index, cb)

source code 

Build function for calling another function with an instance NIC.

Parameters:
  • index (int) - NIC index
  • cb (callable) - Callback

_GetInstNicNetworkName(ctx, _, nic)

source code 

Get a NIC's Network.

Parameters:

_GetInstNicNetwork(ctx, _, nic)

source code 

Get a NIC's Network.

Parameters:

_GetInstNicIp(ctx, _, nic)

source code 

Get a NIC's IP address.

Parameters:

_GetInstNicBridge(ctx, index, _)

source code 

Get a NIC's bridge.

Parameters:

_GetInstNicVLan(ctx, index, _)

source code 

Get a NIC's VLAN.

Parameters:

_GetInstAllNicNetworkNames(ctx, inst)

source code 

Get all network names for an instance.

Parameters:

_GetInstAllNicVlans(ctx, inst)

source code 

Get all network VLANs for an instance.

Parameters:

_GetInstAllNicBridges(ctx, inst)

source code 

Get all network bridges for an instance.

Parameters:

_GetInstNicParam(name)

source code 

Build function for retrieving a NIC parameter.

Parameters:
  • name (string) - Parameter name

_GetInstanceNetworkFields()

source code 

Get instance fields involving network interfaces.

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

_GetInstDiskUsage(ctx, inst)

source code 

Get disk usage for an instance.

Parameters:

_GetInstanceConsole(ctx, inst)

source code 

Get console information for instance.

Parameters:

_GetInstanceDiskFields()

source code 

Get instance fields involving disks.

Returns:
List of field definitions used as input for _PrepareFieldList

_GetInstanceParameterFields()

source code 

Get instance fields involving parameters.

Returns:
List of field definitions used as input for _PrepareFieldList

_GetNodeName(ctx, default, node_uuid)

source code 

Gets node name of a node.

Parameters:

_GetInstNodeGroup(ctx, default, node_uuid)

source code 

Gets group UUID of an instance node.

Parameters:

_GetInstNodeGroupName(ctx, default, node_uuid)

source code 

Gets group name of an instance node.

Parameters:

_JobUnavailInner(fn, ctx, (job_id, job))

source code 

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.

_GetNetworkStatsField(field, kind, ctx, _)

source code 

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

Parameters:
  • field - Field name
  • kind - Data kind, one of constants.QFT_ALL
  • ctx (NetworkQueryData)

Variables Details [hide private]

QFF_ALL

Value:
QFF_HOSTNAME | QFF_IP_ADDRESS | QFF_JOB_ID | QFF_SPLIT_TIMESTAMP

_VERIFY_FN

Verification function for each field type

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_T\
IMESTAMP: ht.TNumber, QFT_OTHER: lambda _: True,}

_FS_ALL

List of all special status

Value:
compat.UniqueFrozenset([_FS_UNKNOWN, _FS_NODATA, _FS_UNAVAIL, _FS_OFFL\
INE,])

_VTToQFT

VType to QFT mapping

Value:
{constants.VTYPE_STRING: QFT_OTHER, constants.VTYPE_MAYBE_STRING: QFT_\
OTHER, constants.VTYPE_BOOL: QFT_BOOL, constants.VTYPE_SIZE: QFT_UNIT,\
 constants.VTYPE_INT: QFT_NUMBER, constants.VTYPE_FLOAT: QFT_NUMBER_FL\
OAT,}

_SERIAL_NO_DOC

Value:
"%s object serial number, incremented on each modification"

_NODE_SIMPLE_FIELDS

Fields that are direct attributes of an objects.Node object

Value:
{"drained":("Drained", QFT_BOOL, 0, "Whether node is drained"), "maste\
r_candidate":("MasterC", QFT_BOOL, 0, "Whether node is a master candid\
ate"), "master_capable":("MasterCapable", QFT_BOOL, 0, "Whether node c\
an become a master candidate"), "name":("Node", QFT_TEXT, QFF_HOSTNAME\
, "Node name"), "offline":("Offline", QFT_BOOL, 0, "Whether node is ma\
rked offline"), "serial_no":("SerialNo", QFT_NUMBER, 0, _SERIAL_NO_DOC\
 % "Node"), "uuid":("UUID", QFT_TEXT, 0, "Node UUID"), "vm_capable":("\
VMCapable", QFT_BOOL, 0, "Whether node can host instances"),}

_NODE_LIVE_FIELDS

Fields requiring talking to the node

Value:
{"bootid":("BootID", QFT_TEXT, "bootid", "Random UUID renewed for each\
 system reboot, can be used" " for detecting reboots by tracking chang\
es"), "cnodes":("CNodes", QFT_NUMBER, "cpu_nodes", "Number of NUMA dom\
ains on node (if exported by hypervisor)"), "cnos":("CNOs", QFT_NUMBER\
, "cpu_dom0", "Number of logical processors used by the node OS (dom0 \
for Xen)"), "csockets":("CSockets", QFT_NUMBER, "cpu_sockets", "Number\
 of physical CPU sockets (if exported by hypervisor)"), "ctotal":("CTo\
tal", QFT_NUMBER, "cpu_total", "Number of logical processors"), "dfree\
...

_INST_SIMPLE_FIELDS

Value:
{"disk_template":("Disk_template", QFT_TEXT, 0, "Instance disk templat\
e"), "hypervisor":("Hypervisor", QFT_TEXT, 0, "Hypervisor name"), "nam\
e":("Instance", QFT_TEXT, QFF_HOSTNAME, "Instance name"), "network_por\
t":("Network_port", QFT_OTHER, 0, "Instance network port if available \
(e.g. for VNC console)"), "os":("OS", QFT_TEXT, 0, "Operating system")\
, "serial_no":("SerialNo", QFT_NUMBER, 0, _SERIAL_NO_DOC % "Instance")\
, "uuid":("UUID", QFT_TEXT, 0, "Instance UUID"),}

_GROUP_SIMPLE_FIELDS

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, "Gro\
up UUID"),}

_CLUSTER_VERSION_FIELDS

Value:
{"software_version":("SoftwareVersion", QFT_TEXT, constants.RELEASE_VE\
RSION, "Software version"), "protocol_version":("ProtocolVersion", QFT\
_NUMBER, constants.PROTOCOL_VERSION, "RPC protocol version"), "config_\
version":("ConfigVersion", QFT_NUMBER, constants.CONFIG_VERSION, "Conf\
iguration format version"), "os_api_version":("OsApiVersion", QFT_NUMB\
ER, max(constants.OS_API_VERSIONS), "API version for OS template scrip\
ts"), "export_version":("ExportVersion", QFT_NUMBER, constants.EXPORT_\
VERSION, "Import/export file format version"), "vcs_version":("VCSVers\
...

_CLUSTER_SIMPLE_FIELDS

Value:
{"cluster_name":("Name", QFT_TEXT, QFF_HOSTNAME, "Cluster name"), "vol\
ume_group_name":("VgName", QFT_TEXT, 0, "LVM volume group name"),}

_NETWORK_SIMPLE_FIELDS

Value:
{"name":("Network", QFT_TEXT, 0, "Name"), "network":("Subnet", QFT_TEX\
T, 0, "IPv4 subnet"), "gateway":("Gateway", QFT_OTHER, 0, "IPv4 gatewa\
y"), "network6":("IPv6Subnet", QFT_OTHER, 0, "IPv6 subnet"), "gateway6\
":("IPv6Gateway", QFT_OTHER, 0, "IPv6 gateway"), "mac_prefix":("MacPre\
fix", QFT_OTHER, 0, "MAC address prefix"), "serial_no":("SerialNo", QF\
T_NUMBER, 0, _SERIAL_NO_DOC % "Network"), "uuid":("UUID", QFT_TEXT, 0,\
 "Network UUID"),}

_NETWORK_STATS_FIELDS

Value:
{"free_count":("FreeCount", QFT_NUMBER, 0, "Number of available addres\
ses"), "reserved_count":("ReservedCount", QFT_NUMBER, 0, "Number of re\
served addresses"), "map":("Map", QFT_TEXT, 0, "Actual mapping"), "ext\
ernal_reservations":("ExternalReservations", QFT_TEXT, 0, "External re\
servations"),}

_FILTER_SIMPLE_FIELDS

Value:
{"watermark":("Watermark", QFT_NUMBER, 0, "Watermark"), "priority":("P\
riority", 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"),}

ALL_FIELDS

All available resources

Value:
{constants.QR_CLUSTER: CLUSTER_FIELDS, constants.QR_INSTANCE: INSTANCE\
_FIELDS, constants.QR_NODE: NODE_FIELDS, constants.QR_LOCK: LOCK_FIELD\
S, constants.QR_GROUP: GROUP_FIELDS, constants.QR_OS: OS_FIELDS, const\
ants.QR_EXTSTORAGE: EXTSTORAGE_FIELDS, constants.QR_JOB: JOB_FIELDS, c\
onstants.QR_EXPORT: EXPORT_FIELDS, constants.QR_NETWORK: NETWORK_FIELD\
S, constants.QR_FILTER: FILTER_FIELDS,}