
- cxml.undefine(options.ip) - if rc == -1: - return XFAIL_RC(bug_cpu) + for case in test_cases: + cxml.undefine(options.ip) + ret = cxml.define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + cleanup_env(options.ip, options.virt, cxml, net_name) + return FAIL + if case == "start": + ret = cxml.start(options.ip) + if not ret: + logger.error("Failed to start the dom: %s", default_dom) + cleanup_env(options.ip, options.virt, cxml, net_name) + return FAIL
Can we do like this ? if case == "start": ret = cxml.start(options.ip) else: ret = cxml.define(options.ip) if not ret: logger.error("Failed to '%s' the dom: %s", case, default_dom) cleanup_env(options.ip, options.virt, cxml, net_name) return FAIL
I don't think that'll work for what we want. What we want to do is: 1) Define a guest using the a default XML 2) Modify that guest with ModifyResource() calls 3) Undefine the guest 4) Define using a default XML 5) Start the guest 6) Modify the running guest with ModifyResource() calls After you're done modifying the defined guest, you need to undefine the guest and then start with a default XML. If we don't do this step, we start a guest that already has a modified XML. So that said, I realized there's a bug in the code here. The cxml XML object will retain the changes made during the modify call, so we need to overwrite it with the defaults. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com