9.1.4.1.4. cobbler.modules.managers package

9.1.4.1.4.1. Submodules

9.1.4.1.4.2. cobbler.modules.managers.bind module

This is some of the code behind ‘cobbler sync’.

Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> John Eckersberg <jeckersb@redhat.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cobbler.modules.managers.bind.get_manager(collection_mgr)[source]

This returns the object to manage a BIND server located locally on the Cobbler server.

Parameters

collection_mgr – The collection manager 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.

9.1.4.1.4.3. cobbler.modules.managers.dnsmasq module

This is some of the code behind ‘cobbler sync’.

Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> John Eckersberg <jeckersb@redhat.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cobbler.modules.managers.dnsmasq.get_manager(collection_mgr)[source]

Creates a manager object to manage a dnsmasq server.

Parameters

collection_mgr – The collection manager 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”.

9.1.4.1.4.4. cobbler.modules.managers.genders module

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 config file to template with the data.

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

9.1.4.1.4.5. cobbler.modules.managers.import_signatures module

Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> John Eckersberg <jeckersb@redhat.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

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

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

Parameters

collection_mgr – The collection Manager 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, fnames). dirname is the name of the directory, and fnames a list of the names of the files and subdirectories in dirname (excluding ‘.’ and ‘..’). func may modify the fnames list in-place (e.g. via del or slice assignment), and walk will only recurse into the subdirectories whose names remain in fnames; 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.

9.1.4.1.4.6. cobbler.modules.managers.in_tftpd module

This is some of the code behind ‘cobbler sync’.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cobbler.modules.managers.in_tftpd.get_manager(collection_mgr)[source]

Creates a manager object to manage an in_tftp server.

Parameters

collection_mgr – The collection manager 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.

9.1.4.1.4.7. cobbler.modules.managers.isc module

This is some of the code behind ‘cobbler sync’.

Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> John Eckersberg <jeckersb@redhat.com>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cobbler.modules.managers.isc.get_manager(collection_mgr)[source]

Creates a manager object to manage an isc dhcp server.

Parameters

collection_mgr – The collection manager 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.

9.1.4.1.4.8. cobbler.modules.managers.ndjbdns module

This is some of the code behind ‘cobbler sync’.

Copyright 2014, Mittwald CM Service GmbH & Co. KG Martin Helmich <m.helmich@mittwald.de> Daniel Krämer <d.kraemer@mittwald.de>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

cobbler.modules.managers.ndjbdns.get_manager(collection_mgr)[source]

Creates a manager object to manage an isc dhcp server.

Parameters

collection_mgr – The collection manager 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.

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