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.

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

Warning

This combiner methode is deprecated, please use insights.combiners.hostname.Hostname instead.

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

Prefer hostname to systemid.

Examples

>>> hn.fqdn
'rhel7.example.com'
>>> hn.hostname
'rhel7'
>>> hn.domain
'example.com'
Returns

A class with fqdn, hostname and domain attributes.

Return type

insights.combiners.hostname.Hostname

Raises

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