metal

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugin = plugins.Plugin{
	Name:   "metal",
	Setup6: setup6,
	Setup4: setup4,
}

Functions

func ApplyEndpointForInventory

func ApplyEndpointForInventory(ctx context.Context, name string, mac net.HardwareAddr, ip net.IP) error

func ApplyEndpointForMACAddress added in v0.4.0

func ApplyEndpointForMACAddress(ctx context.Context, mac net.HardwareAddr, ip net.IP) error

func GetEndpointForMACAddress added in v0.4.0

func GetEndpointForMACAddress(mac net.HardwareAddr) (*metalv1alpha1.Endpoint, error)

func GetIPAddressFromDHCPv4Response added in v0.8.1

func GetIPAddressFromDHCPv4Response(resp *dhcpv4.DHCPv4) net.IP

GetIPAddressFromDHCPv4Response extracts the offered IPv4 address from a DHCPv4 response. A preceding plugin must have set YourIPAddr. The result is normalized to a 4-byte slice so that String() produces the canonical IPv4 form (e.g. "192.168.1.1") rather than an IPv4-mapped IPv6 representation.

func GetInventoryEntryMatchingMACAddress added in v0.4.0

func GetInventoryEntryMatchingMACAddress(mac net.HardwareAddr) string

Types

type Inventory added in v0.4.0

type Inventory struct {
	Entries  map[string]string
	Strategy OnBoardingStrategy
}

type OnBoardingStrategy added in v0.4.0

type OnBoardingStrategy string
const (
	OnBoardingStrategyStatic  OnBoardingStrategy = "Static"
	OnboardingStrategyDynamic OnBoardingStrategy = "Dynamic"
)

Jump to

Keyboard shortcuts

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