fabric

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PersistentTrunks = []int{
	2,
}

Functions

func GetInfraLeaf

func GetInfraLeaf(topo *xir.Net, node string) (*xir.Node, *xir.Endpoint, error)

func GetLeaf

func GetLeaf(tb *xir.Net, node, ifx string) (*xir.Node, *xir.Endpoint, error)

func MapFabrics

func MapFabrics(spec cogs.LinkSpec, amap AccessMap, topo *xir.Net) (
	TrunkMap, VtepMap, error)

func MapLeaves

func MapLeaves(spec cogs.LinkSpec, topo *xir.Net) (AccessMap, TrunkMap, error)

Types

type AccessMap

type AccessMap map[*xir.Node]map[*xir.Endpoint]AccessPort

leaf -> port -> AccessPort

func (AccessMap) Add

func (m AccessMap) Add(leaf *xir.Node, ep *xir.Endpoint, value AccessPort)

type AccessPort

type AccessPort struct {
	Name string
	Vid  int
}

func (AccessPort) Create

func (ap AccessPort) Create() *canopy.Property

func (AccessPort) Destroy

func (ap AccessPort) Destroy() *canopy.Property

type CanopyOps

type CanopyOps map[string][]*canopy.Property

func (CanopyOps) Exec

func (ops CanopyOps) Exec() error

type LinkPlan

type LinkPlan struct {

	// materialization id
	Mzid string

	// id of the experiment link this plan is being created for
	XlinkId string

	LinkKind cogs.LinkKind

	AccessMap AccessMap
	TrunkMap  TrunkMap
	VtepMap   VtepMap
	// 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 NewLinkPlan

func NewLinkPlan(spec cogs.LinkSpec) (*LinkPlan, error)

func (LinkPlan) Create

func (lp LinkPlan) Create() CanopyOps

func (*LinkPlan) Delete added in v0.2.13

func (lp *LinkPlan) Delete() error

func (LinkPlan) Destroy

func (lp LinkPlan) Destroy() CanopyOps

func (*LinkPlan) GetVersion

func (l *LinkPlan) GetVersion() int64

func (*LinkPlan) Key

func (l *LinkPlan) Key() string

func (*LinkPlan) Save added in v0.2.13

func (lp *LinkPlan) Save() error

func (*LinkPlan) SetVersion

func (l *LinkPlan) SetVersion(v int64)

func (LinkPlan) String

func (lp LinkPlan) String() string

func (*LinkPlan) Value

func (l *LinkPlan) Value() interface{}

type TrunkMap

type TrunkMap map[*xir.Node]map[*xir.Endpoint]TrunkPort

fabric -> port -> TrunkPort

func (TrunkMap) Add

func (m TrunkMap) Add(node *xir.Node, ep *xir.Endpoint, value TrunkPort)

type TrunkPort

type TrunkPort struct {
	Name string
	Vids []int
}

func (TrunkPort) Create

func (tp TrunkPort) Create() *canopy.Property

func (TrunkPort) Destroy

func (tp TrunkPort) Destroy() *canopy.Property

type Vtep

type Vtep struct {
	Name     string
	Vid      int
	Vni      int
	Bridge   string
	TunnelIp string
}

func (Vtep) Create

func (v Vtep) Create() []*canopy.Property

func (Vtep) Destroy

func (v Vtep) Destroy() []*canopy.Property

type VtepMap

type VtepMap map[*xir.Node]map[string]Vtep

fabirc -> interface -> Vtep

func (VtepMap) Add

func (m VtepMap) Add(node *xir.Node, name string, value Vtep)

type VxlanConfig

type VxlanConfig struct {
	TunnelIp string
	Bridge   string
}

Jump to

Keyboard shortcuts

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