Red Hat Release

Combiner for Red Hat Release information. It uses the results of the Uname parser and the RedhatRelease parser to determine the release major and minor version. Uname is the preferred source of data. The Red Hat Release is in obtained from the system in the form major.minor. For example, for a Red Hat Enterprise Linux 7.2 system, the release would be major = 7, minor = 2 and rhel = ‘7.2’.

class insights.combiners.redhat_release.RedHatRelease(uname, rh_rel)[source]

Bases: object

Combiner class to check uname and redhat-release for RHEL major/minor version. Prefer uname to redhat-release.

major

The major RHEL version.

Type

int

minor

The minor RHEL version.

Type

int

rhel

The RHEL version, e.g. ‘7.2’, ‘7.5-0.14’

Type

str

rhel6

The RHEL version when it’s RHEL6, otherwise None

Type

str

rhel7

The RHEL version when it’s RHEL7, otherwise None

Type

str

rhel8

The RHEL version when it’s RHEL8, otherwise None

Type

str

rhel9

The RHEL version when it’s RHEL9, otherwise None

Type

str

Raises

SkipComponent -- If the version can’t be determined even though a Uname or RedhatRelease was provided.

Examples

>>> rh_rel.rhel
'7.2'
>>> rh_rel.major
7
>>> rh_rel.minor
2
>>> rh_rel.rhel6 is None
True
>>> rh_rel.rhel7
'7.2'
>>> rh_rel.rhel8 is None
True
class insights.combiners.redhat_release.Release(major, minor)

Bases: tuple

namedtuple: Type for storing the release information.

property major
property minor