7.1.2. cobbler.autoinstall package
7.1.2.1. Subpackages
- 7.1.2.1.1. cobbler.autoinstall.generate package
- 7.1.2.1.1.1. Submodules
- 7.1.2.1.1.2. cobbler.autoinstall.generate.agama module
- 7.1.2.1.1.3. cobbler.autoinstall.generate.autoyast module
- 7.1.2.1.1.4. cobbler.autoinstall.generate.base module
- 7.1.2.1.1.5. cobbler.autoinstall.generate.cloud_init module
- 7.1.2.1.1.6. cobbler.autoinstall.generate.kickstart module
- 7.1.2.1.1.7. cobbler.autoinstall.generate.legacy module
- 7.1.2.1.1.8. cobbler.autoinstall.generate.preseed module
- 7.1.2.1.1.9. cobbler.autoinstall.generate.windows module
- 7.1.2.1.1.10. Module contents
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:
objectManage 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:
NamedTupleThis named tuple makes it easier to work with the results of a validating a single template.
- errors_type: AutoinstallValidationError
Alias for field number 1
7.1.2.4. Module contents
This package contains everything related to generating information required to install a system.