summaryrefslogtreecommitdiffstats
path: root/cobbler/item_system.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-07 15:20:04 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-07 15:20:04 -0400
commit65cbf4415e9f9db7b91088d6452e1621b3d4fb36 (patch)
treec505a4a6be557f575f6c880b80c0a001e47088bb /cobbler/item_system.py
parentb255bf609d10946dd42ad346d67b28c56f04a471 (diff)
downloadthird_party-cobbler-65cbf4415e9f9db7b91088d6452e1621b3d4fb36.tar.gz
third_party-cobbler-65cbf4415e9f9db7b91088d6452e1621b3d4fb36.tar.xz
third_party-cobbler-65cbf4415e9f9db7b91088d6452e1621b3d4fb36.zip
Added --dhcp-tag for multi-subnet configuration
Diffstat (limited to 'cobbler/item_system.py')
-rw-r--r--cobbler/item_system.py10
1 files changed, 9 insertions, 1 deletions
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, '<<inherit>>')[is_subobject]
self.hostname = ("", '<<inheirt>>')[is_subobject]
self.depth = 2
+ self.dhcp_tag = "default"
self.kickstart = "<<inherit>>" # use value in profile
self.virt_path = "<<inherit>>" # use value in profile
self.virt_type = "<<inherit>>" # use value in profile
@@ -54,6 +55,7 @@ class System(item.Item):
self.kickstart = self.load_item(seed_data, 'kickstart', '<<inherit>>')
self.virt_path = self.load_item(seed_data, 'virt_path', '<<inherit>>')
self.virt_type = self.load_item(seed_data, 'virt_type', '<<inherit>>')
+ 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