naming

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: GPL-3.0, LGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func Short

func Short(name string) string

Short returns the node name without its domain.

Types

type Namer

type Namer struct {
	// contains filtered or unexported fields
}

Namer applies the naming rules of a site.

func New

func New(spec v1alpha1.NamingSpec, domains map[string]string) (*Namer, error)

New compiles the naming rules of a site.

func (*Namer) BMC

func (n *Namer) BMC(node string) (string, error)

BMC returns the host name of a node's service processor. Any domain on the input is dropped first, because the service processor lives in a different domain than the node.

func (*Namer) BMCSet

func (n *Namer) BMCSet(ns *nodeset.NodeSet) (*nodeset.NodeSet, error)

BMCSet maps every node of a set to its service processor name.

func (*Namer) Domain

func (n *Namer) Domain(role string) string

Domain returns a named domain of the site.

func (*Namer) FQDN

func (n *Namer) FQDN(node string) (string, error)

FQDN returns the host name of a node.

A name that already carries a domain is returned unchanged, so that an administrator can always name a host exactly.

func (*Namer) FQDNSet

func (n *Namer) FQDNSet(ns *nodeset.NodeSet) (*nodeset.NodeSet, error)

FQDNSet maps every node of a set to its host name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL