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)
- func (m *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface
- func (m *BridgeDomain) GetName() string
- func (*BridgeDomain) ProtoMessage()
- func (m *BridgeDomain) Reset()
- func (m *BridgeDomain) String() string
- func (m *BridgeDomain) XXX_DiscardUnknown()
- func (m *BridgeDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BridgeDomain) XXX_Merge(src proto.Message)
- func (m *BridgeDomain) XXX_Size() int
- func (m *BridgeDomain) XXX_Unmarshal(b []byte) error
- type BridgeDomain_Interface
- func (*BridgeDomain_Interface) Descriptor() ([]byte, []int)
- func (m *BridgeDomain_Interface) GetBridgedVirtualInterface() bool
- func (m *BridgeDomain_Interface) GetName() string
- func (*BridgeDomain_Interface) ProtoMessage()
- func (m *BridgeDomain_Interface) Reset()
- func (m *BridgeDomain_Interface) String() string
- func (m *BridgeDomain_Interface) XXX_DiscardUnknown()
- func (m *BridgeDomain_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BridgeDomain_Interface) XXX_Merge(src proto.Message)
- func (m *BridgeDomain_Interface) XXX_Size() int
- func (m *BridgeDomain_Interface) XXX_Unmarshal(b []byte) error
- type FIBEntry
- func (*FIBEntry) Descriptor() ([]byte, []int)
- func (m *FIBEntry) GetAction() FIBEntry_Action
- func (m *FIBEntry) GetBridgeDomain() string
- func (m *FIBEntry) GetOutgoingInterface() string
- func (m *FIBEntry) GetPhysAddress() string
- func (*FIBEntry) ProtoMessage()
- func (m *FIBEntry) Reset()
- func (m *FIBEntry) String() string
- func (m *FIBEntry) XXX_DiscardUnknown()
- func (m *FIBEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FIBEntry) XXX_Merge(src proto.Message)
- func (m *FIBEntry) XXX_Size() int
- func (m *FIBEntry) XXX_Unmarshal(b []byte) error
- type FIBEntry_Action
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 ( 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 FIBEntry_Action_name = map[int32]string{
0: "FORWARD",
1: "DROP",
}
View Source
var FIBEntry_Action_value = map[string]int32{
"FORWARD": 0,
"DROP": 1,
}
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"` Interfaces []*BridgeDomain_Interface `protobuf:"bytes,10,rep,name=interfaces,proto3" json:"interfaces,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BridgeDomain) Descriptor ¶
func (*BridgeDomain) Descriptor() ([]byte, []int)
func (*BridgeDomain) GetInterfaces ¶
func (m *BridgeDomain) GetInterfaces() []*BridgeDomain_Interface
func (*BridgeDomain) GetName ¶
func (m *BridgeDomain) GetName() string
func (*BridgeDomain) ProtoMessage ¶
func (*BridgeDomain) ProtoMessage()
func (*BridgeDomain) Reset ¶
func (m *BridgeDomain) Reset()
func (*BridgeDomain) String ¶
func (m *BridgeDomain) String() string
func (*BridgeDomain) XXX_DiscardUnknown ¶
func (m *BridgeDomain) XXX_DiscardUnknown()
func (*BridgeDomain) XXX_Marshal ¶
func (m *BridgeDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BridgeDomain) XXX_Merge ¶
func (m *BridgeDomain) XXX_Merge(src proto.Message)
func (*BridgeDomain) XXX_Size ¶
func (m *BridgeDomain) XXX_Size() int
func (*BridgeDomain) XXX_Unmarshal ¶
func (m *BridgeDomain) XXX_Unmarshal(b []byte) error
type BridgeDomain_Interface ¶
type BridgeDomain_Interface struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` BridgedVirtualInterface bool `` /* 133-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BridgeDomain_Interface) Descriptor ¶
func (*BridgeDomain_Interface) Descriptor() ([]byte, []int)
func (*BridgeDomain_Interface) GetBridgedVirtualInterface ¶
func (m *BridgeDomain_Interface) GetBridgedVirtualInterface() bool
func (*BridgeDomain_Interface) GetName ¶
func (m *BridgeDomain_Interface) GetName() string
func (*BridgeDomain_Interface) ProtoMessage ¶
func (*BridgeDomain_Interface) ProtoMessage()
func (*BridgeDomain_Interface) Reset ¶
func (m *BridgeDomain_Interface) Reset()
func (*BridgeDomain_Interface) String ¶
func (m *BridgeDomain_Interface) String() string
func (*BridgeDomain_Interface) XXX_DiscardUnknown ¶
func (m *BridgeDomain_Interface) XXX_DiscardUnknown()
func (*BridgeDomain_Interface) XXX_Marshal ¶
func (m *BridgeDomain_Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BridgeDomain_Interface) XXX_Merge ¶
func (m *BridgeDomain_Interface) XXX_Merge(src proto.Message)
func (*BridgeDomain_Interface) XXX_Size ¶
func (m *BridgeDomain_Interface) XXX_Size() int
func (*BridgeDomain_Interface) XXX_Unmarshal ¶
func (m *BridgeDomain_Interface) XXX_Unmarshal(b []byte) error
type FIBEntry ¶
type FIBEntry struct { PhysAddress string `protobuf:"bytes,1,opt,name=phys_address,json=physAddress,proto3" json:"phys_address,omitempty"` BridgeDomain string `protobuf:"bytes,2,opt,name=bridge_domain,json=bridgeDomain,proto3" json:"bridge_domain,omitempty"` Action FIBEntry_Action `protobuf:"varint,3,opt,name=action,proto3,enum=mock.l2.FIBEntry_Action" json:"action,omitempty"` OutgoingInterface string `protobuf:"bytes,4,opt,name=outgoing_interface,json=outgoingInterface,proto3" json:"outgoing_interface,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*FIBEntry) Descriptor ¶
func (*FIBEntry) GetAction ¶
func (m *FIBEntry) GetAction() FIBEntry_Action
func (*FIBEntry) GetBridgeDomain ¶
func (*FIBEntry) GetOutgoingInterface ¶
func (*FIBEntry) GetPhysAddress ¶
func (*FIBEntry) ProtoMessage ¶
func (*FIBEntry) ProtoMessage()
func (*FIBEntry) XXX_DiscardUnknown ¶
func (m *FIBEntry) XXX_DiscardUnknown()
func (*FIBEntry) XXX_Marshal ¶
func (*FIBEntry) XXX_Unmarshal ¶
type FIBEntry_Action ¶
type FIBEntry_Action int32
const ( FIBEntry_FORWARD FIBEntry_Action = 0 FIBEntry_DROP FIBEntry_Action = 1 )
func (FIBEntry_Action) EnumDescriptor ¶
func (FIBEntry_Action) EnumDescriptor() ([]byte, []int)
func (FIBEntry_Action) String ¶
func (x FIBEntry_Action) String() string
Click to show internal directories.
Click to hide internal directories.