ztp

package
v0.0.0-...-914548b Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mux *http.ServeMux, c Config)

Types

type Config

type Config struct {
	// SearchDomain works like this:
	//
	//   $zone.infra.$environment.ironcore.dev
	//
	// Where zone is the region and availability zone, e.g. wdf-a; and
	// environment is one of dev, staging, canary, or live.
	//
	// Based on the type and ID each device will get a name such as spine-2 or
	// oob-leaf-1 to create FQDNs like this:
	//
	//   spine-2.region-b.infra.staging.ironcore.dev
	//
	// which uniqely identifies each device.
	SearchDomain string `json:"searchDomain"`
	// DHCPServerAddr for the relay to send DHCP packets to.
	//
	// Example:
	//
	//   2001:db8::547
	DHCPServerAddr string                          `json:"dhcpServerAddr"`
	SwitchParams   map[netip.Addr]SwitchParameters `json:"switchParams"`
}

type SwitchParameters

type SwitchParameters struct {
	Type SwitchType `json:"type"`
	ID   int        `json:"id"`
	// Prefix must be a /64 for this sepcific switch.
	//
	// Example:
	//
	//   2001:db8::/64
	Prefix netip.Prefix `json:"prefix"`
	// IP should be the first /128 of the Prefix above.
	//
	// Example:
	//
	//   2001:db8::/128
	IP       netip.Prefix `json:"ip"`
	ASNumber int          `json:"asNumber"`
}

type SwitchType

type SwitchType string
const (
	SwitchTypeLeaf  SwitchType = "leaf"
	SwitchTypeSpine SwitchType = "spine"
)

Jump to

Keyboard shortcuts

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