vppcallfake

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package vppcallfake contains fake implementation of interface vppcalls.SRv6Calls

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddLocalSidFuncCall

type AddLocalSidFuncCall struct{}

AddLocalSidFuncCall is reference to function AddLocalSid and it used for as failure target reference for failure cases

type AddPolicyFuncCall

type AddPolicyFuncCall struct{}

AddPolicyFuncCall is reference to function AddPolicy and it used for as failure target reference for failure cases

type AddPolicySegmentFuncCall

type AddPolicySegmentFuncCall struct{}

AddPolicySegmentFuncCall is reference to function AddPolicySegment and it used for as failure target reference for failure cases

type AddSteeringFuncCall

type AddSteeringFuncCall struct{}

AddSteeringFuncCall is reference to function AddSteering and it used for as failure target reference for failure cases

type DeleteLocalSidFuncCall

type DeleteLocalSidFuncCall struct{}

DeleteLocalSidFuncCall is reference to function DeleteLocalSid and it used for as failure target reference for failure cases

type DeletePolicyFuncCall

type DeletePolicyFuncCall struct{}

DeletePolicyFuncCall is reference to function DeletePolicy and it used for as failure target reference for failure cases

type DeletePolicySegmentFuncCall

type DeletePolicySegmentFuncCall struct{}

DeletePolicySegmentFuncCall is reference to function DeletePolicySegment and it used for as failure target reference for failure cases

type PolicyState

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

PolicyState is holder for one policy and its segments

func (*PolicyState) Policy

func (ps *PolicyState) Policy() *srv6.Policy

Policy provides policy reference from PolicyState

func (*PolicyState) Segments

func (ps *PolicyState) Segments() []*srv6.PolicySegment

Segments provides segments reference from PolicyState

type RemoveSteeringFuncCall

type RemoveSteeringFuncCall struct{}

RemoveSteeringFuncCall is reference to function RemoveSteering and it used for as failure target reference for failure cases

type SRv6Calls

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

SRv6Calls is fake implementation of vppcalls.SRv6Calls used for testing purposes

func NewSRv6Calls

func NewSRv6Calls() *SRv6Calls

NewSRv6Calls creates new SRv6Calls (fake implementation of vppcalls.SRv6Calls)

func (*SRv6Calls) AddLocalSid

func (fake *SRv6Calls) AddLocalSid(sidAddr net.IP, localSID *srv6.LocalSID, swIfIndex ifaceidx.SwIfIndex, vppChan vppcalls.VPPChannel) error

AddLocalSid adds local sid given by <sidAddr> and <localSID> into VPP

func (*SRv6Calls) AddPolicy

func (fake *SRv6Calls) AddPolicy(bindingSid net.IP, policy *srv6.Policy, policySegment *srv6.PolicySegment, vppChan vppcalls.VPPChannel) error

AddPolicy adds SRv6 policy given by identified <bindingSid>,initial segment for policy <policySegment> and other policy settings in <policy>

func (*SRv6Calls) AddPolicySegment

func (fake *SRv6Calls) AddPolicySegment(bindingSid net.IP, policy *srv6.Policy, policySegment *srv6.PolicySegment, vppChan vppcalls.VPPChannel) error

AddPolicySegment adds segment <policySegment> to SRv6 policy <policy> that has policy BSID <bindingSid>

func (*SRv6Calls) AddSteering

func (fake *SRv6Calls) AddSteering(steering *srv6.Steering, swIfIndex ifaceidx.SwIfIndex, vppChan vppcalls.VPPChannel) error

AddSteering sets in VPP steering into SRv6 policy.

func (*SRv6Calls) DeleteLocalSid

func (fake *SRv6Calls) DeleteLocalSid(sidAddr net.IP, vppChan vppcalls.VPPChannel) error

DeleteLocalSid delets local sid given by <sidAddr> in VPP

func (*SRv6Calls) DeletePolicy

func (fake *SRv6Calls) DeletePolicy(bindingSid net.IP, vppChan vppcalls.VPPChannel) error

DeletePolicy deletes SRv6 policy given by binding SID <bindingSid>

func (*SRv6Calls) DeletePolicySegment

func (fake *SRv6Calls) DeletePolicySegment(bindingSid net.IP, policy *srv6.Policy, policySegment *srv6.PolicySegment,
	segmentIndex uint32, vppChan vppcalls.VPPChannel) error

DeletePolicySegment removes segment <policySegment> (with segment index <segmentIndex>) from SRv6 policy <policy> that has policy BSID <bindingSid>

func (*SRv6Calls) FailIn

func (fake *SRv6Calls) FailIn(funcCall interface{}, err error)

FailIn makes SRv6Calls fake to fail in given function call <funcCall> with given error <err>

func (*SRv6Calls) LocalSIDState

func (fake *SRv6Calls) LocalSIDState() map[string]*srv6.LocalSID

LocalSIDState provides current state of local sids as changed by calls to SRv6Calls fake

func (*SRv6Calls) PoliciesState

func (fake *SRv6Calls) PoliciesState() map[string]*PolicyState

PoliciesState provides current state of policies as changed by calls to SRv6Calls fake

func (*SRv6Calls) RemoveSteering

func (fake *SRv6Calls) RemoveSteering(steering *srv6.Steering, swIfIndex ifaceidx.SwIfIndex, vppChan vppcalls.VPPChannel) error

RemoveSteering removes in VPP steering into SRv6 policy.

func (*SRv6Calls) SetEncapsSourceAddress

func (fake *SRv6Calls) SetEncapsSourceAddress(address string, vppChan vppcalls.VPPChannel) error

SetEncapsSourceAddress sets for SRv6 in VPP the source address used for encapsulated packet

func (*SRv6Calls) SteeringState

func (fake *SRv6Calls) SteeringState() map[srv6.Steering]struct{}

SteeringState provides current state of steerings as changed by calls to SRv6Calls fake

type SetEncapsSourceAddressFuncCall

type SetEncapsSourceAddressFuncCall struct{}

SetEncapsSourceAddressFuncCall is reference to function SetEncapsSourceAddress and it used for as failure target reference for failure cases

Jump to

Keyboard shortcuts

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