descriptor

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 24 Imported by: 2

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 (
	// L3XCDescriptorName is the name of the descriptor.
	L3XCDescriptorName = "vpp-l3xc"
)
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,
	ipNeighHandler vppcalls.IPNeighVppAPI,
	log logging.PluginLogger,
) *kvs.KVDescriptor

NewIPScanNeighborDescriptor creates a new instance of the IPScanNeighborDescriptor.

func NewL3XCDescriptor

func NewL3XCDescriptor(l3xcHandler vppcalls.L3XCVppAPI, ifIndexes ifaceidx.IfaceMetadataIndex,
	log logging.PluginLogger,
) *kvs.KVDescriptor

NewL3XCDescriptor creates a new instance of the L3XCDescriptor.

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 L3XCDescriptor

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

L3XCDescriptor teaches KVScheduler how to configure VPP L3XCs.

func (*L3XCDescriptor) Create

func (d *L3XCDescriptor) Create(key string, l3xc *l3.L3XConnect) (interface{}, error)

Create adds VPP L3XC entry.

func (*L3XCDescriptor) Delete

func (d *L3XCDescriptor) Delete(key string, l3xc *l3.L3XConnect, metadata interface{}) error

Delete removes VPP L3XC entry.

func (*L3XCDescriptor) Dependencies

func (d *L3XCDescriptor) Dependencies(key string, l3xc *l3.L3XConnect) (deps []kvs.Dependency)

Dependencies lists dependencies for a VPP L3XC entry.

func (*L3XCDescriptor) EquivalentL3XCs

func (d *L3XCDescriptor) EquivalentL3XCs(key string, oldL3XC, newL3XC *l3.L3XConnect) bool

EquivalentL3XCs is comparison function for L3XC entries.

func (*L3XCDescriptor) Retrieve

func (d *L3XCDescriptor) Retrieve(correlate []adapter.L3XCKVWithMetadata) (
	retrieved []adapter.L3XCKVWithMetadata, err error,
)

Retrieve returns all L3XC entries associated with interfaces managed by this agent.

func (*L3XCDescriptor) Update

func (d *L3XCDescriptor) Update(key string, oldL3XC, newL3XC *l3.L3XConnect, oldMeta interface{}) (interface{}, error)

Update updates VPP L3XC entry.

func (*L3XCDescriptor) Validate

func (d *L3XCDescriptor) Validate(key string, l3xc *l3.L3XConnect) error

Validate returns if given l3xc is valid.

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) Update

func (d *VrfTableDescriptor) Update(_ string, oldVrfTable, newVrfTable *l3.VrfTable, _ *vrfidx.VRFMetadata) (
	metadata *vrfidx.VRFMetadata, err error)

Update updates VPP VRF table (ony if protocol or VRF ID has not changed).

func (*VrfTableDescriptor) UpdateWithRecreate

func (d *VrfTableDescriptor) UpdateWithRecreate(_ string, oldVrfTable, newVrfTable *l3.VrfTable, _ *vrfidx.VRFMetadata) bool

UpdateWithRecreate returns true if a VRF update needs to be performed via re-crate.

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