> + ac = enumclass.enumerate(options.ip, cn, key,
options.virt)
> +
> + for p in pt:
> + enum_list = enumclass.enumerate(options.ip, p, key,
> options.virt)
> +
> + if len(enum_list) < 1:
> + # If libvirt version >= 0.4.1, libvirt-cim uses
> libvirt's
> + # disk pool support instead of creating its own
> diskpool.
> + # In this case, it's possible for a disk pool to not
> exist. + libvirt_version = virsh_version(options.ip,
> options.virt)
> + if p == "DiskPool" and libvirt_version >=
'0.4.1':
> + continue
> +
> + logger.error("%s did not return any instances" % p)
> + return FAIL
>
The tc will fail in the following conditions:
1) if p == "DiskPool" and libvirt_version < '0.4.1' and when there
is no
diskpool on the machines.
2) Also, when the NetworkPool does not exist OR when the existing
NetworkPool are in inactive states.
Yep! Good call on both of these. I forgot to test these cases.
We can improve the test case by making sure we have atleast one of
each
type of the pool and then verify that the AC and the various pools
return the similar results.
Agreed. It's a better way of handling the test.
Also, Can we include the comment that you have in the patch in the
test
case as it does not have any comments as of now and also, it will
provide as a reference for maintenance of the tc.
Sure.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com