7.1.6.1.2. cobbler.items.options package

7.1.6.1.2.1. Submodules

7.1.6.1.2.2. cobbler.items.options.base module

Module for the base Option type. It represents an abstract type that cannot be directly used.

class cobbler.items.options.base.ItemOption(api: CobblerAPI, item: ITEM, **kwargs: Any)[source]

Bases: ABC, Generic[ITEM]

The abstract base Option from which all other options inherit.

deserialize(dictionary: Dict[str, Any])[source]

Logically identically to deserialize()

from_dict(dictionary: Dict[str, Any]) None[source]

Logically identically to from_dict()

abstract property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

serialize() Dict[str, Any][source]

Logically identically to serialize()

to_dict(resolved: bool = False) Dict[str, Any][source]

Logically identically to to_dict()

7.1.6.1.2.3. cobbler.items.options.dns module

DNS Option Management for Cobbler Items

This module provides classes to manage DNS-related options for Cobbler items, including Profiles, Systems, and Network Interfaces. It defines option classes for setting and validating DNS servers, search domains, DNS names, and common names (CNAMEs). The module ensures proper validation and uniqueness of DNS names within Cobbler, and supports inheritance and lazy property evaluation.

class cobbler.items.options.dns.DNSInterfaceOption(api: CobblerAPI, item: NetworkInterface, **kwargs: Any)[source]

Bases: ItemOption[NetworkInterface]

Option class for managing DNS settings specific to a NetworkInterface.

Handles DNS name assignment and validation, as well as management of common names (CNAMEs).

property common_names: List[str]

cnames property.

Getter:

Returns the value for cnames.

Setter:

Sets the value for the property cnames.

property name: str

name property.

Getter:

