Source code for cobbler.modules.managers.tftpd_py

"""
This is some of the code behind 'cobbler sync'.
"""

from builtins import object
import cobbler.clogger as clogger
import cobbler.tftpgen as tftpgen
import cobbler.templar as templar


[docs]def register(): """ The mandatory cobbler module registration hook. """ return "manage"
[docs]class TftpdPyManager(object):
[docs] def what(self): return "tftpd"
def __init__(self, collection_mgr, logger): """ Constructor """ self.logger = logger if self.logger is None: self.logger = clogger.Logger() self.collection_mgr = collection_mgr self.templar = templar.Templar(collection_mgr)
[docs] def regen_hosts(self): pass # not used
[docs] def write_dns_files(self): pass # not used
[docs] def write_boot_files_distro(self, distro): """ Copy files in profile["boot_files"] into /tftpboot. Used for vmware currently. """ pass # not used. Handed by tftp.py
[docs] def write_boot_files(self): """ Copy files in profile["boot_files"] into /tftpboot. Used for vmware currently. """ pass # not used. Handed by tftp.py
[docs] def add_single_distro(self, distro): pass # not used
[docs] def sync(self, verbose=True): """ Write out files to /tftpdboot. Mostly unused for the python server """ self.logger.info("copying bootloaders") tftpgen.TFTPGen(self.collection_mgr, self.logger).copy_bootloaders()
[docs] def update_netboot(self, name): """ Write out files to /tftpdboot. Unused for the python server """ pass
[docs] def add_single_system(self, name): """ Write out files to /tftpdboot. Unused for the python server """ pass
[docs]def get_manager(collection_mgr, logger): return TftpdPyManager(collection_mgr, logger)