Libosinfo.Os

g GObject.Object GObject.Object Libosinfo.Entity Libosinfo.Entity GObject.Object->Libosinfo.Entity Libosinfo.Product Libosinfo.Product Libosinfo.Entity->Libosinfo.Product Libosinfo.Os Libosinfo.Os Libosinfo.Product->Libosinfo.Os

Subclasses:

None

Methods

Inherited:

Libosinfo.Product (13), Libosinfo.Entity (15), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id)

add_device (dev)

add_device_driver (driver)

add_firmware (firmware)

add_image (image)

add_install_script (script)

add_maximum_resources (resources)

add_media (media)

add_minimum_resources (resources)

add_network_install_resources (resources)

add_recommended_resources (resources)

add_tree (tree)

add_variant (variant)

find_install_script (profile)

get_all_device_links (filter)

get_all_devices (filter)

get_cloud_image_username ()

get_complete_firmware_list (filter)

get_device_drivers ()

get_device_drivers_prioritized ()

get_device_links (filter)

get_devices (filter)

get_devices_by_property (property, value, inherited)

get_distro ()

get_family ()

get_firmware_list (filter)

get_image_list ()

get_install_script_list ()

get_kernel_url_argument ()

get_maximum_resources ()

get_media_list ()

get_minimum_resources ()

get_network_install_resources ()

get_recommended_resources ()

get_release_status ()

get_tree_list ()

get_variant_list ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Libosinfo.Product (6), Libosinfo.Entity (1)

Name

Type

Flags

Short Description

cloud-image-username

str

r

Cloud image username

distro

str

r

Generic Distro

family

str

r

Generic Family

kernel-url-argument

str

r

Kernel URL Argument

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

Libosinfo.Product

r

Class Details

class Libosinfo.Os(**kwargs)
Bases:

Libosinfo.Product

Abstract:

No

Structure:

Libosinfo.OsClass

classmethod new(id)
Parameters:

id (str) – a unique identifier

Returns:

a new operating system entity

Return type:

Libosinfo.Os

Create a new operating system entity

add_device(dev)
Parameters:

dev (Libosinfo.Device) – the device to associate with

Returns:

the device association

Return type:

Libosinfo.DeviceLink

Associated a device with an operating system. The returned Libosinfo.DeviceLink can be used to record extra metadata against the link

add_device_driver(driver)
Parameters:

driver (Libosinfo.DeviceDriver) – the device driver to add

Adds driver to the list of device drivers of operating system self.

New in version 0.2.2.

add_firmware(firmware)
Parameters:

firmware (Libosinfo.Firmware) – the firmware to add

Adds firmware to the list of firmwares of operating system self.

New in version 1.7.0.

add_image(image)
Parameters:

image (Libosinfo.Image) – the image to add

Adds an installed image image to operating system self.

New in version 1.3.0.

add_install_script(script)
Parameters:

script (Libosinfo.InstallScript) – the install script to add

Adds script to the list of scripts of operating system self.

New in version 0.2.0.

add_maximum_resources(resources)
Parameters:

resources (Libosinfo.Resources) – the resources to add

Adds resources to list of maximum resources of operating system self.

New in version 1.3.0.

add_media(media)
Parameters:

media (Libosinfo.Media) – the media to add

Adds installation media media to operating system self.

add_minimum_resources(resources)
Parameters:

resources (Libosinfo.Resources) – the resources to add

Adds resources to list of minimum resources of operating system self.

add_network_install_resources(resources)
Parameters:

resources (Libosinfo.Resources) – the resources to add

Adds resources to list of resources needed for network installing an operating system self.

New in version 1.3.0.

Parameters:

resources (Libosinfo.Resources) – the resources to add

Adds resources to list of recommended resources of operating system self.

add_tree(tree)
Parameters:

tree (Libosinfo.Tree) – the tree to add

Adds installation tree tree to operating system self.

add_variant(variant)
Parameters:

variant (Libosinfo.OsVariant) – the variant to add

Adds a variant variant to operating system self.

New in version 0.2.9.

find_install_script(profile)
Parameters:

profile (str) – the install script profile that must be either Libosinfo.INSTALL_SCRIPT_PROFILE_DESKTOP or Libosinfo.INSTALL_SCRIPT_PROFILE_JEOS

Returns:

A new Libosinfo.InstallScript for the self profile

Return type:

Libosinfo.InstallScript

New in version 0.2.0.

Parameters:

filter (Libosinfo.Filter or None) – an optional device property filter

Returns:

A list of Libosinfo.DeviceLink

Return type:

Libosinfo.DeviceLinkList

Get all devicelinks matching a given filter but unlike Libosinfo.Os.get_device_links this function also retrieves devices from all derived and cloned operating systems.

New in version 1.3.0.

get_all_devices(filter)
Parameters:

filter (Libosinfo.Filter or None) – an optional device property filter

Returns:

A list of devices

Return type:

Libosinfo.DeviceList

