descriptor

package
v2.5.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ABFDescriptorName is descriptor name
	ABFDescriptorName = "vpp-abf"
)
View Source
const (
	// ABFToInterfaceDescriptorName is name for descriptor
	ABFToInterfaceDescriptorName = "vpp-abf-to-interface"
)

Variables

View Source
var (
	// ErrABFWithoutACL is returned when ABF configuration does not contain associated access list.
	ErrABFWithoutACL = errors.New("ABF configuration defined without ACL")
)

A list of non-retriable errors:

Functions

func NewABFDescriptor

func NewABFDescriptor(abfHandler vppcalls.ABFVppAPI, aclIndex aclidx.ACLMetadataIndex,
	logger logging.PluginLogger) *api.KVDescriptor

NewABFDescriptor is constructor for ABF descriptor and returns descriptor suitable for registration (via adapter) with the KVScheduler.

func NewABFToInterfaceDescriptor

func NewABFToInterfaceDescriptor(abfIndex abfidx.ABFMetadataIndex, abfHandler vppcalls.ABFVppAPI, ifPlugin ifplugin.API, log logging.PluginLogger) *api.KVDescriptor

NewABFToInterfaceDescriptor returns new ABFInterface descriptor

Types

type ABFDescriptor

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

ABFDescriptor is descriptor for ABF

func (*ABFDescriptor) Create

func (d *ABFDescriptor) Create(key string, abfData *abf.ABF) (*abfidx.ABFMetadata, error)

Create validates ABF (mainly index), verifies ACL existence and configures ABF policy. Attached interfaces are put to metadata together with the ABF index to make it available for other ABF descriptors.

func (*ABFDescriptor) Delete

func (d *ABFDescriptor) Delete(key string, abfData *abf.ABF, metadata *abfidx.ABFMetadata) error

Delete removes ABF policy

func (*ABFDescriptor) Dependencies

func (d *ABFDescriptor) Dependencies(key string, abfData *abf.ABF) (dependencies []api.Dependency)

A list of ABF dependencies (ACL + forwarding path interfaces).

func (*ABFDescriptor) DerivedValues

func (d *ABFDescriptor) DerivedValues(key string, value *abf.ABF) (derived []api.KeyValuePair)

DerivedValues returns list of derived values for ABF.

func (*ABFDescriptor) EquivalentABFs

func (d *ABFDescriptor) EquivalentABFs(key string, oldABF, newABF *abf.ABF) bool

EquivalentABFs compares related ACL name, list of attached interfaces and forwarding paths to specify ABS equality.

func (*ABFDescriptor) Retrieve

func (d *ABFDescriptor) Retrieve(correlate []adapter.ABFKVWithMetadata) (abfs []adapter.ABFKVWithMetadata, err error)

Retrieve returns ABF policies from the VPP.

func (*ABFDescriptor) Validate

func (d *ABFDescriptor) Validate(key string, abfData *abf.ABF) error

Validate validates VPP ABF configuration.

type ABFToInterfaceDescriptor

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

ABFToInterfaceDescriptor represents assignment of interface to ABF policy.

func (*ABFToInterfaceDescriptor) Create

func (d *ABFToInterfaceDescriptor) Create(key string, emptyVal proto.Message) (metadata api.Metadata, err error)

Create binds interface to ABF.

func (*ABFToInterfaceDescriptor) Delete

func (d *ABFToInterfaceDescriptor) Delete(key string, emptyVal proto.Message, metadata api.Metadata) (err error)

Delete unbinds interface from ABF.

func (*ABFToInterfaceDescriptor) Dependencies

func (d *ABFToInterfaceDescriptor) Dependencies(key string, emptyVal proto.Message) []api.Dependency

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

func (*ABFToInterfaceDescriptor) IsABFInterfaceKey

func (d *ABFToInterfaceDescriptor) IsABFInterfaceKey(key string) bool

IsABFInterfaceKey returns true if the key is identifying ABF policy interface (derived value)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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