fabric

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GetInfraLeaf added in v0.2.10

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

func GetLeaf added in v0.2.10

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

func (lp LinkPlan) Destroy() CanopyOps

func (*LinkPlan) GetVersion added in v0.1.13

func (l *LinkPlan) GetVersion() int64

func (*LinkPlan) Key added in v0.1.13

func (l *LinkPlan) Key() string

func (*LinkPlan) SetVersion added in v0.1.13

func (l *LinkPlan) SetVersion(v int64)

func (LinkPlan) String

func (lp LinkPlan) String() string

func (*LinkPlan) Value added in v0.1.13

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