IsRhel6, IsRhel7, IsRhel8, and IsRhel9

An IsRhel* component is valid if the insights.combiners.redhat_release.RedHatRelease combiner indicates the major RHEL version represented by the component. Otherwise, it raises a insights.core.dr.SkipComponent to prevent dependent components from executing.

In particular, an IsRhel* component can be added as a dependency of a parser to limit it to a given version.

class insights.components.rhel_version.IsRhel(rhel, version=None)[source]

Bases: object

This component uses RedHatRelease combiner to determine the RHEL major version. It then checks if the major version matches the version argument, if it doesn’t it raises SkipComponent.

minor

The minor version of RHEL.

Type

int

Raises

SkipComponent -- When RHEL major version does not match version.

class insights.components.rhel_version.IsRhel6(rhel)[source]

Bases: insights.components.rhel_version.IsRhel

This component uses RedHatRelease combiner to determine RHEL version. It checks if RHEL6, if not RHEL6 it raises SkipComponent.

minor

The minor version of RHEL 6.

Type

int

Raises

SkipComponent -- When RHEL version is not RHEL6.

class insights.components.rhel_version.IsRhel7(rhel)[source]

Bases: insights.components.rhel_version.IsRhel

This component uses RedHatRelease combiner to determine RHEL version. It checks if RHEL7, if not RHEL7 it raises SkipComponent.

minor

The minor version of RHEL 7.

Type

int

Raises

SkipComponent -- When RHEL version is not RHEL7.

class insights.components.rhel_version.IsRhel8(rhel)[source]

Bases: insights.components.rhel_version.IsRhel

This component uses RedhatRelease combiner to determine RHEL version. It checks if RHEL8, if not RHEL8 it raises SkipComponent.

minor

The minor version of RHEL 8.

Type

int

Raises

SkipComponent -- When RHEL version is not RHEL8.

class insights.components.rhel_version.IsRhel9(rhel)[source]

Bases: insights.components.rhel_version.IsRhel

This component uses RedhatRelease combiner to determine RHEL version. It checks if RHEL9, if not RHEL9 it raises SkipComponent.

minor

The minor version of RHEL 9.

Type

int

Raises

SkipComponent -- When RHEL version is not RHEL9.