summaryrefslogtreecommitdiffstats
path: root/cobbler/item_profile.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_profile.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_profile.py')
-rw-r--r--cobbler/item_profile.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/cobbler/item_profile.py b/cobbler/item_profile.py
index 286e0d3..9a79adf 100644
--- a/cobbler/item_profile.py
+++ b/cobbler/item_profile.py
@@ -44,6 +44,7 @@ class Profile(item.Item):
self.depth = 1
self.virt_type = (self.settings.default_virt_type, '<<inherit>>')[is_subobject]
self.virt_path = ("", '<<inherit>>')[is_subobject]
+ self.dhcp_tag = ("default", '<<inherit>>')[is_subobject]
def from_datastruct(self,seed_data):
"""
@@ -58,6 +59,7 @@ class Profile(item.Item):
self.ks_meta = self.load_item(seed_data,'ks_meta')
self.repos = self.load_item(seed_data,'repos', [])
self.depth = self.load_item(seed_data,'depth', 1)
+ self.dhcp_tag = self.load_item(seed_data,'dhcp_tag', 'default')
# backwards compatibility
if type(self.repos) != list:
@@ -112,6 +114,10 @@ class Profile(item.Item):
return True
raise CX(_("distribution not found"))
+ def set_dhcp_tag(self,dhcp_tag):
+ self.dhcp_tag = dhcp_tag
+ return True
+
def set_repos(self,repos):
# allow the magic inherit string to persist
@@ -270,7 +276,8 @@ class Profile(item.Item):
'parent' : self.parent,
'depth' : self.depth,
'virt_type' : self.virt_type,
- 'virt_path' : self.virt_path
+ 'virt_path' : self.virt_path,
+ 'dhcp_tag' : self.dhcp_tag
}
def printable(self):
@@ -287,5 +294,6 @@ class Profile(item.Item):
buf = buf + _("virt type : %s\n") % self.virt_type
buf = buf + _("virt path : %s\n") % self.virt_path
buf = buf + _("repos : %s\n") % self.repos
+ buf = buf + _("dhcp tag : %s\n") % self.dhcp_tag
return buf