Add query field flags
authorMichael Hanselmann <hansmi@google.com>
Fri, 25 Feb 2011 14:27:32 +0000 (15:27 +0100)
committerMichael Hanselmann <hansmi@google.com>
Tue, 1 Mar 2011 13:31:56 +0000 (14:31 +0100)
commit111bf531199a6d56649dc7a5050111aebb7cff39
tree520220295898b6071b17b3ba185c5e69d08cd8c6
parent88076fd142267b9439989a4ac8c5fc4c00fe07ad
Add query field flags

Some fields (e.g. “name”) should be treated specially when comparing for
equality. Hypervisor names should use normal rules, but for node names,
“node2” should be equivalent with “node2.example.com”.

To make these differences, a new field for flags is added to the query
fields. It is not added to ”objects.QueryFieldDefinition” (the first
item) as it would be exported to clients, something not desired for
these internal rules. Instead, an additional field is added.

Other special rules, e.g. “a list of strings” for an instance's
secondary nodes, can be implemented as flags, too.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: René Nussbaumer <rn@google.com>
lib/build/sphinx_ext.py
lib/query.py
test/ganeti.query_unittest.py