RHUI release commands or files

RHUISetRelease - command rhui_set_release

RHUIReleaseVer - file /etc/yum/vars/releasever or /etc/yum/vars/releasever

class insights.parsers.rhui_release.RHUIReleaseVer(context)[source]

Bases: Parser

Class for parsing the file /etc/yum/vars/releasever or /etc/dnf/vars/releasever. It will output the rhel minor release when a minor release is set, or emtpy when it isn’t set. This file may not exist when there is no minor release is set.

Sample input data:

8.6
set

the set release.

Type:

str

major

the major version of the set release.

Type:

int

minor

the minor version of the set release.

Type:

int

Raises:

SkipComponent -- When the content is not in expected format.

Examples

>>> type(rhui_releasever)
<class 'insights.parsers.rhui_release.RHUIReleaseVer'>
>>> rhui_releasever.set
'8.6'
>>> rhui_releasever.major
8
>>> rhui_releasever.minor
6
parse_content(content)[source]

This method must be implemented by classes based on this class.

class insights.parsers.rhui_release.RHUISetRelease(context, extra_bad_lines=None)[source]

Bases: CommandParser

Warning

This class is deprecated and will be removed from 3.6.0. Please use the insights.parsers.rhui_release.RHUIReleaseVer instead.

Class for parsing the output of rhui_set_release command. It will output the rhel minor release when a minor release is set, or emtpy when it isn’t set.

Typical output of the command is:

8.6
set

the set release.

Type:

str

major

the major version of the set release.

Type:

int

minor

the minor version of the set release.

Type:

int

Examples

>>> type(rhui_rel)
<class 'insights.parsers.rhui_release.RHUISetRelease'>
>>> rhui_rel.set
'8.6'
>>> rhui_rel.major
8
>>> rhui_rel.minor
6
parse_content(content)[source]

This method must be implemented by classes based on this class.