descriptor

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BDInterfaceDescriptorName is the name of the descriptor for bindings between
	// VPP bridge domains and interfaces.
	BDInterfaceDescriptorName = "vpp-bd-interface"
)
View Source
const (
	// BridgeDomainDescriptorName is the name of the descriptor for VPP bridge domains.
	BridgeDomainDescriptorName = "vpp-bridge-domain"
)
View Source
const (
	// FIBDescriptorName is the name of the descriptor for VPP L2 FIBs.
	FIBDescriptorName = "vpp-l2-fib"
)
View Source
const (
	// XConnectDescriptorName is the name of the descriptor for VPP xConnect pairs.
	XConnectDescriptorName = "vpp-xconnect"
)

Variables

View Source
var (
	// ErrBridgeDomainWithoutName is returned when VPP bridge domain configuration
	// has undefined Name attribute.
	ErrBridgeDomainWithoutName = errors.New("VPP bridge domain defined without logical name")

	// ErrBridgeDomainWithMultipleBVI is returned when bridge domain is defined with
	// multiple BVI interfaces.
	ErrBridgeDomainWithMultipleBVI = errors.New("VPP bridge domain defined with mutliple BVIs")
)

A list of non-retriable errors:

View Source
var (
	// ErrFIBWithoutHwAddr is returned when VPP L2 FIB has undefined hardware
	// address.
	ErrFIBWithoutHwAddr = errors.New("VPP L2 FIB defined without hardware address")

	// ErrFIBWithoutBD is returned when VPP L2 FIB has undefined bridge domain.
	ErrFIBWithoutBD = errors.New("VPP L2 FIB defined without bridge domain")

	// ErrForwardFIBWithoutInterface is returned when VPP L2 FORWARD FIB has undefined outgoing interface.
	ErrForwardFIBWithoutInterface = errors.New("VPP L2 FORWARD FIB defined without outgoing interface")
)

A list of non-retriable errors:

View Source
var (
	// ErrXConnectWithoutInterface is returned when VPP xConnect has undefined
	// Rx or Tx interface.
	ErrXConnectWithoutInterface = errors.New("VPP xConnect defined without Rx/Tx interface")
)

A list of non-retriable errors:

Functions

This section is empty.

Types

type BDInterfaceDescriptor

type BDInterfaceDescriptor struct {
	// contains filtered or unexported fields
}

BDInterfaceDescriptor teaches KVScheduler how to put interface into VPP bridge domain.

func NewBDInterfaceDescriptor

func NewBDInterfaceDescriptor(bdIndex idxvpp2.NameToIndex, bdHandler vppcalls.BridgeDomainVppAPI, log logging.PluginLogger) *BDInterfaceDescriptor

NewBDInterfaceDescriptor creates a new instance of the BDInterface descriptor.

func (*BDInterfaceDescriptor) Add

func (d *BDInterfaceDescriptor) Add(key string, bdIface *l2.BridgeDomain_Interface) (metadata interface{}, err error)

Add puts interface into bridge domain.

func (*BDInterfaceDescriptor) Delete

func (d *BDInterfaceDescriptor) Delete(key string, bdIface *l2.BridgeDomain_Interface, metadata interface{}) error

Delete removes interface from bridge domain.

func (*BDInterfaceDescriptor) Dependencies

Dependencies lists the interface as the only dependency for the binding.

func (*BDInterfaceDescriptor) GetDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*BDInterfaceDescriptor) IsBDInterfaceKey

func (d *BDInterfaceDescriptor) IsBDInterfaceKey(key string) bool

IsBDInterfaceKey returns true if the key is identifying binding between VPP bridge domain and interface.

func (*BDInterfaceDescriptor) ModifyWithRecreate

func (d *BDInterfaceDescriptor) ModifyWithRecreate(key string, oldBDIface, newBDIface *l2.BridgeDomain_Interface, metadata interface{}) bool

