dom0/core: implement per-VM-type firewall defaults

This commit is contained in:
Marek Marczykowski 2012-06-05 19:37:12 +02:00
parent 79f13d6c66
commit a8b992e647

View File

@ -1215,8 +1215,11 @@ class QubesVm(object):
def has_firewall(self):
return os.path.exists (self.firewall_conf)
def get_firewall_defaults(self):
return { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
def get_firewall_conf(self):
conf = { "rules": list(), "allow": True, "allowDns": True, "allowIcmp": True, "allowYumProxy": False }
conf = self.get_firewall_defaults()
try:
tree = xml.etree.ElementTree.parse(self.firewall_conf)