summaryrefslogtreecommitdiffstats
path: root/cobbler/item_system.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-10-11 11:43:13 -0400
committerJim Meyering <jim@meyering.net>2006-10-11 11:43:13 -0400
commita0b61ddb6681474cc67a0667f679ceea08191d3e (patch)
treef53a45a96c8b961b82fc3d0ce1d5c3dd40efdc84 /cobbler/item_system.py
parente3c21f3a12fe5350cc2a9d6b984304bb30293b96 (diff)
downloadthird_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.tar.gz
third_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.tar.xz
third_party-cobbler-a0b61ddb6681474cc67a0667f679ceea08191d3e.zip
(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
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):