Hostname - command hostname
Parsers contained in this module are:
Hostname - command hostname -f
HostnameDefault - command hostname
HostnameShort - command hostname -s
- class insights.parsers.hostname.Hostname(context, extra_bad_lines=None)[source]
Bases:
HostnameBaseThis parser simply reads the output of
hostname -f, which is the configured fully qualified domain name of the client system. It then splits it intohostnameanddomainand stores these as attributes, along with the unmodified name in thefqdnattribute.Examples
>>> hostname.raw 'rhel7.example.com' >>> hostname.fqdn 'rhel7.example.com' >>> hostname.hostname 'rhel7' >>> hostname.domain 'example.com'
- raw
The raw output of the
hostname -fcommand.
- fqdn
The fully qualified domain name of the host. The same to
hostnamewhen domain part is not set.
- hostname
The hostname.
- domain
The domain get from the
fqdn.
- class insights.parsers.hostname.HostnameBase(context, extra_bad_lines=None)[source]
Bases:
CommandParserThe base parser class for command
hostname.- Raises:
ParseException -- When the output contains multiple non-empty lines.
- class insights.parsers.hostname.HostnameDefault(context, extra_bad_lines=None)[source]
Bases:
HostnameBaseThis parser simply reads the output of
hostname.Examples
>>> hostname_def.raw 'rhel7' >>> hostname_def.hostname 'rhel7'
- raw
The raw output of the
hostnamecommand.
- hostname
The hostname.
- class insights.parsers.hostname.HostnameShort(context, extra_bad_lines=None)[source]
Bases:
HostnameBaseThis parser simply reads the output of
hostname -s, which is the configured short hostname of the client system.Examples
>>> hostname_s.raw 'rhel7' >>> hostname_s.hostname 'rhel7'
- raw
The raw output of the
hostname -scommand.
- hostname
The hostname.