cli: Add infrastructure for query2
authorMichael Hanselmann <hansmi@google.com>
Wed, 8 Dec 2010 17:55:50 +0000 (18:55 +0100)
committerMichael Hanselmann <hansmi@google.com>
Tue, 14 Dec 2010 13:23:12 +0000 (14:23 +0100)
commitee3aedff6a2085ae282966a36bc3a5bdfbc2ff8d
treecc9643ed2566310466844c38887ad28269f8d7ae
parente61ae2cc69bda374a3dffd5c353aa9c9e478e4d6
cli: Add infrastructure for query2

A new function for formatting the query results is added,
``FormatTable``. This was determined to be easier and safer than
modifying the existing ``GenerateTable`` function while keeping
backwards compatibility for code not yet converted. The new code makes
use of the enhanced information provided by query2.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: RenĂ© Nussbaumer <rn@google.com>
lib/cli.py
lib/constants.py
test/ganeti.cli_unittest.py