sys

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeConfig

type BridgeConfig struct {
	Name      string
	VlanAware bool
}

type EvpnConfig

type EvpnConfig struct {
	TunnelIP string
	ASN      int
}
type Link struct {
	Name        string
	Kind        LinkKind
	Parent      *Link
	PortRef     *PortRef
	Addrs       []net.IP
	BondMembers []string
	Bridge      *Link
}

func GetBond

func GetBond(e *xir.Endpoint) *Link

func LinkInfo

func LinkInfo(e *xir.Endpoint) *Link
func Links(node *xir.Node) []*Link

func (*Link) AddAddr

func (i *Link) AddAddr(a net.IP)

type LinkKind

type LinkKind string
const (
	Loopback LinkKind = "loopback"
	Physical LinkKind = "physical"
	Vlan     LinkKind = "vlan"
	Vxlan    LinkKind = "vxlan"
	Bond     LinkKind = "bond"
)

type LinkSelector

type LinkSelector func(*Link) bool

func Gbps

func Gbps(value int) LinkSelector

func Lo

func Lo() LinkSelector

type OperatingSystem

type OperatingSystem struct {
	Links  []*Link
	Config OsConfig
}

func (*OperatingSystem) Bond

func (os *OperatingSystem) Bond(name string, links ...*Link) *Link
func (os *OperatingSystem) Link(fs ...LinkSelector) []*Link

type OsConfig

type OsConfig struct {
	Evpn          *EvpnConfig   `json:",omitempty"`
	PrimaryBridge *BridgeConfig `json:",omitempty"`
}

optional configuration properties

func SysConfig

func SysConfig(n *xir.Node) *OsConfig

type PortRef

type PortRef struct {
	CardIndex int
	PortIndex int

	Nic  *hw.Nic  `json:"-" yaml:"-"`
	Port *hw.Port `json:"-" yaml:"-"`
}

type System

type System struct {
	Name   string
	OS     *OperatingSystem
	Device *hw.Device
	Props  xir.Props
}

func NewSystem

func NewSystem(name string, device *hw.Device) *System

func (*System) Node

func (sys *System) Node() *xir.Node

Jump to

Keyboard shortcuts

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