Documentation ¶
Index ¶
- Constants
- Variables
- func NewFPFeatureDescriptor(ipfixHandler vppcalls.IpfixVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
- func NewFPParamsDescriptor(ipfixHandler vppcalls.IpfixVppAPI, featureMap idxmap.NamedMapping, ...) *kvs.KVDescriptor
- func NewIPFIXDescriptor(ipfixHandler vppcalls.IpfixVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
- type FPFeatureDescriptor
- func (d *FPFeatureDescriptor) Create(key string, val *ipfix.FlowProbeFeature) (metadata interface{}, err error)
- func (d *FPFeatureDescriptor) Delete(key string, val *ipfix.FlowProbeFeature, metadata interface{}) (err error)
- func (d *FPFeatureDescriptor) Dependencies(key string, val *ipfix.FlowProbeFeature) []kvs.Dependency
- func (d *FPFeatureDescriptor) Retrieve(correlate []adapter.FlowProbeFeatureKVWithMetadata) (retrieved []adapter.FlowProbeFeatureKVWithMetadata, err error)
- func (d *FPFeatureDescriptor) Validate(key string, value *ipfix.FlowProbeFeature) error
- type FPParamsDescriptor
- func (d *FPParamsDescriptor) Create(key string, val *ipfix.FlowProbeParams) (metadata interface{}, err error)
- func (d *FPParamsDescriptor) Delete(key string, val *ipfix.FlowProbeParams, metadata interface{}) (err error)
- func (d *FPParamsDescriptor) IsRetriableFailure(err error) bool
- func (d *FPParamsDescriptor) Retrieve(correlate []adapter.FlowProbeParamsKVWithMetadata) (retrieved []adapter.FlowProbeParamsKVWithMetadata, err error)
- func (d *FPParamsDescriptor) Update(key string, oldVal, newVal *ipfix.FlowProbeParams, oldMetadata interface{}) (newMetadata interface{}, err error)
- func (d *FPParamsDescriptor) Validate(key string, value *ipfix.FlowProbeParams) error
- type IPFIXDescriptor
- func (d *IPFIXDescriptor) Create(key string, val *ipfix.IPFIX) (metadata interface{}, err error)
- func (d *IPFIXDescriptor) Delete(key string, val *ipfix.IPFIX, metadata interface{}) (err error)
- func (d *IPFIXDescriptor) EquivalentIPFIX(key string, oldValue, newValue *ipfix.IPFIX) bool
- func (d *IPFIXDescriptor) Retrieve(correlate []adapter.IPFIXKVWithMetadata) (retrieved []adapter.IPFIXKVWithMetadata, err error)
- func (d *IPFIXDescriptor) Update(key string, oldVal, newVal *ipfix.IPFIX, oldMetadata interface{}) (newMetadata interface{}, err error)
- func (d *IPFIXDescriptor) Validate(key string, value *ipfix.IPFIX) error
Constants ¶
const ( // FPFeatureDescriptorName is the name of the descriptor for // VPP Flowprobe Feature configuration. FPFeatureDescriptorName = "vpp-flowprobe-feature" )
const ( // FPParamsDescriptorName is the name of the descriptor for // VPP Flowprobe Params configuration. FPParamsDescriptorName = "vpp-flowprobe-params" )
const ( // IPFIXDescriptorName is the name of the descriptor for // VPP IP Flow Information eXport (IPFIX) configuration. IPFIXDescriptorName = "vpp-ipfix" )
Variables ¶
var ( // ErrAllRecordFieldsDisabled returned when all record fields are set to false. ErrAllRecordFieldsDisabled = errors.New("at least one of record fields (l2, l3, l4) must be set") // ErrFeatureEnabled informs the reason why Flowprobe Params can not be changed. ErrFeatureEnabled = errors.New("can not change Flowprobe Params when Flowprobe Feature enabled on some interface") )
var ( // ErrColAddrNotDefined returned when collector address in confiugration is empty string. ErrColAddrNotDefined = errors.New("address of a collector was not provided") // ErrSrcAddrNotDefined returned when source address in confiugration is empty string. ErrSrcAddrNotDefined = errors.New("address of a source was not provided") // ErrTooBigMTU informs about the maximum value for Path MTU. ErrTooBigMTU = errors.New("too big value, maximum is 1450") // ErrTooSmlMTU informs about the minimum value for Path MTU. ErrTooSmlMTU = errors.New("too small value, minimum is 68") )
Validation errors:
var ( // ErrIfaceNotDefined returned when interface in confiugration is empty string. ErrIfaceNotDefined = errors.New("missing interface name for Flowprobe Feature") )
Validation errors:
Functions ¶
func NewFPFeatureDescriptor ¶
func NewFPFeatureDescriptor(ipfixHandler vppcalls.IpfixVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewFPFeatureDescriptor creates a new instance of FPFeatureDescriptor.
func NewFPParamsDescriptor ¶
func NewFPParamsDescriptor(ipfixHandler vppcalls.IpfixVppAPI, featureMap idxmap.NamedMapping, log logging.PluginLogger) *kvs.KVDescriptor
NewFPParamsDescriptor creates a new instance of FPParamsDescriptor.
func NewIPFIXDescriptor ¶
func NewIPFIXDescriptor(ipfixHandler vppcalls.IpfixVppAPI, log logging.PluginLogger) *kvs.KVDescriptor
NewIPFIXDescriptor creates a new instance of IPFIXDescriptor.
Types ¶
type FPFeatureDescriptor ¶
type FPFeatureDescriptor struct {
// contains filtered or unexported fields
}
FPFeatureDescriptor configures Flowprobe Feature for VPP.
func (*FPFeatureDescriptor) Create ¶
func (d *FPFeatureDescriptor) Create(key string, val *ipfix.FlowProbeFeature) (metadata interface{}, err error)
Create uses vppcalls to pass Flowprobe Feature configuration for interface to VPP.
func (*FPFeatureDescriptor) Delete ¶
func (d *FPFeatureDescriptor) Delete(key string, val *ipfix.FlowProbeFeature, metadata interface{}) (err error)
Delete uses vppcalls to remove Flowprobe Feature configuration for interface.
func (*FPFeatureDescriptor) Dependencies ¶
func (d *FPFeatureDescriptor) Dependencies(key string, val *ipfix.FlowProbeFeature) []kvs.Dependency
Dependencies sets Flowprobe Params as a dependency which must be created before enabling Flowprobe Feature on an interface.
func (*FPFeatureDescriptor) Retrieve ¶
func (d *FPFeatureDescriptor) Retrieve(correlate []adapter.FlowProbeFeatureKVWithMetadata) (retrieved []adapter.FlowProbeFeatureKVWithMetadata, err error)
Retrieve hopes that configuration in correlate is actual configuration in VPP. As soon as VPP devs will add dump API calls, this methods should be fixed. TODO: waiting for https://jira.fd.io/browse/VPP-1861.
Also, this method sets metadata, so descriptor for Flowprobe Params would know that there are some interfaces with Flowprobe Feature enabled.
func (*FPFeatureDescriptor) Validate ¶
func (d *FPFeatureDescriptor) Validate(key string, value *ipfix.FlowProbeFeature) error
Validate checks if Flowprobe Feature configuration is good to send to VPP.
type FPParamsDescriptor ¶
type FPParamsDescriptor struct {
// contains filtered or unexported fields
}
FPParamsDescriptor configures Flowprobe Params for VPP.
func (*FPParamsDescriptor) Create ¶
func (d *FPParamsDescriptor) Create(key string, val *ipfix.FlowProbeParams) (metadata interface{}, err error)
Create passes Flowprobe Params to Update method.
func (*FPParamsDescriptor) Delete ¶
func (d *FPParamsDescriptor) Delete(key string, val *ipfix.FlowProbeParams, metadata interface{}) (err error)
Delete does nothing.
Since all Flowprobe Features are dependent on Flowprobe Params, calling this method will also disable (move to "pending" state) all Flowprobe Features on interfaces.
All the work will be done by KVScheduler :)
func (*FPParamsDescriptor) IsRetriableFailure ¶
func (d *FPParamsDescriptor) IsRetriableFailure(err error) bool
IsRetriableFailure returns false if error is one of errors defined at the top of this file as non-retriable.
func (*FPParamsDescriptor) Retrieve ¶
func (d *FPParamsDescriptor) Retrieve(correlate []adapter.FlowProbeParamsKVWithMetadata) (retrieved []adapter.FlowProbeParamsKVWithMetadata, err error)
Retrieve hopes that configuration in correlate is actual configuration in VPP. As soon as VPP devs will add dump API calls, this methods should be fixed.
func (*FPParamsDescriptor) Update ¶
func (d *FPParamsDescriptor) Update(key string, oldVal, newVal *ipfix.FlowProbeParams, oldMetadata interface{}) (newMetadata interface{}, err error)
Update uses vppcalls to pass Flowprobe Params to VPP.
func (*FPParamsDescriptor) Validate ¶
func (d *FPParamsDescriptor) Validate(key string, value *ipfix.FlowProbeParams) error
Validate checks if Flowprobe Params are good to send to VPP.
type IPFIXDescriptor ¶
type IPFIXDescriptor struct {
// contains filtered or unexported fields
}
IPFIXDescriptor configures IPFIX for VPP.
func (*IPFIXDescriptor) Create ¶
func (d *IPFIXDescriptor) Create(key string, val *ipfix.IPFIX) (metadata interface{}, err error)
Create calls Update method, because IPFIX configuration is always there and can not be created.
func (*IPFIXDescriptor) Delete ¶
func (d *IPFIXDescriptor) Delete(key string, val *ipfix.IPFIX, metadata interface{}) (err error)
Delete does nothing, because there are neither ability nor reasons to delete VPP IPFIX configuration. You can only configure exporting in a way you want to.
func (*IPFIXDescriptor) EquivalentIPFIX ¶
func (d *IPFIXDescriptor) EquivalentIPFIX(key string, oldValue, newValue *ipfix.IPFIX) bool
EquivalentIPFIX returns true if two IPFIX configurations are equal.
func (*IPFIXDescriptor) Retrieve ¶
func (d *IPFIXDescriptor) Retrieve(correlate []adapter.IPFIXKVWithMetadata) (retrieved []adapter.IPFIXKVWithMetadata, err error)
Retrieve returns configuration of IP Flow Infromation eXporter.