Documentation ¶
Index ¶
- Variables
- func BreakoutName(x *xir.Endpoint) (string, bool)
- func GetFabric(leaf *xir.Node) (*xir.Node, *xir.Endpoint, *xir.Endpoint, error)
- func GetInfraLeaf(topo *xir.Net, node string) (*xir.Node, *xir.Endpoint, error)
- func GetInfraSwitch(topo *xir.Net, node string) (*xir.Node, *xir.Endpoint, *xir.Endpoint, error)
- func GetNodeSwitch(tb *xir.Net, node, ifx string) (*xir.Node, *xir.Endpoint, *xir.Endpoint, error)
- func LinkName(x *xir.Endpoint) string
- func MapFabrics(link *task.LinkInfo, amap AccessMap, ltmap TrunkMap, vvmap VlanVxlanMap, ...) (TrunkMap, VtepMap, []EvpnAdvertisement, error)
- func MapNodes(link *task.LinkInfo, topo *xir.Net) (AccessMap, TrunkMap, VlanVxlanMap, error)
- type AccessMap
- type AccessPort
- type CanopyOps
- type EvpnAdvertisement
- type HostAccessPort
- type HostTrunkPort
- type HostVtep
- type LinkPlan
- func (lp *LinkPlan) AddLink(link *task.LinkInfo) error
- func (lp LinkPlan) Advertise() error
- func (lp LinkPlan) Create() CanopyOps
- func (l *LinkPlan) Delete() error
- func (lp LinkPlan) Destroy() CanopyOps
- func (l *LinkPlan) GetVersion() int64
- func (l *LinkPlan) Key() string
- func (l LinkPlan) LookupTable() LinkPlanLookup
- func (l *LinkPlan) Save() error
- func (l *LinkPlan) SetVersion(v int64)
- func (l *LinkPlan) Value() interface{}
- func (lp LinkPlan) Withdraw() error
- type LinkPlanLookup
- type LinkPlanRole
- type TrunkMap
- type TrunkPort
- type VlanVxlanMap
- type Vtep
- type VtepMap
- type VxlanConfig
Constants ¶
This section is empty.
Variables ¶
var PersistentTrunks = []int{
2,
}
PersistentTrunks are trunks that never go away
Functions ¶
func BreakoutName ¶ added in v0.7.5
func GetFabric ¶ added in v0.7.5
func GetFabric(leaf *xir.Node) (*xir.Node, *xir.Endpoint, *xir.Endpoint, error)
func GetInfraLeaf ¶
GetInfraLeaf finds the infrastructure leaf switch attached to the specified node. If none exists nil is returned.
func GetInfraSwitch ¶ added in v0.7.5
func GetNodeSwitch ¶
GetNodeSwitch finds the switch attached to the specified node. If none exists nil is returned.
func LinkName ¶ added in v0.7.5
func LinkName(x *xir.Endpoint) string
returns the name of the link, if the link is a part of a bond, returns the name of the bond
func MapFabrics ¶
func MapFabrics(link *task.LinkInfo, amap AccessMap, ltmap TrunkMap, vvmap VlanVxlanMap, topo *xir.Net, mtu int) ( TrunkMap, VtepMap, []EvpnAdvertisement, error)
MapFabrics creates trunk and vtep maps from the set of testbed fabric switches.
Types ¶
type AccessMap ¶
type AccessMap map[string]map[string]*AccessPort
AccessMap is a switch -> port -> access-port mapping
func (AccessMap) Add ¶
func (m AccessMap) Add(leaf *xir.Node, ep *xir.Endpoint, value *AccessPort)
Add an access port to a switch on the specified endpoint.
func (AccessMap) AddEntry ¶
func (m AccessMap) AddEntry(node, name string, value *AccessPort)
type AccessPort ¶
func (AccessPort) Create ¶
func (ap AccessPort) Create() *canopy.Property
Create returns a canopy proerty that creates an access port
func (AccessPort) Destroy ¶
func (ap AccessPort) Destroy() *canopy.Property
Destroy returns a canopy proerty taht destroys an access port
type CanopyOps ¶
type CanopyOps map[string][]*canopy.Property
CanopyOps is a map from a target hosts to a list of canopy properties. This is used for executing many canopy operations over many hosts.
type EvpnAdvertisement ¶
type HostAccessPort ¶
type HostAccessPort struct { Host string AccessPort }
type HostTrunkPort ¶
type LinkPlan ¶
type LinkPlan struct { // materialization id Mzid string Role LinkPlanRole LinkKind task.LinkKind MTU int AccessMap AccessMap TrunkMap TrunkMap VtepMap VtepMap VVMap VlanVxlanMap EvpnAdvertisements []EvpnAdvertisement Topo *xir.Net `json:"-"` // contains filtered or unexported fields }
LinkPlan defines a deployment plan for a link in terms of the ports and virtual interfaces that must be created to materialize it.
func FetchLinkPlan ¶ added in v0.7.5
func FetchLinkPlan(mzid string, role LinkPlanRole) (*LinkPlan, error)
func ListLinkPlans ¶
ListLinkPlans lists all link plans associated with the given materialization ID.
func NewLinkPlan ¶
func NewLinkPlan(mzid string, topo *xir.Net, role LinkPlanRole, mtu int, links ...*task.LinkInfo) ( *LinkPlan, error)
NewLinkPlan creates a new link plan
func (*LinkPlan) GetVersion ¶
GetVersion returns the current datastore version of the object
func (LinkPlan) LookupTable ¶
func (l LinkPlan) LookupTable() LinkPlanLookup
func (*LinkPlan) SetVersion ¶
SetVersion sets the current datastore version of the object
type LinkPlanLookup ¶
type LinkPlanLookup struct { Access map[string][]HostAccessPort Trunk map[string][]HostTrunkPort Vtep map[string][]HostVtep Advertisements map[string][]EvpnAdvertisement }
func NewLinkPlanLookup ¶
func NewLinkPlanLookup() LinkPlanLookup
type LinkPlanRole ¶
type LinkPlanRole int
const ( InfraLP LinkPlanRole = iota ExperimentLP )
func (LinkPlanRole) String ¶
func (r LinkPlanRole) String() string
type TrunkMap ¶
TrunkMap is a switch -> port -> trunk-port mapping
type TrunkPort ¶
TrunkPort encapsulates access port info
type Vtep ¶
type Vtep struct { Name string Vid int Vni int Bridge string TunnelIP string DirectConnect bool XpID string Mtu int Device string }
Vtep encapsulates vtep info
type VxlanConfig ¶
VxlanConfig encapsulates information about a VXLAN configuration