guest: Use newer named CreateXML API

CreateLinux is the very old style name. CreateXML has been around
since at least 2009, which covers our minimum libvirt-python version
This commit is contained in:
Cole Robinson 2016-06-17 08:07:36 -04:00
parent 48ba2883e5
commit 837a9710a3
2 changed files with 3 additions and 3 deletions

View File

@ -399,7 +399,7 @@ class Guest(XMLBuilder):
doboot = not noboot or self.installer.has_install_phase()
if doboot:
dom = self.conn.createLinux(start_xml or final_xml, 0)
dom = self.conn.createXML(start_xml or final_xml, 0)
else:
dom = self.conn.defineXML(start_xml or final_xml)

View File

@ -218,7 +218,7 @@ class MagicURI(object):
conn.getDomainCapabilities = fake_domcaps
if self.hv:
origcreate = conn.createLinux
origcreate = conn.createXML
origdefine = conn.defineXML
def newcreate(xml, flags):
xml = sanitize_xml_for_test_define(xml)
@ -226,5 +226,5 @@ class MagicURI(object):
def newdefine(xml):
xml = sanitize_xml_for_test_define(xml)
return origdefine(xml)
conn.createLinux = newcreate
conn.createXML = newcreate
conn.defineXML = newdefine