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

Module qlang

source code

Module for a simple query language

Functions [hide private]
 
ReadSimpleFilter(namefield, filter_)
Function extracting wanted names from restricted filter.
source code
 
MakeSimpleFilter(namefield, values)
Builds a filter for use with ReadSimpleFilter.
source code
Variables [hide private]
  OP_OR = "|"
  OP_EQUAL = "="

Imports: errors


Function Details [hide private]

ReadSimpleFilter(namefield, filter_)

source code 

Function extracting wanted names from restricted filter.

This should only be used until proper filtering is implemented. The filter must either be empty or of the format ["|", ["=", field, "name1"], ["=", field, "name2"], ...].

MakeSimpleFilter(namefield, values)

source code 

Builds a filter for use with ReadSimpleFilter.

Parameters:
  • namefield - Name of field containing item name
  • values - List of names