Libosinfo.Db

g GObject.Object GObject.Object Libosinfo.Db Libosinfo.Db GObject.Object->Libosinfo.Db

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_datamap (datamap)

add_deployment (deployment)

add_device (device)

add_install_script (script)

add_os (os)

add_platform (platform)

find_deployment (os, platform)

get_datamap (id)

get_datamap_list ()

get_deployment (id)

get_deployment_list ()

get_device (id)

get_device_list ()

get_install_script (id)

get_install_script_list ()

get_os (id)

get_os_list ()

get_platform (id)

get_platform_list ()

guess_os_from_media (media)

guess_os_from_tree (tree)

identify_media (media)

identify_medialist (media)

identify_tree (tree)

identify_treelist (tree)

unique_values_for_os_relationship (relshp)

unique_values_for_platform_relationship (relshp)

unique_values_for_property_in_deployment (propName)

unique_values_for_property_in_device (propName)

unique_values_for_property_in_os (propName)

unique_values_for_property_in_platform (propName)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Libosinfo.Db(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Libosinfo.DbClass

classmethod new()
Returns:

the new database

Return type:

Libosinfo.Db

add_datamap(datamap)
Parameters:

datamap (Libosinfo.Datamap) – an install datamap

New in version 0.2.3.

add_deployment(deployment)
Parameters:

deployment (Libosinfo.Deployment) – a deployment

add_device(device)
Parameters:

device (Libosinfo.Device) – a device

add_install_script(script)
Parameters:

script (Libosinfo.InstallScript) – an install script

New in version 0.2.0.

add_os(os)
Parameters:

os (Libosinfo.Os) – an operating system

add_platform(platform)
Parameters:

platform (Libosinfo.Platform) – an platform

find_deployment(os, platform)
Parameters:
Returns:

the deployment, or None

Return type:

Libosinfo.Deployment

Find the deployment for os on platform, if any.

get_datamap(id)
Parameters:

id (str) – the unique operating system identifier

Returns:

the install datamap, or None if none is found

Return type:

Libosinfo.Datamap

New in version 0.2.3.

get_datamap_list()
Returns:

the list of install datamaps

Return type:

Libosinfo.DatamapList

New in version 0.2.3.

get_deployment(id)
Parameters:

id (str) – the unique operating system identifier

Returns:

the operating system, or None if none is found

Return type:

Libosinfo.Deployment

get_deployment_list()
Returns:

the list of deployments

Return type:

Libosinfo.DeploymentList

get_device(id)
Parameters:

id (str) – the unique device identifier

Returns:

the device, or None if none is found

Return type:

Libosinfo.Device

get_device_list()
Returns:

the list of devices

Return type:

Libosinfo.DeviceList

get_install_script(id)
Parameters:

id (str) – the unique operating system identifier

Returns:

the install script, or None if none is found

Return type:

Libosinfo.InstallScript

New in version 0.2.0.

get_install_script_list()
Returns:

the list of install scripts

Return type:

Libosinfo.InstallScriptList

New in version 0.2.0.

get_os(id)
Parameters:

id (str) – the unique operating system identifier

Returns:

the operating system, or None if none is found

Return type:

Libosinfo.Os

get_os_list()
Returns:

the list of operating systems

Return type:

Libosinfo.OsList

get_platform(id)
Parameters:

id (str) – the unique platform identifier

Returns:

the platform, or None if none is found

Return type:

Libosinfo.Platform

get_platform_list()
Returns:

the list of platforms

Return type:

Libosinfo.PlatformList

guess_os_from_media(media)
Parameters:

media (Libosinfo.Media) – the installation media

Returns:

the operating system, or None if guessing failed

matched_media:

the matched operating system media

Return type:

(Libosinfo.Os, matched_media: Libosinfo.Media)

Guess operating system given an Libosinfo.Media object.

Deprecated since version 0.2.3: Use Libosinfo.Db.identify_media() instead.

guess_os_from_tree(tree)
Parameters:

tree (Libosinfo.Tree) – the installation tree

Returns:

the operating system, or None if guessing failed

matched_tree:

the matched operating system tree

Return type:

(Libosinfo.Os, matched_tree: Libosinfo.Tree)

Guess operating system given an Libosinfo.Tree object.

Deprecated since version 1.6.0: Use Libosinfo.Db.identify_tree() instead.

identify_media(media)
Parameters:

media (Libosinfo.Media) – the installation media data

Returns:

True if media was found in self, False otherwise

Return type:

bool

Try to match a newly created media with a media description from self. If found, media will be filled with the corresponding information stored in self. In particular, after a call to Libosinfo.Db.identify_media(), if the media could be identified, its OsinfoEntify::id and Libosinfo.Media ::os properties will be set.

The match for media in self is not guaranteed to be unique and this method will only return the first match found. The order in which matches are identified is not guaranteed, so when there are multiple matches, the returned match may vary over time. Applications are recommended to use the #osinfo_db_identify_all_media method instead to receive all matched media.

New in version 0.2.3.

identify_medialist(media)
Parameters:

media (Libosinfo.Media) – the installation media data

Returns:

a list containing any matches for media found in self

Return type:

Libosinfo.MediaList

Try to match a newly created media with a media description from self. The return list will contain any Libosinfo.Media instances from self that matched media. Usuaully there will only be one match returned, but applications should be prepared to deal with multiple matches. The returned Libosinfo.Media instances will have their OsinfoEntify::id and Libosinfo.Media ::os properties will be set, while media is left unmodified.

New in version 1.10.0.

identify_tree(tree)
Parameters:

tree (Libosinfo.Tree) – the installation tree data

Returns:

True if tree was found in self, False otherwise

Return type:

bool

Try to match a newly created tree with a tree description from self. If found, tree will be filled with the corresponding information stored in self. In particular, after a call to Libosinfo.Db.identify_tree(), if the tree could be identified, its OsinfoEntify::id and Libosinfo.Media ::os properties will be set.

The match for tree in self is not guaranteed to be unique and this method will only return the first match found. The order in which matches are identified is not guaranteed, so when there are multiple matches, the returned match may vary over time. Applications are recommended to use the #osinfo_db_identify_all_tree method instead to receive all matched tree.

New in version 1.6.0.

identify_treelist(tree)
Parameters:

tree (Libosinfo.Tree) – the installation tree data

Returns:

a list containing any matches for tree found in self

Return type:

Libosinfo.TreeList

Try to match a newly created tree with a tree description from self. The return list will contain any Libosinfo.Tree instances from self that matched tree. Usuaully there will only be one match returned, but applications should be prepared to deal with multiple matches. The returned Libosinfo.Tree instances will have their OsinfoEntify::id and Libosinfo.Tree ::os properties will be set, while tree is left unmodified.

New in version 1.10.0.

unique_values_for_os_relationship(relshp)
Parameters:

relshp (Libosinfo.ProductRelationship) – the product relationship

Returns:

a list of operating systems

Return type:

Libosinfo.OsList

Get all operating systems that are the referee in an operating system relationship.

unique_values_for_platform_relationship(relshp)
Parameters:

relshp (Libosinfo.ProductRelationship) – the product relationship

Returns:

a list of virtualization platforms

Return type:

Libosinfo.PlatformList

Get all platforms that are the referee in an platform relationship.

unique_values_for_property_in_deployment(propName)
Parameters:

propName (str) – a property name

Returns:

a list of strings

Return type:

[str]

Get all unique values for a named property amongst all deployments in the database

unique_values_for_property_in_device(propName)
Parameters:

propName (str) – a property name

Returns:

a list of strings

Return type:

[str]

Get all unique values for a named property amongst all devices in the database

unique_values_for_property_in_os(propName)
Parameters:

propName (str) – a property name

Returns:

a list of strings

Return type:

[str]

Get all unique values for a named property amongst all operating systems in the database

unique_values_for_property_in_platform(propName)
Parameters:

propName (str) – a property name

Returns:

a list of strings

Return type:

[str]

Get all unique values for a named property amongst all platforms in the database