query: return UNAVAIL for "wrong" HV parameters
authorIustin Pop <iustin@google.com>
Sun, 16 Jan 2011 16:28:33 +0000 (17:28 +0100)
committerIustin Pop <iustin@google.com>
Tue, 18 Jan 2011 15:55:56 +0000 (16:55 +0100)
commitff4cd4d222215219a445e87f7ea3022c32205e82
tree188e606a77d0a1a83e13cbe4c1a38de59dba648e
parentd1c3c3b3f66a3b98c83bc88efc8d286895d9df79
query: return UNAVAIL for "wrong" HV parameters

If a HV parameter is required that does not apply for an instance,
currently the code returns None. This is bad, as it means we cannot
switch to the actual HV parameter types and validate correctly this
field.

This patch changes it so that in this case we return QRFS_UNAVAIL;
ideally we would use a NOT_APPROPRIATE or similar field, but UNAVAIL is
good enough (the call cannot fail in another way).

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