network Future proof PXE detection

This commit is contained in:
Cole Robinson 2010-12-06 21:38:05 -05:00
parent ce27c4c4ae
commit be2b59e5ff
1 changed files with 4 additions and 2 deletions

View File

@ -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)