network Future proof PXE detection
This commit is contained in:
parent
ce27c4c4ae
commit
be2b59e5ff
|
@ -142,7 +142,9 @@ class vmmNetwork(gobject.GObject):
|
|||
|
||||
def can_pxe(self):
|
||||
xml = self.get_xml()
|
||||
return (util.get_xml_path(xml, "/network/forward/@mode") == "route" or
|
||||
util.get_xml_path(xml, "/network/ip/dhcp/bootp/@file"))
|
||||
forward = self.get_ipv4_forward()[0]
|
||||
if forward and forward != "nat":
|
||||
return True
|
||||
return bool(util.get_xml_path(xml, "/network/ip/dhcp/bootp/@file"))
|
||||
|
||||
gobject.type_register(vmmNetwork)
|
||||
|
|
Loading…
Reference in New Issue