Hostname

Combiner for hostname information. It uses the results of all the Hostname parsers and the SystemID parser to get the fqdn, hostname and domain information.

class insights.combiners.hostname.Hostname(hf, hd, hs, sid)[source]

Bases: object

Check hostname and systemid to get the fqdn, hostname and domain.

Prefer hostname to systemid.

Examples

>>> type(hostname)
<class 'insights.combiners.hostname.Hostname'>
>>> hostname.fqdn
'rhel7.example.com'
>>> hostname.hostname
'rhel7'
>>> hostname.domain
'example.com'
Raises:

Exception -- If no hostname can be found in any of the source parsers.