Documentation ¶
Index ¶
- Constants
- Variables
- func NewABFDescriptor(abfHandler vppcalls.ABFVppAPI, aclIndex aclidx.ACLMetadataIndex, ...) *api.KVDescriptor
- func NewABFToInterfaceDescriptor(abfIndex abfidx.ABFMetadataIndex, abfHandler vppcalls.ABFVppAPI, ...) *api.KVDescriptor
- type ABFDescriptor
- func (d *ABFDescriptor) Create(key string, abfData *abf.ABF) (*abfidx.ABFMetadata, error)
- func (d *ABFDescriptor) Delete(key string, abfData *abf.ABF, metadata *abfidx.ABFMetadata) error
- func (d *ABFDescriptor) Dependencies(key string, abfData *abf.ABF) (dependencies []api.Dependency)
- func (d *ABFDescriptor) DerivedValues(key string, value *abf.ABF) (derived []api.KeyValuePair)
- func (d *ABFDescriptor) EquivalentABFs(key string, oldABF, newABF *abf.ABF) bool
- func (d *ABFDescriptor) Retrieve(correlate []adapter.ABFKVWithMetadata) (abfs []adapter.ABFKVWithMetadata, err error)
- func (d *ABFDescriptor) Validate(key string, abfData *abf.ABF) error
- type ABFToInterfaceDescriptor
- func (d *ABFToInterfaceDescriptor) Create(key string, emptyVal proto.Message) (metadata api.Metadata, err error)
- func (d *ABFToInterfaceDescriptor) Delete(key string, emptyVal proto.Message, metadata api.Metadata) (err error)
- func (d *ABFToInterfaceDescriptor) Dependencies(key string, emptyVal proto.Message) []api.Dependency
- func (d *ABFToInterfaceDescriptor) IsABFInterfaceKey(key string) bool
Constants ¶
const (
// ABFDescriptorName is descriptor name
ABFDescriptorName = "vpp-abf"
)
const (
// ABFToInterfaceDescriptorName is name for descriptor
ABFToInterfaceDescriptorName = "vpp-abf-to-interface"
)
Variables ¶
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.
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)