libcobblersignatures.models package
Submodules
libcobblersignatures.models.osbreed module
- class libcobblersignatures.models.osbreed.OsBreed(name: str)
Bases:
object
On operating system breed like SUSE or Redhat. The specification of the attributes and what values are valid are described in the JSON specification.
- decode(data: dict)
Decodes the received data. Decoding of each single version is done by the corresponding decode method in
Osversion
.- Parameters
data – The data to decode.
- encode() dict
Encodes the current OsBreed and nested Osversions.
- Returns
The dictionary with all its versions. The name of the OsBreed is not included as this is normally the name of the returned key.
- property name
This property represents the name of the operating system breed.
- Setter
Invalid values will be discarded.
- Deleter
Always raises a TypeError since this is not allowed.
- Getter
The last successfully validated name of the operating system breed.
- osversion_add(name: str, version: Osversion)
Add an Osversion to this OsBreed.
- Parameters
name – The name of the version to add.
version – The Osversion to add to the OsBreed.
- Raises
ValueError – If the Name is not a
str
and/or the Version is not anOsversion
.
- osversion_remove(key: str)
Remove an Osversion with its key.
- Parameters
key – The key of the dictionary to remove.
- property osversions: OrderedDict
An ordered dictionary which contains all versions of the operating system breed.
- Setter
Raises a TypeError in case the value is not an OrderedDict.
- Getter
The ordered dictionary.
- Deleter
Will reset the number of versions to an empty list.
libcobblersignatures.models.osversion module
Module for the datastructure of an operating system version. An operating system version needs to be grouped under an operating system breed.
- class libcobblersignatures.models.osversion.Osversion
Bases:
object
A version of an operating system breed like
openSUSE Leap 15.2
. The specification of the attributes and what values are valid are described in the JSON specification.- property boot_files: set
Unknown field currently. There for compatibility reasons for now. Used by xenserver
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty list.
- Type
set
- property boot_loaders: dict
Defines the supported well known boot loaders inside Cobbler.
- Getter
The last successfully validated value of this field.
- Setter
If validation is successful the value will be set, otherwise raises an exception (TypeError).
- Deleter
Resets this property to an empty dict.
- Type
dict
- decode(data: dict)
Decodes the received data. This means parsing each attribute from the JSON into the property of an object.
- Parameters
data – The data to decode.
- property default_autoinstall: str
The filename for the default autoinstall template in Cobbler.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- encode() dict
Encodes a single
Osversion
. This means that the properties of an object is transferred into a JSON.- Returns
The dictionary with the data.
- property initrd_file: str
The regular expression to match to find the initrd.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property isolinux_ok: bool
Unknown field currently. There for compatibility reasons for now.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to
False
.- Type
bool
- property kernel_arch: str
The regular expression which tells Cobbler where to look for the architecture of the operating system. In some cases this may also be a path to the file where Cobbler should look for the architecture.
- Getter
The value of the last successfully validated kernel_arch.
- Setter
May raise a TypeError in case the value was not of type str.
- Deleter
Resets the value instead of deleting the attribute.
- Type
str
- property kernel_arch_regex: str
In case
kernel_arch
does not point to the architecture directly, this is the regex where Cobbler looks for in the file specified bykernel_arch
.- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property kernel_file: str
The regular expression to match to find the kernel.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property kernel_options: str
Default kernel options to apply to the imported ISO.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property kernel_options_post: str
Default kernel post options to apply to the imported ISO.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property signatures: set
This is a list of strings with currently an unknown functionality.
- Setter
May raise a TypeError in case the value was not of type list.
- Getter
Returns the last correctly validated str of the property.
- Deleter
Resets this to an empty list.
- Type
set
- property supported_arches: set
Unused field currently. There for compatibility reasons for now.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty list.
- Type
set
- property supported_repo_breeds: set
Unused field currently. There for compatibility reasons for now.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty list.
- Type
set
- property template_files: str
Currently only used in ESXi. Needs more investigation what this is for.
- Getter
The last successfully validated value of this field.
- Setter
Will set this if the validation succeeds, otherwise will raise an exception (TypeError).
- Deleter
Resets this to an empty str.
- Type
str
- property version_file: str
The regular expression which points to the file with the os-version info.
- Setter
May raise a TypeError in case the value was not of type str.
- Getter
Returns the last correctly validated str of the property.
- Deleter
Resets this to an empty string.
- Type
str
- property version_file_regex: str
The regular expression which tells Cobbler to pick this version if it matches.
- Getter
The str with the regex.
- Setter
Validates the regex and raises in case an error was detected (TypeError).
- Deleter
Resets the attribute to an empty str instead of deleting it.
- Type
str
Module contents
This module contains the data structures of the library. You may use them without using the library, however they may not work as expected when using them on its own.