ModifyWithRecreate returns always true - a change in BVI or SHG is always performed via Delete+Add.

type BridgeDomainDescriptor

type BridgeDomainDescriptor struct {
	// contains filtered or unexported fields
}

BridgeDomainDescriptor teaches KVScheduler how to configure VPP bridge domains.

func NewBridgeDomainDescriptor

func NewBridgeDomainDescriptor(bdHandler vppcalls.BridgeDomainVppAPI, log logging.PluginLogger) *BridgeDomainDescriptor

NewBridgeDomainDescriptor creates a new instance of the BridgeDomain descriptor.

func (*BridgeDomainDescriptor) Add

func (d *BridgeDomainDescriptor) Add(key string, bd *l2.BridgeDomain) (metadata *idxvpp2.OnlyIndex, err error)

Add adds new bridge domain.

func (*BridgeDomainDescriptor) BridgeDomainNameFromKey

func (d *BridgeDomainDescriptor) BridgeDomainNameFromKey(key string) string

BridgeDomainNameFromKey returns VPP bridge domain name from the key.

func (*BridgeDomainDescriptor) Delete

func (d *BridgeDomainDescriptor) Delete(key string, bd *l2.BridgeDomain, metadata *idxvpp2.OnlyIndex) error

Delete removes VPP bridge domain.

func (*BridgeDomainDescriptor) DerivedValues

func (d *BridgeDomainDescriptor) DerivedValues(key string, bd *l2.BridgeDomain) (derValues []scheduler.KeyValuePair)

DerivedValues derives l2.BridgeDomain_Interface for every interface assigned to the bridge domain.

func (*BridgeDomainDescriptor) Dump

Dump returns all configured VPP bridge domains.

func (*BridgeDomainDescriptor) EquivalentBridgeDomains

func (d *BridgeDomainDescriptor) EquivalentBridgeDomains(key string, oldBD, newBD *l2.BridgeDomain) bool

EquivalentBridgeDomains is case-insensitive comparison function for l2.BridgeDomain, also ignoring the order of assigned ARP termination entries.

func (*BridgeDomainDescriptor) GetDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*BridgeDomainDescriptor) IsBridgeDomainKey

func (d *BridgeDomainDescriptor) IsBridgeDomainKey(key string) bool

IsBridgeDomainKey returns true if the key is identifying VPP bridge domain configuration.

func (*BridgeDomainDescriptor) IsRetriableFailure

func (d *BridgeDomainDescriptor) IsRetriableFailure(err error) bool

IsRetriableFailure returns <false> for errors related to invalid configuration.

func (*BridgeDomainDescriptor) MetadataFactory

func (d *BridgeDomainDescriptor) MetadataFactory() idxmap.NamedMappingRW

MetadataFactory is a factory for index-map customized for VPP bridge domains.

func (*BridgeDomainDescriptor) Modify

func (d *BridgeDomainDescriptor) Modify(key string, oldBD, newBD *l2.BridgeDomain, oldMetadata *idxvpp2.OnlyIndex) (newMetadata *idxvpp2.OnlyIndex, err error)

Modify is able to change ARP termination entries.

func (*BridgeDomainDescriptor) ModifyWithRecreate

func (d *BridgeDomainDescriptor) ModifyWithRecreate(key string, oldBD, newBD *l2.BridgeDomain, metadata *idxvpp2.OnlyIndex) bool

ModifyWithRecreate returns true if bridge domain base parameters are different.

type FIBDescriptor

type FIBDescriptor struct {
	// contains filtered or unexported fields
}

FIBDescriptor teaches KVScheduler how to configure VPP L2 FIBs.

func NewFIBDescriptor

func NewFIBDescriptor(fibHandler vppcalls.FIBVppAPI, log logging.PluginLogger) *FIBDescriptor

NewFIBDescriptor creates a new instance of the FIB descriptor.

func (*FIBDescriptor) Add

