treeinfo – Instalable trees metadata
This module provides classes for manipulating .treeinfo files. Treeinfo files provide details about installable trees in Fedora composes and media.
Classes
- class productmd.treeinfo.TreeInfo
- header
(
productmd.common.Header) – Metadata header
- base_product
(
BaseProduct) – Base product details (optional)
- dump(f, main_variant=None)
Dump data to a file.
- Parameters:
f (file or str) – file-like object or path to file
main_variant (str) – a main variant’s name of a treeinfo
- dumps()
Dump data to a string.
- Return type:
str
- load(f)
Load data from a file.
- Parameters:
f (file or str) – file-like object or path to file
- loads(s)
Load data from a string.
- Parameters:
s (str) – input data
- validate()
Validate attributes by running all self._validate_*() methods.
- Raises:
TypeError – if an attribute has invalid type
ValueError – if an attribute contains invalid value
- class productmd.treeinfo.Release(metadata)
- name
(str) – release name, for example: “Fedora”, “Red Hat Enterprise Linux”, “Spacewalk”
- short
(str) – release short name, for example: “F”, “RHEL”, “Spacewalk”
- version
(str) – release version, for example: “21”, “7.0”, “2.1”
- is_layered
(bool) – typically False for an operating system, True otherwise
- property major_version
Version string without the last part. For example: version == 1.2.0 -> major_version == 1.2
- property minor_version
Last part of the version string. For example: version == 1.2.0 -> minor_version == 0
- class productmd.treeinfo.BaseProduct(metadata)
BaseProductprovides information about operating system aReleaseruns on.- name
(str) – base product name, for example: “Fedora”, “Red Hat Enterprise Linux”
- short
(str) – base product short name, for example: “F”, “RHEL”
- version
(str) – base product major version, for example: “21”, “7”
- class productmd.treeinfo.Variants(metadata)
- class productmd.treeinfo.Variant(metadata)
- id
(str) – variant ID, for example “Server”, “optional”
- uid
(str) – variant UID ($parent_UID.$ID), for example “Server”, “Server-optional”
- name
(str) – variant name, for example “Server”
- type
(str) – “variant”, “addon”, “optional”
- paths
(
VariantPaths) – relative paths to repositories, packages, etc.
- class productmd.treeinfo.VariantPaths(variant)
This class stores paths for a variant in a tree. All paths are relative to .treeinfo location.
Binary
packages – directory with binary RPMs
repository – YUM repository with binary RPMs
Source
source_packages – directory with source RPMs
source_repository – YUM repository with source RPMs
Debug
debug_packages – directory with debug RPMs
debug_repository – YUM repository with debug RPMs
- Others
identity – path to a pem file which identifies a product
Example:
variant = ... variant.paths.packages = "Packages" variant.paths.repository = "."
- class productmd.treeinfo.Images(metadata)
- property platforms
Return all platforms with available images
- class productmd.treeinfo.Stage2(metadata)
- mainimage
(str) – relative path to Anaconda stage2 image
- instimage
(str) – relative path to Anaconda instimage (obsolete)
- class productmd.treeinfo.Media(metadata)
- discnum
disc number
- totaldiscs
number of discs in media set
- class productmd.treeinfo.Tree(_metadata)
- arch
(str) – tree architecture, for example x86_64
- build_timestamp
(int, float) – tree build time timestamp; format: unix time
- platforms
(set(str)), supported platforms; for example x86_64,xen
- class productmd.treeinfo.Checksums(metadata)