7.1.2. cobbler.autoinstall package

7.1.2.1. Subpackages

7.1.2.2. Submodules

7.1.2.3. cobbler.autoinstall.manager module

This module contains code to create the automatic installation files. For example kickstarts, autoyast files or preseed files.

class cobbler.autoinstall.manager.AutoInstallationManager(api: CobblerAPI)[source]

Bases: object

Manage automatic installation templates, snippets and final files

generate_autoinstall(obj: BootableItem, autoinstall_template: Template, autoinstaller_subfile: str = '') str[source]

This is an internal method for generating an auto-installation config/script. Please use the generate_autoinstall_for_* methods.

Parameters:
  • obj – The profile to use for generating the auto-installation config/script.

  • autoinstaller_type – All currently available types can be found at cobbler.enums.AutoinstallerType.

  • autoinstall_template – If empty, the default file is returned. Specific flavors may use this variable to generate secondary files (e.g. cloud-init & the different metadata files).

  • autoinstaller_subfile – TODO

Returns:

The auto-installation script or configuration file as a string.

get_last_errors() List[Any][source]

Returns the list of errors generated by the last template render action.

Returns:

The list of error messages which are available. This may not only contain error messages related to generating autoinstallation configuration and scripts.

is_autoinstall_in_use(name: str) bool[source]

Check if the auto-installation template is referenced by at least one Profile or System.

Parameters:

name – The name of the template.

Returns:

True if the template is referenced by at least a single object.

validate_autoinstall_file(obj: Profile | System) AutoinstallValidationResult[source]

Validate automatic installation file used by a system/profile.

Parameters:

obj – system/profile

Returns:

An instance of the named tuple AutoinstallValidationResult.

validate_autoinstall_files() bool[source]

Determine if Cobbler automatic OS installation files will be accepted by corresponding Linux distribution installers. The presence of an error does not imply that the automatic installation file is bad, only that the possibility exists. Automatic installation file validators are not available for all automatic installation file types and on all operating systems in which Cobbler may be installed.

Returns:

True if all automatic installation files are valid, otherwise false.

class cobbler.autoinstall.manager.AutoinstallValidationResult(success: bool, errors_type: AutoinstallValidationError, errors: Sequence[Any])[source]

Bases: NamedTuple

This named tuple makes it easier to work with the results of a validating a single template.

errors: Sequence[Any]

Alias for field number 2

errors_type: AutoinstallValidationError

Alias for field number 1

success: bool

Alias for field number 0

7.1.2.4. Module contents

This package contains everything related to generating information required to install a system.