[Libvirt-cim] [PATCH] [TEST] Updating the 01_forward.py tc in SettingsDefineCapabilities
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Tue Apr 22 14:53:33 UTC 2008
> - at do_main(sup_types)
> +def verify_rasd_fields(loop, assoc_info, cllist, rtype, rangelist):
> + status = PASS
> + for inst in assoc_info:
> + if inst.classname != cllist[loop]:
> + print_error("Classname", inst.classname, cllist[loop])
> + status = FAIL
> + if inst['ResourceType'] != rtype[cllist[loop]]:
> + print_error("ResourceType", inst['ResourceType'],
> + rtype[cllist[loop]])
> + status = FAIL
> + ppolicy = inst['PropertyPolicy']
> + if ppolicy != 0 and ppolicy != 1:
> + print_error("PropertyPolicy", inst['PropertyPolicy'], ppolicy)
> + status = FAIL
> + vrole = inst['ValueRole']
> + if vrole < 0 or vrole > 4:
> + print_error("ValueRole", inst['ValueRole'], vrole)
> + status = FAIL
> + insid = inst['InstanceID']
> + vrange = rangelist[insid]
> + if vrange != inst['ValueRange']:
> + print_error("ValueRange", inst['ValueRange'], vrange)
> + status = FAIL
> + if status != PASS:
> + break
> + return status
> +
> +
Nice job on turning this into a function. I think this makes things more
readable. I know this is just a reshuffling of code, but can you modify
it so that we return an error instead of just setting the status to
FAIL? That way, we bail out immediately.
Also, this test fails for me on F9 with KVM using current sources. This
is because the current providers use diskpools (which you need a version
of libvirt 0.4.0 or newer, I believe).
Daisy was going to look into working out a disk pool fix, so you might
want to check with her to see if she's still planning on this.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list