示例#1
0
文件: api.py 项目: ciupicri/cobbler
 def get_module_from_file(self,section,name,fallback=None):
     """
     Looks in /etc/cobbler/modules.conf for a section called 'section'
     and a key called 'name', and then returns the module that corresponds
     to the value of that key.
     Cobbler internal use only.
     """
     return module_loader.get_module_from_file(section,name,fallback)
示例#2
0
 def get_module_from_file(self, section, name, fallback=None):
     """
     Looks in /etc/cobbler/modules.conf for a section called 'section'
     and a key called 'name', and then returns the module that corresponds
     to the value of that key.
     Cobbler internal use only.
     """
     return module_loader.get_module_from_file(section, name, fallback)
示例#3
0
 def __init__(self, config, verbose=False, logger=None):
     """
     Constructor
     """
     self.verbose = verbose
     self.config = config
     self.distros = config.distros()
     self.profiles = config.profiles()
     self.systems = config.systems()
     self.images = config.images()
     self.settings = config.settings()
     self.repos = config.repos()
     if logger is None:
         logger = clogger.Logger()
     self.logger = logger
     self.tftpd = module_loader.get_module_from_file("tftpd", "module", "in_tftpd").get_manager(config, logger)
     self.sync = config.api.get_sync(verbose, logger=self.logger)
     self.sync.make_tftpboot()
示例#4
0
 def __init__(self, collection_mgr, verbose=False, logger=None):
     """
     Constructor
     """
     self.verbose = verbose
     self.collection_mgr = collection_mgr
     self.distros = collection_mgr.distros()
     self.profiles = collection_mgr.profiles()
     self.systems = collection_mgr.systems()
     self.images = collection_mgr.images()
     self.settings = collection_mgr.settings()
     self.repos = collection_mgr.repos()
     if logger is None:
         logger = clogger.Logger()
     self.logger = logger
     self.tftpd = module_loader.get_module_from_file(
         "tftpd", "module", "in_tftpd").get_manager(collection_mgr, logger)
     self.sync = collection_mgr.api.get_sync(verbose, logger=self.logger)
     self.sync.make_tftpboot()
示例#5
0
文件: api.py 项目: ciupicri/cobbler
 def get_module_name_from_file(self,section,name,fallback=None):
     """
     Looks up a module the same as get_module_from_file but returns
     the module name rather than the module itself
     """
     return module_loader.get_module_from_file(section,name,fallback,just_name=True)
示例#6
0
文件: api.py 项目: CyaLiven/cobbler
 def get_module_name_from_file(self,section,name,fallback=None):
     """
     Looks up a module the same as get_module_from_file but returns
     the module name rather than the module itself
     """
     return module_loader.get_module_from_file(section,name,fallback,just_name=True)