Documentation ¶
Index ¶
- Constants
- Variables
- func CreateDefVrf()
- func CreateRoot(config *GBPServerConfig)
- func GetInvMoMap(vtep string) map[string]*gbpCommonMo
- func InitConfig(config *GBPServerConfig)
- func MakeHTTPHandler(handlerFunc httpAPIFunc) http.HandlerFunc
- func RegisterGBPServer(s grpc.ServiceRegistrar, srv GBPServer)
- func SendDefaultsToAPIC()
- func StartGRPC(port string, gs *Server) (*gbpWatch, error)
- func StringFromInfo(ver *VersionInfo) string
- func UuidToCid(uuid string) string
- func VersionString() string
- type ApicInfo
- type BDSubnet
- func (bds *BDSubnet) BDUri() string
- func (bds *BDSubnet) CreateBD()
- func (bds *BDSubnet) CreateEPG(name, uri string) *gbpBaseMo
- func (bds *BDSubnet) CreateFD()
- func (bds *BDSubnet) CreateSubnet()
- func (bds *BDSubnet) FDMcastUri() string
- func (bds *BDSubnet) FDToBDUri() string
- func (bds *BDSubnet) FDUri() string
- func (bds *BDSubnet) Setup()
- func (bds *BDSubnet) SnUri() string
- func (bds *BDSubnet) SubnetsUri() string
- type Contract
- type EPG
- type EmptyMsg
- type Endpoint
- type GBPAction
- type GBPBDToSubnets
- type GBPBDToVrf
- type GBPBridgeDomain
- func (g *GBPBridgeDomain) AddRef(refSubj, targetURI string) error
- func (bd *GBPBridgeDomain) AddSubnet() error
- func (g *GBPBridgeDomain) GetRefURIs(subject string) (map[string]string, error)
- func (bd *GBPBridgeDomain) Make(name, uri, subnetsUri string) error
- func (bd *GBPBridgeDomain) Validate() error
- type GBPClassifierRsrc
- type GBPClient
- type GBPContract
- type GBPCustomMo
- type GBPEPGToFD
- type GBPEPGToSnet
- type GBPEpGroup
- type GBPFDToBD
- type GBPFloodDomain
- type GBPFloodMcast
- type GBPL24Classifier
- type GBPMo
- type GBPObject
- func (*GBPObject) Descriptor() ([]byte, []int)deprecated
- func (x *GBPObject) GetChildren() []string
- func (x *GBPObject) GetParentRelation() string
- func (x *GBPObject) GetParentSubject() string
- func (x *GBPObject) GetParentUri() string
- func (x *GBPObject) GetProperties() []*Property
- func (x *GBPObject) GetSubject() string
- func (x *GBPObject) GetUri() string
- func (*GBPObject) ProtoMessage()
- func (x *GBPObject) ProtoReflect() protoreflect.Message
- func (x *GBPObject) Reset()
- func (x *GBPObject) String() string
- type GBPOperation
- func (*GBPOperation) Descriptor() ([]byte, []int)deprecated
- func (x *GBPOperation) GetObjectList() []*GBPObject
- func (x *GBPOperation) GetOpcode() GBPOperation_OpCode
- func (*GBPOperation) ProtoMessage()
- func (x *GBPOperation) ProtoReflect() protoreflect.Message
- func (x *GBPOperation) Reset()
- func (x *GBPOperation) String() string
- type GBPOperation_OpCode
- func (GBPOperation_OpCode) Descriptor() protoreflect.EnumDescriptor
- func (x GBPOperation_OpCode) Enum() *GBPOperation_OpCode
- func (GBPOperation_OpCode) EnumDescriptor() ([]byte, []int)deprecated
- func (x GBPOperation_OpCode) Number() protoreflect.EnumNumber
- func (x GBPOperation_OpCode) String() string
- func (GBPOperation_OpCode) Type() protoreflect.EnumType
- type GBPRoutingDomain
- type GBPRule
- type GBPRuleToAct
- type GBPRuleToClass
- type GBPServer
- type GBPServerConfig
- type GBPSubject
- type GBPSubnet
- type GBPSubnetSet
- type GBPVrfIntSubnet
- type GBP_ListObjectsClient
- type GBP_ListObjectsServer
- type GBPeInstContext
- type HpSubj
- type HpSubjChild
- type HpSubjGrandchild
- type Hpp
- type IntRange
- type ListResp
- type NetworkPolicy
- type ObjectList
- type PostResp
- type Property
- func (*Property) Descriptor() ([]byte, []int)deprecated
- func (x *Property) GetIntVal() int32
- func (x *Property) GetName() string
- func (x *Property) GetRefVal() *Reference
- func (x *Property) GetStrVal() string
- func (m *Property) GetValue() isProperty_Value
- func (p *Property) MarshalJSON() ([]byte, error)
- func (*Property) ProtoMessage()
- func (x *Property) ProtoReflect() protoreflect.Message
- func (x *Property) Reset()
- func (x *Property) String() string
- func (p *Property) UnmarshalJSON(data []byte) error
- type Property_IntVal
- type Property_RefVal
- type Property_StrVal
- type Reference
- type Server
- func (s *Server) AddContract(c Contract)
- func (s *Server) AddEP(ep Endpoint)
- func (s *Server) AddEPG(e EPG)
- func (s *Server) AddGBPCustomMo(crd GBPCustomMo)
- func (s *Server) AddNetPol(np NetworkPolicy)
- func (s *Server) Config() *GBPServerConfig
- func (s *Server) DelContract(c Contract)
- func (s *Server) DelEP(ep Endpoint)
- func (s *Server) DelEPG(e EPG)
- func (s *Server) DelGBPCustomMo(crd GBPCustomMo)
- func (s *Server) DelNetPol(dn string)
- func (s *Server) GetPlatformURI() string
- func (s *Server) GetTenantURI() string
- func (s *Server) GetURIBySubject(sub string) string
- func (s *Server) InitDB()
- func (s *Server) InitState(sd StateDriver) error
- func (s *Server) RegisterCallBack(id string, fn func(op GBPOperation_OpCode, urls []string))
- func (s *Server) RemoveCallBack(id string)
- func (s *Server) Stop()
- func (s *Server) UTReadMsg(to time.Duration) (int, interface{}, error)
- func (s *Server) UpdateTunnels(tunnels map[string]int64)
- type StateDriver
- type UnimplementedGBPServer
- type UnsafeGBPServer
- type VTEP
- type VTEPList
- type Version
- type VersionInfo
- type WLRule
Constants ¶
const ( RdClassID = 31999 RdEncapID = 7699999 )
const ( GBP_ListObjects_FullMethodName = "/gbpserver.GBP/ListObjects" GBP_ListVTEPs_FullMethodName = "/gbpserver.GBP/ListVTEPs" GBP_GetSnapShot_FullMethodName = "/gbpserver.GBP/GetSnapShot" )
const ( NoContainer = "NC" OpaddEPG OpdelEPG OpaddContract OpdelContract OpaddEP OpdelEP OpaddNetPol OpdelNetPol OpUpdTunnels OpaddGBPCustomMo OpdelGBPCustomMo )
Variables ¶
var ( GBPOperation_OpCode_name = map[int32]string{ 0: "ADD", 1: "REPLACE", 2: "DELETE", 3: "DELETE_RECURSIVE", } GBPOperation_OpCode_value = map[string]int32{ "ADD": 0, "REPLACE": 1, "DELETE": 2, "DELETE_RECURSIVE": 3, } )
Enum value maps for GBPOperation_OpCode.
var File_gbp_proto protoreflect.FileDescriptor
var GBP_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gbpserver.GBP", HandlerType: (*GBPServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListVTEPs", Handler: _GBP_ListVTEPs_Handler, }, { MethodName: "GetSnapShot", Handler: _GBP_GetSnapShot_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ListObjects", Handler: _GBP_ListObjects_Handler, ServerStreams: true, }, }, Metadata: "gbp.proto", }
GBP_ServiceDesc is the grpc.ServiceDesc for GBP service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var LocalhostCert = []byte(`-----BEGIN CERTIFICATE-----
MIICEzCCAXygAwIBAgIQMIMChMLGrR+QvmQvpwAU6zANBgkqhkiG9w0BAQsFADAS
MRAwDgYDVQQKEwdBY21lIENvMCAXDTcwMDEwMTAwMDAwMFoYDzIwODQwMTI5MTYw
MDAwWjASMRAwDgYDVQQKEwdBY21lIENvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB
iQKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9SjY1bIw4
iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZBl2+XsDul
rKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQABo2gwZjAO
BgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUw
AwEB/zAuBgNVHREEJzAlggtleGFtcGxlLmNvbYcEfwAAAYcQAAAAAAAAAAAAAAAA
AAAAATANBgkqhkiG9w0BAQsFAAOBgQCEcetwO59EWk7WiJsG4x8SY+UIAA+flUI9
tyC4lNhbcF2Idq9greZwbYCqTTTr2XiRNSMLCOjKyI7ukPoPjo16ocHj+P3vZGfs
h1fIw3cSS2OolhloGw/XM6RWPWtPAlGykKLciQrBru5NAPvCMsb/I1DAceTiotQM
fblo6RBxUQ==
-----END CERTIFICATE-----`)
var LocalhostKey = []byte(`-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQDuLnQAI3mDgey3VBzWnB2L39JUU4txjeVE6myuDqkM/uGlfjb9
SjY1bIw4iA5sBBZzHi3z0h1YV8QPuxEbi4nW91IJm2gsvvZhIrCHS3l6afab4pZB
l2+XsDulrKBxKKtD1rGxlG4LjncdabFn9gvLZad2bSysqz/qTAUStTvqJQIDAQAB
AoGAGRzwwir7XvBOAy5tM/uV6e+Zf6anZzus1s1Y1ClbjbE6HXbnWWF/wbZGOpet
3Zm4vD6MXc7jpTLryzTQIvVdfQbRc6+MUVeLKwZatTXtdZrhu+Jk7hx0nTPy8Jcb
uJqFk541aEw+mMogY/xEcfbWd6IOkp+4xqjlFLBEDytgbIECQQDvH/E6nk+hgN4H
qzzVtxxr397vWrjrIgPbJpQvBsafG7b0dA4AFjwVbFLmQcj2PprIMmPcQrooz8vp
jy4SHEg1AkEA/v13/5M47K9vCxmb8QeD/asydfsgS5TeuNi8DoUBEmiSJwma7FXY
fFUtxuvL7XvjwjN5B30pNEbc6Iuyt7y4MQJBAIt21su4b3sjXNueLKH85Q+phy2U
fQtuUE9txblTu14q3N7gHRZB4ZMhFYyDy8CKrN2cPg/Fvyt0Xlp/DoCzjA0CQQDU
y2ptGsuSmgUtWj3NM9xuwYPm+Z/F84K6+ARYiZ6PYj013sovGKUFfYAqVXVlxtIX
qyUBnu3X9ps8ZfjLZO7BAkEAlT4R5Yl6cGhaJQYZHOde3JEMhNRcVFMO8dJDaFeo
f9Oeos0UUothgiDktdQHxdNEwLjQf7lJJBzV+5OtwswCWA==
-----END RSA PRIVATE KEY-----`)
Functions ¶
func CreateDefVrf ¶
func CreateDefVrf()
func CreateRoot ¶
func CreateRoot(config *GBPServerConfig)
func GetInvMoMap ¶
func InitConfig ¶
func InitConfig(config *GBPServerConfig)
func MakeHTTPHandler ¶
func MakeHTTPHandler(handlerFunc httpAPIFunc) http.HandlerFunc
MakeHTTPHandler is a simple Wrapper for http handlers
func RegisterGBPServer ¶
func RegisterGBPServer(s grpc.ServiceRegistrar, srv GBPServer)
func SendDefaultsToAPIC ¶
func SendDefaultsToAPIC()
func StringFromInfo ¶
func StringFromInfo(ver *VersionInfo) string
StringFromInfo prints the versioning details
Types ¶
type ApicInfo ¶
type ApicInfo struct { // The hostnames or IPs for connecting to apic Hosts []string `json:"apic-hosts,omitempty"` // The username for connecting to APIC Username string `json:"apic-username,omitempty"` // The password for connecting to APIC Password string `json:"apic-password,omitempty"` RefreshTimer string `json:"apic-refreshtime,omitempty"` // How early (seconds) the subscriptions to be refreshed than // actual subscription refresh-timeout. Will be defaulted to 5Seconds. RefreshTickerAdjust string `json:"apic-refreshticker-adjust,omitempty"` // A path for a PEM-encoded private key for client certificate // authentication for APIC API PrivateKeyPath string `json:"apic-private-key-path,omitempty"` // A path for a PEM-encoded public certificate for APIC server to // enable secure TLS server verifification CertPath string `json:"apic-cert-path,omitempty"` // Cloud Info Cloud *kafkac.CloudInfo `json:"cloud-info,omitempty"` // kafka config Kafka *kafkac.KafkaCfg `json:"kafka,omitempty"` }
type BDSubnet ¶
type BDSubnet struct {
// contains filtered or unexported fields
}
func (*BDSubnet) CreateSubnet ¶
func (bds *BDSubnet) CreateSubnet()
func (*BDSubnet) FDMcastUri ¶
func (*BDSubnet) SubnetsUri ¶
type Contract ¶
type EPG ¶
type EmptyMsg ¶
type EmptyMsg struct {
// contains filtered or unexported fields
}
func (*EmptyMsg) Descriptor
deprecated
func (*EmptyMsg) ProtoMessage ¶
func (*EmptyMsg) ProtoMessage()
func (*EmptyMsg) ProtoReflect ¶
func (x *EmptyMsg) ProtoReflect() protoreflect.Message
type Endpoint ¶
type Endpoint struct { Uuid string `json:"uuid,omitempty"` MacAddr string `json:"macaddr,omitempty"` IPAddr []string `json:"ipaddr,omitempty"` EPG string `json:"epg,omitempty"` VTEP string `json:"vtep,omitempty"` IFName string `json:"ifname,omitempty"` Namespace string `json:"namespace,omitempty"` PodName string `json:"podname,omitempty"` }
type GBPAction ¶
type GBPAction struct {
// contains filtered or unexported fields
}
func (*GBPAction) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
type GBPBDToSubnets ¶
type GBPBDToSubnets struct {
// contains filtered or unexported fields
}
type GBPBDToVrf ¶
type GBPBDToVrf struct {
// contains filtered or unexported fields
}
type GBPBridgeDomain ¶
type GBPBridgeDomain struct {
// contains filtered or unexported fields
}
func (*GBPBridgeDomain) AddSubnet ¶
func (bd *GBPBridgeDomain) AddSubnet() error
func (*GBPBridgeDomain) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPBridgeDomain) Make ¶
func (bd *GBPBridgeDomain) Make(name, uri, subnetsUri string) error
func (*GBPBridgeDomain) Validate ¶
func (bd *GBPBridgeDomain) Validate() error
type GBPClassifierRsrc ¶
type GBPClassifierRsrc struct {
// contains filtered or unexported fields
}
func (*GBPClassifierRsrc) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPClassifierRsrc) Make ¶
func (cr *GBPClassifierRsrc) Make(name, uri string) error
func (*GBPClassifierRsrc) Validate ¶
func (cr *GBPClassifierRsrc) Validate() error
type GBPClient ¶
type GBPClient interface { // Obtains the objects currently in the policy database as a stream ListObjects(ctx context.Context, in *Version, opts ...grpc.CallOption) (GBP_ListObjectsClient, error) ListVTEPs(ctx context.Context, in *EmptyMsg, opts ...grpc.CallOption) (*VTEPList, error) GetSnapShot(ctx context.Context, in *VTEP, opts ...grpc.CallOption) (*ObjectList, error) }
GBPClient is the client API for GBP service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewGBPClient ¶
func NewGBPClient(cc grpc.ClientConnInterface) GBPClient
type GBPContract ¶
type GBPContract struct {
// contains filtered or unexported fields
}
func (*GBPContract) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPContract) Make ¶
func (c *GBPContract) Make(name, uri string) error
func (*GBPContract) Validate ¶
func (c *GBPContract) Validate() error
type GBPCustomMo ¶
type GBPCustomMo interface { Subject() string URI(s *Server) string Properties() map[string]interface{} ParentSub() string ParentURI(s *Server) string Children() []string }
GBPCustomMo acts as the interface between a CRD and the corresponding MO. Implement this interface in the CRD watcher
type GBPEPGToFD ¶
type GBPEPGToFD struct {
// contains filtered or unexported fields
}
type GBPEPGToSnet ¶
type GBPEPGToSnet struct {
// contains filtered or unexported fields
}
type GBPEpGroup ¶
type GBPEpGroup struct {
// contains filtered or unexported fields
}
func (*GBPEpGroup) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPEpGroup) Make ¶
func (epg *GBPEpGroup) Make(name, uri string) error
func (*GBPEpGroup) Validate ¶
func (epg *GBPEpGroup) Validate() error
type GBPFloodDomain ¶
type GBPFloodDomain struct {
// contains filtered or unexported fields
}
func (*GBPFloodDomain) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPFloodDomain) Make ¶
func (fd *GBPFloodDomain) Make(name, uri string) error
func (*GBPFloodDomain) Validate ¶
func (ss *GBPFloodDomain) Validate() error
type GBPFloodMcast ¶
type GBPFloodMcast struct {
// contains filtered or unexported fields
}
func (*GBPFloodMcast) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPFloodMcast) Make ¶
func (fm *GBPFloodMcast) Make(name, uri string) error
func (*GBPFloodMcast) Validate ¶
func (ss *GBPFloodMcast) Validate() error
type GBPL24Classifier ¶
type GBPL24Classifier struct {
// contains filtered or unexported fields
}
func (*GBPL24Classifier) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPL24Classifier) Make ¶
func (c *GBPL24Classifier) Make(name, uri string) error
func (*GBPL24Classifier) Validate ¶
func (c *GBPL24Classifier) Validate() error
type GBPMo ¶
type GBPMo interface { Make(name, uri string) error FromJSON(j []byte) error SetParent(subj, rel, uri string) AddChild(uri string) DelChild(uri string) AddProperty(name string, data interface{}) WriteJSON() []byte Validate() error GetStringProperty(name string) string GetIntProperty(name string) int GetRefURIs(subject string) (map[string]string, error) }
type GBPObject ¶
type GBPObject struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` Properties []*Property `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"` Children []string `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty"` ParentSubject string `protobuf:"bytes,5,opt,name=parent_subject,json=parentSubject,proto3" json:"parent_subject,omitempty"` ParentUri string `protobuf:"bytes,6,opt,name=parent_uri,json=parentUri,proto3" json:"parent_uri,omitempty"` ParentRelation string `protobuf:"bytes,7,opt,name=parent_relation,json=parentRelation,proto3" json:"parent_relation,omitempty"` // contains filtered or unexported fields }
GBPObject is a generic definition representing an object
func (*GBPObject) Descriptor
deprecated
func (*GBPObject) GetChildren ¶
func (*GBPObject) GetParentRelation ¶
func (*GBPObject) GetParentSubject ¶
func (*GBPObject) GetParentUri ¶
func (*GBPObject) GetProperties ¶
func (*GBPObject) GetSubject ¶
func (*GBPObject) ProtoMessage ¶
func (*GBPObject) ProtoMessage()
func (*GBPObject) ProtoReflect ¶
func (x *GBPObject) ProtoReflect() protoreflect.Message
type GBPOperation ¶
type GBPOperation struct { Opcode GBPOperation_OpCode `protobuf:"varint,1,opt,name=opcode,proto3,enum=gbpserver.GBPOperation_OpCode" json:"opcode,omitempty"` ObjectList []*GBPObject `protobuf:"bytes,2,rep,name=object_list,json=objectList,proto3" json:"object_list,omitempty"` // contains filtered or unexported fields }
A GBPOperation adds, replaces or deletes a subtree
func (*GBPOperation) Descriptor
deprecated
func (*GBPOperation) Descriptor() ([]byte, []int)
Deprecated: Use GBPOperation.ProtoReflect.Descriptor instead.
func (*GBPOperation) GetObjectList ¶
func (x *GBPOperation) GetObjectList() []*GBPObject
func (*GBPOperation) GetOpcode ¶
func (x *GBPOperation) GetOpcode() GBPOperation_OpCode
func (*GBPOperation) ProtoMessage ¶
func (*GBPOperation) ProtoMessage()
func (*GBPOperation) ProtoReflect ¶
func (x *GBPOperation) ProtoReflect() protoreflect.Message
func (*GBPOperation) Reset ¶
func (x *GBPOperation) Reset()
func (*GBPOperation) String ¶
func (x *GBPOperation) String() string
type GBPOperation_OpCode ¶
type GBPOperation_OpCode int32
const ( GBPOperation_ADD GBPOperation_OpCode = 0 GBPOperation_REPLACE GBPOperation_OpCode = 1 GBPOperation_DELETE GBPOperation_OpCode = 2 GBPOperation_DELETE_RECURSIVE GBPOperation_OpCode = 3 )
func (GBPOperation_OpCode) Descriptor ¶
func (GBPOperation_OpCode) Descriptor() protoreflect.EnumDescriptor
func (GBPOperation_OpCode) Enum ¶
func (x GBPOperation_OpCode) Enum() *GBPOperation_OpCode
func (GBPOperation_OpCode) EnumDescriptor
deprecated
func (GBPOperation_OpCode) EnumDescriptor() ([]byte, []int)
Deprecated: Use GBPOperation_OpCode.Descriptor instead.
func (GBPOperation_OpCode) Number ¶
func (x GBPOperation_OpCode) Number() protoreflect.EnumNumber
func (GBPOperation_OpCode) String ¶
func (x GBPOperation_OpCode) String() string
func (GBPOperation_OpCode) Type ¶
func (GBPOperation_OpCode) Type() protoreflect.EnumType
type GBPRoutingDomain ¶
type GBPRoutingDomain struct {
// contains filtered or unexported fields
}
func (*GBPRoutingDomain) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPRoutingDomain) Make ¶
func (rd *GBPRoutingDomain) Make(name, uri string) error
func (*GBPRoutingDomain) Validate ¶
func (a *GBPRoutingDomain) Validate() error
type GBPRule ¶
type GBPRule struct {
// contains filtered or unexported fields
}
func (*GBPRule) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
type GBPRuleToAct ¶
type GBPRuleToAct struct {
// contains filtered or unexported fields
}
type GBPRuleToClass ¶
type GBPRuleToClass struct {
// contains filtered or unexported fields
}
type GBPServer ¶
type GBPServer interface { // Obtains the objects currently in the policy database as a stream ListObjects(*Version, GBP_ListObjectsServer) error ListVTEPs(context.Context, *EmptyMsg) (*VTEPList, error) GetSnapShot(context.Context, *VTEP) (*ObjectList, error) // contains filtered or unexported methods }
GBPServer is the server API for GBP service. All implementations must embed UnimplementedGBPServer for forward compatibility
type GBPServerConfig ¶
type GBPServerConfig struct { // General log level LogLevel string `json:"log-level,omitempty"` // GRPC log level GRPCLogLevel string `json:"grpc-log-level,omitempty"` // Watch log level WatchLogLevel string `json:"watch-log-level,omitempty"` // Absolute path to a kubeconfig file KubeConfig string `json:"kubeconfig,omitempty"` // TCP port to run status server on (or 0 to disable) StatusPort int `json:"status-port,omitempty"` // TCP port to run grpc server on GRPCPort int `json:"grpc-port,omitempty"` // TCP port to run apic proxy server on (or 0 to disable) ProxyListenPort int `json:"proxy-listen-port,omitempty"` // Pod subnet CIDR in the form <gateway-address>/<prefix-length> that // cover all pod-ip-pools PodSubnet string `json:"pod-subnet,omitempty"` NodeSubnet string `json:"node-subnet,omitempty"` // Used by internal kv store EtcdDir string `json:"etcd-dir,omitempty"` EtcdPort int `json:"etcd-port,omitempty"` // Tenant to use when creating policy objects in APIC AciPolicyTenant string `json:"aci-policy-tenant,omitempty"` // The name of the ACI VMM domain AciVmmDomain string `json:"aci-vmm-domain,omitempty"` AciVrfTenant string `json:"aci-vrf-tenant,omitempty"` // ACI VRF for this kubernetes instance AciVrf string `json:"aci-vrf,omitempty"` VrfEncapID int `json:"vrf-encap-id,omitempty"` // APIC info Apic *ApicInfo `json:"apic,omitempty"` SyncRemEps bool `json:"sync-rem-eps,omitempty"` CSRList string `json:"csr-list,omitempty"` // Metrics EnableMetrics bool `json:"enable-metrics,omitempty"` MetricsPort int `json:"metrics-port,omitempty"` }
Configuration for the gbpserver
type GBPSubject ¶
type GBPSubject struct {
// contains filtered or unexported fields
}
func (*GBPSubject) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPSubject) Make ¶
func (s *GBPSubject) Make(name, uri string) error
func (*GBPSubject) Validate ¶
func (s *GBPSubject) Validate() error
type GBPSubnet ¶
type GBPSubnet struct {
// contains filtered or unexported fields
}
func (*GBPSubnet) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
type GBPSubnetSet ¶
type GBPSubnetSet struct {
// contains filtered or unexported fields
}
func (*GBPSubnetSet) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPSubnetSet) Make ¶
func (ss *GBPSubnetSet) Make(name, uri string) error
func (*GBPSubnetSet) Validate ¶
func (ss *GBPSubnetSet) Validate() error
type GBPVrfIntSubnet ¶
type GBPVrfIntSubnet struct {
// contains filtered or unexported fields
}
func (*GBPVrfIntSubnet) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPVrfIntSubnet) Make ¶
func (vi *GBPVrfIntSubnet) Make(name, uri string) error
func (*GBPVrfIntSubnet) Validate ¶
func (vi *GBPVrfIntSubnet) Validate() error
type GBP_ListObjectsClient ¶
type GBP_ListObjectsClient interface { Recv() (*GBPOperation, error) grpc.ClientStream }
type GBP_ListObjectsServer ¶
type GBP_ListObjectsServer interface { Send(*GBPOperation) error grpc.ServerStream }
type GBPeInstContext ¶
type GBPeInstContext struct {
// contains filtered or unexported fields
}
func (*GBPeInstContext) GetRefURIs ¶
returns refMo URI, indexed by the actual target uri
func (*GBPeInstContext) Make ¶
func (eic *GBPeInstContext) Make(name, uri string) error
func (*GBPeInstContext) Validate ¶
func (eic *GBPeInstContext) Validate() error
type HpSubj ¶
type HpSubj struct { Attributes map[string]string `json:"attributes,omitempty"` Children []map[string]HpSubjChild `json:"children,omitempty"` // contains filtered or unexported fields }
type HpSubjChild ¶
type HpSubjChild struct { Attributes map[string]string `json:"attributes,omitempty"` Children []map[string]HpSubjGrandchild `json:"children,omitempty"` // contains filtered or unexported fields }
func (*HpSubjChild) Make ¶
func (hsc *HpSubjChild) Make(ruleMo *gbpCommonMo, subjName, npName string) error
type HpSubjGrandchild ¶
type NetworkPolicy ¶
type NetworkPolicy struct {
HostprotPol Hpp `json:"hostprotPol,omitempty"`
}
func (*NetworkPolicy) Make ¶
func (np *NetworkPolicy) Make() error
type ObjectList ¶
type ObjectList struct { MoList []*GBPObject `protobuf:"bytes,1,rep,name=mo_list,json=moList,proto3" json:"mo_list,omitempty"` // contains filtered or unexported fields }
ObjectList is a list of GBP objects
func (*ObjectList) Descriptor
deprecated
func (*ObjectList) Descriptor() ([]byte, []int)
Deprecated: Use ObjectList.ProtoReflect.Descriptor instead.
func (*ObjectList) GetMoList ¶
func (x *ObjectList) GetMoList() []*GBPObject
func (*ObjectList) ProtoMessage ¶
func (*ObjectList) ProtoMessage()
func (*ObjectList) ProtoReflect ¶
func (x *ObjectList) ProtoReflect() protoreflect.Message
func (*ObjectList) Reset ¶
func (x *ObjectList) Reset()
func (*ObjectList) String ¶
func (x *ObjectList) String() string
type Property ¶
type Property struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to Value: // // *Property_StrVal // *Property_IntVal // *Property_RefVal Value isProperty_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
Property is a name value pair, where the value could be one of [string, int, Reference]
func (*Property) Descriptor
deprecated
func (*Property) MarshalJSON ¶
func (*Property) ProtoMessage ¶
func (*Property) ProtoMessage()
func (*Property) ProtoReflect ¶
func (x *Property) ProtoReflect() protoreflect.Message
func (*Property) UnmarshalJSON ¶
type Property_IntVal ¶
type Property_IntVal struct {
IntVal int32 `protobuf:"varint,3,opt,name=intVal,proto3,oneof"`
}
type Property_RefVal ¶
type Property_RefVal struct {
RefVal *Reference `protobuf:"bytes,4,opt,name=refVal,proto3,oneof"`
}
type Property_StrVal ¶
type Property_StrVal struct {
StrVal string `protobuf:"bytes,2,opt,name=strVal,proto3,oneof"`
}
type Reference ¶
type Reference struct { Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` ReferenceUri string `protobuf:"bytes,2,opt,name=reference_uri,json=referenceUri,proto3" json:"reference_uri,omitempty"` // contains filtered or unexported fields }
Reference refers to another GBP object
func (*Reference) Descriptor
deprecated
func (*Reference) GetReferenceUri ¶
func (*Reference) GetSubject ¶
func (*Reference) ProtoMessage ¶
func (*Reference) ProtoMessage()
func (*Reference) ProtoReflect ¶
func (x *Reference) ProtoReflect() protoreflect.Message
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config *GBPServerConfig) *Server
func StartNewServer ¶
func StartNewServer(config *GBPServerConfig, sd StateDriver, etcdURLs []string) (*Server, error)
func (*Server) AddContract ¶
func (*Server) AddGBPCustomMo ¶
func (s *Server) AddGBPCustomMo(crd GBPCustomMo)
AddGBPCustomMo access utility for crd watcher to add an MO
func (*Server) AddNetPol ¶
func (s *Server) AddNetPol(np NetworkPolicy)
func (*Server) Config ¶
func (s *Server) Config() *GBPServerConfig
func (*Server) DelContract ¶
func (*Server) DelGBPCustomMo ¶
func (s *Server) DelGBPCustomMo(crd GBPCustomMo)
DelGBPCustomMo access utility for crd watcher to delete an MO
func (*Server) GetPlatformURI ¶
GetPlatformURI helper for watchers to get the platform uri
func (*Server) GetTenantURI ¶
GetTenantURI helper for watchers to get the tenant uri
func (*Server) GetURIBySubject ¶
GetURIBySubject helper for watchers to get a parent URI
func (*Server) InitState ¶
func (s *Server) InitState(sd StateDriver) error
func (*Server) RegisterCallBack ¶
func (s *Server) RegisterCallBack(id string, fn func(op GBPOperation_OpCode, urls []string))
func (*Server) RemoveCallBack ¶
func (*Server) UpdateTunnels ¶
type StateDriver ¶
type UnimplementedGBPServer ¶
type UnimplementedGBPServer struct { }
UnimplementedGBPServer must be embedded to have forward compatible implementations.
func (UnimplementedGBPServer) GetSnapShot ¶
func (UnimplementedGBPServer) GetSnapShot(context.Context, *VTEP) (*ObjectList, error)
func (UnimplementedGBPServer) ListObjects ¶
func (UnimplementedGBPServer) ListObjects(*Version, GBP_ListObjectsServer) error
type UnsafeGBPServer ¶
type UnsafeGBPServer interface {
// contains filtered or unexported methods
}
UnsafeGBPServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GBPServer will result in compilation errors.
type VTEP ¶
type VTEP struct { Vtep string `protobuf:"bytes,1,opt,name=vtep,proto3" json:"vtep,omitempty"` // contains filtered or unexported fields }
VTEP is the ip address of the vtep matching a node.
func (*VTEP) Descriptor
deprecated
func (*VTEP) ProtoMessage ¶
func (*VTEP) ProtoMessage()
func (*VTEP) ProtoReflect ¶
func (x *VTEP) ProtoReflect() protoreflect.Message
type VTEPList ¶
type VTEPList struct { Vteps []string `protobuf:"bytes,1,rep,name=vteps,proto3" json:"vteps,omitempty"` // contains filtered or unexported fields }
VTEPList is the list of vteps, corresponding to the connected grpc clients
func (*VTEPList) Descriptor
deprecated
func (*VTEPList) ProtoMessage ¶
func (*VTEPList) ProtoMessage()
func (*VTEPList) ProtoReflect ¶
func (x *VTEPList) ProtoReflect() protoreflect.Message
type Version ¶
type Version struct { Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
Version is used for syncing between client and server
func (*Version) Descriptor
deprecated
func (*Version) ProtoMessage ¶
func (*Version) ProtoMessage()
func (*Version) ProtoReflect ¶
func (x *Version) ProtoReflect() protoreflect.Message
type VersionInfo ¶
Info enlists version and build information