Documentation ¶
Index ¶
- Constants
- Variables
- func NewArpDescriptor(scheduler kvs.KVScheduler, arpHandler vppcalls.ArpVppAPI, ...) *kvs.KVDescriptor
- func NewDHCPProxyDescriptor(scheduler kvs.KVScheduler, dhcpProxyHandler vppcalls.DHCPProxyAPI, ...) *kvs.KVDescriptor
- func NewIPScanNeighborDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.IPNeighVppAPI, ...) *kvs.KVDescriptor
- func NewProxyArpDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.ProxyArpVppAPI, ...) *kvs.KVDescriptor
- func NewProxyArpInterfaceDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.ProxyArpVppAPI, ...) *kvs.KVDescriptor
- func NewRouteDescriptor(routeHandler vppcalls.RouteVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
- func NewVrfTableDescriptor(vtHandler vppcalls.VrfTableVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
- type ArpDescriptor
- func (d *ArpDescriptor) Create(key string, arp *l3.ARPEntry) (interface{}, error)
- func (d *ArpDescriptor) Delete(key string, arp *l3.ARPEntry, metadata interface{}) error
- func (d *ArpDescriptor) Dependencies(key string, arp *l3.ARPEntry) (deps []kvs.Dependency)
- func (d *ArpDescriptor) EquivalentArps(key string, oldArp, newArp *l3.ARPEntry) bool
- func (d *ArpDescriptor) Retrieve(correlate []adapter.ARPEntryKVWithMetadata) (retrieved []adapter.ARPEntryKVWithMetadata, err error)
- type DHCPProxyDescriptor
- func (d *DHCPProxyDescriptor) Create(key string, value *l3.DHCPProxy) (metadata interface{}, err error)
- func (d *DHCPProxyDescriptor) Delete(key string, value *l3.DHCPProxy, metadata interface{}) error
- func (d *DHCPProxyDescriptor) Dependencies(key string, value *l3.DHCPProxy) (deps []kvs.Dependency)
- func (d *DHCPProxyDescriptor) Retrieve(correlate []adapter.DHCPProxyKVWithMetadata) (retrieved []adapter.DHCPProxyKVWithMetadata, err error)
- func (d *DHCPProxyDescriptor) Validate(key string, value *l3.DHCPProxy) error
- type IPScanNeighborDescriptor
- func (d *IPScanNeighborDescriptor) Create(key string, value *l3.IPScanNeighbor) (metadata interface{}, err error)
- func (d *IPScanNeighborDescriptor) Delete(key string, value *l3.IPScanNeighbor, metadata interface{}) error
- func (d *IPScanNeighborDescriptor) EquivalentIPScanNeighbors(key string, oldValue, newValue *l3.IPScanNeighbor) bool
- func (d *IPScanNeighborDescriptor) Retrieve(correlate []adapter.IPScanNeighborKVWithMetadata) (retrieved []adapter.IPScanNeighborKVWithMetadata, err error)
- func (d *IPScanNeighborDescriptor) Update(key string, oldValue, newValue *l3.IPScanNeighbor, oldMetadata interface{}) (newMetadata interface{}, err error)
- type ProxyArpDescriptor
- func (d *ProxyArpDescriptor) Create(key string, value *l3.ProxyARP) (metadata interface{}, err error)
- func (d *ProxyArpDescriptor) Delete(key string, value *l3.ProxyARP, metadata interface{}) error
- func (d *ProxyArpDescriptor) DerivedValues(key string, proxyArp *l3.ProxyARP) (derValues []kvs.KeyValuePair)
- func (d *ProxyArpDescriptor) EquivalentProxyArps(key string, oldValue, newValue *l3.ProxyARP) bool
- func (d *ProxyArpDescriptor) Retrieve(correlate []adapter.ProxyARPKVWithMetadata) (retrieved []adapter.ProxyARPKVWithMetadata, err error)
- func (d *ProxyArpDescriptor) Update(key string, oldValue, newValue *l3.ProxyARP, oldMetadata interface{}) (newMetadata interface{}, err error)
- type ProxyArpInterfaceDescriptor
- func (d *ProxyArpInterfaceDescriptor) Create(key string, value *l3.ProxyARP_Interface) (metadata interface{}, err error)
- func (d *ProxyArpInterfaceDescriptor) Delete(key string, value *l3.ProxyARP_Interface, metadata interface{}) error
- func (d *ProxyArpInterfaceDescriptor) Dependencies(key string, value *l3.ProxyARP_Interface) (deps []kvs.Dependency)
- type RouteDescriptor
- func (d *RouteDescriptor) Create(key string, route *l3.Route) (metadata interface{}, err error)
- func (d *RouteDescriptor) Delete(key string, route *l3.Route, metadata interface{}) error
- func (d *RouteDescriptor) Dependencies(key string, route *l3.Route) []kvs.Dependency
- func (d *RouteDescriptor) EquivalentRoutes(key string, oldRoute, newRoute *l3.Route) bool
- func (d *RouteDescriptor) Retrieve(correlate []adapter.RouteKVWithMetadata) (retrieved []adapter.RouteKVWithMetadata, err error)
- func (d *RouteDescriptor) Validate(key string, route *l3.Route) (err error)
- type VrfTableDescriptor
- func (d *VrfTableDescriptor) Create(key string, vrfTable *l3.VrfTable) (metadata *vrfidx.VRFMetadata, err error)
- func (d *VrfTableDescriptor) Delete(key string, vrfTable *l3.VrfTable, metadata *vrfidx.VRFMetadata) error
- func (d *VrfTableDescriptor) EquivalentVrfTables(key string, oldVrfTable, newVrfTable *l3.VrfTable) bool
- func (d *VrfTableDescriptor) MetadataFactory() idxmap.NamedMappingRW
- func (d *VrfTableDescriptor) Retrieve(correlate []adapter.VrfTableKVWithMetadata) (retrieved []adapter.VrfTableKVWithMetadata, err error)
- func (d *VrfTableDescriptor) Validate(key string, vrfTable *l3.VrfTable) (err error)
Constants ¶
const (
// ArpDescriptorName is the name of the descriptor.
ArpDescriptorName = "vpp-arp"
)
const (
// ProxyArpInterfaceDescriptorName is the name of the descriptor.
DHCPProxyDescriptorName = "dhcp-proxy"
)
const (
// IPScanNeighborDescriptorName is the name of the descriptor.
IPScanNeighborDescriptorName = "vpp-ip-scan-neighbor"
)
const (
// ProxyArpDescriptorName is the name of the descriptor.
ProxyArpDescriptorName = "vpp-proxy-arp"
)
const (
// ProxyArpInterfaceDescriptorName is the name of the descriptor.
ProxyArpInterfaceDescriptorName = "vpp-proxy-arp-interface"
)
const (
// RouteDescriptorName is the name of the descriptor for static routes.
RouteDescriptorName = "vpp-route"
)
const (
// VrfTableDescriptorName is the name of the descriptor for VRF tables.
VrfTableDescriptorName = "vpp-vrf-table"
)
Variables ¶
var ( // ErrVrfTableLabelTooLong is returned when VRF table label exceeds the length limit. ErrVrfTableLabelTooLong = errors.New("VPP VRF table label exceeds the length limit (63 characters)") )
A list of non-retriable errors:
Functions ¶
func NewArpDescriptor ¶
func NewArpDescriptor(scheduler kvs.KVScheduler, arpHandler vppcalls.ArpVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewArpDescriptor creates a new instance of the ArpDescriptor.
func NewDHCPProxyDescriptor ¶
func NewDHCPProxyDescriptor(scheduler kvs.KVScheduler, dhcpProxyHandler vppcalls.DHCPProxyAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewDHCPProxyDescriptor creates a new instance of the DHCPProxyDescriptor.
func NewIPScanNeighborDescriptor ¶
func NewIPScanNeighborDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.IPNeighVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewIPScanNeighborDescriptor creates a new instance of the IPScanNeighborDescriptor.
func NewProxyArpDescriptor ¶
func NewProxyArpDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.ProxyArpVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewProxyArpDescriptor creates a new instance of the ProxyArpDescriptor.
func NewProxyArpInterfaceDescriptor ¶
func NewProxyArpInterfaceDescriptor(scheduler kvs.KVScheduler, proxyArpHandler vppcalls.ProxyArpVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewProxyArpInterfaceDescriptor creates a new instance of the ProxyArpInterfaceDescriptor.
func NewRouteDescriptor ¶
func NewRouteDescriptor( routeHandler vppcalls.RouteVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewRouteDescriptor creates a new instance of the Route descriptor.
func NewVrfTableDescriptor ¶
func NewVrfTableDescriptor( vtHandler vppcalls.VrfTableVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewVrfTableDescriptor creates a new instance of the VrfTable descriptor.
Types ¶
type ArpDescriptor ¶
type ArpDescriptor struct {
// contains filtered or unexported fields
}
ArpDescriptor teaches KVScheduler how to configure VPP ARPs.
func (*ArpDescriptor) Create ¶
func (d *ArpDescriptor) Create(key string, arp *l3.ARPEntry) (interface{}, error)
Create adds VPP ARP entry.
func (*ArpDescriptor) Delete ¶
func (d *ArpDescriptor) Delete(key string, arp *l3.ARPEntry, metadata interface{}) error
Delete removes VPP ARP entry.
func (*ArpDescriptor) Dependencies ¶
func (d *ArpDescriptor) Dependencies(key string, arp *l3.ARPEntry) (deps []kvs.Dependency)
Dependencies lists dependencies for a VPP ARP entry.
func (*ArpDescriptor) EquivalentArps ¶
func (d *ArpDescriptor) EquivalentArps(key string, oldArp, newArp *l3.ARPEntry) bool
EquivalentArps is comparison function for ARP entries.
func (*ArpDescriptor) Retrieve ¶
func (d *ArpDescriptor) Retrieve(correlate []adapter.ARPEntryKVWithMetadata) ( retrieved []adapter.ARPEntryKVWithMetadata, err error, )
Retrieve returns all ARP entries associated with interfaces managed by this agent.
type DHCPProxyDescriptor ¶
type DHCPProxyDescriptor struct {
// contains filtered or unexported fields
}
DHCPProxyDescriptor teaches KVScheduler how to configure VPP DHCP proxy.
func (*DHCPProxyDescriptor) Create ¶
func (d *DHCPProxyDescriptor) Create(key string, value *l3.DHCPProxy) (metadata interface{}, err error)
Create enables VPP DHCP proxy.
func (*DHCPProxyDescriptor) Delete ¶
func (d *DHCPProxyDescriptor) Delete(key string, value *l3.DHCPProxy, metadata interface{}) error
Delete disables VPP DHCP proxy.
func (*DHCPProxyDescriptor) Dependencies ¶
func (d *DHCPProxyDescriptor) Dependencies(key string, value *l3.DHCPProxy) (deps []kvs.Dependency)
Dependencies lists dependencies for a VPP DHCP proxy.
func (*DHCPProxyDescriptor) Retrieve ¶
func (d *DHCPProxyDescriptor) Retrieve(correlate []adapter.DHCPProxyKVWithMetadata) (retrieved []adapter.DHCPProxyKVWithMetadata, err error)
Retrieve returns current VPP DHCP proxy configuration.
type IPScanNeighborDescriptor ¶
type IPScanNeighborDescriptor struct {
// contains filtered or unexported fields
}
IPScanNeighborDescriptor teaches KVScheduler how to configure VPP proxy ARPs.
func (*IPScanNeighborDescriptor) Create ¶
func (d *IPScanNeighborDescriptor) Create(key string, value *l3.IPScanNeighbor) (metadata interface{}, err error)
Create adds VPP IP Scan Neighbor.
func (*IPScanNeighborDescriptor) Delete ¶
func (d *IPScanNeighborDescriptor) Delete(key string, value *l3.IPScanNeighbor, metadata interface{}) error
Delete deletes VPP IP Scan Neighbor.
func (*IPScanNeighborDescriptor) EquivalentIPScanNeighbors ¶
func (d *IPScanNeighborDescriptor) EquivalentIPScanNeighbors(key string, oldValue, newValue *l3.IPScanNeighbor) bool
EquivalentIPScanNeighbors compares the IP Scan Neighbor values.
func (*IPScanNeighborDescriptor) Retrieve ¶
func (d *IPScanNeighborDescriptor) Retrieve(correlate []adapter.IPScanNeighborKVWithMetadata) ( retrieved []adapter.IPScanNeighborKVWithMetadata, err error, )
Retrieve returns current VPP IP Scan Neighbor configuration.
func (*IPScanNeighborDescriptor) Update ¶
func (d *IPScanNeighborDescriptor) Update(key string, oldValue, newValue *l3.IPScanNeighbor, oldMetadata interface{}) (newMetadata interface{}, err error)
Update modifies VPP IP Scan Neighbor.
type ProxyArpDescriptor ¶
type ProxyArpDescriptor struct {
// contains filtered or unexported fields
}
ProxyArpDescriptor teaches KVScheduler how to configure VPP proxy ARPs.
func (*ProxyArpDescriptor) Create ¶
func (d *ProxyArpDescriptor) Create(key string, value *l3.ProxyARP) (metadata interface{}, err error)
Create adds VPP Proxy ARP.
func (*ProxyArpDescriptor) Delete ¶
func (d *ProxyArpDescriptor) Delete(key string, value *l3.ProxyARP, metadata interface{}) error
Delete deletes VPP Proxy ARP.
func (*ProxyArpDescriptor) DerivedValues ¶
func (d *ProxyArpDescriptor) DerivedValues(key string, proxyArp *l3.ProxyARP) (derValues []kvs.KeyValuePair)
DerivedValues derives l3.ProxyARP_Interface for every interface..
func (*ProxyArpDescriptor) EquivalentProxyArps ¶
func (d *ProxyArpDescriptor) EquivalentProxyArps(key string, oldValue, newValue *l3.ProxyARP) bool
EquivalentProxyArps compares VPP Proxy ARPs.
func (*ProxyArpDescriptor) Retrieve ¶
func (d *ProxyArpDescriptor) Retrieve(correlate []adapter.ProxyARPKVWithMetadata) ( retrieved []adapter.ProxyARPKVWithMetadata, err error)
Retrieve returns VPP Proxy ARP configuration.
type ProxyArpInterfaceDescriptor ¶
type ProxyArpInterfaceDescriptor struct {
// contains filtered or unexported fields
}
ProxyArpInterfaceDescriptor teaches KVScheduler how to configure VPP proxy ARP interfaces.
func (*ProxyArpInterfaceDescriptor) Create ¶
func (d *ProxyArpInterfaceDescriptor) Create(key string, value *l3.ProxyARP_Interface) (metadata interface{}, err error)
Create enables VPP Proxy ARP for interface.
func (*ProxyArpInterfaceDescriptor) Delete ¶
func (d *ProxyArpInterfaceDescriptor) Delete(key string, value *l3.ProxyARP_Interface, metadata interface{}) error
Delete disables VPP Proxy ARP for interface.
func (*ProxyArpInterfaceDescriptor) Dependencies ¶
func (d *ProxyArpInterfaceDescriptor) Dependencies(key string, value *l3.ProxyARP_Interface) (deps []kvs.Dependency)
Dependencies returns list of dependencies for VPP Proxy ARP interface.
type RouteDescriptor ¶
type RouteDescriptor struct {
// contains filtered or unexported fields
}
RouteDescriptor teaches KVScheduler how to configure VPP routes.
func (*RouteDescriptor) Create ¶
func (d *RouteDescriptor) Create(key string, route *l3.Route) (metadata interface{}, err error)
Create adds VPP static route.
func (*RouteDescriptor) Delete ¶
func (d *RouteDescriptor) Delete(key string, route *l3.Route, metadata interface{}) error
Delete removes VPP static route.
func (*RouteDescriptor) Dependencies ¶
func (d *RouteDescriptor) Dependencies(key string, route *l3.Route) []kvs.Dependency
Dependencies lists dependencies for a VPP route.
func (*RouteDescriptor) EquivalentRoutes ¶
func (d *RouteDescriptor) EquivalentRoutes(key string, oldRoute, newRoute *l3.Route) bool
EquivalentRoutes is case-insensitive comparison function for l3.Route.
func (*RouteDescriptor) Retrieve ¶
func (d *RouteDescriptor) Retrieve(correlate []adapter.RouteKVWithMetadata) ( retrieved []adapter.RouteKVWithMetadata, err error, )
Retrieve returns all routes associated with interfaces managed by this agent.
type VrfTableDescriptor ¶
type VrfTableDescriptor struct {
// contains filtered or unexported fields
}
VrfTableDescriptor teaches KVScheduler how to configure VPP VRF tables.
func (*VrfTableDescriptor) Create ¶
func (d *VrfTableDescriptor) Create(key string, vrfTable *l3.VrfTable) (metadata *vrfidx.VRFMetadata, err error)
Create adds VPP VRF table.
func (*VrfTableDescriptor) Delete ¶
func (d *VrfTableDescriptor) Delete(key string, vrfTable *l3.VrfTable, metadata *vrfidx.VRFMetadata) error
Delete removes VPP VRF table.
func (*VrfTableDescriptor) EquivalentVrfTables ¶
func (d *VrfTableDescriptor) EquivalentVrfTables(key string, oldVrfTable, newVrfTable *l3.VrfTable) bool
EquivalentVrfTables is a comparison function for l3.VrfTable.
func (*VrfTableDescriptor) MetadataFactory ¶
func (d *VrfTableDescriptor) MetadataFactory() idxmap.NamedMappingRW
MetadataFactory is a factory for index-map customized for VRFs.
func (*VrfTableDescriptor) Retrieve ¶
func (d *VrfTableDescriptor) Retrieve(correlate []adapter.VrfTableKVWithMetadata) ( retrieved []adapter.VrfTableKVWithMetadata, err error, )
Retrieve returns all configured VPP VRF tables.