Returns the value for ``dns_name`.

Setter:

Sets the value for the property dns_name.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

class cobbler.items.options.dns.DNSOption(api: CobblerAPI, item: Profile | System, **kwargs: Any)[source]

Bases: ItemOption[Profile | System]

Option class for managing DNS settings for Cobbler Profile and System items.

Provides properties and methods to set and validate DNS servers and search domains.

property name_servers: List[str]

name_servers property. FIXME: Differentiate between IPv4/6

Getter:

Returns the value for name_servers.

Setter:

Sets the value for the property name_servers.

name_servers_search property.

Getter:

Returns the value for name_servers_search.

Setter:

Sets the value for the property name_servers_search.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

7.1.6.1.2.4. cobbler.items.options.ip module

This module provides option classes for managing IP-related settings for network interfaces in Cobbler.

class cobbler.items.options.ip.IPOption(api: CobblerAPI, item: NetworkInterface, **kwargs: Any)[source]

Bases: ItemOption[NetworkInterface]

Option class for managing IP-related settings for a NetworkInterface.

Provides properties and methods to set static routes and MTU values.

property mtu: str

mtu property.

Getter:

Returns the value for mtu.

Setter:

Sets the value for the property mtu.

property static_routes: List[str]

static_routes property.

Getter:

Returns the value for static_routes.

Setter:

Sets the value for the property static_routes.

class cobbler.items.options.ip.IPv4Option(api: CobblerAPI, item: NetworkInterface, **kwargs: Any)[source]

Bases: IPOption

Option class for managing IPv4-specific settings for a NetworkInterface.

Includes properties for address, netmask, and related configuration.

property address: str

address property.

Getter:

Returns the value for address.

Setter:

Sets the value for the property address.

property netmask: str

netmask property.

Getter:

Returns the value for netmask.

Setter:

Sets the value for the property netmask.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

class cobbler.items.options.ip.IPv6Option(api: CobblerAPI, item: NetworkInterface, **kwargs: Any)[source]

Bases: IPOption

Option class for managing IPv6-specific settings for a NetworkInterface.

Includes properties for address, prefix, secondaries, and default gateway.

property address: str

address property.

Getter:

Returns the value for address.

Setter:

Sets the value for the property address.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

property prefix: str

prefix property.

Getter:

Returns the value for prefix.

Setter:

Sets the value for the property prefix.

property secondaries: List[str]

secondaries property.

Getter:

Returns the value for secondaries.

Setter:

Sets the value for the property secondaries.

7.1.6.1.2.5. cobbler.items.options.package module

This module defines the Option classes for managing repository settings within Cobbler’s Repo items.

class cobbler.items.options.package.APTOption(api: CobblerAPI, item: Repo)[source]

Bases: ItemOption[Repo]

Option class for managing APT repository settings for a Cobbler Repo item.

Handles configuration of components and distributions for Debian-based mirrors.

property components: List[str]

Specify the section of Debian to mirror. Defaults to “main,contrib,non-free,main/debian-installer”.

Getter:

If empty the default is used.

Setter:

May be a comma delimited str or a real list.

property dists: List[str]

This decides which installer images are downloaded. For more information please see: https://www.debian.org/CD/mirroring/index.html or the manpage of debmirror.

Getter:

Per default no images are mirrored.

Setter:

Either a comma delimited str or a real list.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

7.1.6.1.2.6. cobbler.items.options.power module

This module defines the Option classes for managing power control settings of Cobbler items.

class cobbler.items.options.power.PowerOption(api: CobblerAPI, item: System, **kwargs: Any)[source]

Bases: ItemOption[System]

Option class for managing power control settings for a Cobbler System.

Provides properties and methods to configure power type, credentials, and connection options.

property address: str

address property.

Getter:

Returns the value for power_address.

Setter:

Sets the value for the property power_address.

property id: str

id property.

Getter:

Returns the value for power_id.

Setter:

Sets the value for the property power_id.

property identity_file: str

power_identity_file property.

Getter:

Returns the value for power_identity_file.

Setter:

Sets the value for the property power_identity_file.

property options: str

power_options property.

Getter:

Returns the value for power_options.

Setter:

Sets the value for the property power_options.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

property password: str

power password property.

Getter:

Returns the value for power_pass.

Setter:

Sets the value for the property power_pass.

property type: str

power_type property.

Getter:

Returns the value for power_type.

Setter:

Sets the value for the property power_type.

property user: str

user property.

Getter:

Returns the value for power.user.

Setter:

Sets the value for the property power.user.

7.1.6.1.2.7. cobbler.items.options.tftp module

TFTP option management for Cobbler Profile and System items.

class cobbler.items.options.tftp.TFTPOption(api: CobblerAPI, item: Profile | System, **kwargs: Any)[source]

Bases: ItemOption[Profile | System]

Option class for managing TFTP server settings for Cobbler Profile and System items.

Handles configuration of next server addresses and related TFTP options.

property next_server_v4: str

next_server_v4 property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for next_server_v4.

Setter:

Sets the value for the property next_server_v4.

property next_server_v6: str

next_server_v6 property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for next_server_v6.

Setter:

Sets the value for the property next_server_v6.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

7.1.6.1.2.8. cobbler.items.options.uri module

URI option management for Cobbler items.

class cobbler.items.options.uri.URIOption(api: CobblerAPI, item: Any, **kwargs: Any)[source]

Bases: ItemOption[Template]

Option class for managing an URI for Cobbler items.

property authority: str

Property that represents the authority. An authority is a hostname, an IP address or empty.

Getter:

Returns the current authority.

Setter:

Sets the new value for the authority.

property fragment: str

Property that represents the fragment. The framgent does not need to be prefixed with a questionsmark and only a single fragment parameter is supported at the moment.

Getter:

Returns the current fragement.

Setter:

Sets the new value for the fragment.

property full_uri: str

Property to represent the full URI that is curently stored.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

property path: str

Property that represents the path. A path is the location where the target resource can be found if requested from the optional authority. In case a path validator is present, it is executed.

Getter:

Returns the current path.

Setter:

Sets the new value for the path in case the optional path validation succeeds.

property query: str

Property that represents the query. The query does not need to be prefixed with a questionmark and only a single query parameter is supported at the moment.

Getter:

Returns the current query.

Setter:

Sets the new value for the query.

property schema: str

Property that represents the schema. A schema is something like “http”, “ftp” or anything else that makes sense in the context of the usage of the URIOption.

Getter:

Returns the current schema.

Setter:

Sets the new value for schema.

7.1.6.1.2.9. cobbler.items.options.virt module

Virtualization option management for Cobbler items.

class cobbler.items.options.virt.VirtOption(api: CobblerAPI, item: Image | Profile | System, **kwargs: Any)[source]

Bases: ItemOption[Image | Profile | System]

Option class for managing virtualization settings for Cobbler Image, Profile, and System items.

Provides properties for auto boot, CPU core count, disk driver, RAM, and other virtualization options.

property auto_boot: bool

auto_boot property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for auto_boot.

Setter:

Sets the value for the property auto_boot.

property cpus: int

cpus property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for virt_cpus.

Setter:

Sets the value for the property virt_cpus.

property disk_driver: VirtDiskDrivers

disk_driver property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for disk_driver.

Setter:

Sets the value for the property disk_driver.

property file_size: float

file_size property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for file_size.

Setter:

Sets the value for the property file_size.

property parent_name: str

The name of the object inside the parent class. This should be identical across all items where an option is used.

Returns:

The name of the parent attribute or property.

property path: str

path property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for path.

Setter:

Sets the value for the property path.

property pxe_boot: bool

pxe_boot property.

Getter:

Returns the value for pxe_boot.

Setter:

Sets the value for the property pxe_boot.

property ram: int

ram property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for ram.

Setter:

Sets the value for the property ram.

property type: VirtType

type property.

Note

This property can be set to <<inherit>>.

Getter:

Returns the value for type.

Setter:

Sets the value for the property type.

7.1.6.1.2.10. Module contents

This module contains all Option classes that Cobbler Items own. An Option is a set of properties that group a common topic and prevents using prefixes for variable names.