Get all devices matching a given filter but unlike Libosinfo.Os.get_devices this function also retrieves devices from all derived and cloned operating systems.

New in version 0.0.5.

get_cloud_image_username()
Returns:

the username, if present. Otherwise, None.

Return type:

str

Gets the username expected to be passed to the cloud image when performing installation.

get_complete_firmware_list(filter)
Parameters:

filter (Libosinfo.Filter or None) – an optional firmware property filter

Returns:

A list of firmwares

Return type:

Libosinfo.FirmwareList

Get the complete firmwares matching a given filter, including the non-supported ones.

New in version 1.10.0.

get_device_drivers()
Returns:

A list of device drivers

Return type:

Libosinfo.DeviceDriverList

Gets list of all available device drivers for OS self.

New in version 0.2.2.

get_device_drivers_prioritized()
Returns:

A list of device drivers

Return type:

Libosinfo.DeviceDriverList

Gets list of the highest priority device drivers for OS self.

New in version 1.7.0.

Parameters:

filter (Libosinfo.Filter or None) – an optional device property filter

Returns:

A list of device links

Return type:

Libosinfo.DeviceLinkList

Get all devices matching a given filter. The filter matches against the links, not the devices.

get_devices(filter)
Parameters:

filter (Libosinfo.Filter or None) – an optional device property filter

Returns:

A list of devices

Return type:

Libosinfo.DeviceList

Get all devices matching a given filter

get_devices_by_property(property, value, inherited)
Parameters:
  • property (str) – the property of interest

  • value (str) – the required value of property property

  • inherited (bool) – Should devices from inherited and cloned OSs be included in the search.

Returns:

The found devices

Return type:

Libosinfo.DeviceList

A utility function that gets devices found from the list of devices self supports, for which the value of property is value.

New in version 0.0.6.

get_distro()
Returns:

the distro of this os

Return type:

str

Retrieves the generic family the OS self belongs to, for example fedora, ubuntu, windows, solaris, freebsd etc.

get_family()
Returns:

the family of this os

Return type:

str

Retrieves the generic family the OS self belongs to, based upon its kernel, for example linux, winnt, solaris, freebsd etc.

get_firmware_list(filter)
Parameters:

filter (Libosinfo.Filter or None) – an optional firmware property filter

Returns:

A list of firmwares

Return type:

Libosinfo.FirmwareList

Get all the supported firmwares matching a given filter

New in version 1.7.0.

get_image_list()
Returns:

A list of images

Return type:

Libosinfo.ImageList

Get all installed images associated with operating system self.

New in version 1.3.0.

get_install_script_list()
Returns:

a list of the install scripts for the specified os

Return type:

Libosinfo.InstallScriptList

New in version 0.2.0.

get_kernel_url_argument()
Returns:

the kernel url argument, if present. Otherwise, None.

Return type:

str

Gets the argument expected to be passed to the kernel command line when performing a tree based installation.

get_maximum_resources()
Returns:

A list of resources

Return type:

Libosinfo.ResourcesList

Get the list of maximum resources for the operating system self.

New in version 1.3.0.

get_media_list()
Returns:

A list of medias

Return type:

Libosinfo.MediaList

Get all installation medias associated with operating system self.

get_minimum_resources()
Returns:

A list of resources

Return type:

Libosinfo.ResourcesList

Get the list of minimum required resources for the operating system self.

get_network_install_resources()
Returns:

A list of resources

Return type:

Libosinfo.ResourcesList

Get the list of resources needed for network installing an operating system self.

New in version 1.3.0.

Returns:

A list of resources

Return type:

Libosinfo.ResourcesList

Get the list of recommended resources for the operating system self.

get_release_status()
Returns:

release status of self.

Return type:

Libosinfo.ReleaseStatus

Use this to determine the release status of the self.

New in version 0.2.9.

get_tree_list()
Returns:

A list of trees

Return type:

Libosinfo.TreeList

Get all installation trees associated with operating system self.

get_variant_list()
Returns:

A list of variants

Return type:

Libosinfo.OsVariantList

Gets all known variants of operating system self.

New in version 0.2.9.

Property Details

Libosinfo.Os.props.cloud_image_username
Name:

cloud-image-username

Type:

str

Default Value:

None

Flags:

READABLE

The username to be passed to the cloud-init program.

Libosinfo.Os.props.distro
Name:

distro

Type:

str

Default Value:

None

Flags:

READABLE

The generic distro this OS belongs to, for example fedora, windows, solaris, freebsd etc.

Libosinfo.Os.props.family
Name:

family

Type:

str

Default Value:

None

Flags:

READABLE

The generic family this OS belongs to, based upon its kernel, for example linux, winnt, solaris, freebsd etc.

Libosinfo.Os.props.kernel_url_argument
Name:

kernel-url-argument

Type:

str

Default Value:

None

Flags:

READABLE

The argument to be passed to kernel command line when performing a tree based installation of this OS.