RHSM Release Version - file /var/lib/rhsm/cache/releasever.json

Parser Red Hat Subscription manager release info.

class insights.parsers.rhsm_releasever.RhsmReleaseVer(context)[source]

Bases: JSONParser

Class for parsing the file: /var/lib/rhsm/cache/releasever.json.

This information mirror the information provided by the subscription-manager release --show command.

Note

Please refer to the super-class insights.core.JSONParser for additional information on attributes and methods.

Sample input data:

{"releaseVer": "6.10"}
Raises:

SkipComponent -- When the json content of the file is empty.(i.e release version is empty. eg. {})

Examples

>>> type(rhsm_releasever)
<class 'insights.parsers.rhsm_releasever.RhsmReleaseVer'>
>>> rhsm_releasever['releaseVer'] == '6.10'
True
>>> rhsm_releasever.set == '6.10'
True
>>> rhsm_releasever.major
6
>>> rhsm_releasever.minor
10
parse_content(content)[source]

Parse the contents of file /var/lib/rhsm/cache/releasever.json.