9.1.4. cobbler.modules package

9.1.4.1. Subpackages

9.1.4.2. Submodules

9.1.4.3. cobbler.modules.nsupdate_add_system_post module

cobbler.modules.nsupdate_add_system_post.nslog(msg)[source]

Log a message to the logger.

Parameters:

msg – The message to log.

cobbler.modules.nsupdate_add_system_post.register() str[source]

This method is the obligatory Cobbler registration hook.

Returns:

The trigger name or an empty string.

cobbler.modules.nsupdate_add_system_post.run(api, args)[source]

This method executes the trigger, meaning in this case that it updates the dns configuration.

Parameters:
  • api – The api to read metadata from.

  • args – Metadata to log.

Returns:

“0” on success or a skipped task. If the task failed or problems occurred then an exception is raised.

9.1.4.4. cobbler.modules.nsupdate_delete_system_pre module

cobbler.modules.nsupdate_delete_system_pre.nslog(msg)[source]

Log a message to the logger.

Parameters:

msg – The message to log.

cobbler.modules.nsupdate_delete_system_pre.register() str[source]

This method is the obligatory Cobbler registration hook.

Returns:

The trigger name or an empty string.

cobbler.modules.nsupdate_delete_system_pre.run(api, args)[source]

This method executes the trigger, meaning in this case that it updates the dns configuration.

Parameters:
  • api – The api to read metadata from.

  • args – Metadata to log.

Returns:

“0” on success or a skipped task. If the task failed or problems occurred then an exception is raised.

9.1.4.5. cobbler.modules.scm_track module

(C) 2009, Red Hat Inc. Michael DeHaan <michael.dehaan AT gmail>

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.scm_track.register() str[source]

This pure python trigger acts as if it were a legacy shell-trigger, but is much faster. The return of this method indicates the trigger type :return: Always: /var/lib/cobbler/triggers/change/*

cobbler.modules.scm_track.run(api, args)[source]

Runs the trigger, meaning in this case track any changed which happen to a config or data file.

Parameters:
  • api – The api instance of the Cobbler server. Used to look up if scm_track_enabled is true.

  • args – The parameter is currently unused for this trigger.

Returns:

0 on success, otherwise an exception is risen.

9.1.4.6. cobbler.modules.sync_post_restart_services module

Restarts the DHCP and/or DNS after a Cobbler sync to apply changes to the configuration files.

cobbler.modules.sync_post_restart_services.register() str[source]

This pure python trigger acts as if it were a legacy shell-trigger, but is much faster. The return of this method indicates the trigger type

Returns:

Always /var/lib/cobbler/triggers/sync/post/*

cobbler.modules.sync_post_restart_services.run(api, args) int[source]

Run the trigger via this method, meaning in this case that depending on the settings dns and/or dhcp services are restarted.

Parameters:
  • api – The api to resolve settings.

  • args – This parameter is not used currently.

Returns:

The return code of the service restarts.

9.1.4.7. cobbler.modules.sync_post_wingen module

cobbler.modules.sync_post_wingen.bcdedit(orig_bcd, new_bcd, wim, sdi, startoptions=None)[source]
cobbler.modules.sync_post_wingen.register() str | None[source]

This pure python trigger acts as if it were a legacy shell-trigger, but is much faster. The return of this method indicates the trigger type :return: Always /var/lib/cobbler/triggers/sync/post/*

cobbler.modules.sync_post_wingen.run(api, args)[source]

9.1.4.8. Module contents

This part of Cobbler may be utilized by any plugins which are extending Cobbler and core code which can be exchanged through the modules.conf file.

A Cobbler module is loaded if it has a method called register(). The method must return a str which represents the module category.