> + curr_cim_rev, changeset = get_provider_version(options.virt,
> options.ip)
> + if curr_cim_rev < target_dev_rev:
> + logger.error("Network interface target device support is
> available" \
> + " in rev >= %s", target_dev_rev)
> + return SKIP
> +
> + cxml = get_class(options.virt)(test_dom)
> +
> + target_dev = "vtap7"
>
We can use a random number in the name here.
We cannot create 2 guests which use the same target device name.
The test would have failed had we tried to start the guest with an error
similar to the one below:
libvir: QEMU error : Failed to add tap interface 'vtap7' to bridge
'testbridge3': Device or resource busy
Sorry for the delay on this - excellent point here.
Can we also start the guest in the test case instead of just defining
the guest ?
Sure - this is a good idea.
> +
> + guest_defined = False
> +
> + try:
> + rasd_list = get_rasd_list(options.ip, options.virt, target_dev)
> + if len(rasd_list) < 1:
> + raise Exception("Unable to get template RASDs for %s" %
> test_dom)
> +
> + cxml.set_res_settings(rasd_list)
> + ret = cxml.cim_define(options.ip)
> + if not ret:
> + raise Exception("Unable to define %s" % test_dom)
> +
> + guest_defined = True +
> + status = verify_net_rasd(options.ip, options.virt,
> target_dev, test_dom)
> + if status != PASS:
> + raise Exception("Failed to net interface for %s" % test_dom)
>
small typo, "Failed to net" should have been "Failed to add net"
Thanks! Will fix this in the next revision. =)
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com