>
> + if options.virt == "Xen" or options.virt == "XenFV":
> + libvirt_version = virsh_version(options.ip, options.virt)
> + if libvirt_version <= "0.3.3":
> + expected_values['empty']['network'] = "no network
with
> matching name"
> + expected_values['invalid']['network'] = "no network
with
> matching name"
> +
> + inv_br_str = "POST operation failed: (xend.err 'Device 0
> (vif) " + \
> + "could not be connected. Could not find
> bridge device " + \
> + "invalid')"
> +
> + expected_values['invalid']['bridge'] = inv_br_str
> +
> + else:
> + expected_values['empty']['network'] = "Network not
found"
> + expected_values['invalid']['network'] = "Network
not found"
> + + inv_br_str = "POST operation failed:
> xend_post: error from xen " + \
> + "daemon: (xend.err 'Device 0 (vif) could not
> be " + \
> + "connected. Could not find bridge device
> invalid')"
> + expected_values['invalid']['bridge'] = inv_br_str
>
We can use a common variable to assign these error messages get the
assignment to the expected_values fields before coming out of the
if options.virt == "Xen" or options.virt == "XenFV": check.
Not sure what you mean here...
But any suggestions appreciated, because what I have here isn't very
pretty. =)
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com