func (d *FIBDescriptor) Add(key string, fib *l2.FIBEntry) (metadata interface{}, err error)

Add adds new L2 FIB.

func (*FIBDescriptor) Delete

func (d *FIBDescriptor) Delete(key string, fib *l2.FIBEntry, metadata interface{}) error

Delete removes VPP L2 FIB.

func (*FIBDescriptor) Dependencies

func (d *FIBDescriptor) Dependencies(key string, fib *l2.FIBEntry) (dependencies []scheduler.Dependency)

Dependencies for FIBs are:

  • FORWARD FIB: bridge domain + outgoing interface already put into the bridge domain
  • DROP FIB: bridge domain

func (*FIBDescriptor) Dump

func (d *FIBDescriptor) Dump(correlate []adapter.FIBKVWithMetadata) (dump []adapter.FIBKVWithMetadata, err error)

Dump returns all configured VPP L2 FIBs.

func (*FIBDescriptor) EquivalentFIBs

func (d *FIBDescriptor) EquivalentFIBs(key string, oldFIB, newFIB *l2.FIBEntry) bool

EquivalentFIBs is case-insensitive comparison function for l2.FIBEntry.

func (*FIBDescriptor) GetDescriptor

func (d *FIBDescriptor) GetDescriptor() *adapter.FIBDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*FIBDescriptor) IsFIBKey

func (d *FIBDescriptor) IsFIBKey(key string) bool

IsFIBKey returns true if the key is identifying VPP L2 FIB configuration.

func (*FIBDescriptor) IsRetriableFailure

func (d *FIBDescriptor) IsRetriableFailure(err error) bool

IsRetriableFailure returns <false> for errors related to invalid configuration.

func (*FIBDescriptor) ModifyWithRecreate

func (d *FIBDescriptor) ModifyWithRecreate(key string, oldFIB, newFIB *l2.FIBEntry, metadata interface{}) bool

ModifyWithRecreate always returns true - L2 FIBs are modified via re-creation.

type XConnectDescriptor

type XConnectDescriptor struct {
	// contains filtered or unexported fields
}

XConnectDescriptor teaches KVScheduler how to configure VPP xConnect pairs.

func NewXConnectDescriptor

func NewXConnectDescriptor(xcHandler vppcalls.XConnectVppAPI, log logging.PluginLogger) *XConnectDescriptor

NewXConnectDescriptor creates a new instance of the xConnect descriptor.

func (*XConnectDescriptor) Add

func (d *XConnectDescriptor) Add(key string, xc *l2.XConnectPair) (metadata interface{}, err error)

Add adds new xConnect pair.

func (*XConnectDescriptor) Delete

func (d *XConnectDescriptor) Delete(key string, xc *l2.XConnectPair, metadata interface{}) error

Delete removes existing xConnect pair.

func (*XConnectDescriptor) Dependencies

func (d *XConnectDescriptor) Dependencies(key string, xc *l2.XConnectPair) []scheduler.Dependency

Dependencies lists both Rx and Tx interface as dependencies.

func (*XConnectDescriptor) Dump

Dump returns all configured VPP xConnect pairs.

func (*XConnectDescriptor) GetDescriptor

func (d *XConnectDescriptor) GetDescriptor() *adapter.XConnectDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*XConnectDescriptor) IsRetriableFailure

func (d *XConnectDescriptor) IsRetriableFailure(err error) bool

IsRetriableFailure returns <false> for errors related to invalid configuration.

func (*XConnectDescriptor) IsXConnectKey

func (d *XConnectDescriptor) IsXConnectKey(key string) bool

IsXConnectKey returns true if the key is identifying VPP xConnect configuration.

func (*XConnectDescriptor) ModifyWithRecreate

func (d *XConnectDescriptor) ModifyWithRecreate(key string, oldXC, newXC *l2.XConnectPair, metadata interface{}) bool

ModifyWithRecreate always returns true - xConnect pairs are modified via re-creation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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