Documentation ¶
Index ¶
- func ParseIPv6(str string) (net.IP, error)
- type NamedPolicySegment
- type NamedSteering
- type SRv6Configurator
- func (c *SRv6Configurator) AddLocalSID(value *srv6.LocalSID) error
- func (c *SRv6Configurator) AddPolicy(policy *srv6.Policy) error
- func (c *SRv6Configurator) AddPolicySegment(segmentName string, policySegment *srv6.PolicySegment) error
- func (c *SRv6Configurator) AddSteering(name string, steering *srv6.Steering) error
- func (c *SRv6Configurator) Close() error
- func (c *SRv6Configurator) DeleteLocalSID(value *srv6.LocalSID) error
- func (c *SRv6Configurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, ...) (err error)
- func (c *SRv6Configurator) LogError(err error) error
- func (c *SRv6Configurator) ModifyLocalSID(value *srv6.LocalSID, prevValue *srv6.LocalSID) error
- func (c *SRv6Configurator) ModifyPolicy(value *srv6.Policy, prevValue *srv6.Policy) error
- func (c *SRv6Configurator) ModifyPolicySegment(segmentName string, value *srv6.PolicySegment, prevValue *srv6.PolicySegment) error
- func (c *SRv6Configurator) ModifySteering(name string, value *srv6.Steering, prevValue *srv6.Steering) error
- func (c *SRv6Configurator) RemovePolicy(policy *srv6.Policy) error
- func (c *SRv6Configurator) RemovePolicySegment(segmentName string, policySegment *srv6.PolicySegment) error
- func (c *SRv6Configurator) RemoveSteering(name string, steering *srv6.Steering) error
- func (c *SRv6Configurator) Resync(localSids []*srv6.LocalSID, policies []*srv6.Policy, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NamedPolicySegment ¶
type NamedPolicySegment struct { Name string /* unique identifiable name */ Segment *srv6.PolicySegment }
NamedPolicySegment represents named policy segment. TODO: move unique identifiable name into srv6 models
type NamedSteering ¶
NamedSteering represents named steetring.
type SRv6Configurator ¶
type SRv6Configurator struct {
// contains filtered or unexported fields
}
SRv6Configurator runs in the background where it watches for any changes in the configuration of interfaces as modelled by the proto file "../model/srv6/srv6.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/vpp/config/v1/srv6".
func (*SRv6Configurator) AddLocalSID ¶
func (c *SRv6Configurator) AddLocalSID(value *srv6.LocalSID) error
AddLocalSID adds new Local SID into VPP using VPP's binary api
func (*SRv6Configurator) AddPolicy ¶
func (c *SRv6Configurator) AddPolicy(policy *srv6.Policy) error
AddPolicy adds new policy into VPP using VPP's binary api
func (*SRv6Configurator) AddPolicySegment ¶
func (c *SRv6Configurator) AddPolicySegment(segmentName string, policySegment *srv6.PolicySegment) error
AddPolicySegment adds policy segment <policySegment> with name <segmentName> into referenced policy in VPP using VPP's binary api.
func (*SRv6Configurator) AddSteering ¶
func (c *SRv6Configurator) AddSteering(name string, steering *srv6.Steering) error
AddSteering adds new steering into VPP using VPP's binary api
func (*SRv6Configurator) Close ¶
func (c *SRv6Configurator) Close() error
Close closes GOVPP channel
func (*SRv6Configurator) DeleteLocalSID ¶
func (c *SRv6Configurator) DeleteLocalSID(value *srv6.LocalSID) error
DeleteLocalSID removes Local SID from VPP using VPP's binary api
func (*SRv6Configurator) Init ¶
func (c *SRv6Configurator) Init(logger logging.PluginLogger, goVppMux govppmux.API, swIfIndexes ifaceidx.SwIfIndex, srHandler vppcalls.SRv6VppAPI) (err error)
Init members
func (*SRv6Configurator) LogError ¶ added in v1.8.1
func (c *SRv6Configurator) LogError(err error) error
LogError prints error if not nil, including stack trace. The same value is also returned, so it can be easily propagated further
func (*SRv6Configurator) ModifyLocalSID ¶
ModifyLocalSID modifies Local SID from <prevValue> to <value> in VPP using VPP's binary api
func (*SRv6Configurator) ModifyPolicy ¶
ModifyPolicy modifies policy in VPP using VPP's binary api
func (*SRv6Configurator) ModifyPolicySegment ¶
func (c *SRv6Configurator) ModifyPolicySegment(segmentName string, value *srv6.PolicySegment, prevValue *srv6.PolicySegment) error
ModifyPolicySegment modifies existing policy segment with name <segmentName> from <prevValue> to <value> in referenced policy.
func (*SRv6Configurator) ModifySteering ¶
func (c *SRv6Configurator) ModifySteering(name string, value *srv6.Steering, prevValue *srv6.Steering) error
ModifySteering modifies existing steering in VPP using VPP's binary api
func (*SRv6Configurator) RemovePolicy ¶
func (c *SRv6Configurator) RemovePolicy(policy *srv6.Policy) error
RemovePolicy removes policy from VPP using VPP's binary api
func (*SRv6Configurator) RemovePolicySegment ¶
func (c *SRv6Configurator) RemovePolicySegment(segmentName string, policySegment *srv6.PolicySegment) error
RemovePolicySegment removes policy segment <policySegment> with name <segmentName> from referenced policy in VPP using VPP's binary api. In case of last policy segment in policy, policy segment is not removed, because policy can't exists in VPP without policy segment. Instead it is postponed until policy removal or addition of another policy segment happen.
func (*SRv6Configurator) RemoveSteering ¶
func (c *SRv6Configurator) RemoveSteering(name string, steering *srv6.Steering) error
RemoveSteering removes steering from VPP using VPP's binary api
func (*SRv6Configurator) Resync ¶
func (c *SRv6Configurator) Resync(localSids []*srv6.LocalSID, policies []*srv6.Policy, namedSegments []*NamedPolicySegment, namedSteerings []*NamedSteering) error
Resync writes missing segment routing configs to the VPP and removes obsolete ones.
Directories ¶
Path | Synopsis |
---|---|
Package cache contains caches for certain modeled types.
|
Package cache contains caches for certain modeled types. |
Package vppcalls contains wrappers over VPP binary APIs to simplify their usage
|
Package vppcalls contains wrappers over VPP binary APIs to simplify their usage |