Documentation ¶
Index ¶
- Constants
- Variables
- func NewABXDescriptor(abxHandler vppcalls.ABXVppAPI, aclIndex aclidx.ACLMetadataIndex, ...) *api.KVDescriptor
- func NewABXToInterfaceDescriptor(abxIndex abxidx.ABXMetadataIndex, abxHandler vppcalls.ABXVppAPI, ...) *api.KVDescriptor
- type ABXDescriptor
- func (d *ABXDescriptor) Create(key string, abxData *abx.ABX) (*abxidx.ABXMetadata, error)
- func (d *ABXDescriptor) Delete(key string, abxData *abx.ABX, metadata *abxidx.ABXMetadata) error
- func (d *ABXDescriptor) Dependencies(key string, abxData *abx.ABX) (dependencies []api.Dependency)
- func (d *ABXDescriptor) DerivedValues(key string, value *abx.ABX) (derived []api.KeyValuePair)
- func (d *ABXDescriptor) EquivalentABXs(key string, oldABX, newABX *abx.ABX) bool
- func (d *ABXDescriptor) Retrieve(correlate []adapter.ABXKVWithMetadata) (abxs []adapter.ABXKVWithMetadata, err error)
- func (d *ABXDescriptor) Validate(key string, abxData *abx.ABX) error
- type ABXToInterfaceDescriptor
- func (d *ABXToInterfaceDescriptor) Create(key string, emptyVal proto.Message) (metadata api.Metadata, err error)
- func (d *ABXToInterfaceDescriptor) Delete(key string, emptyVal proto.Message, metadata api.Metadata) (err error)
- func (d *ABXToInterfaceDescriptor) Dependencies(key string, emptyVal proto.Message) []api.Dependency
- func (d *ABXToInterfaceDescriptor) IsABXInterfaceKey(key string) bool
Constants ¶
const (
// ABXDescriptorName is descriptor name
ABXDescriptorName = "vpp-abx"
)
const (
// ABXToInterfaceDescriptorName is name for descriptor
ABXToInterfaceDescriptorName = "vpp-abx-to-interface"
)
Variables ¶
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.
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)