Documentation
¶
Overview ¶
Package naming turns short node names into host names and service processor names, replacing the prefix logic the shell tools carried.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Namer ¶
type Namer struct {
// contains filtered or unexported fields
}
Namer applies the naming rules of a site.
func (*Namer) BMC ¶
BMC returns the host name of a node's service processor.
The name comes from the bmc template of the first rule that matches the short name, and nothing else: a node whose rule has none, or that no rule matches, is refused rather than given its own name, because the site's BMC account would then be sent to the node. For the same reason a template that gives the node's short name or host name back is refused. A node whose service processor cannot be named by a rule has its address written in the inventory, which the commands prefer.
A name with a domain is accepted only when it is the host name the rules give its short name. Any other domain names a different machine, whose service processor the rules do not know. An IP address is refused too: it has no short name, and cutting it at the first dot named one host for a whole subnet.