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 = None

(productmd.common.Header) – Metadata header

release = None

(Release) – Release details

base_product = None

(BaseProduct) – Base product details (optional)

tree = None

(Tree) – Tree details

variants = None

(Variants) – Release variants

checksums = None

(Checksums) – Checksums of images included in a tree

images = None

(Images) – Paths to images included in a tree

stage2 = None

(Stage2) – Stage 2 image path (for Anaconda installer)

media = None

(Media) – Media set information (optional)

dump(f)

Dump data to a file.

Parameters:f (file or str) – file-like object or path to file
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 = None

(str) – release name, for example: “Fedora”, “Red Hat Enterprise Linux”, “Spacewalk”

short = None

(str) – release short name, for example: “F”, “RHEL”, “Spacewalk”

version = None

(str) – release version, for example: “21”, “7.0”, “2.1”

is_layered = None

(bool) – typically False for an operating system, True otherwise

major_version

Version string without the last part. For example: version == 1.2.0 -> major_version == 1.2

minor_version

Last part of the version string. For example: version == 1.2.0 -> minor_version == 0

class productmd.treeinfo.BaseProduct(metadata)

BaseProduct provides information about operating system a Release runs on.

name = None

(str) – base product name, for example: “Fedora”, “Red Hat Enterprise Linux”

short = None

(str) – base product short name, for example: “F”, “RHEL”

version = None

(str) – base product major version, for example: “21”, “7”

class productmd.treeinfo.Variants(metadata)
class productmd.treeinfo.Variant(metadata)
id = None

(str) – variant ID, for example “Server”, “optional”

uid = None

(str) – variant UID ($parent_UID.$ID), for example “Server”, “Server-optional”

name = None

(str) – variant name, for example “Server”

type = None

(str) – “variant”, “addon”, “optional”

parent = None

(Variant or None) – reference to parent Variant

variants = None

(dict) Variant

paths = None

(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)
platforms

Return all platforms with available images

Table Of Contents

Previous topic

rpms – RPM metadata

Next topic

Composeinfo file format 1.0

This Page