Version: v0.3.9 Latest Latest

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

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




This section is empty.


This section is empty.


func LinkLabel

func LinkLabel(lnk *xir.Link) string


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    `json:"parent,omitempty"`
	PortRef     *PortRef `json:"port_ref,omitempty" mapstructure:"port_ref"`
	Addrs       []string `json:"addrs,omitempty"`
	BondMembers []string `json:"bond_members,omitempty"`
	Bridge      *Link    `json:"bridge,omitempty"`
	Gateway     net.IP   `json:"gateway,omitempty"`

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 string)

type LinkKind

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

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 `json:"config,omitempty"`

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"`
	Append        string        `json:"append,omitempty"`
	Rootdev       string        `json:"rootdev,omitempty"`

optional configuration properties

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 `json:"-"`
	Props  xir.Props  `json:"props,omitempty"`

func NewSystem

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

func Sys

func Sys(n *xir.Node) *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