descriptor

package
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 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 idxvpp.NameToIndex, bdHandler vppcalls.BridgeDomainVppAPI, log logging.PluginLogger) *BDInterfaceDescriptor

NewBDInterfaceDescriptor creates a new instance of the BDInterface descriptor.

func (*BDInterfaceDescriptor) Create

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

Create 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

func (d *BDInterfaceDescriptor) Dependencies(key string, value *l2.BridgeDomain_Interface) []kvs.Dependency

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.

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

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

Create adds new bridge domain.

func (*BridgeDomainDescriptor) Delete

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

Delete removes VPP bridge domain.

func (*BridgeDomainDescriptor) DerivedValues

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

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

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

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

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

func (*BridgeDomainDescriptor) Retrieve

Retrieve returns all configured VPP bridge domains.

func (*BridgeDomainDescriptor) Update

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

Update is able to change ARP termination entries.

func (*BridgeDomainDescriptor) UpdateWithRecreate

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

UpdateWithRecreate returns true if bridge domain base parameters are different.

func (*BridgeDomainDescriptor) Validate

func (d *BridgeDomainDescriptor) Validate(key string, bd *l2.BridgeDomain) error

Validate validates VPP bridge domain configuration.

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

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

Create 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 []kvs.Dependency)

Dependencies for FIBs are:

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

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

func (d *FIBDescriptor) Retrieve(correlate []adapter.FIBKVWithMetadata) (retrieved []adapter.FIBKVWithMetadata, err error)

Retrieve returns all configured VPP L2 FIBs.

func (*FIBDescriptor) Validate

func (d *FIBDescriptor) Validate(key string, fib *l2.FIBEntry) error

Validate validates VPP L2 FIB configuration.

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

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

Create 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) []kvs.Dependency

Dependencies lists both Rx and Tx interface as dependencies.

func (*XConnectDescriptor) GetDescriptor

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

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

func (*XConnectDescriptor) Retrieve

func (d *XConnectDescriptor) Retrieve(correlate []adapter.XConnectKVWithMetadata) (retrieved []adapter.XConnectKVWithMetadata, err error)

Retrieve returns all configured VPP xConnect pairs.

func (*XConnectDescriptor) Validate

func (d *XConnectDescriptor) Validate(key string, xc *l2.XConnectPair) error

Validate validates VPP xConnect pair configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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