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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ArpDescriptorName is the name of the descriptor.
	ArpDescriptorName = "vpp-arp"
)
View Source
const (
	// ProxyArpInterfaceDescriptorName is the name of the descriptor.
	DHCPProxyDescriptorName = "dhcp-proxy"
)
View Source
const (
	// IPScanNeighborDescriptorName is the name of the descriptor.
	IPScanNeighborDescriptorName = "vpp-ip-scan-neighbor"
)
View Source
const (
	// ProxyArpDescriptorName is the name of the descriptor.
	ProxyArpDescriptorName = "vpp-proxy-arp"
)
View Source
const (
	// ProxyArpInterfaceDescriptorName is the name of the descriptor.
	ProxyArpInterfaceDescriptorName = "vpp-proxy-arp-interface"
)
View Source
const (
	// RouteDescriptorName is the name of the descriptor for static routes.
	RouteDescriptorName = "vpp-route"
)
View Source
const (
	// VrfTableDescriptorName is the name of the descriptor for VRF tables.
	VrfTableDescriptorName = "vpp-vrf-table"
)

Variables

View Source
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, addrAlloc netalloc.AddressAllocator,
	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.

func (*DHCPProxyDescriptor) Validate

func (d *DHCPProxyDescriptor) Validate(key string, value *l3.DHCPProxy) error

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

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.

func (*ProxyArpDescriptor) Update

func (d *ProxyArpDescriptor) Update(key string, oldValue, newValue *l3.ProxyARP, oldMetadata interface{}) (newMetadata interface{}, err error)

Update modifies VPP Proxy ARP.

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.

func (*RouteDescriptor) Validate

func (d *RouteDescriptor) Validate(key string, route *l3.Route) (err error)

Validate validates VPP static route configuration.

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.

func (*VrfTableDescriptor) Validate

func (d *VrfTableDescriptor) Validate(key string, vrfTable *l3.VrfTable) (err error)

Validate validates configuration of VPP VRF table.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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