8.1.4.1.4. cobbler.modules.managers package
8.1.4.1.4.1. Submodules
8.1.4.1.4.2. cobbler.modules.managers.bind module
This is some of the code behind ‘cobbler sync’.
- class cobbler.modules.managers.bind.MetadataZoneHelper(forward_zones: List[str], reverse_zones: List[Tuple[str, str]], zone_include: str)[source]
Bases:
object
Helper class to hold data for template rendering of named config files.
- cobbler.modules.managers.bind.get_manager(api: CobblerAPI) _BindManager [source]
This returns the object to manage a BIND server located locally on the Cobbler server.
- Parameters
api – The API to resolve all information with.
- Returns
The BindManger object to manage bind with.
8.1.4.1.4.3. cobbler.modules.managers.dnsmasq module
This is some of the code behind ‘cobbler sync’.
- cobbler.modules.managers.dnsmasq.get_manager(api: CobblerAPI) _DnsmasqManager [source]
Creates a manager object to manage a dnsmasq server.
- Parameters
api – The API to resolve all information with.
- Returns
The object generated from the class.
8.1.4.1.4.4. cobbler.modules.managers.genders module
Cobbler Module that manages the cluster configuration tool from CHAOS. For more information please see: GitHub - chaos/genders
- cobbler.modules.managers.genders.register() str [source]
We should run anytime something inside of Cobbler changes.
- Returns
Always
/var/lib/cobbler/triggers/change/*
- cobbler.modules.managers.genders.run(api: CobblerAPI, args: Any) int [source]
Mandatory Cobbler trigger hook.
- Parameters
api – The api to resolve information with.
args – For this implementation unused.
- Returns
0
or1
, depending on the outcome of the operation.
- cobbler.modules.managers.genders.write_genders_file(config: CobblerAPI, profiles_genders: Dict[str, str], distros_genders: Dict[str, str], mgmtcls_genders: Dict[str, str])[source]
Genders file is over-written when
manage_genders
is set in our settings.- Parameters
config – The API instance to template the data with.
profiles_genders – The profiles which should be included.
distros_genders – The distros which should be included.
mgmtcls_genders – The management classes which should be included.
- Raises
OSError – Raised in case the template could not be read.
8.1.4.1.4.5. cobbler.modules.managers.import_signatures module
8.1.4.1.4.6. cobbler.modules.managers.in_tftpd module
This is some of the code behind ‘cobbler sync’.
- cobbler.modules.managers.in_tftpd.get_manager(api: CobblerAPI) _InTftpdManager [source]
Creates a manager object to manage an in_tftp server.
- Parameters
api – The API which holds all information in the current Cobbler instance.
- Returns
The object to manage the server with.
8.1.4.1.4.7. cobbler.modules.managers.isc module
This is some of the code behind ‘cobbler sync’.
- cobbler.modules.managers.isc.get_manager(api: CobblerAPI) _IscManager [source]
Creates a manager object to manage an isc dhcp server.
- Parameters
api – The API which holds all information in the current Cobbler instance.
- Returns
The object to manage the server with.
8.1.4.1.4.8. cobbler.modules.managers.ndjbdns module
This is some of the code behind ‘cobbler sync’.
- cobbler.modules.managers.ndjbdns.get_manager(api: CobblerAPI) _NDjbDnsManager [source]
Creates a manager object to manage an isc dhcp server.
- Parameters
api – The API which holds all information in the current Cobbler instance.
- Returns
The object to manage the server with.
8.1.4.1.4.9. Module contents
This module contains extensions for services Cobbler is managing. The services are restarted via the service
command
or alternatively through the server executables directly. Cobbler does not announce the restarts but is expecting to be
allowed to do this on its own at any given time. Thus all services managed by Cobbler should not be touched by any
other tool or administrator.
- class cobbler.modules.managers.DhcpManagerModule(api: CobblerAPI)[source]
Bases:
ManagerModule
TODO
- class cobbler.modules.managers.DnsManagerModule(api: CobblerAPI)[source]
Bases:
ManagerModule
TODO
- class cobbler.modules.managers.ManagerModule(api: CobblerAPI)[source]
Bases:
object
Base class for Manager modules located in
modules/manager/*.py
These are typically but not necessarily used to manage systemd services. Enabling can be done via settings
manage_*
(e.g.manage_dhcp
) andrestart_*
(e.g.restart_dhcp
). Different modules could manage the same functionality as dhcp can be managed via isc.py or dnsmasq.py (compare with/etc/cobbler/modules.py
).- regen_ethers() None [source]
ISC/BIND doesn’t use this. It is there for compatibility reasons with other managers.
- restart_service() int [source]
Write module specific config files. E.g. dhcp manager would write
/etc/dhcpd.conf
here
- sync() int [source]
This syncs the manager’s server (systemd service) with it’s new config files. Basically this restarts the service to apply the changes.
- Returns
Integer return value of restart_service - 0 on success
- class cobbler.modules.managers.TftpManagerModule(api: CobblerAPI)[source]
Bases:
ManagerModule
TODO
- abstract sync_single_system(system: System, menu_items: Optional[Dict[str, Union[str, Dict[str, str]]]] = None) None [source]
TODO
- Parameters
system – TODO
menu_items – TODO