Beautify disk ipolicy violations in cluster-verify
authorIustin Pop <iustin@google.com>
Mon, 14 May 2012 13:21:27 +0000 (15:21 +0200)
committerIustin Pop <iustin@google.com>
Tue, 15 May 2012 11:38:08 +0000 (13:38 +0200)
commit0c2e59ac756f8de88aedfe718abb687b4cf5303b
treef6497e41dae7456ca58a9926fdf8bf2117cdafa2
parent889bed1668c7fee8ebc131e5efb2d3d469e8ac78
Beautify disk ipolicy violations in cluster-verify

Currently, we only get:

  instance3: ['disk-size value 512 is not in range [1024, 1048576]'

which doesn't explain which disk we are talking about. This patch
extends the verification functions to take an additional parameter
that qualifies the disk:

  instance3: ['disk-size/0 value 512 is not in range [1024, 1048576]'

Future patch will make the formatting of the list better.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cmdlib.py
test/ganeti.cmdlib_unittest.py