8.1.3. cobbler.items package
8.1.3.1. Submodules
8.1.3.2. cobbler.items.distro module
Cobbler module that contains the code for a Cobbler distro object.
Changelog:
Schema: From -> To
- V3.4.0 (unreleased):
- Added:
find_distro_path()
link_distro()
- Changed:
Constructor:
kwargs
can now be used to seed the item during creation.children
: The property was moved to the base class.from_dict()
: The method was moved to the base class.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Changed:
redhat_management_key
: Inherits from the settings again
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
from_dict()
- Moved to base class (Item):
ctime
: floatdepth
: intmtime
: floatuid
: strkernel_options
: dictkernel_options_post
: dictautoinstall_meta
: dictboot_files
: list/dicttemplate_files
: list/dictcomment
: strname
: strowners
: list[str]
- Changed:
tree_build_time
: str -> floatarch
: str -> Union[list, str]fetchable_files
: list/dict? -> dictboot_loader
-> boot_loaders (rename)
- Removed:
get_fields()
get_parent
set_kernel()
- Please use the propertykernel
set_remote_boot_kernel()
- Please use the propertyremote_boot_kernel
set_tree_build_time()
- Please use the propertytree_build_time
set_breed()
- Please use the propertybreed
set_os_version()
- Please use the propertyos_version
set_initrd()
- Please use the propertyinitrd
set_remote_boot_initrd()
- Please use the propertyremote_boot_initrd
set_source_repos()
- Please use the propertysource_repos
set_arch()
- Please use the propertyarch
get_arch()
- Please use the propertyarch
set_supported_boot_loaders()
- Please use the propertysupported_boot_loaders
. It is readonly.set_boot_loader()
- Please use the propertyboot_loader
set_redhat_management_key()
- Please use the propertyredhat_management_key
get_redhat_management_key()
- Please use the propertyredhat_management_key
- V3.2.2:
No changes
- V3.2.1:
- Added:
kickstart
: Resolves as a proxy toautoinstall
- V3.2.0:
No changes
- V3.1.2:
- Added:
remote_boot_kernel
: strremote_grub_kernel
: strremote_boot_initrd
: strremote_grub_initrd
: str
- V3.1.1:
No changes
- V3.1.0:
- Added:
get_arch()
- V3.0.1:
File was moved from
cobbler/item_distro.py
tocobbler/items/distro.py
.
- V3.0.0:
- Added:
boot_loader
: Union[str, inherit]
- Changed:
rename:
ks_meta
->autoinstall_meta
redhat_management_key
: Union[str, inherit] -> str
- Removed:
redhat_management_server
: Union[str, inherit]
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
name
: strctime
: floatmtime
: floatuid
: strowners
: Union[list, SETTINGS:default_ownership]kernel
: strinitrd
: strkernel_options
: dictkernel_options_post
: dictks_meta
: dictarch
: strbreed
: stros_version
: strsource_repos
: listdepth
: intcomment
: strtree_build_time
: strmgmt_classes
: listboot_files
: list/dict?fetchable_files
: list/dict?template_files
: list/dict?redhat_management_key
: Union[str, inherit]redhat_management_server
: Union[str, inherit]
- class cobbler.items.distro.Distro(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
A Cobbler distribution object
- COLLECTION_TYPE = 'distro'
- TYPE_NAME = 'distro'
- property arch
The field is mainly relevant to PXE provisioning.
Using an alternative distro type allows for dhcpd.conf templating to “do the right thing” with those systems – this also relates to bootloader configuration files which have different syntax for different distro types (because of the bootloaders).
This field is named “arch” because mainly on Linux, we only care about the architecture, though if (in the future) new provisioning types are added, an arch value might be something like “bsd_x86”.
- Returns
Return the current architecture.
- property boot_loaders: List[str]
All boot loaders for which Cobbler generates entries for.
Note
This property can be set to
<<inherit>>
.- Getter
The bootloaders.
- Setter
Validates this against the list of well-known bootloaders and raises a
TypeError
orValueError
in case the validation goes south.
- property breed: str
The repository system breed. This decides some defaults for most actions with a repo in Cobbler.
- Getter
The breed detected.
- Setter
May raise a
ValueError
orTypeError
in case the given value is wrong.
- find_distro_path()[source]
This returns the absolute path to the distro under the
distro_mirror
directory. If that directory doesn’t contain the kernel, the directory of the kernel in the distro is returned.- Returns
The path to the distribution files.
- property initrd: str
Specifies an initrd image. Path search works as in set_kernel. File must be named appropriately.
- Getter
The current path to the initrd.
- Setter
May raise a
TypeError
orValueError
in case the validation is not successful.
- property kernel: str
Specifies a kernel. The kernel parameter is a full path, a filename in the configured kernel directory or a directory path that would contain a selectable kernel. Kernel naming conventions are checked, see docs in the utils module for
find_kernel
.- Getter
The last successfully validated kernel path.
- Setter
May raise a
ValueError
orTypeError
in case of validation errors.
- link_distro()[source]
Link a Cobbler distro from its source into the web directory to make it reachable from the outside.
- make_clone()[source]
Clone a distro object.
- Returns
The cloned object. Not persisted on the disk or in a database.
- property os_version: str
The operating system version which the image contains.
- Getter
The sanitized operating system version.
- Setter
Accepts a str which will be validated against the
distro_signatures.json
.
- property parent
Distros don’t have parent objects.
- property redhat_management_key: str
Get the redhat management key. This is probably only needed if you have spacewalk, uyuni or SUSE Manager running.
Note
This property can be set to
<<inherit>>
.- Returns
The key as a string.
- property remote_boot_initrd: str
URL to a remote initrd. If the bootloader supports this feature, it directly tries to retrieve the initrd and boot it. (grub supports tftp and http protocol and server must be an IP).
- Getter
Returns the current remote URL to boot from.
- Setter
Raises a
TypeError
orValueError
in case the provided value was not correct.
- property remote_boot_kernel: str
URL to a remote kernel. If the bootloader supports this feature, it directly tries to retrieve the kernel and boot it. (grub supports tftp and http protocol and server must be an IP).
- Getter
Returns the current remote URL to boot from.
- Setter
Raises a
TypeError
orValueError
in case the provided value was not correct.
- property remote_grub_initrd: str
This is tied to the
remote_boot_initrd
property. It contains the URL of that field in a format which grub can use directly.- Getter
The computed URL from
remote_boot_initrd
.
- property remote_grub_kernel: str
This is tied to the
remote_boot_kernel
property. It contains the URL of that field in a format which grub can use directly.- Getter
The computed URL from
remote_boot_kernel
.
- property source_repos: List[Any]
A list of http:// URLs on the Cobbler server that point to yum configuration files that can be used to install core packages. Use by
cobbler import
only.- Getter
The source repos used.
- Setter
The new list of source repos to use.
8.1.3.3. cobbler.items.file module
Cobbler module that contains the code for a Cobbler file object.
Changelog:
- V3.4.0 (unreleased):
- Changed:
Constructor:
kwargs
can now be used to seed the item during creation.from_dict()
: The method was moved to the base class.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
No changes
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Moved to base classes (Resource/Item):
uid
: strdepth
: floatcomment
: strctime
: floatmtime
: floatowners
: Union[list, SETTINGS:default_ownership]name
: straction
: strgroup
: strmode
: strowner
: strpath
: strtemplate
: str
- Removed:
get_fields()
set_is_dir()
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
- Added:
set_is_dir()
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
uid
: strdepth
: floatcomment
: strctime
: floatmtime
: floatowners
: Union[list, SETTINGS:default_ownership]name
: stris_dir
: boolaction
: strgroup
: strmode
: strowner
: strpath
: strtemplate
: str
- class cobbler.items.file.File(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Resource
A Cobbler file object.
- COLLECTION_TYPE = 'file'
- TYPE_NAME = 'file'
- check_if_valid() None [source]
Checks if the object is valid. This is the case if name, path, owner, group, and mode are set. Templates are only required for files if
is_dir
is true then template is not required.- Raises
CX – Raised in case a required argument is missing
8.1.3.4. cobbler.items.image module
Cobbler module that contains the code for a Cobbler image object.
Changelog:
- V3.4.0 (unreleased):
- Added:
display_name
- Changed:
Constructor:
kwargs
can now be used to seed the item during creation.autoinstall
: Restored inheritance of the property.children
: The proqperty was moved to the base class.from_dict()
: The method was moved to the base class.virt_disk_driver
: Restored inheritance of the property.virt_ram
: Restored inheritance of the property.virt_type
: Restored inheritance of the property.virt_bridge
: Restored inheritance of the property.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Added:
children
- Changes:
virt_file_size
: Inherits from the settings againboot_loaders
: Inherits from the settings again
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
boot_loaders
: listmenu
: strsupported_boot_loaders
: listfrom_dict()
- Moved to parent class (Item):
ctime
: floatmtime
: floatdepth
: intparent
: struid
: strcomment
: strname
: str
- Removed:
get_fields()
get_parent()
set_arch()
- Please use thearch
property.set_autoinstall()
- Please use theautoinstall
property.set_file()
- Please use thefile
property.set_os_version()
- Please use theos_version
property.set_breed()
- Please use thebreed
property.set_image_type()
- Please use theimage_type
property.set_virt_cpus()
- Please use thevirt_cpus
property.set_network_count()
- Please use thenetwork_count
property.set_virt_auto_boot()
- Please use thevirt_auto_boot
property.set_virt_file_size()
- Please use thevirt_file_size
property.set_virt_disk_driver()
- Please use thevirt_disk_driver
property.set_virt_ram()
- Please use thevirt_ram
property.set_virt_type()
- Please use thevirt_type
property.set_virt_bridge()
- Please use thevirt_bridge
property.set_virt_path()
- Please use thevirt_path
property.get_valid_image_types()
- Changes:
arch
: str -> enums.Archsautoinstall
: str -> enums.VALUE_INHERITEDimage_type
: str -> enums.ImageTypesvirt_auto_boot
: Union[bool, SETTINGS:virt_auto_boot] -> boolvirt_bridge
: Union[str, SETTINGS:default_virt_bridge] -> strvirt_disk_driver
: Union[str, SETTINGS:default_virt_disk_driver] -> enums.VirtDiskDriversvirt_file_size
: Union[float, SETTINGS:default_virt_file_size] -> floatvirt_ram
: Union[int, SETTINGS:default_virt_ram] -> intvirt_type
: Union[str, SETTINGS:default_virt_type] -> enums.VirtType
- V3.2.2:
No changes
- V3.2.1:
- Added:
kickstart
: Resolves as a proxy toautoinstall
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
- Added:
set_autoinstall()
- Changes:
Rename:
kickstart
->autoinstall
- Removed:
set_kickstart()
- Please useset_autoinstall()
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
ctime
: floatdepth
: intmtime
: floatparent
: struid
: strarch
: strkickstart
: strbreed
: strcomment
: strfile
: strimage_type
: strname
: strnetwork_count
: intos_version
: strowners
: Union[list, SETTINGS:default_ownership]virt_auto_boot
: Union[bool, SETTINGS:virt_auto_boot]virt_bridge
: Union[str, SETTINGS:default_virt_bridge]virt_cpus
: intvirt_disk_driver
: Union[str, SETTINGS:default_virt_disk_driver]virt_file_size
: Union[float, SETTINGS:default_virt_file_size]virt_path
: strvirt_ram
: Union[int, SETTINGS:default_virt_ram]virt_type
: Union[str, SETTINGS:default_virt_type]
- class cobbler.items.image.Image(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
A Cobbler Image. Tracks a virtual or physical image, as opposed to a answer file (autoinst) led installation.
- COLLECTION_TYPE = 'image'
- TYPE_NAME = 'image'
- property arch: Archs
Represents the architecture the image has. If deployed to a physical host this should be enforced, a virtual image may be deployed on a host with any architecture.
- Getter
The current architecture. Default is
X86_64
.- Setter
Should be of the enum type or str. May raise an exception in case the architecture is not known to Cobbler.
- property autoinstall: str
Property for the automatic installation file path, this must be a local file.
It may not make sense for images to have automatic installation templates. It really doesn’t. However if the image type is ‘iso’ koan can create a virtual floppy and shove an answer file on it, to script an installation. This may not be a automatic installation template per se, it might be a Windows answer file (SIF) etc.
This property can inherit from a parent. Which is actually the default value.
- Getter
The path relative to the template directory.
- Setter
The location of the template relative to the template base directory.
- property boot_loaders: List[str]
Represents the boot loaders which are able to boot this image.
- Getter
The bootloaders. May be an emtpy list.
- Setter
A list with the supported boot loaders for this image.
- property breed: str
The operating system breed.
- Getter
Returns the current breed.
- Setter
When setting this it is validated against the
distro_signatures.json
file.
- property display_name: str
Returns the display name.
- Getter
Returns the display name for the boot menu.
- Setter
Sets the display name for the boot menu.
- property file: str
Stores the image location. This should be accessible on all nodes that need to access it.
Format: can be one of the following: * username:password@hostname:/path/to/the/filename.ext * username@hostname:/path/to/the/filename.ext * hostname:/path/to/the/filename.ext * /path/to/the/filename.ext
- Getter
The path to the image location or an emtpy string.
- Setter
May raise a TypeError or SyntaxError in case the validation of the location fails.
- property image_type: ImageTypes
Indicates what type of image this is. direct = something like “memdisk”, physical only iso = a bootable ISO that pxe’s or can be used for virt installs, virtual only virt-clone = a cloned virtual disk (FIXME: not yet supported), virtual only memdisk = hdd image (physical only)
- Getter
The enum type value of the image type.
- Setter
Accepts str like and enum type values and raises a TypeError or ValueError in the case of a problem.
- make_clone()[source]
Clone this image object. Please manually adjust all value yourself to make the cloned object unique.
- Returns
The cloned instance of this object.
Property to represent the menu which this image should be put into.
- Getter
The name of the menu or an emtpy str.
- Setter
Should only be the name of the menu not the object. May raise
CX
in case the menu does not exist.
- property network_count: int
Represents the number of virtual NICs this image has.
Deprecated since version 3.3.0: This is nowhere used in the project and will be removed in a future release.
- Getter
The number of networks.
- Setter
Raises a
TypeError
in case the value is not an int.
- property os_version: str
The operating system version which the image contains.
- Getter
The sanitized operating system version.
- Setter
Accepts a str which will be validated against the
distro_signatures.json
.
- property supported_boot_loaders: List[str]
Read only property which represents the subset of settable bootloaders.
- Getter
The bootloaders which are available for being set.
- property virt_auto_boot: bool
Whether the VM should be booted when booting the host or not.
- Getter
True
means autoboot is enabled, otherwise VM is not booted automatically.- Setter
The new state for the property.
- property virt_bridge: str
The name of the virtual bridge used for networking.
Warning
The new validation for the setter is not working. Thus the inheritance from the settings is broken.
- Getter
The name of the bridge.
- Setter
The new name of the bridge. If set to an empty
str
, it will be taken from the settings.
- property virt_cpus: int
The amount of vCPU cores used in case the image is being deployed on top of a VM host.
- Getter
The cores used.
- Setter
The new number of cores.
- property virt_disk_driver: VirtDiskDrivers
The type of disk driver used for storing the image.
- Getter
The enum type representation of the disk driver.
- Setter
May be a
str
with the name of the disk driver or from the enum type directly.
- property virt_file_size: float
The size of the image and thus the usable size for the guest.
Warning
There is a regression which makes the usage of multiple disks not possible right now. This will be fixed in a future release.
- Getter
The size of the image(s) in GB.
- Setter
The float with the new size in GB.
- property virt_path: str
Represents the location where the image for the VM is stored.
- Getter
The path.
- Setter
Is being validated for being a reasonable path. If yes is set, otherwise ignored.
8.1.3.5. cobbler.items.item module
Cobbler module that contains the code for a generic Cobbler item.
Changelog:
- V3.4.0 (unreleased):
- (Re-)Added Cache implementation with the following new methods and properties:
cache
inmemery
clean_cache()
- Overhauled the parent/child system:
children
is now insideitem.py
.tree_walk()
was added.logical_parent
was added.get_parent()
was added which returns the internal reference that is used to return the object of theparent
property.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Added:
grab_tree
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
depth
: intcomment
: strowners
: Union[list, str]mgmt_classes
: Union[list, str]mgmt_classes
: Union[dict, str]conceptual_parent
: Union[distro, profile]
- Removed:
collection_mgr: collection_mgr
- Remove unreliable caching:
get_from_cache()
set_cache()
remove_from_cache()
- Changed:
Constructor: Takes an instance of
CobblerAPI
instead ofCollectionManager
.children
: dict -> listctime
: int -> floatmtime
: int -> floatuid
: strkernel_options
: dict -> Union[dict, str]kernel_options_post
: dict -> Union[dict, str]autoinstall_meta
: dict -> Union[dict, str]fetchable_files
: dict -> Union[dict, str]boot_files
: dict -> Union[dict, str]
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
- Added:
collection_mgr
: collection_mgrkernel_options
: dictkernel_options_post
: dictautoinstall_meta
: dictfetchable_files
: dictboot_files
: dicttemplate_files
: dictname
: strlast_cached_mtime
: int
- Changed:
Rename:
cached_datastruct
->cached_dict
- Removed:
config
- V2.8.5:
- Added:
config
: ?settings
: settingsis_subobject
: boolparent
: Union[distro, profile]children
: dictlog_func
: collection_mgr.api.logctime
: intmtime
: intuid
: strlast_cached_mtime
: intcached_datastruct
: str
- class cobbler.items.item.Item(api: CobblerAPI, is_subobject: bool = False, **kwargs: Any)[source]
Bases:
object
An Item is a serializable thing that can appear in a Collection
- COLLECTION_TYPE = 'generic'
- LOGICAL_INHERITANCE: Dict[str, Tuple[List[Tuple[str, str]], List[Tuple[str, str]]]] = {'distro': ([], [('profile', 'distro')]), 'image': ([], [('system', 'image')]), 'profile': ([('distro', 'distro')], [('system', 'profile')]), 'system': ([('image', 'image'), ('profile', 'profile')], [])}
- TYPE_DEPENDENCIES: Dict[str, List[Tuple[str, str]]] = {'distro': [('profile', 'distro')], 'file': [('mgmtclass', 'files'), ('image', 'file')], 'image': [('system', 'image')], 'menu': [('menu', 'parent'), ('image', 'menu'), ('profile', 'menu')], 'mgmtclass': [('distro', 'mgmt_classes'), ('profile', 'mgmt_classes'), ('system', 'mgmt_classes')], 'package': [('mgmtclass', 'packages')], 'profile': [('profile', 'parent'), ('system', 'profile')], 'repo': [('profile', 'repos')], 'system': []}
- TYPE_NAME = 'generic'
- property autoinstall_meta: Dict[Any, Any]
A comma delimited list of key value pairs, like ‘a=b,c=d,e=f’ or a dict. The meta tags are used as input to the templating system to preprocess automatic installation template files.
Note
This property can be set to
<<inherit>>
.- Getter
The metadata or an empty dict.
- Setter
Accepts anything which can be split by
input_string_or_dict()
.
- property boot_files: Dict[Any, Any]
Files copied into tftpboot beyond the kernel/initrd
- Getter
The dictionary with name-path key-value pairs.
- Setter
A dict. If not a dict must be a str which is split by
input_string_or_dict()
. RaisesTypeError
otherwise.
- property cache: ItemCache
Gettinging the ItemCache oject.
Note
This is a read only property.
- Getter
This is the ItemCache oject.
- check_if_valid() None [source]
Raise exceptions if the object state is inconsistent.
- Raises
CX – In case the name of the item is not set.
- property children: List[ITEM_UNION]
The list of logical children of any depth. :getter: An empty list in case of items which don’t have logical children. :setter: Replace the list of children completely with the new provided one.
- clean_cache(name: Optional[str] = None)[source]
Clearing the Item cache.
- Parameters
obj – The object whose modification invalidates the dict cache. Can be Item, Settings or SIGNATURE_CACHE.
name – The name of Item attribute or None.
- property comment: str
For every object you are able to set a unique comment which will be persisted on the object.
- Getter
The comment or an emtpy string.
- Setter
The new comment for the item.
- property ctime: float
Property which represents the creation time of the object.
- Getter
The float which can be passed to Python time stdlib.
- Setter
Should only be used by the Cobbler Item Factory.
- property depth: int
This represents the logical depth of an object in the category of the same items. Important for the order of loading items from the disk and other related features where the alphabetical order is incorrect for sorting.
- Getter
The logical depth of the object.
- Setter
The new int for the logical object-depth.
- property descendants: List[ITEM_UNION]
Get objects that depend on this object, i.e. those that would be affected by a cascading delete, etc.
Note
This is a read only property.
- Getter
This is a list of all descendants. May be empty if none exist.
- deserialize() None [source]
Deserializes the object itself and, if necessary, recursively all the objects it depends on.
- dump_vars(formatted_output: bool = True, remove_dicts: bool = False) Union[Dict[str, Any], str] [source]
Dump all variables.
- Parameters
formatted_output – Whether to format the output or not.
remove_dicts – If True the dictionaries will be put into str form.
- Returns
The raw or formatted data.
- property fetchable_files: Dict[Any, Any]
A comma seperated list of
virt_name=path_to_template
that should be fetchable via tftp or a webserverNote
This property can be set to
<<inherit>>
.- Getter
The dictionary with name-path key-value pairs.
- Setter
A dict. If not a dict must be a str which is split by
input_string_or_dict()
. RaisesTypeError
otherwise.
- find_match(kwargs: Dict[str, Any], no_errors: bool = False) bool [source]
Find from a given dict if the item matches the kv-pairs.
- Parameters
kwargs – The dict to match for in this item.
no_errors – How strict this matching is.
- Returns
True if matches or False if the item does not match.
- find_match_single_key(data: Dict[str, Any], key: str, value: Any, no_errors: bool = False) bool [source]
Look if the data matches or not. This is an alternative for
find_match()
.- Parameters
data – The data to search through.
key – The key to look for int the item.
value – The value for the key.
no_errors – How strict this matching is.
- Returns
Whether the data matches or not.
- from_dict(dictionary: Dict[Any, Any]) None [source]
Modify this object to take on values in
dictionary
.- Parameters
dictionary – This should contain all values which should be updated.
- Raises
AttributeError – In case during the process of setting a value for an attribute an error occurred.
KeyError – In case there were keys which could not be set in the item dictionary.
- get_conceptual_parent() Optional[ITEM_UNION] [source]
The parent may just be a superclass for something like a subprofile. Get the first parent of a different type.
- Returns
The first item which is conceptually not from the same type.
- property get_parent: str
This method returns the name of the parent for the object. In case there is not parent this return empty string.
- grab_tree() List[Union[Item, Settings]] [source]
Climb the tree and get every node.
- Returns
The list of items with all parents from that object upwards the tree. Contains at least the item itself and the settings of Cobbler.
- property inmemory: bool
If set to
false
, only the Item name is in memory. The rest of the Item’s properties can be retrieved either on demand or as a result of theload_items
background task.- Getter
The inmemory for the item.
- Setter
The new inmemory value for the object. Should only be used by the Cobbler serializers.
- property is_subobject: bool
Weather the object is a subobject of another object or not.
- Getter
True in case the object is a subobject, False otherwise.
- Setter
Sets the value. If this is not a bool, this will raise a
TypeError
.
- property kernel_options: Dict[Any, Any]
Kernel options are a space delimited list, like ‘a=b c=d e=f g h i=j’ or a dict.
Note
This property can be set to
<<inherit>>
.- Getter
The parsed kernel options.
- Setter
The new kernel options as a space delimited list. May raise
ValueError
in case of parsing problems.
- property kernel_options_post: Dict[str, Any]
Post kernel options are a space delimited list, like ‘a=b c=d e=f g h i=j’ or a dict.
Note
This property can be set to
<<inherit>>
.- Getter
The dictionary with the parsed values.
- Setter
Accepts str in above mentioned format or directly a dict.
- property logical_parent: Any
This property contains the name of the logical parent of an object. In case there is not parent this return None.
- Getter
Returns the parent object or None if it can’t be resolved via the Cobbler API.
- Setter
The name of the new logical parent.
- property mgmt_classes: List[Any]
Assigns a list of configuration management classes that can be assigned to any object, such as those used by Puppet’s external_nodes feature.
Note
This property can be set to
<<inherit>>
.- Getter
An empty list or the list of mgmt_classes.
- Setter
Will split this according to
input_string_or_list()
.
- property mgmt_parameters: Dict[Any, Any]
Parameters which will be handed to your management application (Must be a valid YAML dictionary)
Note
This property can be set to
<<inherit>>
.- Getter
The mgmt_parameters or an empty dict.
- Setter
A YAML string which can be assigned to any object, this is used by Puppet’s external_nodes feature.
- property mtime: float
Represents the last modification time of the object via the API. This is not updated automagically.
- Getter
The float which can be fed into a Python time object.
- Setter
The new time something was edited via the API.
- property name: str
Property which represents the objects name.
- Getter
The name of the object.
- Setter
Updating this has broad implications. Please try to use the
rename()
functionality from the corresponding collection.
- property owners: List[Any]
This is a feature which is related to the ownership module of Cobbler which gives only specific people access to specific records. Otherwise this is just a cosmetic feature to allow assigning records to specific users.
Warning
This is never validated against a list of existing users. Thus you can lock yourself out of a record.
Note
This property can be set to
<<inherit>>
.- Getter
Return the list of users which are currently assigned to the record.
- Setter
The list of people which should be new owners. May lock you out if you are using the ownership authorization module.
- property parent: Optional[Union[System, Profile, Distro, Menu]]
This property contains the name of the parent of an object. In case there is not parent this return None.
- Getter
Returns the parent object or None if it can’t be resolved via the Cobbler API.
- Setter
The name of the new logical parent.
- serialize() Dict[str, Any] [source]
This method is a proxy for
to_dict()
and contains additional logic for serialization to a persistent location.- Returns
The dictionary with the information for serialization.
- sort_key(sort_fields: List[Any])[source]
Convert the item to a dict and sort the data after specific given fields.
- Parameters
sort_fields – The fields to sort the data after.
- Returns
The sorted data.
- property template_files: Dict[Any, Any]
File mappings for built-in configuration management
- Getter
The dictionary with name-path key-value pairs.
- Setter
A dict. If not a dict must be a str which is split by
input_string_or_dict()
. RaisesTypeError
otherwise.
- to_dict(resolved: bool = False) Dict[Any, Any] [source]
This converts everything in this object to a dictionary.
- Parameters
resolved – If this is True, Cobbler will resolve the values to its final form, rather than give you the objects raw value.
- Returns
A dictionary with all values present in this object.
- tree_walk() List[ITEM_UNION] [source]
Get all children related by parent/child relationship. :return: The list of children objects.
- property uid: str
The uid is the internal unique representation of a Cobbler object. It should never be used twice, even after an object was deleted.
- Getter
The uid for the item. Should be unique across a running Cobbler instance.
- Setter
The new uid for the object. Should only be used by the Cobbler Item Factory.
- class cobbler.items.item.ItemCache(api: CobblerAPI)[source]
Bases:
object
A Cobbler ItemCache object.
8.1.3.7. cobbler.items.mgmtclass module
Cobbler module that contains the code for a Cobbler mgmtclass object.
Changelog:
- V3.4.0 (unreleased):
- Changed:
from_dict()
: The method was moved to the base class (Item)
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Changed:
check_if_valid()
: The method was moved to the base class (Item)
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Moved to base class (Item):
ctime
: intdepth
: floatmtime
: intuid
: strcomment
: strname
: strowners
: Union[list, SETTINGS:default_ownership]
- Removed:
get_fields()
set_packages()
- Please use the propertypackages
set_files()
- Please use the propertyfiles
set_params()
- Please use the propertyparams
set_is_definition()
- Please use the propertyis_definition
set_class_name()
- Please use the propertyclass_name
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
No changes
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
ctime
: intdepth
: floatis_definition
: boolmtime
: intuid
: strclass_name
: strcomment
: strfiles
: listname
: strowners
: Union[list, SETTINGS:default_ownership]packages
: listparams
: dict
- class cobbler.items.mgmtclass.Mgmtclass(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
This represents a group of systems which are related in Puppet through
Classes
.- COLLECTION_TYPE = 'mgmtclass'
- TYPE_NAME = 'mgmtclass'
- property class_name: str
The name of the management class.
- Getter
Returns the class name.
- Setter
Sets the name of the management class. Raises a TypeError or a Value Error.
- property files: List[str]
Files property.
- Getter
Returns the value for
files
.- Setter
Sets the value for the property
files
.
- property is_definition: bool
Is_definition property.
- Getter
Returns the value for
is_definition
.- Setter
Sets the value for property
is_defintion
. Raises a TypeError if not from type boolean.
- make_clone() Mgmtclass [source]
Clone this file object. Please manually adjust all value yourself to make the cloned object unique.
- Returns
The cloned instance of this object.
8.1.3.8. cobbler.items.package module
Cobbler module that contains the code for a Cobbler package object.
Changelog:
- V3.4.0 (unreleased):
- Changes:
Constructor:
kwargs
can now be used to seed the item during creation.from_dict()
: The method was moved to the base class.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Changed:
check_if_valid()
: Now present in base class (Item).
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
from_dict()
- Moved to base classes (Resource & Item):
ctime: float
depth: float
mtime: float
uid: str
action: str
comment: str
name: str
owners: Union[list, SETTINGS:default_ownership]
- Removed:
get_fields()
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
File was moved from
cobbler/item_package.py
tocobbler/items/package.py
.
- V3.0.0:
- Added:
set_installer()
set_version()
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
ctime: float
depth: float
mtime: float
uid: str
action: str
comment: str
installer: str
name: str
owners: Union[list, SETTINGS:default_ownership]
version: str
- class cobbler.items.package.Package(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Resource
This class represents a package which is being installed on a system.
- COLLECTION_TYPE = 'package'
- TYPE_NAME = 'package'
- property installer: str
Installer property.
- Getter
Returns the value for
installer
.- Setter
Sets the value for property
installer
. Raises a TypeError ifinstaller
is no string.
8.1.3.9. cobbler.items.profile module
Cobbler module that contains the code for a Cobbler profile object.
Changelog:
- V3.4.0 (unreleased):
- Changes:
Constructor:
kwargs
can now be used to seed the item during creation.children
: The property was moved to the base class.parent
: The property was moved to the base class.from_dict()
: The method was moved to the base class.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Changed:
next_server_v4
: str -> enums.VALUE_INHERITEDnext_server_v6
: str -> enums.VALUE_INHERITEDvirt_bridge
: str -> enums.VALUE_INHERITEDvirt_file_size
: int -> enums.VALUE_INHERITEDvirt_ram
: int -> enums.VALUE_INHERITED
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
boot_loaders
: Union[list, str]enable_ipxe
: boolnext_server_v4
: strnext_server_v6
: strmenu
: strfrom_dict()
- Removed:
enable_gpxe
: Union[bool, SETTINGS:enable_gpxe]next_server
: Union[str, inherit]get_fields()
get_parent()
: Please use the propertyparent
insteadset_parent()
: Please use the propertyparent
insteadset_distro()
: Please use the propertydistro
insteadset_name_servers()
: Please use the propertyname_servers
insteadset_name_servers_search()
: Please use the propertyname_servers_search
insteadset_proxy()
: Please use the propertyproxy
insteadset_enable_gpxe()
: Please use the propertyenable_gpxe
insteadset_enable_menu()
: Please use the propertyenable_menu
insteadset_dhcp_tag()
: Please use the propertydhcp_tag
insteadset_server()
: Please use the propertyserver
insteadset_next_server()
: Please use the propertynext_server
insteadset_filename()
: Please use the propertyfilename
insteadset_autoinstall()
: Please use the propertyautoinstall
insteadset_virt_auto_boot()
: Please use the propertyvirt_auto_boot
insteadset_virt_cpus()
: Please use the propertyvirt_cpus
insteadset_virt_file_size()
: Please use the propertyvirt_file_size
insteadset_virt_disk_driver()
: Please use the propertyvirt_disk_driver
insteadset_virt_ram()
: Please use the propertyvirt_ram
insteadset_virt_type()
: Please use the propertyvirt_type
insteadset_virt_bridge()
: Please use the propertyvirt_bridge
insteadset_virt_path()
: Please use the propertyvirt_path
insteadset_repos()
: Please use the propertyrepos
insteadset_redhat_management_key()
: Please use the propertyredhat_management_key
insteadget_redhat_management_key()
: Please use the propertyredhat_management_key
insteadget_arch()
: Please use the propertyarch
instead
- Changed:
autoinstall
: Union[str, SETTINGS:default_kickstart] -> enums.VALUE_INHERITEDenable_menu
: Union[bool, SETTINGS:enable_menu] -> boolname_servers
: Union[list, SETTINGS:default_name_servers] -> listname_servers_search
: Union[list, SETTINGS:default_name_servers_search] -> listfilename
: Union[str, inherit] -> strproxy
: Union[str, SETTINGS:proxy_url_int] -> enums.VALUE_INHERITEDredhat_management_key
: Union[str, inherit] -> enums.VALUE_INHERITEDserver
: Union[str, inherit] -> enums.VALUE_INHERITEDvirt_auto_boot
: Union[bool, SETTINGS:virt_auto_boot] -> boolvirt_bridge
: Union[str, SETTINGS:default_virt_bridge] -> strvirt_cpus
: int -> Union[int, str]virt_disk_driver
: Union[str, SETTINGS:default_virt_disk_driver] -> enums.VirtDiskDriversvirt_file_size
: Union[int, SETTINGS:default_virt_file_size] -> intvirt_ram
: Union[int, SETTINGS:default_virt_ram] -> intvirt_type
: Union[str, SETTINGS:default_virt_type] -> enums.VirtTypeboot_files
: list/dict? -> enums.VALUE_INHERITEDfetchable_files
: dict -> enums.VALUE_INHERITEDautoinstall_meta
: dict -> enums.VALUE_INHERITEDkernel_options
: dict -> enums.VALUE_INHERITEDkernel_options_post
: dict -> enums.VALUE_INHERITEDmgmt_classes: list -> enums.VALUE_INHERITED
mgmt_parameters
: Union[str, inherit] -> enums.VALUE_INHERITED
(
mgmt_classes
parameter has a duplicate)
- V3.2.2:
No changes
- V3.2.1:
- Added:
kickstart
: Resolves as a proxy toautoinstall
- V3.2.0:
No changes
- V3.1.2:
- Added:
filename
: Union[str, inherit]
- V3.1.1:
No changes
- V3.1.0:
- Added:
get_arch()
- V3.0.1:
File was moved from
cobbler/item_profile.py
tocobbler/items/profile.py
.
- V3.0.0:
- Added:
next_server
: Union[str, inherit]
- Changed:
Renamed:
kickstart
->autoinstall
Renamed:
ks_meta
->autoinstall_meta
autoinstall
: Union[str, SETTINGS:default_kickstart] -> Union[str, SETTINGS:default_autoinstall]set_kickstart()
: Renamed toset_autoinstall()
- Removed:
redhat_management_server
: Union[str, inherit]template_remote_kickstarts
: Union[bool, SETTINGS:template_remote_kickstarts]set_redhat_management_server()
set_template_remote_kickstarts()
- V2.8.5:
Inital tracking of changes for the changelog.
- Added
ctime
: intdepth
: intmtime
: intuid
: strkickstart
: Union[str, SETTINGS:default_kickstart]ks_meta
: dictboot_files
: list/dict?comment
: strdhcp_tag
: strdistro
: strenable_gpxe
: Union[bool, SETTINGS:enable_gpxe]enable_menu
: Union[bool, SETTINGS:enable_menu]fetchable_files
: dictkernel_options
: dictkernel_options_post
: dictmgmt_classes
: listmgmt_parameters
: Union[str, inherit]name
: strname_servers
: Union[list, SETTINGS:default_name_servers]name_servers_search
: Union[list, SETTINGS:default_name_servers_search]owners
: Union[list, SETTINGS:default_ownership]parent
: strproxy
: Union[str, SETTINGS:proxy_url_int]redhat_management_key
: Union[str, inherit]redhat_management_server
: Union[str, inherit]template_remote_kickstarts
: Union[bool, SETTINGS:template_remote_kickstarts]repos
: listserver
: Union[str, inherit]template_files
: dictvirt_auto_boot
: Union[bool, SETTINGS:virt_auto_boot]virt_bridge
: Union[str, SETTINGS:default_virt_bridge]virt_cpus
: intvirt_disk_driver
: Union[str, SETTINGS:default_virt_disk_driver]virt_file_size
: Union[int, SETTINGS:default_virt_file_size]virt_path
: strvirt_ram
: Union[int, SETTINGS:default_virt_ram]virt_type
: Union[str, SETTINGS:default_virt_type]
- class cobbler.items.profile.Profile(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
A Cobbler profile object.
- COLLECTION_TYPE = 'profile'
- TYPE_NAME = 'profile'
- property arch: Optional[Archs]
This represents the architecture of a profile. It is read only.
- Getter
None
or the parent architecture.
- property autoinstall: str
Represents the automatic OS installation template file path, this must be a local file.
- Getter
Either the inherited name or the one specific to this profile.
- Setter
The name of the new autoinstall template is validated. The path should come in the format of a
str
.
- property boot_loaders: List[str]
This represents all boot loaders for which Cobbler will try to generate bootloader configuration for.
Note
This property can be set to
<<inherit>>
.- Getter
The bootloaders.
- Setter
The new bootloaders. Will be validates against a list of well known ones.
- check_if_valid()[source]
Check if the profile is valid. This checks for an existing name and a distro as a conceptual parent.
- Raises
CX – In case the distro or name is not present.
- property dhcp_tag: str
Represents the VLAN tag the DHCP Server is in/answering to.
- Getter
The VLAN tag or nothing if a system with the profile should not be in a VLAN.
- Setter
The new VLAN tag.
- property display_name: str
Returns the display name.
- Getter
Returns the display name for the boot menu.
- Setter
Sets the display name for the boot menu.
- property distro: Optional[Distro]
The parent distro of a profile. This is not representing the Distro but the id of it.
This is a required property, if saved to the disk, with the exception if this is a subprofile.
- Returns
The distro object or None.
- property enable_ipxe: bool
Sets whether or not the profile will use iPXE for booting.
- Getter
If set to inherit then this returns the parent value, otherwise it returns the real value.
- Setter
May throw a
TypeError
in case the new value cannot be cast tobool
.
Sets whether or not the profile will be listed in the default PXE boot menu. This is pretty forgiving for YAML’s sake.
- Getter
The value resolved from the defaults or the value specific to the profile.
- Setter
May raise a
TypeError
in case the boolean could not be converted.
- property filename: str
The filename which is fetched by the client from TFTP.
- Getter
Either the default/inherited one, or the one specific to this profile.
- Setter
The new filename which is fetched on boot. May raise a
TypeError
when the wrong type was given.
- find_match_single_key(data: Dict[str, Any], key: str, value: Any, no_errors: bool = False) bool [source]
Look if the data matches or not. This is an alternative for
find_match()
.- Parameters
data – The data to search through.
key – The key to look for int the item.
value – The value for the key.
no_errors – How strict this matching is.
- Returns
Whether the data matches or not.
- make_clone()[source]
Clone this file object. Please manually adjust all value yourself to make the cloned object unique.
- Returns
The cloned instance of this object.
Property to represent the menu which this image should be put into.
- Getter
The name of the menu or an emtpy str.
- Setter
Should only be the name of the menu not the object. May raise
CX
in case the menu does not exist.
- property name_servers: List[Any]
Represents the list of nameservers to set for the profile.
- Getter
The nameservers.
- Setter
Comma delimited
str
or list with the nameservers.
- property name_servers_search: List[Any]
Represents the list of DNS search paths.
- Getter
The list of DNS search paths.
- Setter
Comma delimited
str
or list with the nameservers search paths.
- property next_server_v4: str
Represents the next server for IPv4.
- Getter
The IP for the next server.
- Setter
May raise a
TypeError
if the new value is not of typestr
.
- property next_server_v6: str
Represents the next server for IPv6.
- Getter
The IP for the next server.
- Setter
May raise a
TypeError
if the new value is not of typestr
.
- property proxy: str
Override the default external proxy which is used for accessing the internet.
- Getter
Returns the default one or the specific one for this repository.
- Setter
May raise a
TypeError
in case the wrong value is given.
- property redhat_management_key: str
Getter of the redhat management key of the profile or it’s parent.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the redhat_management_key of the profile.
- Setter
May raise a
TypeError
in case of a validation error.
- property repos: Union[str, List[str]]
The repositories to add once the system is provisioned.
- Getter
The names of the repositories the profile has assigned.
- Setter
The new names of the repositories for the profile. Validated against existing repositories.
- property server: str
Represents the hostname the Cobbler server is reachable by a client.
Note
This property can be set to
<<inherit>>
.- Getter
The hostname of the Cobbler server.
- Setter
May raise a
TypeError
in case the new value is not astr
.
- property virt_auto_boot: bool
Whether the VM should be booted when booting the host or not.
Note
This property can be set to
<<inherit>>
.- Getter
True
means autoboot is enabled, otherwise VM is not booted automatically.- Setter
The new state for the property.
- property virt_bridge: str
Represents the name of the virtual bridge to use.
Note
This property can be set to
<<inherit>>
.- Getter
Either the default name for the bridge or the specific one for this profile.
- Setter
The new name. Does not overwrite the default one.
- property virt_cpus: int
The amount of vCPU cores used in case the image is being deployed on top of a VM host.
- Getter
The cores used.
- Setter
The new number of cores.
- property virt_disk_driver: VirtDiskDrivers
The type of disk driver used for storing the image.
Note
This property can be set to
<<inherit>>
.- Getter
The enum type representation of the disk driver.
- Setter
May be a
str
with the name of the disk driver or from the enum type directly.
- property virt_file_size: float
The size of the image and thus the usable size for the guest.
Warning
There is a regression which makes the usage of multiple disks not possible right now. This will be fixed in a future release.
Note
This property can be set to
<<inherit>>
.- Getter
The size of the image(s) in GB.
- Setter
The float with the new size in GB.
- property virt_path: str
The path to the place where the image will be stored.
- Getter
The path to the image.
- Setter
The new path for the image.
8.1.3.10. cobbler.items.repo module
Cobbler module that contains the code for a Cobbler repo object.
Changelog:
- V3.4.0 (unreleased):
- Changed:
Constructor:
kwargs
can now be used to seed the item during creation.children
: The property was moved to the base class.from_dict()
: The method was moved to the base class.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
No changes
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
os_version: str
from_dict()
- Moved to base class (Item):
ctime
: floatdepth
: floatmtime
: floatparent
: struid
: strcomment
: strname
: strowners
: Union[list, SETTINGS:default_ownership]
- Changes:
breed
: str -> enums.RepoBreedsarch
: str -> enums.RepoArchsrsyncopts
: dict/str? -> dictmirror_type
: str -> enums.MirrorTypeapt_components
: list/str? -> listapt_dists
: list/str? -> listcreaterepo_flags
: Union[dict, inherit] -> enums.VALUE_INHERITEDproxy
: Union[str, inherit] -> enums.VALUE_INHERITED
- V3.2.2:
No changes
- V3.2.1:
- Added:
mirror_type
: strset_mirror_type()
- V3.2.0:
- Added:
rsyncopts
: dict/strset_rsyncopts()
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
- Changed:
arch
: New valid values390x
as an architecture.
- V3.0.1:
File was moved from
cobbler/item_repo.py
tocobbler/items/repo.py
.
- V3.0.0:
- Changes:
proxy
: Union[str, inherit, SETTINGS:proxy_url_ext] -> Union[str, inherit]
- V2.8.5:
Inital tracking of changes for the changelog.
- Added:
ctime
: floatdepth
: floatmtime
: floatparent
: struid
: strapt_components
: list/str?apt_dists
: list/str?arch
: strbreed
: strcomment
: strcreaterepo_flags
: Union[dict, inherit]environment
: dictkeep_updated
: boolmirror
: strmirror_locally
: boolname
: strowners
: Union[list, SETTINGS:default_ownership]priority
: intproxy
: Union[str, inherit, SETTINGS:proxy_url_ext]rpm_list
: listyumopts
: dict
- class cobbler.items.repo.Repo(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
A Cobbler repo object.
- COLLECTION_TYPE = 'repo'
- TYPE_NAME = 'repo'
- property apt_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 reallist
.
- property apt_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 reallist
.
- property arch: RepoArchs
Override the arch used for reposync
- Getter
The repo arch enum object.
- Setter
May throw a
ValueError
orTypeError
in case the conversion of the value is unsuccessful.
- property breed: RepoBreeds
The repository system breed. This decides some defaults for most actions with a repo in Cobbler.
- Getter
The breed detected.
- Setter
May raise a
ValueError
orTypeError
in case the given value is wrong.
- check_if_valid() None [source]
Checks if the object is valid. Currently checks for name and mirror to be present.
- Raises
CX – In case the name or mirror is missing.
- property createrepo_flags: str
Flags passed to createrepo when it is called. Common flags to use would be
-c cache
or-g comps.xml
to generate group information.Note
This property can be set to
<<inherit>>
.- Getter
The createrepo_flags to apply to the repo.
- Setter
The new flags. May raise a
TypeError
in case the options are not astr
.
- property environment: Dict[Any, Any]
Yum can take options from the environment. This puts them there before each reposync.
- Getter
The options to be attached to the environment.
- Setter
May raise a
ValueError
in case the data provided is not parsable.
- property keep_updated: bool
This allows the user to disable updates to a particular repo for whatever reason.
- Getter
True in case the repo is updated automatically and False otherwise.
- Setter
Is auto-converted to a bool via multiple types. Raises a
TypeError
if this was not possible.
- make_clone() Repo [source]
Clone this file object. Please manually adjust all value yourself to make the cloned object unique.
- Returns
The cloned instance of this object.
- property mirror: str
A repo is (initially, as in right now) is something that can be rsynced. reposync/repotrack integration over HTTP might come later.
- Getter
The mirror uri.
- Setter
May raise a
TypeError
in case we run into
- property mirror_locally: bool
If this property is set to
True
then all content of the source is mirrored locally. This may take up a lot of disk space.- Getter
Whether the mirror is locally available or not.
- Setter
Raises a
TypeError
in case after the conversion of the value is not of typebool
.
- property mirror_type: MirrorType
Override the mirror_type used for reposync
- Getter
The mirror type. Is one of the predefined ones.
- Setter
Hand over a str or enum type value to this. May raise
TypeError
orValueError
in case there are conversion or type problems.
- property os_version: str
The operating system version which is compatible with this repository.
- Getter
The os version.
- Setter
The version as a
str
.
- property priority: int
Set the priority of the repository. Only works if host is using priorities plugin for yum.
- Getter
The priority of the repo.
- Setter
A number between 1 & 99. May raise otherwise
TypeError
orValueError
.
- property proxy: str
Override the default external proxy which is used for accessing the internet.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the default one or the specific one for this repository.
- Setter
May raise a
TypeError
in case the wrong value is given.
- property rpm_list: List[str]
Rather than mirroring the entire contents of a repository (Fedora Extras, for instance, contains games, and we probably don’t want those), make it possible to list the packages one wants out of those repos, so only those packages and deps can be mirrored.
- Getter
The list of packages to be mirrored.
- Setter
May be a space delimited list or a real one.
8.1.3.11. cobbler.items.resource module
A Resource is a serializable thing that can appear in a Collection
Changelog:
- V3.4.0 (unreleased):
No changes
- V3.3.4 (unreleased):
No changes
- V3.3.3:
No changes
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
File was moved from
cobbler/resource.py
tocobbler/items/resource.py
.- Added:
action: enums.ResourceAction
mode: str
owner: str
group: str
path: str
template: str
- Removed:
set_template
- Please use the propertytemplate
set_path
- Please use the propertypath
set_owner
- Please use the propertyowner
set_mode
- Please use the propertymode
set_group
- Please use the propertygroup
set_action
- Please use the propertyaction
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
No changes
- V2.8.5:
Inital tracking of changes for the changelog.
- class cobbler.items.resource.Resource(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
Base Class for management resources.
- property action: ResourceAction
Action property.
- Getter
Return the value for
action
.- Setter
Sets the value for property
action
. Raises a ValueError or a TypeError.
- property group: str
Group property.
- Getter
Return the value for
group
.- Setter
Sets the value for property
group
.
- make_clone() Resource [source]
Clone this file object. Please manually adjust all values yourself to make the cloned object unique.
- Returns
The cloned instance of this object.
- property mode: str
Mode property.
- Getter
Return the value for
mode
.- Setter
Sets the value for property
mode
. Raises a TypeError.
- property owner: str
Owner property.
- Getter
Return the value for
owner
.- Setter
Sets the value for property
owner
. Raises a TypeError.
8.1.3.12. cobbler.items.system module
All code belonging to Cobbler systems. This includes network interfaces.
Changelog (NetworkInterface):
- V3.4.0 (unreleased):
- Changes:
Constructor:
kwargs
can now be used to seed the item during creation.
- V3.3.4 (unreleased):
No changes
- V3.3.3:
- Changed:
to_dict()
: Accepts new parameterresolved
virt_bridge
: Can now be set to<<inherit>>
to get its value from the settings keydefault_virt_bridge
- V3.3.2:
No changes
- V3.3.1:
No changes
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
NetworkInterface
is now a class.Serialization still happens inside the system collection.
Properties have been used.
- V3.2.2:
No changes
- V3.2.1:
No changes
- V3.2.0:
No changes
- V3.1.2:
No changes
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
No changes
- V3.0.0:
Field defintions now split of
System
class
- V2.8.5:
Inital tracking of changes for the changelog.
Field definitions part of
System
class- Added:
mac_address
: strconnected_mode
: boolmtu
: strip_address
: strinterface_type
: str - One of “na”, “bond”, “bond_slave”, “bridge”, bridge_slave”, “bonded_bridge_slave”, “infiniband”interface_master
: strbonding_opts
: strbridge_opts
: strmanagement
: boolstatic
: boolnetmask
: strif_gateway
: strdhcp_tag
: strdns_name
: strstatic_routes
: List[str]virt_bridge
: stripv6_address
: stripv6_prefix
: stripv6_secondaries
: List[str]ipv6_mtu
: stripv6_static_routes
: List[str]ipv6_default_gateway
: strcnames
: List[str]
Changelog (System):
- V3.4.0 (unreleased):
- Added:
display_name
: str
- Changes:
Constructor:
kwargs
can now be used to seed the item during creation.from_dict()
: The method was moved to the base class.parent
: The property was moved to the base class.
- V3.3.4 (unreleased):
- Changed:
The network interface
default
is not created on object creation.
- V3.3.3:
- Changed:
boot_loaders
: Can now be set to<<inherit>>
next_server_v4
: Can now be set to<<inhertit>>
next_server_v6
: Can now be set to<<inhertit>>
virt_cpus
: Can now be set to<<inhertit>>
virt_file_size
: Can now be set to<<inhertit>>
virt_disk_driver
: Can now be set to<<inhertit>>
virt_auto_boot
: Can now be set to<<inhertit>>
virt_ram
: Can now be set to<<inhertit>>
virt_type
: Can now be set to<<inhertit>>
virt_path
: Can now be set to<<inhertit>>
- V3.3.2:
No changes
- V3.3.1:
- Changed:
serial_device
: Default value is now-1
- V3.3.0:
This release switched from pure attributes to properties (getters/setters).
- Added:
next_server_v4
next_server_v6
- Changed:
virt_*
: Cannot be set to inherit anymoreenable_gpxe
: Renamed toenable_ipxe
- Removed:
get_fields()
next_server
- Please use one ofnext_server_v4
ornext_server_v6
set_boot_loader()
- Moved toboot_loader
propertyset_server()
- Moved toserver
propertyset_next_server()
- Moved tonext_server
propertyset_filename()
- Moved tofilename
propertyset_proxy()
- Moved toproxy
propertyset_redhat_management_key()
- Moved toredhat_management_key
propertyget_redhat_management_key()
- Moved toredhat_management_key
propertyset_dhcp_tag()
- Moved toNetworkInterface
class propertydhcp_tag
set_cnames()
- Moved toNetworkInterface
class propertycnames
set_status()
- Moved tostatus
propertyset_static()
- Moved toNetworkInterface
class propertystatic
set_management()
- Moved toNetworkInterface
class propertymanagement
set_dns_name()
- Moved toNetworkInterface
class propertydns_name
set_hostname()
- Moved tohostname
propertyset_ip_address()
- Moved toNetworkInterface
class propertyip_address
set_mac_address()
- Moved toNetworkInterface
class propertymac_address
set_gateway()
- Moved togateway
propertyset_name_servers()
- Moved toname_servers
propertyset_name_servers_search()
- Moved toname_servers_search
propertyset_netmask()
- Moved toNetworkInterface
class propertynetmask
set_if_gateway()
- Moved toNetworkInterface
class propertyif_gateway
set_virt_bridge()
- Moved toNetworkInterface
class propertyvirt_bridge
set_interface_type()
- Moved toNetworkInterface
class propertyinterface_type
set_interface_master()
- Moved toNetworkInterface
class propertyinterface_master
set_bonding_opts()
- Moved toNetworkInterface
class propertybonding_opts
set_bridge_opts()
- Moved toNetworkInterface
class propertybridge_opts
set_ipv6_autoconfiguration()
- Moved toipv6_autoconfiguration
propertyset_ipv6_default_device()
- Moved toipv6_default_device
propertyset_ipv6_address()
- Moved toNetworkInterface
class propertyipv6_address
set_ipv6_prefix()
- Moved toNetworkInterface
class propertyipv6_prefix
set_ipv6_secondaries()
- Moved toNetworkInterface
class propertyipv6_secondaries
set_ipv6_default_gateway()
- Moved toNetworkInterface
class propertyipv6_default_gateway
set_ipv6_static_routes()
- Moved toNetworkInterface
class propertyipv6_static_routes
set_ipv6_mtu()
- Moved toNetworkInterface
class propertyipv6_mtu
set_mtu()
- Moved toNetworkInterface
class propertymtu
set_connected_mode()
- Moved toNetworkInterface
class propertyconnected_mode
set_enable_gpxe()
- Moved toenable_gpxe
propertyset_profile()
- Moved toprofile
propertyset_image()
- Moved toimage
propertyset_virt_cpus()
- Moved tovirt_cpus
propertyset_virt_file_size()
- Moved tovirt_file_size
propertyset_virt_disk_driver()
- Moved tovirt_disk_driver
propertyset_virt_auto_boot()
- Moved tovirt_auto_boot
propertyset_virt_pxe_boot()
- Moved tovirt_pxe_boot
propertyset_virt_ram()
- Moved tovirt_ram
propertyset_virt_type()
- Moved tovirt_type
propertyset_virt_path()
- Moved tovirt_path
propertyset_netboot_enabled()
- Moved tonetboot_enabled
propertyset_autoinstall()
- Moved toautoinstall
propertyset_power_type()
- Moved topower_type
propertyset_power_identity_file()
- Moved topower_identity_file
propertyset_power_options()
- Moved topower_options
propertyset_power_user()
- Moved topower_user
propertyset_power_pass()
- Moved topower_pass
propertyset_power_address()
- Moved topower_address
propertyset_power_id()
- Moved topower_id
propertyset_repos_enabled()
- Moved torepos_enabled
propertyset_serial_device()
- Moved toserial_device
propertyset_serial_baud_rate()
- Moved toserial_baud_rate
property
- V3.2.2:
No changes
- V3.2.1:
- Added:
kickstart
: Resolves as a proxy toautoinstall
- V3.2.0:
No changes
- V3.1.2:
- Added:
filename
: str - Inheritableset_filename()
- V3.1.1:
No changes
- V3.1.0:
No changes
- V3.0.1:
File was moved from
cobbler/item_system.py
tocobbler/items/system.py
.
- V3.0.0:
Field definitions for network interfaces moved to own
FIELDS
array- Added:
boot_loader
: str - Inheritablenext_server
: str - Inheritablepower_options
: strpower_identity_file
: strserial_device
: intserial_baud_rate
: int - One of “”, “2400”, “4800”, “9600”, “19200”, “38400”, “57600”, “115200”set_next_server()
set_serial_device()
set_serial_baud_rate()
get_config_filename()
set_power_identity_file()
set_power_options()
- Changed:
kickstart
: Renamed toautoinstall
ks_meta
: Renamed toautoinstall_meta
from_datastruct
: Renamed tofrom_dict()
set_kickstart()
: Renamed toset_autoinstall()
- Removed:
redhat_management_server
set_ldap_enabled()
set_monit_enabled()
set_template_remote_kickstarts()
set_redhat_management_server()
set_name()
- V2.8.5:
Inital tracking of changes for the changelog.
Network interface defintions part of this class
- Added:
name
: struid
: strowners
: List[str] - Inheritableprofile
: str - Name of the profileimage
: str - Name of the imagestatus
: str - One of “”, “development”, “testing”, “acceptance”, “production”kernel_options
: Dict[str, Any]kernel_options_post
: Dict[str, Any]ks_meta
: Dict[str, Any]enable_gpxe
: bool - Inheritableproxy
: str - Inheritablenetboot_enabled
: boolkickstart
: str - Inheritablecomment
: strdepth
: intserver
: str - Inheritablevirt_path
: str - Inheritablevirt_type
: str - Inheritable; One of “xenpv”, “xenfv”, “qemu”, “kvm”, “vmware”, “openvz”virt_cpus
: int - Inheritablevirt_file_size
: float - Inheritablevirt_disk_driver
: str - Inheritable; One of “<<inherit>>”, “raw”, “qcow”, “qcow2”, “aio”, “vmdk”, “qed”virt_ram
: int - Inheritablevirt_auto_boot
: bool - Inheritablevirt_pxe_boot
: boolctime
: floatmtime
: floatpower_type
: str - Default loaded from settings keypower_management_default_type
power_address
: strpower_user
: strpower_pass
: strpower_id
: strhostname
: strgateway
: strname_servers
: List[str]name_servers_search
: List[str]ipv6_default_device
: stripv6_autoconfiguration
: boolmgmt_classes
: List[Any] - Inheritablemgmt_parameters
: str - Inheritableboot_files
: Dict[str, Any]/List (Not reverse engineeriable) - Inheritablefetchable_files
: Dict[str, Any] - Inheritabletemplate_files
: Dict[str, Any] - Inheritableredhat_management_key
: str - Inheritableredhat_management_server
: str - Inheritabletemplate_remote_kickstarts
: bool - Default loaded from settings keytemplate_remote_kickstarts
repos_enabled
: boolldap_enabled
: - boolldap_type
: str - Default loaded from settings keyldap_management_default_type
monit_enabled
: bool
- class cobbler.items.system.NetworkInterface(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
object
A subobject of a Cobbler System which represents the network interfaces
- property bonding_opts: str
bonding_opts property.
- Getter
Returns the value for
bonding_opts
.- Setter
Sets the value for the property
bonding_opts
.
- property bridge_opts: str
bridge_opts property.
- Getter
Returns the value for
bridge_opts
.- Setter
Sets the value for the property
bridge_opts
.
- property cnames: List[str]
cnames property.
- Getter
Returns the value for
cnames
.- Setter
Sets the value for the property
cnames
.
- property connected_mode: bool
connected_mode property.
- Getter
Returns the value for
connected_mode
.- Setter
Sets the value for the property
connected_mode
.
- deserialize(interface_dict: Dict[str, Any])[source]
This is currently a proxy for
from_dict()
.- Parameters
interface_dict – The dictionary with the data to deserialize.
- property dhcp_tag: str
dhcp_tag property.
- Getter
Returns the value for
dhcp_tag
.- Setter
Sets the value for the property
dhcp_tag
.
- property dns_name: str
dns_name property.
- Getter
Returns the value for ``dns_name`.
- Setter
Sets the value for the property
dns_name
.
- from_dict(dictionary: Dict[str, Any])[source]
Initializes the object with attributes from the dictionary.
- Parameters
dictionary – The dictionary with values.
- property if_gateway: str
if_gateway property.
- Getter
Returns the value for
if_gateway
.- Setter
Sets the value for the property
if_gateway
.
- property interface_master: str
interface_master property.
- Getter
Returns the value for
interface_master
.- Setter
Sets the value for the property
interface_master
.
- property interface_type: NetworkInterfaceType
interface_type property.
- Getter
Returns the value for
interface_type
.- Setter
Sets the value for the property
interface_type
.
- property ip_address: str
ip_address property.
- Getter
Returns the value for
ip_address
.- Setter
Sets the value for the property
ip_address
.
- property ipv6_address: str
ipv6_address property.
- Getter
Returns the value for
ipv6_address
.- Setter
Sets the value for the property
ipv6_address
.
- property ipv6_default_gateway: str
ipv6_default_gateway property.
- Getter
Returns the value for
ipv6_default_gateway
.- Setter
Sets the value for the property
ipv6_default_gateway
.
- property ipv6_mtu: str
ipv6_mtu property.
- Getter
Returns the value for
ipv6_mtu
.- Setter
Sets the value for the property
ipv6_mtu
.
- property ipv6_prefix: str
ipv6_prefix property.
- Getter
Returns the value for
ipv6_prefix
.- Setter
Sets the value for the property
ipv6_prefix
.
- property ipv6_secondaries: List[str]
ipv6_secondaries property.
- Getter
Returns the value for
ipv6_secondaries
.- Setter
Sets the value for the property
ipv6_secondaries
.
- property ipv6_static_routes: List[str]
ipv6_static_routes property.
- Getter
Returns the value for
ipv6_static_routes
.- Setter
Sets the value for the property ipv6_static_routes`.
- property mac_address: str
mac_address property.
- Getter
Returns the value for
mac_address
.- Setter
Sets the value for the property
mac_address
.
- property management: bool
management property.
- Getter
Returns the value for
management
.- Setter
Sets the value for the property
management
.
- modify_interface(_dict: Dict[str, Any])[source]
Modify the interface
- Parameters
_dict – The dict with the parameter.
- property mtu: str
mtu property.
- Getter
Returns the value for
mtu
.- Setter
Sets the value for the property
mtu
.
- property netmask: str
netmask property.
- Getter
Returns the value for
netmask
.- Setter
Sets the value for the property
netmask
.
- serialize() Dict[str, Any] [source]
This method is a proxy for
to_dict()
and contains additional logic for serialization to a persistent location.- Returns
The dictionary with the information for serialization.
- property static: bool
static property.
- Getter
Returns the value for
static
.- Setter
Sets the value for the property
static
.
- property static_routes: List[str]
static_routes property.
- Getter
Returns the value for
static_routes
.- Setter
Sets the value for the property
static_routes
.
- to_dict(resolved: bool = False) Dict[str, Any] [source]
This converts everything in this object to a dictionary.
- Parameters
resolved – If this is True, Cobbler will resolve the values to its final form, rather than give you the objects raw value.
- Returns
A dictionary with all values present in this object.
- class cobbler.items.system.System(api: CobblerAPI, *args: Any, **kwargs: Any)[source]
Bases:
Item
A Cobbler system object.
- COLLECTION_TYPE = 'system'
- TYPE_NAME = 'system'
- property autoinstall: str
autoinstall property.
- Getter
Returns the value for
autoinstall
.- Setter
Sets the value for the property
autoinstall
.
- property boot_loaders: List[str]
boot_loaders property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
boot_loaders
.- Setter
Sets the value for the property
boot_loaders
.
- check_if_valid()[source]
Checks if the current item passes logical validation.
- Raises
CX – In case name is missing. Additionally either image or profile is required.
- delete_interface(name: Union[str, Dict[Any, Any]]) None [source]
Used to remove an interface.
- Raises
TypeError – If the name of the interface is not of type str or dict.
- property display_name: str
Returns the display name.
- Getter
Returns the display name for the boot menu.
- Setter
Sets the display name for the boot menu.
- property enable_ipxe: bool
enable_ipxe property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
enable_ipxe
.- Setter
Sets the value for the property
enable_ipxe
.
- property filename: str
filename property.
- Getter
Returns the value for
filename
.- Setter
Sets the value for the property
filename
.
- property gateway
gateway property.
- Getter
Returns the value for
gateway
.- Setter
Sets the value for the property
gateway
.
- get_config_filename(interface: str, loader: Optional[str] = None) Optional[str] [source]
The configuration file for each system pxe uses is either a form of the MAC address or the hex version or the IP address. If none of that is available, just use the given name, though the name given will be unsuitable for PXE configuration (For this, check system.is_management_supported()). This same file is used to store system config information in the Apache tree, so it’s still relevant.
- Parameters
interface – Name of the interface.
loader – Bootloader type.
- get_ip_address(interface: str) str [source]
Get the IP address for the given interface.
- Parameters
interface – The name of the interface to get the IP address of.
- get_mac_address(interface: str)[source]
Get the mac address, which may be implicit in the object name or explicit with –mac-address. Use the explicit location first.
- Parameters
interface – The name of the interface to get the MAC of.
- property hostname: str
hostname property.
- Getter
Returns the value for
hostname
.- Setter
Sets the value for the property
hostname
.
- property image: str
image property.
- Getter
Returns the value for
image
.- Setter
Sets the value for the property
image
.
- property interfaces: Dict[str, NetworkInterface]
Represents all interfaces owned by the system.
- Getter
The interfaces present. Has at least the
default
one.- Setter
Accepts not only the correct type but also a dict with dicts which will then be converted by the setter.
- property ipv6_autoconfiguration: bool
ipv6_autoconfiguration property.
- Getter
Returns the value for
ipv6_autoconfiguration
.- Setter
Sets the value for the property
ipv6_autoconfiguration
.
- property ipv6_default_device: str
ipv6_default_device property.
- Getter
Returns the value for
ipv6_default_device
.- Setter
Sets the value for the property
ipv6_default_device
.
- is_management_supported(cidr_ok: bool = True) bool [source]
Can only add system PXE records if a MAC or IP address is available, else it’s a koan only record.
- Parameters
cidr_ok – Deprecated parameter which is not used anymore.
- modify_interface(interface_values: Dict[str, Any])[source]
Modifies a magic interface dictionary in the form of: {“macaddress-eth0” : “aa:bb:cc:dd:ee:ff”}
- 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
.
- property name_servers_search: List[str]
name_servers_search property.
- Getter
Returns the value for
name_servers_search
.- Setter
Sets the value for the property
name_servers_search
.
- property netboot_enabled: bool
netboot_enabled property.
- Getter
Returns the value for
netboot_enabled
.- Setter
Sets the value for the property
netboot_enabled
.
- 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 power_address: str
power_address property.
- Getter
Returns the value for
power_address
.- Setter
Sets the value for the property
power_address
.
- property power_id: str
power_id property.
- Getter
Returns the value for
power_id
.- Setter
Sets the value for the property
power_id
.
- property power_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 power_options: str
power_options property.
- Getter
Returns the value for
power_options
.- Setter
Sets the value for the property
power_options
.
- property power_pass: str
power_pass property.
- Getter
Returns the value for
power_pass
.- Setter
Sets the value for the property
power_pass
.
- property power_type: str
power_type property.
- Getter
Returns the value for
power_type
.- Setter
Sets the value for the property
power_type
.
- property power_user: str
power_user property.
- Getter
Returns the value for
power_user
.- Setter
Sets the value for the property
power_user
.
- property profile: str
profile property.
- Getter
Returns the value for
profile
.- Setter
Sets the value for the property
profile
.
- property proxy: str
proxy property. This corresponds per default to the setting``proxy_url_int``.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
proxy
.- Setter
Sets the value for the property
proxy
.
- property redhat_management_key: str
redhat_management_key property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
redhat_management_key
.- Setter
Sets the value for the property
redhat_management_key
.
- rename_interface(old_name: str, new_name: str)[source]
Used to rename an interface.
- Raises
TypeError – In case on of the params was not a
str
.ValueError – In case the name for the old interface does not exist or the new name does.
- property repos_enabled: bool
repos_enabled property.
- Getter
Returns the value for
repos_enabled
.- Setter
Sets the value for the property
repos_enabled
.
- property serial_baud_rate: BaudRates
serial_baud_rate property. The value “disabled” will disable the functionality completely.
- Getter
Returns the value for
serial_baud_rate
.- Setter
Sets the value for the property
serial_baud_rate
.
- property serial_device: int
serial_device property. “-1” disables the serial device functionality completely.
- Getter
Returns the value for
serial_device
.- Setter
Sets the value for the property
serial_device
.
- property server: str
server property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
server
.- Setter
Sets the value for the property
server
.
- property status: str
status property.
- Getter
Returns the value for
status
.- Setter
Sets the value for the property
status
.
- property virt_auto_boot: bool
virt_auto_boot property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
virt_auto_boot
.- Setter
Sets the value for the property
virt_auto_boot
.
- property virt_cpus: int
virt_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 virt_disk_driver: VirtDiskDrivers
virt_disk_driver property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
virt_disk_driver
.- Setter
Sets the value for the property
virt_disk_driver
.
- property virt_file_size: float
virt_file_size property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
virt_file_size
.- Setter
Sets the value for the property
virt_file_size
.
- property virt_path: str
virt_path property.
Note
This property can be set to
<<inherit>>
.- Getter
Returns the value for
virt_path
.- Setter
Sets the value for the property
virt_path
.
- property virt_pxe_boot: bool
virt_pxe_boot property.
- Getter
Returns the value for
virt_pxe_boot
.- Setter
Sets the value for the property
virt_pxe_boot
.
8.1.3.13. Module contents
This package contains all data storage classes. The classes are responsible for ensuring that types of the properties are correct but not for logical checks. The classes should be as stupid as possible. Further they are responsible for returning the logic for serializing and deserializing themselves.