Documentation ¶
Index ¶
- Constants
- Variables
- func BDInterfaceKey(bdName string, iface string) string
- func BridgeDomainKey(bdName string) string
- func FIBKey(bdName string, fibMac string) string
- func ParseBDInterfaceKey(key string) (bdName string, iface string, isBDIfaceKey bool)
- type BridgeDomain
- func (*BridgeDomain) Descriptor() ([]byte, []int)deprecated
- func (x *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface
- func (x *BridgeDomain) GetName() string
- func (*BridgeDomain) ProtoMessage()
- func (x *BridgeDomain) ProtoReflect() protoreflect.Message
- func (x *BridgeDomain) Reset()
- func (x *BridgeDomain) String() string
- type BridgeDomain_Interface
- func (*BridgeDomain_Interface) Descriptor() ([]byte, []int)deprecated
- func (x *BridgeDomain_Interface) GetBridgedVirtualInterface() bool
- func (x *BridgeDomain_Interface) GetName() string
- func (*BridgeDomain_Interface) ProtoMessage()
- func (x *BridgeDomain_Interface) ProtoReflect() protoreflect.Message
- func (x *BridgeDomain_Interface) Reset()
- func (x *BridgeDomain_Interface) String() string
- type FIBEntry
- func (*FIBEntry) Descriptor() ([]byte, []int)deprecated
- func (x *FIBEntry) GetAction() FIBEntry_Action
- func (x *FIBEntry) GetBridgeDomain() string
- func (x *FIBEntry) GetOutgoingInterface() string
- func (x *FIBEntry) GetPhysAddress() string
- func (*FIBEntry) ProtoMessage()
- func (x *FIBEntry) ProtoReflect() protoreflect.Message
- func (x *FIBEntry) Reset()
- func (x *FIBEntry) String() string
- type FIBEntry_Action
- func (FIBEntry_Action) Descriptor() protoreflect.EnumDescriptor
- func (x FIBEntry_Action) Enum() *FIBEntry_Action
- func (FIBEntry_Action) EnumDescriptor() ([]byte, []int)deprecated
- func (x FIBEntry_Action) Number() protoreflect.EnumNumber
- func (x FIBEntry_Action) String() string
- func (FIBEntry_Action) Type() protoreflect.EnumType
Constants ¶
View Source
const (
// InvalidKeyPart is used in key for parts which are invalid
InvalidKeyPart = "<invalid>"
)
View Source
const ModuleName = "mock"
ModuleName is the module name used for models of the mock l2plugin.
Variables ¶
View Source
var ( FIBEntry_Action_name = map[int32]string{ 0: "FORWARD", 1: "DROP", } FIBEntry_Action_value = map[string]int32{ "FORWARD": 0, "DROP": 1, } )
Enum value maps for FIBEntry_Action.
View Source
var ( ModelBridgeDomain = models.Register(&BridgeDomain{}, models.Spec{ Module: ModuleName, Type: "bridge-domain", Version: "v1", }) ModelFIBEntry = models.Register(&FIBEntry{}, models.Spec{ Module: ModuleName, Type: "fib", Version: "v1", }, models.WithNameTemplate("{{.BridgeDomain}}/mac/{{.PhysAddress}}")) )
View Source
var File_model_bridge_domain_proto protoreflect.FileDescriptor
View Source
var File_model_fib_proto protoreflect.FileDescriptor
Functions ¶
func BDInterfaceKey ¶
BDInterfaceKey returns the key used to represent binding between the given interface and the bridge domain.
func BridgeDomainKey ¶
BridgeDomainKey returns the key used in NB DB to store the configuration of the given mock bridge domain.
Types ¶
type BridgeDomain ¶
type BridgeDomain struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // bridge domain name Interfaces []*BridgeDomain_Interface `protobuf:"bytes,10,rep,name=interfaces,proto3" json:"interfaces,omitempty"` // list of interfaces // contains filtered or unexported fields }
func (*BridgeDomain) Descriptor
deprecated
func (*BridgeDomain) Descriptor() ([]byte, []int)
Deprecated: Use BridgeDomain.ProtoReflect.Descriptor instead.
func (*BridgeDomain) GetInterfaces ¶
func (x *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface
func (*BridgeDomain) GetName ¶
func (x *BridgeDomain) GetName() string
func (*BridgeDomain) ProtoMessage ¶
func (*BridgeDomain) ProtoMessage()
func (*BridgeDomain) ProtoReflect ¶ added in v3.3.0
func (x *BridgeDomain) ProtoReflect() protoreflect.Message
func (*BridgeDomain) Reset ¶
func (x *BridgeDomain) Reset()
func (*BridgeDomain) String ¶
func (x *BridgeDomain) String() string
type BridgeDomain_Interface ¶
type BridgeDomain_Interface struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // interface name belonging to this bridge domain BridgedVirtualInterface bool `` // true if this is a BVI interface /* 133-byte string literal not displayed */ // contains filtered or unexported fields }
func (*BridgeDomain_Interface) Descriptor
deprecated
func (*BridgeDomain_Interface) Descriptor() ([]byte, []int)
Deprecated: Use BridgeDomain_Interface.ProtoReflect.Descriptor instead.
func (*BridgeDomain_Interface) GetBridgedVirtualInterface ¶
func (x *BridgeDomain_Interface) GetBridgedVirtualInterface() bool
func (*BridgeDomain_Interface) GetName ¶
func (x *BridgeDomain_Interface) GetName() string
func (*BridgeDomain_Interface) ProtoMessage ¶
func (*BridgeDomain_Interface) ProtoMessage()
func (*BridgeDomain_Interface) ProtoReflect ¶ added in v3.3.0
func (x *BridgeDomain_Interface) ProtoReflect() protoreflect.Message
func (*BridgeDomain_Interface) Reset ¶
func (x *BridgeDomain_Interface) Reset()
func (*BridgeDomain_Interface) String ¶
func (x *BridgeDomain_Interface) String() string
type FIBEntry ¶
type FIBEntry struct { PhysAddress string `protobuf:"bytes,1,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` // unique destination MAC address BridgeDomain string `protobuf:"bytes,2,opt,name=bridge_domain,json=bridgeDomain,proto3" json:"bridge_domain,omitempty"` // name of bridge domain this FIB table entry belongs to Action FIBEntry_Action `protobuf:"varint,3,opt,name=action,proto3,enum=mock.l2.FIBEntry_Action" json:"action,omitempty"` // action to tke on matching frames OutgoingInterface string `protobuf:"bytes,4,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` // outgoing interface for matching frames // contains filtered or unexported fields }
func (*FIBEntry) Descriptor
deprecated
func (*FIBEntry) GetAction ¶
func (x *FIBEntry) GetAction() FIBEntry_Action
func (*FIBEntry) GetBridgeDomain ¶
func (*FIBEntry) GetOutgoingInterface ¶
func (*FIBEntry) GetPhysAddress ¶
func (*FIBEntry) ProtoMessage ¶
func (*FIBEntry) ProtoMessage()
func (*FIBEntry) ProtoReflect ¶ added in v3.3.0
func (x *FIBEntry) ProtoReflect() protoreflect.Message
type FIBEntry_Action ¶
type FIBEntry_Action int32
const ( FIBEntry_FORWARD FIBEntry_Action = 0 // forward the matching frame FIBEntry_DROP FIBEntry_Action = 1 // drop the matching frame )
func (FIBEntry_Action) Descriptor ¶ added in v3.3.0
func (FIBEntry_Action) Descriptor() protoreflect.EnumDescriptor
func (FIBEntry_Action) Enum ¶ added in v3.3.0
func (x FIBEntry_Action) Enum() *FIBEntry_Action
func (FIBEntry_Action) EnumDescriptor
deprecated
func (FIBEntry_Action) EnumDescriptor() ([]byte, []int)
Deprecated: Use FIBEntry_Action.Descriptor instead.
func (FIBEntry_Action) Number ¶ added in v3.3.0
func (x FIBEntry_Action) Number() protoreflect.EnumNumber
func (FIBEntry_Action) String ¶
func (x FIBEntry_Action) String() string
func (FIBEntry_Action) Type ¶ added in v3.3.0
func (FIBEntry_Action) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.