From a0b61ddb6681474cc67a0667f679ceea08191d3e Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 11 Oct 2006 11:43:13 -0400 Subject: (1) initial work on a command to import build trees into cobbler in a really fast, automated way (2) bundling 2.4's subprocess as sub_process (it's supposed to work) since subprocess isn't available on 2.3 and we want to support lots of 2.3 machines --- cobbler/item_system.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'cobbler/item_system.py') diff --git a/cobbler/item_system.py b/cobbler/item_system.py index 315ab3a..217e511 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -54,11 +54,15 @@ class System(item.Item): self.name = name # we check it add time, but store the original value. return True - def set_pxe_address(self,hostname): - # we allow this to be set to anything and should restrict it - if not utils.is_ip(hostname): + def set_pxe_address(self,address): + # restricting to address as IP only in dhcpd.conf is probably + # incorrect ... some people may want to pin the hostname instead. + # doing so, however, doesn't allow dhcpd.conf to be managed + # by cobbler (since elilo can't do MAC addresses) -- this is + # covered in the man page. + if not utils.is_ip(address) and not utils.is_mac(address): raise cexceptions.CobblerException("bad_ip") - self.pxe_address = hostname + self.pxe_address = address return True def set_profile(self,profile_name): -- cgit