Libosinfo.Tree¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
CPU Architecture |
||
r/w |
The path to the bootable ISO image |
||
r/w |
Whether the tree has treeinfo |
||
r/w |
The path to the initrd image |
||
r/w |
The path to the kernel image |
||
r/w |
Information about the operating system on this tree |
||
r/w |
The treeinfo architecture |
||
r/w |
The treeinfo family |
||
r/w |
The treeinfo variant |
||
r/w |
The treeinfo version |
||
r/w |
The URL to this tree |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Libosinfo.Tree(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod create_from_location(location, cancellable)¶
- Parameters:
location (
str
) – the location of an installation treecancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
a new
Libosinfo.Tree
, orNone
on error- Return type:
Creates a new
Libosinfo.Tree
for installation tree at location. The location could be a http:// or a https:// URI, or a local file.NOTE: Currently this only works for trees with a .treeinfo file
New in version 0.1.0.
- classmethod create_from_location_async(location, priority, cancellable, callback, *user_data)¶
- Parameters:
location (
str
) – the location of an installation treepriority (
int
) – the I/O priority of the requestcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – Function to call when result of this call is readyuser_data (
object
orNone
) – The user data to pass to callback, orNone
Asynchronous variant of
Libosinfo.Tree.create_from_location
.New in version 0.1.0.
- classmethod create_from_location_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a new
Libosinfo.Tree
, orNone
on error- Return type:
Finishes an asynchronous tree object creation process started with
Libosinfo.Tree.create_from_location_async
.New in version 0.1.0.
- classmethod create_from_treeinfo(treeinfo, location)¶
- Parameters:
- Raises:
- Returns:
a new
Libosinfo.Tree
, orNone
on error- Return type:
Creates a new
Libosinfo.Tree
for installation tree represented by treeinfo.New in version 1.7.0.
- classmethod new(id, architecture)¶
- Parameters:
- Returns:
A tree entity
- Return type:
Create a new tree entity
New in version 0.1.0.
- get_architecture()¶
-
Retrieves the target hardware architecture of the OS self provides.
New in version 0.1.0.
- get_boot_iso_path()¶
-
Retrieves the path to the boot_iso image in the install tree.
New in version 0.1.0.
- get_initrd_path()¶
-
Retrieves the path to the initrd image in the install tree.
Note: This only applies to installer trees of ‘linux’ OS family.
New in version 0.1.0.
- get_kernel_path()¶
-
Retrieves the path to the kernel image in the install tree.
Note: This only applies to installer trees of ‘linux’ OS family.
New in version 0.1.0.
- get_os_variants()¶
- Returns:
the operating system variant, or
None
- Return type:
Gets the variants of the associated operating system.
New in version 1.5.0.
- get_treeinfo_arch()¶
-
If self has treeinfo, this function retrieves the expected architecture.
Note: In practice, this will usually not be the exact copy of the architecture but rather a regular expression that matches it.
New in version 0.1.0.
- get_treeinfo_family()¶
-
If self has treeinfo, this function retrieves the expected family.
Note: In practice, this will usually not be the exact copy of the family but rather a regular expression that matches it.
New in version 0.1.0.
- get_treeinfo_variant()¶
-
If self has treeinfo, this function retrieves the expected variant.
Note: In practice, this will usually not be the exact copy of the variant but rather a regular expression that matches it.
New in version 0.1.0.
- get_treeinfo_version()¶
-
If self has treeinfo, this function retrieves the expected version.
Note: In practice, this will usually not be the exact copy of version but rather a regular expression that matches it.
New in version 0.1.0.
- has_treeinfo()¶
-
Return whether a tree has treeinfo or not.
New in version 1.3.0.
- matches(reference)¶
- Parameters:
reference (
Libosinfo.Tree
) – a referenceLibosinfo.Tree
instance- Returns:
- Return type:
Determines whether the metadata for the unidentified self is a match for the reference tree.
The metadata in the unidentified self must be literal strings, while the metadata in the reference tree must be regular expressions.
New in version 1.10.0.
- set_os(os)¶
- Parameters:
os (
Libosinfo.Os
) – anLibosinfo.Os
instance
Sets the
Libosinfo.Os
associated to theLibosinfo.Tree
instance.New in version 1.5.0.
Property Details¶
- Libosinfo.Tree.props.architecture¶
-
The target hardware architecture of this tree.
- Libosinfo.Tree.props.boot_iso_path¶
-
The path to the boot ISO in the install tree
- Libosinfo.Tree.props.has_treeinfo¶
-
Whether the tree has treeinfo or not
- Libosinfo.Tree.props.initrd_path¶
-
The path to the initrd image in the install tree.
- Libosinfo.Tree.props.kernel_path¶
-
The path to the kernel image in the install tree.
- Libosinfo.Tree.props.os¶
- Name:
os
- Type:
- Default Value:
- Flags:
Os information for the current tree. For tree stored in an
Libosinfo.Db
, it will be filled when the database is loaded, otherwise the property will be filled after a successful call toLibosinfo.Db.identify_tree
().
- Libosinfo.Tree.props.treeinfo_arch¶
-
The treeinfo arch
- Libosinfo.Tree.props.treeinfo_family¶
-
The treeinfo family
- Libosinfo.Tree.props.treeinfo_variant¶
-
The treeinfo variant
- Libosinfo.Tree.props.treeinfo_version¶
-
The treeinfo version