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

Class QueryBase

source code


Base for query utility classes.

Instance Methods [hide private]
 
__init__(self, qfilter, fields, use_locking)
Initializes this class.
source code
 
_GetNames(self, lu, all_names, lock_level)
Helper function to determine names asked for in the query.
source code
 
ExpandNames(self, lu)
Expand names for this query.
source code
 
DeclareLocks(self, lu, level)
Declare locks for this query.
source code
 
_GetQueryData(self, lu)
Collects all data for this query.
source code
 
NewStyleQuery(self, lu)
Collect data and execute query.
source code
 
OldStyleQuery(self, lu)
Collect data and execute query.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  FIELDS = None
Attribute holding field definitions
  SORT_FIELD = "name"
Field to sort by
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, qfilter, fields, use_locking)
(Constructor)

source code 

Initializes this class.

Overrides: object.__init__

ExpandNames(self, lu)

source code 

Expand names for this query.

See LogicalUnit.ExpandNames.

DeclareLocks(self, lu, level)

source code 

Declare locks for this query.

See LogicalUnit.DeclareLocks.

_GetQueryData(self, lu)

source code 

Collects all data for this query.

Returns:
Query data object