descriptor

package
v0.0.0-...-ae01f8c Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ABXDescriptorName is descriptor name
	ABXDescriptorName = "vpp-abx"
)
View Source
const (
	// ABXToInterfaceDescriptorName is name for descriptor
	ABXToInterfaceDescriptorName = "vpp-abx-to-interface"
)

Variables

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

A list of non-retriable errors:

Functions

func NewABXDescriptor

func NewABXDescriptor(abxHandler vppcalls.ABXVppAPI, aclIndex aclidx.ACLMetadataIndex,
	logger logging.PluginLogger) *api.KVDescriptor

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

func NewABXToInterfaceDescriptor

func NewABXToInterfaceDescriptor(abxIndex abxidx.ABXMetadataIndex, abxHandler vppcalls.ABXVppAPI, ifPlugin ifplugin.API, log logging.PluginLogger) *api.KVDescriptor

NewABXToInterfaceDescriptor returns new ABXInterface descriptor

Types

type ABXDescriptor

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

ABXDescriptor is descriptor for ABX

func (*ABXDescriptor) Create

func (d *ABXDescriptor) Create(key string, abxData *abx.ABX) (*abxidx.ABXMetadata, error)

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

func (*ABXDescriptor) Delete

func (d *ABXDescriptor) Delete(key string, abxData *abx.ABX, metadata *abxidx.ABXMetadata) error

Delete removes ABX policy

func (*ABXDescriptor) Dependencies

func (d *ABXDescriptor) Dependencies(key string, abxData *abx.ABX) (dependencies []api.Dependency)

A list of ABX dependencies (ACL).

func (*ABXDescriptor) DerivedValues

func (d *ABXDescriptor) DerivedValues(key string, value *abx.ABX) (derived []api.KeyValuePair)

DerivedValues returns list of derived values for ABX.

func (*ABXDescriptor) EquivalentABXs

func (d *ABXDescriptor) EquivalentABXs(key string, oldABX, newABX *abx.ABX) bool

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

func (*ABXDescriptor) Retrieve

func (d *ABXDescriptor) Retrieve(correlate []adapter.ABXKVWithMetadata) (abxs []adapter.ABXKVWithMetadata, err error)

Retrieve returns ABX policies from the VPP.

func (*ABXDescriptor) Validate

func (d *ABXDescriptor) Validate(key string, abxData *abx.ABX) error

Validate validates VPP abx configuration.

type ABXToInterfaceDescriptor

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

ABXToInterfaceDescriptor represents assignment of interface to ABX policy.

func (*ABXToInterfaceDescriptor) Create

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

Create binds interface to ABX.

func (*ABXToInterfaceDescriptor) Delete

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

Delete unbinds interface from ABX.

func (*ABXToInterfaceDescriptor) Dependencies

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

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

func (*ABXToInterfaceDescriptor) IsABXInterfaceKey

func (d *ABXToInterfaceDescriptor) IsABXInterfaceKey(key string) bool

IsABXInterfaceKey returns true if the key is identifying ABX 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