LUQueryInstances: fix querying for nic data
authorGuido Trotter <ultrotter@google.com>
Tue, 16 Jun 2009 14:47:25 +0000 (15:47 +0100)
committerGuido Trotter <ultrotter@google.com>
Tue, 16 Jun 2009 15:03:01 +0000 (16:03 +0100)
commit39a02558dbd906b0c4f1d86d239538dfc5b7ad3a
treefcbc725c333c25252bc848dd70ac4d154ec6f8ba
parenta2a24f4ce7cf7d2bce490c97dc2328a4f7360bfe
LUQueryInstances: fix querying for nic data

Currently we support querying for "mac" "ip" or "bridge", meaning "the
one of the first nic. We are not checking that there is a first nic,
though, and thus could incur in errors. This patch fixes it by returning
"None" should there be no such nic, as it's done when explicitely asking
for a nic via nic.<field>/<N>

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/cmdlib.py