management

Management module.

exception spicerack.management.ManagementError[source]

Bases: spicerack.exceptions.SpicerackError

Custom exception class for errors of the Management class.

class spicerack.management.Management(dns: wmflib.dns.Dns)[source]

Bases: object

Class to interact with management FQDNs.

Initialize the instance.

Parameters

dns (wmflib.dns.Dns) -- the instance to use for DNS resolution.

get_fqdn(hostname: str)str[source]

Get the FQDN of the management interface.

Parameters

hostname (str) -- the FQDN of the hostname for which the management FQDN should be returned.

Returns

the FQDN of the management interface.

Return type

str

Raises

spicerack.management.ManagementError -- if unable to find or verify the FQDN of the management interface.