sys

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 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       `json:"parent,omitempty"`
	PortRef     *PortRef    `json:"link,omitempty"`
	Addrs       []net.IPNet `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 net.IPNet)

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 `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