mockcalls

package
v2.4.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 5 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBDAPI

type MockBDAPI interface {
	MockBDWrite
	MockBDRead
}

MockBDAPI provides methods for managing bridge domains in the mock SB.

func NewMockBDHandler

func NewMockBDHandler(ifaceIndex idxvpp.NameToIndex, log logging.Logger) MockBDAPI

NewMockBDHandler creates new instance of bridge domain handler for mock SB.

type MockBDHandler

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

MockBDHandler is accessor for bridge domain-related calls into mock SB.

func (*MockBDHandler) AddInterfaceToBridgeDomain

func (h *MockBDHandler) AddInterfaceToBridgeDomain(sbBDHandle uint32, ifaceName string, isBVI bool) error

AddInterfaceToBridgeDomain puts interface into bridge domain.

func (*MockBDHandler) CreateBridgeDomain

func (h *MockBDHandler) CreateBridgeDomain(bdName string) (sbBDHandle uint32, err error)

CreateBridgeDomain creates new bridge domain in the mock SB.

func (*MockBDHandler) DeleteBridgeDomain

func (h *MockBDHandler) DeleteBridgeDomain(sbBDHandle uint32) error

DeleteBridgeDomain removes existing bridge domain from the mock SB.

func (*MockBDHandler) DeleteInterfaceFromBridgeDomain

func (h *MockBDHandler) DeleteInterfaceFromBridgeDomain(sbBDHandle uint32, ifaceName string) error

DeleteInterfaceFromBridgeDomain removes interface from bridge domain.

func (*MockBDHandler) DumpBridgeDomains

func (h *MockBDHandler) DumpBridgeDomains() (mockBDs, error)

DumpBridgeDomains dumps bridge domains "configured" in the mock SB.

type MockBDRead

type MockBDRead interface {
	// DumpBridgeDomains dumps bridge domains "configured" in the mock SB.
	DumpBridgeDomains() (mockBDs, error)
}

MockBDRead provides read methods for bridge domains.

type MockBDWrite

type MockBDWrite interface {
	// CreateBridgeDomain creates new bridge domain in the mock SB.
	CreateBridgeDomain(bdName string) (sbBDHandle uint32, err error)
	// DeleteBridgeDomain removes existing bridge domain from the mock SB.
	DeleteBridgeDomain(sbBDHandle uint32) error
	// AddInterfaceToBridgeDomain puts interface into bridge domain.
	AddInterfaceToBridgeDomain(sbBDHandle uint32, ifaceName string, isBVI bool) error
	// DeleteInterfaceFromBridgeDomain removes interface from bridge domain.
	DeleteInterfaceFromBridgeDomain(sbBDHandle uint32, ifaceName string) error
}

MockBDWrite provides write methods for bridge domains.

type MockFIBAPI

type MockFIBAPI interface {
	MockFIBWrite
	MockFIBRead
}

MockFIBAPI provides methods for managing FIBs.

func NewMockFIBHandler

func NewMockFIBHandler(ifaceIndex idxvpp.NameToIndex, bdIndexes idxvpp.NameToIndex,
	log logging.Logger) MockFIBAPI

NewMockFIBHandler creates new instance of FIB handler for mock SB.

type MockFIBHandler

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

MockFIBHandler is accessor for FIB-related calls into mock SB.

func (*MockFIBHandler) CreateL2FIB

func (h *MockFIBHandler) CreateL2FIB(fib *l2.FIBEntry) error

CreateL2FIB creates L2 FIB table entry in the mock SB.

func (*MockFIBHandler) DeleteL2FIB

func (h *MockFIBHandler) DeleteL2FIB(fib *l2.FIBEntry) error

DeleteL2FIB removes existing L2 FIB table entry from the mock SB.

func (*MockFIBHandler) DumpL2FIBs

func (h *MockFIBHandler) DumpL2FIBs() ([]*l2.FIBEntry, error)

DumpL2FIBs dumps L2 FIB table entries "configured" in the mock SB.

type MockFIBRead

type MockFIBRead interface {
	// DumpL2FIBs dumps L2 FIB table entries "configured" in the mock SB.
	DumpL2FIBs() ([]*l2.FIBEntry, error)
}

MockFIBRead provides read methods for FIBs.

type MockFIBWrite

type MockFIBWrite interface {
	// CreateL2FIB creates L2 FIB table entry in the mock SB.
	CreateL2FIB(fib *l2.FIBEntry) error
	// DeleteL2FIB removes existing L2 FIB table entry from the mock SB.
	DeleteL2FIB(fib *l2.FIBEntry) error
}

MockFIBWrite provides write methods for FIBs.

Jump to

Keyboard shortcuts

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