Package ganeti :: Module cmdlib :: Class _OsQuery
[hide private]
[frames] | no frames]

Class _OsQuery

source code


Instance Methods [hide private]
 
ExpandNames(self, lu)
Expand names for this query.
source code
 
DeclareLocks(self, lu, level)
Declare locks for this query.
source code
 
_GetQueryData(self, lu)
Computes the list of nodes and their attributes.
source code

Inherited from _QueryBase: NewStyleQuery, OldStyleQuery, __init__

Inherited from _QueryBase (private): _GetNames

Static Methods [hide private]
dict
_DiagnoseByOS(rlist)
Remaps a per-node return list into an a per-os per-node dictionary
source code
Class Variables [hide private]
  FIELDS = _BuildOsFields()
Attribute holding field definitions

Inherited from _QueryBase: SORT_FIELD

Method Details [hide private]

ExpandNames(self, lu)

source code 

Expand names for this query.

See LogicalUnit.ExpandNames.

Overrides: _QueryBase.ExpandNames
(inherited documentation)

DeclareLocks(self, lu, level)

source code 

Declare locks for this query.

See LogicalUnit.DeclareLocks.

Overrides: _QueryBase.DeclareLocks
(inherited documentation)

_DiagnoseByOS(rlist)
Static Method

source code 

Remaps a per-node return list into an a per-os per-node dictionary

Parameters:
  • rlist - a map with node names as keys and OS objects as values
Returns: dict
a dictionary with osnames as keys and as value another map, with nodes as keys and tuples of (path, status, diagnose, variants, parameters, api_versions) as values, eg:
 {"debian-etch": {"node1": [(/usr/lib/..., True, "", [], []),
                            (/srv/..., False, "invalid api")],
                  "node2": [(/srv/..., True, "", [], [])]}
 }

_GetQueryData(self, lu)

source code 

Computes the list of nodes and their attributes.

Returns:
Query data object
Overrides: _QueryBase._GetQueryData