def _compare(self, guest, filebase, do_install, do_disk_boot=False, do_create=True): filename = filebase and build_xmlfile(filebase) or None guest._prepare_install(progress.BaseMeter()) try: actualXML = guest.get_config_xml(install=do_install, disk_boot=do_disk_boot) if filename: utils.diff_compare(actualXML, filename) if do_create: utils.test_create(guest.conn, actualXML) finally: guest._cleanup_install()
def _alter_compare(self, actualXML, outfile): utils.test_create(conn, actualXML) utils.diff_compare(actualXML, outfile)
def _clone_define(self, filebase): """Take the valid output xml and attempt to define it on the connection to ensure we don't get any errors""" outfile = os.path.join(clonexml_dir, filebase + "-out.xml") outxml = utils.read_file(outfile) utils.test_create(conn, outxml)