[Libvirt-cim] [PATCH] [TEST] #3 Check that the DefineSystem() result can be passed to GetInstance()
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Jul 30 20:06:23 UTC 2008
> + at do_main(sup_types)
> +def main():
> + options = main.options
> +
> + rc, systemref = define_test_system(options)
> + if systemref is None:
> + return rc
> +
> + if not isinstance(systemref, pywbem.CIMInstanceName):
> + logger.error("ResultingSystem is not a Reference!")
> + return FAIL
> +
You'll need to undefine the guest before the return
> + if systemref.namespace is None:
> + logger.error("Returned reference had no namespace!")
> + return FAIL
Same here.
> +
> + logger.info("GetInstance(%s)" % systemref)
> + system = get_instance_by_ref(options.ip, systemref)
> +
> + undefine_test_domain(default_dom, options.ip, virt=options.virt)
> +
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list