From 6ffd4eca30766153aa920888411f6437948757b2 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 2 May 2008 16:38:22 -0400 Subject: Add some missing files and do some more work on dns/dhcp refactoring --- cobbler/action_check.py | 8 +++++++- cobbler/action_litesync.py | 4 ++-- cobbler/modules/manage_dnsmasq.py | 5 ++++- cobbler/modules/manage_isc_and_bind.py | 4 ++-- 4 files changed, 15 insertions(+), 6 deletions(-) (limited to 'cobbler') diff --git a/cobbler/action_check.py b/cobbler/action_check.py index 588a65a..2004c9f 100644 --- a/cobbler/action_check.py +++ b/cobbler/action_check.py @@ -48,7 +48,13 @@ class BootCheck: else: status.append(_("configured management mode in modules.conf is unknown")) # FIXME: add in checks for bind config - + if self.settings.manage_dns: + mode = self.config.api.get_sync().manager.what() + if mode == "isc_and_bind": + #self.check_bind_bin(status) + #self.check_service(status,"dhcpd") + pass + self.check_service(status, "cobblerd") self.check_bootloaders(status) diff --git a/cobbler/action_litesync.py b/cobbler/action_litesync.py index ba0a256..9df99cc 100644 --- a/cobbler/action_litesync.py +++ b/cobbler/action_litesync.py @@ -117,8 +117,8 @@ class BootLiteSync: self.sync.manager.write_dhcp_lease( self.settings.omapi_port, interface["hostname"], - interface["mac-address"], - interface["ip-address"] + interface["mac_address"], + interface["ip_address"] ) diff --git a/cobbler/modules/manage_dnsmasq.py b/cobbler/modules/manage_dnsmasq.py index d37a2d4..465995f 100644 --- a/cobbler/modules/manage_dnsmasq.py +++ b/cobbler/modules/manage_dnsmasq.py @@ -55,7 +55,6 @@ class DnsmasqManager: self.settings = config.settings() self.repos = config.repos() self.templar = templar.Templar(config) - self.dns = dns def what(self): return "dnsmasq" @@ -186,6 +185,10 @@ class DnsmasqManager: fh.write(ip + "\t" + host + "\n") fh.close() + def write_dns_files(self): + # already taken care of by the regen_hosts() + pass + def get_manager(config): return DnsmasqManager(config) diff --git a/cobbler/modules/manage_isc_and_bind.py b/cobbler/modules/manage_isc_and_bind.py index bc3a338..3927c69 100644 --- a/cobbler/modules/manage_isc_and_bind.py +++ b/cobbler/modules/manage_isc_and_bind.py @@ -213,8 +213,8 @@ class IscAndBindManager: if mac is not None and mac != "": if host is not None and host != "": if self.settings.omapi_enabled and self.settings.omapi_port: - self.removeDHCPLease(self.settings.omapi_port,host) - self.writeDHCPLease(self.settings.omapi_port,host,ip,mac) + self.remove_dhcp_lease(self.settings.omapi_port,host) + self.write_dhcp_lease(self.settings.omapi_port,host,ip,mac) dhcp_tag = interface["dhcp_tag"] if dhcp_tag == "": -- cgit