From 65cbf4415e9f9db7b91088d6452e1621b3d4fb36 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 7 Sep 2007 15:20:04 -0400 Subject: Added --dhcp-tag for multi-subnet configuration --- cobbler/item_system.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cobbler/item_system.py') diff --git a/cobbler/item_system.py b/cobbler/item_system.py index 445cf73..9f22969 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -39,6 +39,7 @@ class System(item.Item): self.netboot_enabled = (1, '<>')[is_subobject] self.hostname = ("", '<>')[is_subobject] self.depth = 2 + self.dhcp_tag = "default" self.kickstart = "<>" # use value in profile self.virt_path = "<>" # use value in profile self.virt_type = "<>" # use value in profile @@ -54,6 +55,7 @@ class System(item.Item): self.kickstart = self.load_item(seed_data, 'kickstart', '<>') self.virt_path = self.load_item(seed_data, 'virt_path', '<>') self.virt_type = self.load_item(seed_data, 'virt_type', '<>') + self.dhcp_tag = self.load_item(seed_data, 'dhcp_tag', 'default') # backwards compat, load --ip-address from two possible sources. # the old --pxe-address was a bit of a misnomer, new value is --ip-address @@ -155,6 +157,10 @@ class System(item.Item): return False return True + def set_dhcp_tag(self,dhcp_tag): + self.dhcp_tag = dhcp_tag + return True + def set_hostname(self,hostname): self.hostname = hostname return True @@ -274,7 +280,8 @@ class System(item.Item): 'depth' : self.depth, 'kickstart' : self.kickstart, 'virt_type' : self.virt_type, - 'virt_path' : self.virt_path + 'virt_path' : self.virt_path, + 'dhcp_tag' : self.dhcp_tag } def printable(self): @@ -291,5 +298,6 @@ class System(item.Item): buf = buf + _("kickstart : %s\n") % self.kickstart buf = buf + _("virt type : %s\n") % self.virt_type buf = buf + _("virt path : %s\n") % self.virt_path + buf = buf + _("dhcp tag : %s\n") % self.dhcp_tag return buf -- cgit