Kaitlin Rupert wrote:
> +def verify_err_fields(cxml, server, conn, keys, classname, +
> assoc_classname, msg, field):
> + try:
> + ret = try_assoc(conn, classname, assoc_classname, keys, +
> field_name=field, expr_values=expr_values[field], + bug_no="")
> + if ret != PASS:
> + if classname == 'Linux_ComputerSystem':
> + return XFAIL_RC(bug_sblim)
> + else:
> + logger.error("--- FAILED: %s---", msg)
> + cxml.destroy(server)
You also need cxml.undefine() here.
I removed the cxml.undefine() since
cxml.destroy() is just sufficient to
destroy the domain that was created using cxml.create().
I had verified this before removing the cxml.undefine(), let me know if
you still think we need to include cxml.undefine().
> + acn = get_typed_class(virt, 'HostedDependency')
> + status, host_name, classname = get_host_info(server, virt)
> + if status:
> + logger.error("Unable to get host info")
> + cxml.destroy(server)
Same here.
> + msg = 'Invalid CreationClassName Key Value'
> + field='INVALID_CCNameValue'
> + keys = { 'CreationClassName' : field, 'Name' : host_name }
> + ret_value = verify_err_fields(cxml, server, conn, keys, classname,
> + acn, msg, field)
> + cxml.destroy(server)
Here as well.
> + return ret_value