summaryrefslogtreecommitdiffstats
path: root/cobbler/item_system.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/item_system.py')
-rw-r--r--cobbler/item_system.py12
1 files changed, 8 insertions, 4 deletions
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):