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’.

cobbler.modules.managers.bind.get_manager(api)[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.

cobbler.modules.managers.bind.register() str[source]

The mandatory Cobbler module registration hook.

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)[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.

cobbler.modules.managers.dnsmasq.register() str[source]

The mandatory Cobbler modules registration hook.

Returns

Always “manage”.

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, args) int[source]

Mandatory Cobbler trigger hook.

Parameters
  • api – The api to resolve information with.

  • args – For this implementation unused.

Returns

0 or 1, depending on the outcome of the operation.

cobbler.modules.managers.genders.write_genders_file(config, profiles_genders, distros_genders, mgmtcls_genders)[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

Cobbler Module that contains the code for cobbler import and provides the magic to automatically detect an ISO image OS and version.

cobbler.modules.managers.import_signatures.get_import_manager(api)[source]

Get an instance of the import manager which enables you to import various things.

Parameters

api – The API instance of Cobbler

Returns

The object to import data with.

cobbler.modules.managers.import_signatures.import_walker(top: str, func: Callable, arg: Any)[source]

Directory tree walk with callback function.

For each directory in the directory tree rooted at top (including top itself, but excluding ‘.’ and ‘..’), call func(arg, dirname, filenames). dirname is the name of the directory, and filenames a list of the names of the files and subdirectories in dirname (excluding ‘.’ and ‘..’). func may modify the filenames list in-place (e.g. via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in filenames; this can be used to implement a filter, or to impose a specific order of visiting. No semantics are defined for, or required of, arg, beyond that arg is always passed to func. It can be used, e.g., to pass a filename pattern, or a mutable object designed to accumulate statistics.

Parameters
  • top – The most top directory for which func should be run.

  • func – A function which is called as described in the above description.

  • arg – Passing None for this is common.

cobbler.modules.managers.import_signatures.register() str[source]

The mandatory Cobbler module registration hook.

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)[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.

cobbler.modules.managers.in_tftpd.register() str[source]

The mandatory Cobbler module registration hook.

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)[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.

cobbler.modules.managers.isc.register() str[source]

The mandatory Cobbler module registration hook.

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)[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.

cobbler.modules.managers.ndjbdns.register() str[source]

The mandatory Cobbler module registration hook.

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.