From 01d0067f33be7433b49cce004c994d2ab5511ee4 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Thu, 23 Jan 2020 12:32:02 -0500 Subject: [PATCH 01/13] Initial proposal of new api for go based gateway Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.proto | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pkg/apis/gateway.proto diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto new file mode 100644 index 0000000..fda33b9 --- /dev/null +++ b/pkg/apis/gateway.proto @@ -0,0 +1,59 @@ +syntax="proto3"; + +package api; + +// EndpointType defines supported endpoints' types +enum EndpointType +{ + UNKNOWN = 0; + IPV4 = 1; + IPV6 = 2; + SID = 3; +} + +// endpoint is expressed by it is type and the value of endpoint, whether it is address, +// or SR SID is stored in byte array. +message endpoint +{ + EndpointType type = 1; + bytes address = 2; +} +// latency defines one of available QoE metrics +// value expresses latency vallue in milliseconds. +// variation expresses percent of the acceptable variation from value. +message latency +{ + int32 value = 1; + int32 variation = 2; +} +// qoe_parameters defaines a list of QoE parameters a client can request. +// Currently only latency is supported. +message qoe_parameters +{ + latency latency = 1; +} +message qoe{ + endpoint src = 1; + endpoint dst = 2; + qoe_parameters qoe = 3; + repeated uint32 label = 4; + int32 err = 5; +} +// RequestQoE defines the rpc message sent by the client to the gateway. +// Multiple Src/Dst/QoE are supported in a single request. +message RequestQoE +{ + map qoes = 1; +} +// ResponseQoE defines the rpc message sent as a reply to the client. +// it is the same message as request, but the gateway populates labels and +// err for each qoe. +message ResponseQoE +{ + map qoes = 1; +} + +service QoEService +{ + rpc QoE (RequestQoE) returns (ResponseQoE); +} \ No newline at end of file From f46a3fe3996bb27e248797e3ab610101ef18d94a Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Thu, 23 Jan 2020 12:55:03 -0500 Subject: [PATCH 02/13] Add generated code Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 392 +++++++++++++++++++++++++++++++++++++++++ pkg/apis/gateway.proto | 65 +++---- 2 files changed, 417 insertions(+), 40 deletions(-) create mode 100644 pkg/apis/gateway.pb.go diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go new file mode 100644 index 0000000..21ceff1 --- /dev/null +++ b/pkg/apis/gateway.pb.go @@ -0,0 +1,392 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: gateway.proto + +package apis + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// EndpointType defines supported endpoints' types +type EndpointType int32 + +const ( + EndpointType_UNKNOWN EndpointType = 0 + EndpointType_IPV4 EndpointType = 1 + EndpointType_IPV6 EndpointType = 2 + EndpointType_SID EndpointType = 3 +) + +var EndpointType_name = map[int32]string{ + 0: "UNKNOWN", + 1: "IPV4", + 2: "IPV6", + 3: "SID", +} + +var EndpointType_value = map[string]int32{ + "UNKNOWN": 0, + "IPV4": 1, + "IPV6": 2, + "SID": 3, +} + +func (x EndpointType) String() string { + return proto.EnumName(EndpointType_name, int32(x)) +} + +func (EndpointType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{0} +} + +// endpoint is expressed by it is type and the value of endpoint, whether it is +// address, or SR SID is stored in byte array. +type Endpoint struct { + Type EndpointType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.EndpointType" json:"type,omitempty"` + Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{0} +} + +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Endpoint.Unmarshal(m, b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) +} +func (m *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return xxx_messageInfo_Endpoint.Size(m) +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetType() EndpointType { + if m != nil { + return m.Type + } + return EndpointType_UNKNOWN +} + +func (m *Endpoint) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +// latency defines one of available QoE metrics +// value expresses latency vallue in milliseconds. +// variation expresses percent of the acceptable variation from value. +type Latency struct { + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + Variation int32 `protobuf:"varint,2,opt,name=variation,proto3" json:"variation,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Latency) Reset() { *m = Latency{} } +func (m *Latency) String() string { return proto.CompactTextString(m) } +func (*Latency) ProtoMessage() {} +func (*Latency) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{1} +} + +func (m *Latency) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Latency.Unmarshal(m, b) +} +func (m *Latency) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Latency.Marshal(b, m, deterministic) +} +func (m *Latency) XXX_Merge(src proto.Message) { + xxx_messageInfo_Latency.Merge(m, src) +} +func (m *Latency) XXX_Size() int { + return xxx_messageInfo_Latency.Size(m) +} +func (m *Latency) XXX_DiscardUnknown() { + xxx_messageInfo_Latency.DiscardUnknown(m) +} + +var xxx_messageInfo_Latency proto.InternalMessageInfo + +func (m *Latency) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +func (m *Latency) GetVariation() int32 { + if m != nil { + return m.Variation + } + return 0 +} + +// qoe_parameters defaines a list of QoE parameters a client can request. +// Currently only latency is supported. +type QoeParameters struct { + Latency *Latency `protobuf:"bytes,1,opt,name=latency,proto3" json:"latency,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *QoeParameters) Reset() { *m = QoeParameters{} } +func (m *QoeParameters) String() string { return proto.CompactTextString(m) } +func (*QoeParameters) ProtoMessage() {} +func (*QoeParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{2} +} + +func (m *QoeParameters) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QoeParameters.Unmarshal(m, b) +} +func (m *QoeParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QoeParameters.Marshal(b, m, deterministic) +} +func (m *QoeParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_QoeParameters.Merge(m, src) +} +func (m *QoeParameters) XXX_Size() int { + return xxx_messageInfo_QoeParameters.Size(m) +} +func (m *QoeParameters) XXX_DiscardUnknown() { + xxx_messageInfo_QoeParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_QoeParameters proto.InternalMessageInfo + +func (m *QoeParameters) GetLatency() *Latency { + if m != nil { + return m.Latency + } + return nil +} + +type Qoe struct { + Src *Endpoint `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` + Dst *Endpoint `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` + Qoe *QoeParameters `protobuf:"bytes,3,opt,name=qoe,proto3" json:"qoe,omitempty"` + Label []uint32 `protobuf:"varint,4,rep,packed,name=label,proto3" json:"label,omitempty"` + Err int32 `protobuf:"varint,5,opt,name=err,proto3" json:"err,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Qoe) Reset() { *m = Qoe{} } +func (m *Qoe) String() string { return proto.CompactTextString(m) } +func (*Qoe) ProtoMessage() {} +func (*Qoe) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{3} +} + +func (m *Qoe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Qoe.Unmarshal(m, b) +} +func (m *Qoe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Qoe.Marshal(b, m, deterministic) +} +func (m *Qoe) XXX_Merge(src proto.Message) { + xxx_messageInfo_Qoe.Merge(m, src) +} +func (m *Qoe) XXX_Size() int { + return xxx_messageInfo_Qoe.Size(m) +} +func (m *Qoe) XXX_DiscardUnknown() { + xxx_messageInfo_Qoe.DiscardUnknown(m) +} + +var xxx_messageInfo_Qoe proto.InternalMessageInfo + +func (m *Qoe) GetSrc() *Endpoint { + if m != nil { + return m.Src + } + return nil +} + +func (m *Qoe) GetDst() *Endpoint { + if m != nil { + return m.Dst + } + return nil +} + +func (m *Qoe) GetQoe() *QoeParameters { + if m != nil { + return m.Qoe + } + return nil +} + +func (m *Qoe) GetLabel() []uint32 { + if m != nil { + return m.Label + } + return nil +} + +func (m *Qoe) GetErr() int32 { + if m != nil { + return m.Err + } + return 0 +} + +// RequestQoE defines the rpc message sent by the client to the gateway. +// Multiple Src/Dst/QoE are supported in a single request. +type RequestQoE struct { + Qoes map[int32]*Qoe `protobuf:"bytes,1,rep,name=qoes,proto3" json:"qoes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestQoE) Reset() { *m = RequestQoE{} } +func (m *RequestQoE) String() string { return proto.CompactTextString(m) } +func (*RequestQoE) ProtoMessage() {} +func (*RequestQoE) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{4} +} + +func (m *RequestQoE) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestQoE.Unmarshal(m, b) +} +func (m *RequestQoE) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestQoE.Marshal(b, m, deterministic) +} +func (m *RequestQoE) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestQoE.Merge(m, src) +} +func (m *RequestQoE) XXX_Size() int { + return xxx_messageInfo_RequestQoE.Size(m) +} +func (m *RequestQoE) XXX_DiscardUnknown() { + xxx_messageInfo_RequestQoE.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestQoE proto.InternalMessageInfo + +func (m *RequestQoE) GetQoes() map[int32]*Qoe { + if m != nil { + return m.Qoes + } + return nil +} + +// ResponseQoE defines the rpc message sent as a reply to the client. +// it is the same message as request, but the gateway populates labels and +// err for each qoe. +type ResponseQoE struct { + Qoes map[int32]*Qoe `protobuf:"bytes,1,rep,name=qoes,proto3" json:"qoes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseQoE) Reset() { *m = ResponseQoE{} } +func (m *ResponseQoE) String() string { return proto.CompactTextString(m) } +func (*ResponseQoE) ProtoMessage() {} +func (*ResponseQoE) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{5} +} + +func (m *ResponseQoE) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponseQoE.Unmarshal(m, b) +} +func (m *ResponseQoE) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponseQoE.Marshal(b, m, deterministic) +} +func (m *ResponseQoE) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseQoE.Merge(m, src) +} +func (m *ResponseQoE) XXX_Size() int { + return xxx_messageInfo_ResponseQoE.Size(m) +} +func (m *ResponseQoE) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseQoE.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseQoE proto.InternalMessageInfo + +func (m *ResponseQoE) GetQoes() map[int32]*Qoe { + if m != nil { + return m.Qoes + } + return nil +} + +func init() { + proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) + proto.RegisterType((*Endpoint)(nil), "apis.endpoint") + proto.RegisterType((*Latency)(nil), "apis.latency") + proto.RegisterType((*QoeParameters)(nil), "apis.qoe_parameters") + proto.RegisterType((*Qoe)(nil), "apis.qoe") + proto.RegisterType((*RequestQoE)(nil), "apis.RequestQoE") + proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.RequestQoE.QoesEntry") + proto.RegisterType((*ResponseQoE)(nil), "apis.ResponseQoE") + proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.ResponseQoE.QoesEntry") +} + +func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } + +var fileDescriptor_f1a937782ebbded5 = []byte{ + // 419 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0x4d, 0x8f, 0xd3, 0x30, + 0x14, 0xc4, 0x75, 0x42, 0xb7, 0xaf, 0xdb, 0x2a, 0x58, 0x3d, 0x44, 0x05, 0x89, 0x28, 0x07, 0xa8, + 0xf6, 0x10, 0xa4, 0x82, 0x50, 0x41, 0xe2, 0x82, 0xe8, 0x61, 0x05, 0x2a, 0xd4, 0xcb, 0xc7, 0x11, + 0x79, 0x9b, 0x27, 0x14, 0x51, 0xe2, 0xc4,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x00, 0x00, +} diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index fda33b9..1c1b9b7 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -1,59 +1,44 @@ -syntax="proto3"; +syntax = "proto3"; -package api; +package apis; // EndpointType defines supported endpoints' types -enum EndpointType -{ - UNKNOWN = 0; - IPV4 = 1; - IPV6 = 2; - SID = 3; +enum EndpointType { + UNKNOWN = 0; + IPV4 = 1; + IPV6 = 2; + SID = 3; } -// endpoint is expressed by it is type and the value of endpoint, whether it is address, -// or SR SID is stored in byte array. -message endpoint -{ - EndpointType type = 1; - bytes address = 2; +// endpoint is expressed by it is type and the value of endpoint, whether it is +// address, or SR SID is stored in byte array. +message endpoint { + EndpointType type = 1; + bytes address = 2; } // latency defines one of available QoE metrics // value expresses latency vallue in milliseconds. // variation expresses percent of the acceptable variation from value. -message latency -{ - int32 value = 1; - int32 variation = 2; +message latency { + int32 value = 1; + int32 variation = 2; } // qoe_parameters defaines a list of QoE parameters a client can request. // Currently only latency is supported. -message qoe_parameters -{ - latency latency = 1; -} -message qoe{ - endpoint src = 1; - endpoint dst = 2; - qoe_parameters qoe = 3; - repeated uint32 label = 4; - int32 err = 5; +message qoe_parameters { latency latency = 1; } +message qoe { + endpoint src = 1; + endpoint dst = 2; + qoe_parameters qoe = 3; + repeated uint32 label = 4; + int32 err = 5; } // RequestQoE defines the rpc message sent by the client to the gateway. // Multiple Src/Dst/QoE are supported in a single request. -message RequestQoE -{ - map qoes = 1; -} +message RequestQoE { map qoes = 1; } // ResponseQoE defines the rpc message sent as a reply to the client. // it is the same message as request, but the gateway populates labels and // err for each qoe. -message ResponseQoE -{ - map qoes = 1; -} +message ResponseQoE { map qoes = 1; } -service QoEService -{ - rpc QoE (RequestQoE) returns (ResponseQoE); -} \ No newline at end of file +service QoEService { rpc QoE(RequestQoE) returns (ResponseQoE); } \ No newline at end of file From 484dd7f44090b7a6c0f41de9d8f12e7a3966455e Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Thu, 23 Jan 2020 13:09:11 -0500 Subject: [PATCH 03/13] Addressing comment Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 4 ++-- pkg/apis/gateway.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 21ceff1..1506e6d 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -102,7 +102,7 @@ func (m *Endpoint) GetAddress() []byte { } // latency defines one of available QoE metrics -// value expresses latency vallue in milliseconds. +// value expresses latency value in milliseconds. // variation expresses percent of the acceptable variation from value. type Latency struct { Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` @@ -151,7 +151,7 @@ func (m *Latency) GetVariation() int32 { return 0 } -// qoe_parameters defaines a list of QoE parameters a client can request. +// qoe_parameters defines a list of QoE parameters a client can request. // Currently only latency is supported. type QoeParameters struct { Latency *Latency `protobuf:"bytes,1,opt,name=latency,proto3" json:"latency,omitempty"` diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 1c1b9b7..4c8331f 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -17,13 +17,13 @@ message endpoint { bytes address = 2; } // latency defines one of available QoE metrics -// value expresses latency vallue in milliseconds. +// value expresses latency value in milliseconds. // variation expresses percent of the acceptable variation from value. message latency { int32 value = 1; int32 variation = 2; } -// qoe_parameters defaines a list of QoE parameters a client can request. +// qoe_parameters defines a list of QoE parameters a client can request. // Currently only latency is supported. message qoe_parameters { latency latency = 1; } message qoe { From 167b08806cd235997ea3f8854460fdb17a706082 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Thu, 23 Jan 2020 14:29:32 -0500 Subject: [PATCH 04/13] regenerating proto for grpc plugin Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 84 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 1506e6d..0a772c4 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -4,8 +4,12 @@ package apis import ( + context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" math "math" ) @@ -390,3 +394,83 @@ var fileDescriptor_f1a937782ebbded5 = []byte{ 0x97, 0xb7, 0xdd, 0x63, 0x7f, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8, 0xe7, 0xbc, 0xfd, 0x02, 0x00, 0x00, } + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QoEServiceClient is the client API for QoEService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QoEServiceClient interface { + QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) +} + +type qoEServiceClient struct { + cc *grpc.ClientConn +} + +func NewQoEServiceClient(cc *grpc.ClientConn) QoEServiceClient { + return &qoEServiceClient{cc} +} + +func (c *qoEServiceClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { + out := new(ResponseQoE) + err := c.cc.Invoke(ctx, "/apis.QoEService/QoE", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QoEServiceServer is the server API for QoEService service. +type QoEServiceServer interface { + QoE(context.Context, *RequestQoE) (*ResponseQoE, error) +} + +// UnimplementedQoEServiceServer can be embedded to have forward compatible implementations. +type UnimplementedQoEServiceServer struct { +} + +func (*UnimplementedQoEServiceServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { + return nil, status.Errorf(codes.Unimplemented, "method QoE not implemented") +} + +func RegisterQoEServiceServer(s *grpc.Server, srv QoEServiceServer) { + s.RegisterService(&_QoEService_serviceDesc, srv) +} + +func _QoEService_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestQoE) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QoEServiceServer).QoE(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/apis.QoEService/QoE", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QoEServiceServer).QoE(ctx, req.(*RequestQoE)) + } + return interceptor(ctx, in, info, handler) +} + +var _QoEService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "apis.QoEService", + HandlerType: (*QoEServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "QoE", + Handler: _QoEService_QoE_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "gateway.proto", +} From faf32e8fecde664cbbf0a59524fb830aa8da46ae Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Fri, 24 Jan 2020 13:02:23 -0500 Subject: [PATCH 05/13] Define errors code for consistent error handling Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 107 +++++++++++++++++++++++++++++------------ pkg/apis/gateway.proto | 15 +++++- 2 files changed, 90 insertions(+), 32 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 0a772c4..70906d3 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -56,6 +56,46 @@ func (EndpointType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{0} } +// Errors defines error codes which a gateway can return to a client +type GatewayErrors int32 + +const ( + GatewayErrors_OK GatewayErrors = 0 + // Returned when a gateway encountered a generic error + GatewayErrors_EIO GatewayErrors = 1 + // Returned when request key does not exist + GatewayErrors_ENOENT GatewayErrors = 2 + // Returned when an operation triggered by the client's requested timed out + // and was canceled + GatewayErrors_ETIMEDOUT GatewayErrors = 3 + // Returned when a gateway cannot reach a DB host + GatewayErrors_EHOSTDOWN GatewayErrors = 4 +) + +var GatewayErrors_name = map[int32]string{ + 0: "OK", + 1: "EIO", + 2: "ENOENT", + 3: "ETIMEDOUT", + 4: "EHOSTDOWN", +} + +var GatewayErrors_value = map[string]int32{ + "OK": 0, + "EIO": 1, + "ENOENT": 2, + "ETIMEDOUT": 3, + "EHOSTDOWN": 4, +} + +func (x GatewayErrors) String() string { + return proto.EnumName(GatewayErrors_name, int32(x)) +} + +func (GatewayErrors) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{1} +} + // endpoint is expressed by it is type and the value of endpoint, whether it is // address, or SR SID is stored in byte array. type Endpoint struct { @@ -201,7 +241,7 @@ type Qoe struct { Dst *Endpoint `protobuf:"bytes,2,opt,name=dst,proto3" json:"dst,omitempty"` Qoe *QoeParameters `protobuf:"bytes,3,opt,name=qoe,proto3" json:"qoe,omitempty"` Label []uint32 `protobuf:"varint,4,rep,packed,name=label,proto3" json:"label,omitempty"` - Err int32 `protobuf:"varint,5,opt,name=err,proto3" json:"err,omitempty"` + Err GatewayErrors `protobuf:"varint,5,opt,name=err,proto3,enum=apis.GatewayErrors" json:"err,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -260,11 +300,11 @@ func (m *Qoe) GetLabel() []uint32 { return nil } -func (m *Qoe) GetErr() int32 { +func (m *Qoe) GetErr() GatewayErrors { if m != nil { return m.Err } - return 0 + return GatewayErrors_OK } // RequestQoE defines the rpc message sent by the client to the gateway. @@ -352,6 +392,7 @@ func (m *ResponseQoE) GetQoes() map[int32]*Qoe { func init() { proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) + proto.RegisterEnum("apis.GatewayErrors", GatewayErrors_name, GatewayErrors_value) proto.RegisterType((*Endpoint)(nil), "apis.endpoint") proto.RegisterType((*Latency)(nil), "apis.latency") proto.RegisterType((*QoeParameters)(nil), "apis.qoe_parameters") @@ -365,34 +406,38 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 419 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0x4d, 0x8f, 0xd3, 0x30, - 0x14, 0xc4, 0x75, 0x42, 0xb7, 0xaf, 0xdb, 0x2a, 0x58, 0x3d, 0x44, 0x05, 0x89, 0x28, 0x07, 0xa8, - 0xf6, 0x10, 0xa4, 0x82, 0x50, 0x41, 0xe2, 0x82, 0xe8, 0x61, 0x05, 0x2a, 0xd4, 0xcb, 0xc7, 0x11, - 0x79, 0x9b, 0x27, 0x14, 0x51, 0xe2, 0xc4, 0xf6, 0x16, 0xe5, 0x86, 0xf8, 0x17, 0xfc, 0x5b, 0x64, - 0x3b, 0xc9, 0x52, 0xe0, 0xba, 0xb7, 0xf7, 0xde, 0x4c, 0x26, 0x33, 0x23, 0xc3, 0xe4, 0x8b, 0x30, - 0xf8, 0x5d, 0x34, 0x59, 0xa5, 0xa4, 0x91, 0x2c, 0x10, 0x55, 0xa1, 0xd3, 0x37, 0x70, 0x82, 0x65, - 0x5e, 0xc9, 0xa2, 0x34, 0xec, 0x01, 0x04, 0xa6, 0xa9, 0x30, 0x26, 0x09, 0x59, 0x4c, 0x97, 0x2c, - 0xb3, 0x84, 0x6c, 0xdd, 0xa2, 0xef, 0x9b, 0x0a, 0xb9, 0xc3, 0x59, 0x0c, 0x43, 0x91, 0xe7, 0x0a, - 0xb5, 0x8e, 0x07, 0x09, 0x59, 0x9c, 0xf2, 0x6e, 0x4d, 0x5f, 0xc0, 0x70, 0x2f, 0x0c, 0x96, 0xbb, - 0x86, 0xcd, 0x20, 0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0x0f, 0x8f, 0x8e, 0x3c, 0xdc, 0xed, 0x3c, 0xf4, - 0x84, 0x9b, 0x30, 0x71, 0xb6, 0x82, 0xd3, 0x3f, 0x5f, 0x13, 0x1b, 0xc3, 0xf0, 0xc3, 0xe6, 0xf5, - 0xe6, 0xed, 0xa7, 0x4d, 0x74, 0x8b, 0x9d, 0x40, 0x70, 0xfe, 0xee, 0xe3, 0x93, 0x88, 0xb4, 0xd3, - 0xd3, 0x68, 0xc0, 0x86, 0x40, 0x2f, 0xce, 0x5f, 0x45, 0x74, 0xb9, 0x02, 0xd8, 0xca, 0xf5, 0x05, - 0xaa, 0x43, 0xb1, 0x43, 0x76, 0x06, 0xd4, 0x66, 0x88, 0xfe, 0x6e, 0x6e, 0x7e, 0xe7, 0x9f, 0x1c, - 0x97, 0xb7, 0xdd, 0x63, 0x7f, 0xfc, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x15, 0xe8, 0xe7, 0xbc, 0xfd, - 0x02, 0x00, 0x00, + // 482 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x51, 0x8f, 0x12, 0x31, + 0x10, 0xc7, 0x6f, 0xe9, 0x72, 0x1c, 0xc3, 0x41, 0xd6, 0xca, 0xc3, 0x06, 0x4d, 0x24, 0x9b, 0xa8, + 0x84, 0x07, 0x4c, 0xd0, 0x18, 0x34, 0xf1, 0xc5, 0xd0, 0x28, 0x9e, 0xb2, 0x52, 0x38, 0x7d, 0x34, + 0x3d, 0x98, 0x18, 0x22, 0x6e, 0x97, 0xb6, 0x87, 0xd9, 0x37, 0xe3, 0x07, 0xf2, 0x33, 0x9a, 0xb6, + 0x0b, 0x27, 0xea, 0xab, 0x6f, 0x9d, 0xce, 0x6f, 0x66, 0xfe, 0xf3, 0xef, 0x2e, 0x34, 0x3f, 0x0b, + 0x83, 0xdf, 0x44, 0x31, 0xc8, 0x95, 0x34, 0x92, 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x88, 0xf5, 0x23, 0xfa, 0xf3, 0x15, 0x3a, 0xb7, 0xfe, 0xf2, 0xe4, 0xea, + 0xd4, 0xfd, 0x4d, 0x8f, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x52, 0xa9, 0x9e, 0x5e, 0x03, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 4c8331f..c781750 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -10,6 +10,19 @@ enum EndpointType { SID = 3; } +// Errors defines error codes which a gateway can return to a client +enum GatewayErrors { + OK = 0; + // Returned when a gateway encountered a generic error + EIO = 1; + // Returned when request key does not exist + ENOENT = 2; + // Returned when an operation triggered by the client's requested timed out + // and was canceled + ETIMEDOUT = 3; + // Returned when a gateway cannot reach a DB host + EHOSTDOWN = 4; +} // endpoint is expressed by it is type and the value of endpoint, whether it is // address, or SR SID is stored in byte array. message endpoint { @@ -31,7 +44,7 @@ message qoe { endpoint dst = 2; qoe_parameters qoe = 3; repeated uint32 label = 4; - int32 err = 5; + GatewayErrors err = 5; } // RequestQoE defines the rpc message sent by the client to the gateway. // Multiple Src/Dst/QoE are supported in a single request. From 8883ea6997afae726e8d1925c91bba5763065c3d Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Mon, 27 Jan 2020 18:05:02 -0500 Subject: [PATCH 06/13] Add new vpn label service Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 410 +++++++++++++++++++++++++++++++++++------ pkg/apis/gateway.proto | 48 ++++- 2 files changed, 399 insertions(+), 59 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 70906d3..f5b0beb 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -96,8 +97,10 @@ func (GatewayErrors) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{1} } -// endpoint is expressed by it is type and the value of endpoint, whether it is -// address, or SR SID is stored in byte array. +// endpoint is an object defining a source or a destination of a communication path. +// The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. +// The list of supported endpoint types may be extended in future. +// The address of endpoint is stored in a slice of bytes and should be decoded according to the endpoint type. type Endpoint struct { Type EndpointType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.EndpointType" json:"type,omitempty"` Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` @@ -390,6 +393,246 @@ func (m *ResponseQoE) GetQoes() map[int32]*Qoe { return nil } +// Borrowed from gobgp project +// +// Route Distinguisher is expressed by 2 bytes Autonomous System +type RouteDistinguisherTwoOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherTwoOctetAS) Reset() { *m = RouteDistinguisherTwoOctetAS{} } +func (m *RouteDistinguisherTwoOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherTwoOctetAS) ProtoMessage() {} +func (*RouteDistinguisherTwoOctetAS) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{6} +} + +func (m *RouteDistinguisherTwoOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Unmarshal(m, b) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.Merge(m, src) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Size(m) +} +func (m *RouteDistinguisherTwoOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherTwoOctetAS proto.InternalMessageInfo + +func (m *RouteDistinguisherTwoOctetAS) GetAdmin() uint32 { + if m != nil { + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherTwoOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +// Route Distinguisher is expressed by IP address +type RouteDistinguisherIPAddress struct { + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherIPAddress) Reset() { *m = RouteDistinguisherIPAddress{} } +func (m *RouteDistinguisherIPAddress) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherIPAddress) ProtoMessage() {} +func (*RouteDistinguisherIPAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{7} +} + +func (m *RouteDistinguisherIPAddress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherIPAddress.Unmarshal(m, b) +} +func (m *RouteDistinguisherIPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherIPAddress.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherIPAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherIPAddress.Merge(m, src) +} +func (m *RouteDistinguisherIPAddress) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherIPAddress.Size(m) +} +func (m *RouteDistinguisherIPAddress) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherIPAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherIPAddress proto.InternalMessageInfo + +func (m *RouteDistinguisherIPAddress) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *RouteDistinguisherIPAddress) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +// Route Distinguisher is expressed by 4 bytes Autonomous System +type RouteDistinguisherFourOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherFourOctetAS) Reset() { *m = RouteDistinguisherFourOctetAS{} } +func (m *RouteDistinguisherFourOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherFourOctetAS) ProtoMessage() {} +func (*RouteDistinguisherFourOctetAS) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{8} +} + +func (m *RouteDistinguisherFourOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Unmarshal(m, b) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherFourOctetAS.Merge(m, src) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Size(m) +} +func (m *RouteDistinguisherFourOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherFourOctetAS.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherFourOctetAS proto.InternalMessageInfo + +func (m *RouteDistinguisherFourOctetAS) GetAdmin() uint32 { + if m != nil { + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherFourOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +// RequestVPNLabel defines the rpc message which is sent by the client to the Gateway +// to request Layer3 VPN label for the corresponding Route Distinguisher. +type RequestVPNLabel struct { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestVPNLabel) Reset() { *m = RequestVPNLabel{} } +func (m *RequestVPNLabel) String() string { return proto.CompactTextString(m) } +func (*RequestVPNLabel) ProtoMessage() {} +func (*RequestVPNLabel) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{9} +} + +func (m *RequestVPNLabel) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestVPNLabel.Unmarshal(m, b) +} +func (m *RequestVPNLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestVPNLabel.Marshal(b, m, deterministic) +} +func (m *RequestVPNLabel) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestVPNLabel.Merge(m, src) +} +func (m *RequestVPNLabel) XXX_Size() int { + return xxx_messageInfo_RequestVPNLabel.Size(m) +} +func (m *RequestVPNLabel) XXX_DiscardUnknown() { + xxx_messageInfo_RequestVPNLabel.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestVPNLabel proto.InternalMessageInfo + +func (m *RequestVPNLabel) GetRd() *any.Any { + if m != nil { + return m.Rd + } + return nil +} + +// ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client +// in response to RequestVPNLabel. If VPN label is not found, the error will be returned. +type ResponseVPNLabel struct { + Label []uint32 `protobuf:"varint,1,rep,packed,name=label,proto3" json:"label,omitempty"` + Err GatewayErrors `protobuf:"varint,2,opt,name=err,proto3,enum=apis.GatewayErrors" json:"err,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResponseVPNLabel) Reset() { *m = ResponseVPNLabel{} } +func (m *ResponseVPNLabel) String() string { return proto.CompactTextString(m) } +func (*ResponseVPNLabel) ProtoMessage() {} +func (*ResponseVPNLabel) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{10} +} + +func (m *ResponseVPNLabel) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponseVPNLabel.Unmarshal(m, b) +} +func (m *ResponseVPNLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponseVPNLabel.Marshal(b, m, deterministic) +} +func (m *ResponseVPNLabel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseVPNLabel.Merge(m, src) +} +func (m *ResponseVPNLabel) XXX_Size() int { + return xxx_messageInfo_ResponseVPNLabel.Size(m) +} +func (m *ResponseVPNLabel) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseVPNLabel.DiscardUnknown(m) +} + +var xxx_messageInfo_ResponseVPNLabel proto.InternalMessageInfo + +func (m *ResponseVPNLabel) GetLabel() []uint32 { + if m != nil { + return m.Label + } + return nil +} + +func (m *ResponseVPNLabel) GetErr() GatewayErrors { + if m != nil { + return m.Err + } + return GatewayErrors_OK +} + func init() { proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) proto.RegisterEnum("apis.GatewayErrors", GatewayErrors_name, GatewayErrors_value) @@ -401,43 +644,58 @@ func init() { proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.RequestQoE.QoesEntry") proto.RegisterType((*ResponseQoE)(nil), "apis.ResponseQoE") proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.ResponseQoE.QoesEntry") + proto.RegisterType((*RouteDistinguisherTwoOctetAS)(nil), "apis.RouteDistinguisherTwoOctetAS") + proto.RegisterType((*RouteDistinguisherIPAddress)(nil), "apis.RouteDistinguisherIPAddress") + proto.RegisterType((*RouteDistinguisherFourOctetAS)(nil), "apis.RouteDistinguisherFourOctetAS") + proto.RegisterType((*RequestVPNLabel)(nil), "apis.RequestVPNLabel") + proto.RegisterType((*ResponseVPNLabel)(nil), "apis.ResponseVPNLabel") } func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 482 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x93, 0x51, 0x8f, 0x12, 0x31, - 0x10, 0xc7, 0x6f, 0xe9, 0x72, 0x1c, 0xc3, 0x41, 0xd6, 0xca, 0xc3, 0x06, 0x4d, 0x24, 0x9b, 0xa8, - 0x84, 0x07, 0x4c, 0xd0, 0x18, 0x34, 0xf1, 0xc5, 0xd0, 0x28, 0x9e, 0xb2, 0x52, 0x38, 0x7d, 0x34, - 0x3d, 0x98, 0x18, 0x22, 0x6e, 0x97, 0xb6, 0x87, 0xd9, 0x37, 0xe3, 0x07, 0xf2, 0x33, 0x9a, 0xb6, - 0x0b, 0x27, 0xea, 0xab, 0x6f, 0x9d, 0xce, 0x6f, 0x66, 0xfe, 0xf3, 0xef, 0x2e, 0x34, 0x3f, 0x0b, - 0x83, 0xdf, 0x44, 0x31, 0xc8, 0x95, 0x34, 0x92, 0x86, 0x22, 0x5f, 0xeb, 0xe4, 0x2d, 0x9c, 0x61, - 0xb6, 0xca, 0xe5, 0x3a, 0x33, 0xf4, 0x01, 0x84, 0xa6, 0xc8, 0x31, 0x0e,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 0xff, 0xff, 0x3c, 0x52, 0xa9, 0x9e, 0x5e, 0x03, - 0x00, 0x00, + // 646 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5b, 0x6f, 0xd3, 0x4c, + 0x10, 0xad, 0xed, 0xa4, 0x69, 0x26, 0x4d, 0xeb, 0x6f, 0xbf, 0x80, 0x4c, 0x5a, 0x44, 0x64, 0x71, + 0x89, 0xfa, 0xe0, 0x4a, 0xa1, 0x82, 0x82, 0xc4, 0x43, 0x51, 0x4c, 0x09, 0x2d, 0x76, 0xba, 0x49, + 0xcb, 0x23, 0xda, 0xc6, 0x4b, 0xb0, 0x48, 0xbd, 0xce, 0xee, 0xa6, 0x95, 0xdf, 0x10, 0x3f, 0x88, + 0xdf, 0x88, 0xbc, 0xbe, 0x94, 0xd0, 0x0a, 0x21, 0x24, 0xde, 0x76, 0x66, 0xce, 0x9c, 0x9d, 0xcb, + 0x19, 0x68, 0x4e, 0x89, 0xa4, 0x57, 0x24, 0x71, 0x62, 0xce, 0x24, 0x43, 0x15, 0x12, 0x87, 0xa2, + 0x7d, 0x6f, 0xca, 0xd8, 0x74, 0x46, 0x77, 0x95, 0xef, 0x7c, 0xf1, 0x69, 0x97, 0x44, 0x39, 0xc0, + 0x3e, 0x86, 0x35, 0x1a, 0x05, 0x31, 0x0b, 0x23, 0x89, 0x1e, 0x43, 0x45, 0x26, 0x31, 0xb5, 0xb4, + 0x8e, 0xd6, 0xdd, 0xe8, 0x21, 0x27, 0xcd, 0x75, 0xdc, 0x3c, 0x3a, 0x4e, 0x62, 0x8a, 0x55, 0x1c, + 0x59, 0x50, 0x23, 0x41, 0xc0, 0xa9, 0x10, 0x96, 0xde, 0xd1, 0xba, 0xeb, 0xb8, 0x30, 0xed, 0x57, + 0x50, 0x9b, 0x11, 0x49, 0xa3, 0x49, 0x82, 0x5a, 0x50, 0xbd, 0x24, 0xb3, 0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ce, 0x3b, 0x68, 0x2e, 0xf1, 0xa1, 0x55, 0xd0, + 0xfd, 0x23, 0x73, 0x25, 0x45, 0xb8, 0x03, 0xdf, 0xd4, 0x10, 0xc0, 0xaa, 0xeb, 0xf9, 0xae, 0x37, + 0x36, 0x75, 0xd4, 0x84, 0xba, 0x3b, 0x1e, 0xbc, 0x77, 0xfb, 0xfe, 0xe9, 0xd8, 0x34, 0x94, 0xf9, + 0xd6, 0x1f, 0x8d, 0xfb, 0xe9, 0x47, 0x95, 0x9e, 0x80, 0xcd, 0x43, 0x22, 0xc9, 0x15, 0x49, 0x46, + 0x94, 0x5f, 0x86, 0x13, 0x2a, 0xd0, 0x0e, 0x18, 0xa9, 0x28, 0xcd, 0x5f, 0x4f, 0xa1, 0xfd, 0xdf, + 0x0d, 0x61, 0xa2, 0x3d, 0x30, 0xce, 0x86, 0x1e, 0xba, 0xb3, 0x84, 0x2d, 0xe6, 0xd3, 0xbe, 0xbb, + 0x9c, 0x50, 0xf8, 0xcf, 0x57, 0xd5, 0x74, 0x9f, 0xfe, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x31, + 0xdb, 0x24, 0x34, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -448,72 +706,112 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// QoEServiceClient is the client API for QoEService service. +// GatawayServicesClient is the client API for GatawayServices service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QoEServiceClient interface { +type GatawayServicesClient interface { + // API to request specified Quality of Experience QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) + // API to request L3 VPN label for specified VRF, identified by Route Distinguisher + VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) } -type qoEServiceClient struct { +type gatawayServicesClient struct { cc *grpc.ClientConn } -func NewQoEServiceClient(cc *grpc.ClientConn) QoEServiceClient { - return &qoEServiceClient{cc} +func NewGatawayServicesClient(cc *grpc.ClientConn) GatawayServicesClient { + return &gatawayServicesClient{cc} } -func (c *qoEServiceClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { +func (c *gatawayServicesClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { out := new(ResponseQoE) - err := c.cc.Invoke(ctx, "/apis.QoEService/QoE", in, out, opts...) + err := c.cc.Invoke(ctx, "/apis.GatawayServices/QoE", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *gatawayServicesClient) VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) { + out := new(ResponseVPNLabel) + err := c.cc.Invoke(ctx, "/apis.GatawayServices/VPN", in, out, opts...) if err != nil { return nil, err } return out, nil } -// QoEServiceServer is the server API for QoEService service. -type QoEServiceServer interface { +// GatawayServicesServer is the server API for GatawayServices service. +type GatawayServicesServer interface { + // API to request specified Quality of Experience QoE(context.Context, *RequestQoE) (*ResponseQoE, error) + // API to request L3 VPN label for specified VRF, identified by Route Distinguisher + VPN(context.Context, *RequestVPNLabel) (*ResponseVPNLabel, error) } -// UnimplementedQoEServiceServer can be embedded to have forward compatible implementations. -type UnimplementedQoEServiceServer struct { +// UnimplementedGatawayServicesServer can be embedded to have forward compatible implementations. +type UnimplementedGatawayServicesServer struct { } -func (*UnimplementedQoEServiceServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { +func (*UnimplementedGatawayServicesServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { return nil, status.Errorf(codes.Unimplemented, "method QoE not implemented") } +func (*UnimplementedGatawayServicesServer) VPN(ctx context.Context, req *RequestVPNLabel) (*ResponseVPNLabel, error) { + return nil, status.Errorf(codes.Unimplemented, "method VPN not implemented") +} -func RegisterQoEServiceServer(s *grpc.Server, srv QoEServiceServer) { - s.RegisterService(&_QoEService_serviceDesc, srv) +func RegisterGatawayServicesServer(s *grpc.Server, srv GatawayServicesServer) { + s.RegisterService(&_GatawayServices_serviceDesc, srv) } -func _QoEService_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GatawayServices_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestQoE) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QoEServiceServer).QoE(ctx, in) + return srv.(GatawayServicesServer).QoE(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/apis.QoEService/QoE", + FullMethod: "/apis.GatawayServices/QoE", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QoEServiceServer).QoE(ctx, req.(*RequestQoE)) + return srv.(GatawayServicesServer).QoE(ctx, req.(*RequestQoE)) } return interceptor(ctx, in, info, handler) } -var _QoEService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "apis.QoEService", - HandlerType: (*QoEServiceServer)(nil), +func _GatawayServices_VPN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestVPNLabel) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(GatawayServicesServer).VPN(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/apis.GatawayServices/VPN", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(GatawayServicesServer).VPN(ctx, req.(*RequestVPNLabel)) + } + return interceptor(ctx, in, info, handler) +} + +var _GatawayServices_serviceDesc = grpc.ServiceDesc{ + ServiceName: "apis.GatawayServices", + HandlerType: (*GatawayServicesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QoE", - Handler: _QoEService_QoE_Handler, + Handler: _GatawayServices_QoE_Handler, + }, + { + MethodName: "VPN", + Handler: _GatawayServices_VPN_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index c781750..5a79990 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/any.proto"; + package apis; // EndpointType defines supported endpoints' types @@ -23,8 +25,10 @@ enum GatewayErrors { // Returned when a gateway cannot reach a DB host EHOSTDOWN = 4; } -// endpoint is expressed by it is type and the value of endpoint, whether it is -// address, or SR SID is stored in byte array. +// endpoint is an object defining a source or a destination of a communication path. +// The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. +// The list of supported endpoint types may be extended in future. +// The address of endpoint is stored in a slice of bytes and should be decoded according to the endpoint type. message endpoint { EndpointType type = 1; bytes address = 2; @@ -54,4 +58,42 @@ message RequestQoE { map qoes = 1; } // err for each qoe. message ResponseQoE { map qoes = 1; } -service QoEService { rpc QoE(RequestQoE) returns (ResponseQoE); } \ No newline at end of file +// Borrowed from gobgp project +// +// Route Distinguisher is expressed by 2 bytes Autonomous System +message RouteDistinguisherTwoOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +// Route Distinguisher is expressed by IP address +message RouteDistinguisherIPAddress { + string admin = 1; + uint32 assigned = 2; +} +// Route Distinguisher is expressed by 4 bytes Autonomous System +message RouteDistinguisherFourOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +// RequestVPNLabel defines the rpc message which is sent by the client to the Gateway +// to request Layer3 VPN label for the corresponding Route Distinguisher. +message RequestVPNLabel { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; +} +// ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client +// in response to RequestVPNLabel. If VPN label is not found, the error will be returned. +message ResponseVPNLabel { + repeated uint32 label = 1; + GatewayErrors err = 2; +} + +service GatawayServices { + // API to request specified Quality of Experience + rpc QoE(RequestQoE) returns (ResponseQoE); + // API to request L3 VPN label for specified VRF, identified by Route Distinguisher + rpc VPN(RequestVPNLabel) returns (ResponseVPNLabel); +} \ No newline at end of file From 5ccf250098ad770685864888842e291c41e9d5a7 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Mon, 27 Jan 2020 18:40:21 -0500 Subject: [PATCH 07/13] Switch to use oneof Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 159 +++++++++++++++++++++++++++-------------- pkg/apis/gateway.proto | 12 ++-- 2 files changed, 111 insertions(+), 60 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index f5b0beb..e482ec0 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -7,7 +7,6 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -542,14 +541,14 @@ func (m *RouteDistinguisherFourOctetAS) GetAssigned() uint32 { // RequestVPNLabel defines the rpc message which is sent by the client to the Gateway // to request Layer3 VPN label for the corresponding Route Distinguisher. type RequestVPNLabel struct { - // Route Distinguisher must be one of - // RouteDistinguisherTwoOctetAS, - // RouteDistinguisherIPAddressAS, - // or RouteDistinguisherFourOctetAS. - Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // Types that are valid to be assigned to RdType: + // *RequestVPNLabel_Rd2As + // *RequestVPNLabel_RdIPAddr + // *RequestVPNLabel_Rd4As + RdType isRequestVPNLabel_RdType `protobuf_oneof:"rd_type"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RequestVPNLabel) Reset() { *m = RequestVPNLabel{} } @@ -577,13 +576,65 @@ func (m *RequestVPNLabel) XXX_DiscardUnknown() { var xxx_messageInfo_RequestVPNLabel proto.InternalMessageInfo -func (m *RequestVPNLabel) GetRd() *any.Any { +type isRequestVPNLabel_RdType interface { + isRequestVPNLabel_RdType() +} + +type RequestVPNLabel_Rd2As struct { + Rd2As *RouteDistinguisherTwoOctetAS `protobuf:"bytes,1,opt,name=rd2as,proto3,oneof"` +} + +type RequestVPNLabel_RdIPAddr struct { + RdIPAddr *RouteDistinguisherIPAddress `protobuf:"bytes,2,opt,name=rdIPAddr,proto3,oneof"` +} + +type RequestVPNLabel_Rd4As struct { + Rd4As *RouteDistinguisherFourOctetAS `protobuf:"bytes,3,opt,name=rd4as,proto3,oneof"` +} + +func (*RequestVPNLabel_Rd2As) isRequestVPNLabel_RdType() {} + +func (*RequestVPNLabel_RdIPAddr) isRequestVPNLabel_RdType() {} + +func (*RequestVPNLabel_Rd4As) isRequestVPNLabel_RdType() {} + +func (m *RequestVPNLabel) GetRdType() isRequestVPNLabel_RdType { if m != nil { - return m.Rd + return m.RdType } return nil } +func (m *RequestVPNLabel) GetRd2As() *RouteDistinguisherTwoOctetAS { + if x, ok := m.GetRdType().(*RequestVPNLabel_Rd2As); ok { + return x.Rd2As + } + return nil +} + +func (m *RequestVPNLabel) GetRdIPAddr() *RouteDistinguisherIPAddress { + if x, ok := m.GetRdType().(*RequestVPNLabel_RdIPAddr); ok { + return x.RdIPAddr + } + return nil +} + +func (m *RequestVPNLabel) GetRd4As() *RouteDistinguisherFourOctetAS { + if x, ok := m.GetRdType().(*RequestVPNLabel_Rd4As); ok { + return x.Rd4As + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*RequestVPNLabel) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*RequestVPNLabel_Rd2As)(nil), + (*RequestVPNLabel_RdIPAddr)(nil), + (*RequestVPNLabel_Rd4As)(nil), + } +} + // ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client // in response to RequestVPNLabel. If VPN label is not found, the error will be returned. type ResponseVPNLabel struct { @@ -654,48 +705,50 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 646 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x5b, 0x6f, 0xd3, 0x4c, - 0x10, 0xad, 0xed, 0xa4, 0x69, 0x26, 0x4d, 0xeb, 0x6f, 0xbf, 0x80, 0x4c, 0x5a, 0x44, 0x64, 0x71, - 0x89, 0xfa, 0xe0, 0x4a, 0xa1, 0x82, 0x82, 0xc4, 0x43, 0x51, 0x4c, 0x09, 0x2d, 0x76, 0xba, 0x49, - 0xcb, 0x23, 0xda, 0xc6, 0x4b, 0xb0, 0x48, 0xbd, 0xce, 0xee, 0xa6, 0x95, 0xdf, 0x10, 0x3f, 0x88, - 0xdf, 0x88, 0xbc, 0xbe, 0x94, 0xd0, 0x0a, 0x21, 0x24, 0xde, 0x76, 0x66, 0xce, 0x9c, 0x9d, 0xcb, - 0x19, 0x68, 0x4e, 0x89, 0xa4, 0x57, 0x24, 0x71, 0x62, 0xce, 0x24, 0x43, 0x15, 0x12, 0x87, 0xa2, - 0x7d, 0x6f, 0xca, 0xd8, 0x74, 0x46, 0x77, 0x95, 0xef, 0x7c, 0xf1, 0x69, 0x97, 0x44, 0x39, 0xc0, - 0x3e, 0x86, 0x35, 0x1a, 0x05, 0x31, 0x0b, 0x23, 0x89, 0x1e, 0x43, 0x45, 0x26, 0x31, 0xb5, 0xb4, - 0x8e, 0xd6, 0xdd, 0xe8, 0x21, 0x27, 0xcd, 0x75, 0xdc, 0x3c, 0x3a, 0x4e, 0x62, 0x8a, 0x55, 0x1c, - 0x59, 0x50, 0x23, 0x41, 0xc0, 0xa9, 0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x5c, 0x41, 0x6b, 0x50, 0x19, 0x0c, 0xcf, 0xf6, 0x4c, 0x2d, 0x7f, 0x3d, 0x33, - 0x75, 0x54, 0x03, 0x63, 0x34, 0xe8, 0x9b, 0xc6, 0xce, 0x3b, 0x68, 0x2e, 0xf1, 0xa1, 0x55, 0xd0, - 0xfd, 0x23, 0x73, 0x25, 0x45, 0xb8, 0x03, 0xdf, 0xd4, 0x10, 0xc0, 0xaa, 0xeb, 0xf9, 0xae, 0x37, - 0x36, 0x75, 0xd4, 0x84, 0xba, 0x3b, 0x1e, 0xbc, 0x77, 0xfb, 0xfe, 0xe9, 0xd8, 0x34, 0x94, 0xf9, - 0xd6, 0x1f, 0x8d, 0xfb, 0xe9, 0x47, 0x95, 0x9e, 0x80, 0xcd, 0x43, 0x22, 0xc9, 0x15, 0x49, 0x46, - 0x94, 0x5f, 0x86, 0x13, 0x2a, 0xd0, 0x0e, 0x18, 0xa9, 0x28, 0xcd, 0x5f, 0x4f, 0xa1, 0xfd, 0xdf, - 0x0d, 0x61, 0xa2, 0x3d, 0x30, 0xce, 0x86, 0x1e, 0xba, 0xb3, 0x84, 0x2d, 0xe6, 0xd3, 0xbe, 0xbb, - 0x9c, 0x50, 0xf8, 0xcf, 0x57, 0xd5, 0x74, 0x9f, 0xfe, 0x08, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x31, - 0xdb, 0x24, 0x34, 0x05, 0x00, 0x00, + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x5d, 0x4f, 0xdb, 0x4a, + 0x10, 0x8d, 0xe3, 0x84, 0x24, 0x13, 0x02, 0xbe, 0x7b, 0xb9, 0x57, 0x51, 0xe0, 0xea, 0xa6, 0xae, + 0xda, 0x46, 0x3c, 0xa4, 0x52, 0x1a, 0x55, 0x94, 0xaa, 0xaa, 0x40, 0x71, 0x21, 0x85, 0xc6, 0x61, + 0x13,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0x3c, 0xaa, 0x41, 0xc5, 0x19, 0xf7, 0x3f, 0x38, 0x3d, 0xf7, 0x78, 0x6c, + 0x99, 0x71, 0xb8, 0xef, 0x8e, 0xc6, 0x3d, 0x95, 0xa8, 0xd0, 0x11, 0xb0, 0xba, 0x47, 0x24, 0xb9, + 0x22, 0xd1, 0x88, 0xf2, 0x4b, 0x7f, 0x42, 0x05, 0xda, 0x04, 0x53, 0x2d, 0x8d, 0xf5, 0xf3, 0xaa, + 0x36, 0xfe, 0xba, 0xb5, 0x38, 0xa8, 0x0b, 0xe6, 0xc9, 0x70, 0x80, 0xfe, 0x59, 0xc0, 0xa6, 0xfe, + 0x34, 0xfe, 0x5d, 0x24, 0xa4, 0xe7, 0x67, 0x4b, 0xf1, 0x43, 0xfd, 0xe2, 0x47, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xc4, 0x88, 0x20, 0x7f, 0xb9, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 5a79990..ff101a1 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -1,7 +1,5 @@ syntax = "proto3"; -import "google/protobuf/any.proto"; - package apis; // EndpointType defines supported endpoints' types @@ -78,11 +76,11 @@ message RouteDistinguisherFourOctetAS { // RequestVPNLabel defines the rpc message which is sent by the client to the Gateway // to request Layer3 VPN label for the corresponding Route Distinguisher. message RequestVPNLabel { - // Route Distinguisher must be one of - // RouteDistinguisherTwoOctetAS, - // RouteDistinguisherIPAddressAS, - // or RouteDistinguisherFourOctetAS. - google.protobuf.Any rd = 1; + oneof rd_type { + RouteDistinguisherTwoOctetAS rd2as = 1; + RouteDistinguisherIPAddress rdIPAddr = 2; + RouteDistinguisherFourOctetAS rd4as = 3; + } } // ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client // in response to RequestVPNLabel. If VPN label is not found, the error will be returned. From 5299d4eeed4c373bc005cf36c6f745ce5f2230e9 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Mon, 27 Jan 2020 18:55:20 -0500 Subject: [PATCH 08/13] Fix typos Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 148 ++++++++++++++++++++--------------------- pkg/apis/gateway.proto | 2 +- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index e482ec0..0fa5b6c 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -705,50 +705,50 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 682 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x5d, 0x4f, 0xdb, 0x4a, - 0x10, 0x8d, 0xe3, 0x84, 0x24, 0x13, 0x02, 0xbe, 0x7b, 0xb9, 0x57, 0x51, 0xe0, 0xea, 0xa6, 0xae, - 0xda, 0x46, 0x3c, 0xa4, 0x52, 0x1a, 0x55, 0x94, 0xaa, 0xaa, 0x40, 0x71, 0x21, 0x85, 0xc6, 0x61, - 0x13, 0xe8, 0x23, 0x5a, 0xe2, 0x15, 0xb5, 0x1a, 0xbc, 0xce, 0xee, 0x06, 0xe4, 0xb7, 0xaa, 0x3f, - 0xa8, 0x3f, 0xa7, 0xbf, 0xa7, 0x5a, 0xaf, 0x6d, 0x48, 0xf9, 0x50, 0x55, 0xa9, 0x6f, 0x9e, 0xdd, - 0x73, 0xce, 0xcc, 0x1c, 0xcf, 0x2c, 0xd4, 0xce, 0x89, 0xa4, 0x57, 0x24, 0x6a, 0x87, 0x9c, 0x49, - 0x86, 0x0a, 0x24, 0xf4, 0x85, 0x7d, 0x08, 0x65, 0x1a, 0x78, 0x21, 0xf3, 0x03, 0x89, 0x9e, 0x42, - 0x41, 0x46, 0x21, 0xad, 0x1b, 0x4d, 0xa3, 0xb5, 0xd2, 0x41, 0x6d, 0x05, 0x68, 0x3b, 0xc9, 0xed, - 0x38, 0x0a, 0x29, 0x8e, 0xef, 0x51, 0x1d, 0x4a, 0xc4, 0xf3, 0x38, 0x15, 0xa2, 0x9e, 0x6f, 0x1a, - 0xad, 0x65, 0x9c, 0x86, 0xf6, 0x1b, 0x28, 0x4d, 0x89, 0xa4, 0xc1, 0x24, 0x42, 0x6b, 0x50, 0xbc, - 0x24, 0xd3, 0xb9, 0x56, 0x2b, 0x62, 0x1d, 0xa0, 0x0d, 0xa8, 0x5c, 0x12, 0xee, 0x13, 0xe9, 0xb3, - 0x20, 0x26, 0x17, 0xf1, 0xf5, 0x81, 0xfd, 0x0a, 0x56, 0x66, 0x8c, 0x9e, 0x86, 0x84, 0x93, 0x0b, - 0x2a, 0x29, 0x17, 0xe8, 0x59, 0x26, 0x18, 0xeb, 0x54, 0x3b, 0x35, 0x5d, 0x55, 0x72, 0x88, 0xd3, - 0x5b, 0xfb, 0x9b, 0x01, 0xe6, 0x8c, 0x51, 0xd4, 0x04, 0x53, 0xf0, 0x49, 0x02, 0x5e, 0xd1, 0xe0, - 0xb4, 0x41, 0xac, 0xae, 0x14, 0xc2, 0x13, 0x32, 0x4e, 0x7e, 0x07, 0xc2, 0x13, 0xca, 0x07, 0x25, - 0x55, 0x37, 0x63, 0xc4, 0x9a, 0x46, 0x2c, 0xd6, 0x85, 0xe3, 0x5c, 0x6b, 0x50, 0x9c, 0x92, 0x33, - 0x3a, 0xad, 0x17, 0x9a, 0x66, 0xab, 0x86, 0x75, 0x80, 0x9e, 0x80, 0x49, 0x39, 0xaf, 0x17, 0x63, - 0x13, 0xff, 0xd6, 0xec, 0x3d, 0xed, 0xbc, 0xc3, 0x39, 0x53, 0x64, 0xca, 0xb9, 0xfd, 0xc5, 0x00, - 0xc0, 0x74, 0x36, 0xa7, 0x42, 0x1e, 0x31, 0x07, 0xb5, 0xa1, 0x30, 0x63, 0x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x67, 0x4b, 0xf1, 0x43, 0xfd, 0xe2, 0x47, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc4, 0x88, 0x20, 0x7f, 0xb9, 0x05, 0x00, 0x00, + // 677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x5d, 0x6f, 0xd3, 0x4a, + 0x10, 0x8d, 0xe3, 0xa4, 0x49, 0x26, 0x4d, 0xae, 0xef, 0xde, 0xde, 0xab, 0x28, 0xed, 0x15, 0xc1, + 0x08, 0x88, 0xfa, 0x10, 0xa4, 0x10, 0xa1, 0x52, 0x84, 0x50, 0xab, 0x18, 0x1a, 0x5a, 0xec, 0x74, + 0x93, 0x96, 0xc7, 0x6a, 0x1b, 0xaf, 0x8a, 0x45, 0xea, 0x75, 0x76, 0x37, 0xad, 0xf2, 0x86, 0xf8, + 0x41, 0xfc, 0x1c, 0x7e, 0x0f, 0x5a, 0xaf, 0xed, 0x36, 0xf4, 0x43, 0x08, 0x89, 0x37, 0xcf, 0xee, + 0x39, 0x67, 0x66, 0x8e, 0x67, 0x16, 0x6a, 0x67, 0x44, 0xd2, 0x4b, 0xb2, 0xe8, 0x44, 0x9c, 0x49, + 0x86, 0x0a, 0x24, 0x0a, 0x84, 0x7d, 0x00, 0x65, 0x1a, 0xfa, 0x11, 0x0b, 0x42, 0x89, 0x9e, 0x40, + 0x41, 0x2e, 0x22, 0xda, 0x30, 0x5a, 0x46, 0xbb, 0xde, 0x45, 0x1d, 0x05, 0xe8, 0x38, 0xc9, 0xed, + 0x78, 0x11, 0x51, 0x1c, 0xdf, 0xa3, 0x06, 0x94, 0x88, 0xef, 0x73, 0x2a, 0x44, 0x23, 0xdf, 0x32, + 0xda, 0xab, 0x38, 0x0d, 0xed, 0xd7, 0x50, 0x9a, 0x12, 0x49, 0xc3, 0xc9, 0x02, 0xad, 0x41, 0xf1, + 0x82, 0x4c, 0xe7, 0x5a, 0xad, 0x88, 0x75, 0x80, 0x36, 0xa0, 0x72, 0x41, 0x78, 0x40, 0x64, 0xc0, + 0xc2, 0x98, 0x5c, 0xc4, 0x57, 0x07, 0xf6, 0x4b, 0xa8, 0xcf, 0x18, 0x3d, 0x89, 0x08, 0x27, 0xe7, + 0x54, 0x52, 0x2e, 0xd0, 0xd3, 0x4c, 0x30, 0xd6, 0xa9, 0x76, 0x6b, 0xba, 0xaa, 0xe4, 0x10, 0xa7, + 0xb7, 0xf6, 0x37, 0x03, 0xcc, 0x19, 0xa3, 0xa8, 0x05, 0xa6, 0xe0, 0x93, 0x04, 0x5c, 0xd7, 0xe0, + 0xb4, 0x41, 0xac, 0xae, 0x14, 0xc2, 0x17, 0x32, 0x4e, 0x7e, 0x0b, 0xc2, 0x17, 0xca, 0x07, 0x25, + 0xd5, 0x30, 0x63, 0xc4, 0x9a, 0x46, 0x2c, 0xd7, 0x85, 0xe3, 0x5c, 0x6b, 0x50, 0x9c, 0x92, 0x53, + 0x3a, 0x6d, 0x14, 0x5a, 0x66, 0xbb, 0x86, 0x75, 0x80, 0x1e, 0x83, 0x49, 0x39, 0x6f, 0x14, 0x63, + 0x13, 0xff, 0xd1, 0xec, 0x77, 0xda, 0x79, 0x87, 0x73, 0xa6, 0xc8, 0x94, 0x73, 0xfb, 0x8b, 0x01, + 0x80, 0xe9, 0x6c, 0x4e, 0x85, 0x3c, 0x64, 0x0e, 0xea, 0x40, 0x61, 0xc6, 0xa8, 0x68, 0x18, 0x2d, + 0xb3, 0x5d, 0xed, 0x36, 0x35, 0xed, 0xea, 0xbe, 0x73, 0xc8, 0xa8, 0x70, 0x42, 0xc9, 0x17, 0x38, + 0xc6, 0x35, 0x77, 0xa1, 0x92, 0x1d, 0x21, 0x0b, 0xcc, 0xcf, 0x74, 0x91, 0x38, 0xad, 0x3e, 0xd1, + 0x83, 0xd4, 0x7d, 0xdd, 0x66, 0x25, 0x6b, 0x22, 0xf9, 0x11, 0xdb, 0xf9, 0x2d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0xbf, 0x27, 0x9b, 0x5b, 0xb0, 0x7a, 0xfd, 0x09, 0x42, 0x55, 0x28, 0x1d, + 0xb9, 0xfb, 0xae, 0xf7, 0xd1, 0xb5, 0x72, 0xa8, 0x0c, 0x85, 0xc1, 0xf0, 0xb8, 0x67, 0x19, 0xc9, + 0xd7, 0x0b, 0x2b, 0x8f, 0x4a, 0x60, 0x8e, 0x06, 0x7d, 0xcb, 0xdc, 0x7c, 0x0f, 0xb5, 0x25, 0x3d, + 0xb4, 0x02, 0x79, 0x6f, 0xdf, 0xca, 0x29, 0x84, 0x33, 0xf0, 0x2c, 0x03, 0x01, 0xac, 0x38, 0xae, + 0xe7, 0xb8, 0x63, 0x2b, 0x8f, 0x6a, 0x50, 0x71, 0xc6, 0x83, 0x0f, 0x4e, 0xdf, 0x3b, 0x1a, 0x5b, + 0x66, 0x1c, 0xee, 0x79, 0xa3, 0x71, 0x5f, 0x25, 0x2a, 0x74, 0x39, 0xd4, 0x13, 0xad, 0x11, 0xe5, + 0x17, 0xc1, 0x84, 0xa2, 0x4d, 0x30, 0xd5, 0xce, 0x58, 0x3f, 0x6f, 0x6a, 0xf3, 0xef, 0x1b, 0x7b, + 0x83, 0x7a, 0x60, 0x1e, 0x0f, 0x5d, 0xf4, 0xef, 0x12, 0x36, 0xb5, 0xa7, 0xf9, 0xdf, 0x32, 0x21, + 0x3d, 0x3f, 0x5d, 0x89, 0xdf, 0xe9, 0xe7, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf4, 0x15, + 0x5d, 0xb8, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -759,112 +759,112 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// GatawayServicesClient is the client API for GatawayServices service. +// GatewayServiceClient is the client API for GatewayService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GatawayServicesClient interface { +type GatewayServiceClient interface { // API to request specified Quality of Experience QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) // API to request L3 VPN label for specified VRF, identified by Route Distinguisher VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) } -type gatawayServicesClient struct { +type gatewayServiceClient struct { cc *grpc.ClientConn } -func NewGatawayServicesClient(cc *grpc.ClientConn) GatawayServicesClient { - return &gatawayServicesClient{cc} +func NewGatewayServiceClient(cc *grpc.ClientConn) GatewayServiceClient { + return &gatewayServiceClient{cc} } -func (c *gatawayServicesClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { +func (c *gatewayServiceClient) QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) { out := new(ResponseQoE) - err := c.cc.Invoke(ctx, "/apis.GatawayServices/QoE", in, out, opts...) + err := c.cc.Invoke(ctx, "/apis.GatewayService/QoE", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *gatawayServicesClient) VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) { +func (c *gatewayServiceClient) VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) { out := new(ResponseVPNLabel) - err := c.cc.Invoke(ctx, "/apis.GatawayServices/VPN", in, out, opts...) + err := c.cc.Invoke(ctx, "/apis.GatewayService/VPN", in, out, opts...) if err != nil { return nil, err } return out, nil } -// GatawayServicesServer is the server API for GatawayServices service. -type GatawayServicesServer interface { +// GatewayServiceServer is the server API for GatewayService service. +type GatewayServiceServer interface { // API to request specified Quality of Experience QoE(context.Context, *RequestQoE) (*ResponseQoE, error) // API to request L3 VPN label for specified VRF, identified by Route Distinguisher VPN(context.Context, *RequestVPNLabel) (*ResponseVPNLabel, error) } -// UnimplementedGatawayServicesServer can be embedded to have forward compatible implementations. -type UnimplementedGatawayServicesServer struct { +// UnimplementedGatewayServiceServer can be embedded to have forward compatible implementations. +type UnimplementedGatewayServiceServer struct { } -func (*UnimplementedGatawayServicesServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { +func (*UnimplementedGatewayServiceServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { return nil, status.Errorf(codes.Unimplemented, "method QoE not implemented") } -func (*UnimplementedGatawayServicesServer) VPN(ctx context.Context, req *RequestVPNLabel) (*ResponseVPNLabel, error) { +func (*UnimplementedGatewayServiceServer) VPN(ctx context.Context, req *RequestVPNLabel) (*ResponseVPNLabel, error) { return nil, status.Errorf(codes.Unimplemented, "method VPN not implemented") } -func RegisterGatawayServicesServer(s *grpc.Server, srv GatawayServicesServer) { - s.RegisterService(&_GatawayServices_serviceDesc, srv) +func RegisterGatewayServiceServer(s *grpc.Server, srv GatewayServiceServer) { + s.RegisterService(&_GatewayService_serviceDesc, srv) } -func _GatawayServices_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GatewayService_QoE_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestQoE) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GatawayServicesServer).QoE(ctx, in) + return srv.(GatewayServiceServer).QoE(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/apis.GatawayServices/QoE", + FullMethod: "/apis.GatewayService/QoE", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatawayServicesServer).QoE(ctx, req.(*RequestQoE)) + return srv.(GatewayServiceServer).QoE(ctx, req.(*RequestQoE)) } return interceptor(ctx, in, info, handler) } -func _GatawayServices_VPN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _GatewayService_VPN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RequestVPNLabel) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(GatawayServicesServer).VPN(ctx, in) + return srv.(GatewayServiceServer).VPN(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/apis.GatawayServices/VPN", + FullMethod: "/apis.GatewayService/VPN", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatawayServicesServer).VPN(ctx, req.(*RequestVPNLabel)) + return srv.(GatewayServiceServer).VPN(ctx, req.(*RequestVPNLabel)) } return interceptor(ctx, in, info, handler) } -var _GatawayServices_serviceDesc = grpc.ServiceDesc{ - ServiceName: "apis.GatawayServices", - HandlerType: (*GatawayServicesServer)(nil), +var _GatewayService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "apis.GatewayService", + HandlerType: (*GatewayServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "QoE", - Handler: _GatawayServices_QoE_Handler, + Handler: _GatewayService_QoE_Handler, }, { MethodName: "VPN", - Handler: _GatawayServices_VPN_Handler, + Handler: _GatewayService_VPN_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index ff101a1..5716f47 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -89,7 +89,7 @@ message ResponseVPNLabel { GatewayErrors err = 2; } -service GatawayServices { +service GatewayService { // API to request specified Quality of Experience rpc QoE(RequestQoE) returns (ResponseQoE); // API to request L3 VPN label for specified VRF, identified by Route Distinguisher From 24f118ab07c44d3042854188ddc2c5eb43647e33 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Mon, 27 Jan 2020 19:11:58 -0500 Subject: [PATCH 09/13] simplify route distinguisher type Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 339 +++++++++++------------------------------ pkg/apis/gateway.proto | 32 ++-- 2 files changed, 94 insertions(+), 277 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 0fa5b6c..5a11fbd 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -96,6 +96,38 @@ func (GatewayErrors) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{1} } +// RouteDistinguisherType lists supported Route Destinguisher types +type RouteDistinguisherType int32 + +const ( + RouteDistinguisherType_INVALID RouteDistinguisherType = 0 + RouteDistinguisherType_TWOOCTETAS RouteDistinguisherType = 1 + RouteDistinguisherType_FOUROCTETAS RouteDistinguisherType = 2 + RouteDistinguisherType_IPADDRESS RouteDistinguisherType = 3 +) + +var RouteDistinguisherType_name = map[int32]string{ + 0: "INVALID", + 1: "TWOOCTETAS", + 2: "FOUROCTETAS", + 3: "IPADDRESS", +} + +var RouteDistinguisherType_value = map[string]int32{ + "INVALID": 0, + "TWOOCTETAS": 1, + "FOUROCTETAS": 2, + "IPADDRESS": 3, +} + +func (x RouteDistinguisherType) String() string { + return proto.EnumName(RouteDistinguisherType_name, int32(x)) +} + +func (RouteDistinguisherType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{2} +} + // endpoint is an object defining a source or a destination of a communication path. // The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. // The list of supported endpoint types may be extended in future. @@ -392,170 +424,21 @@ func (m *ResponseQoE) GetQoes() map[int32]*Qoe { return nil } -// Borrowed from gobgp project -// -// Route Distinguisher is expressed by 2 bytes Autonomous System -type RouteDistinguisherTwoOctetAS struct { - Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` - Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteDistinguisherTwoOctetAS) Reset() { *m = RouteDistinguisherTwoOctetAS{} } -func (m *RouteDistinguisherTwoOctetAS) String() string { return proto.CompactTextString(m) } -func (*RouteDistinguisherTwoOctetAS) ProtoMessage() {} -func (*RouteDistinguisherTwoOctetAS) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{6} -} - -func (m *RouteDistinguisherTwoOctetAS) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Unmarshal(m, b) -} -func (m *RouteDistinguisherTwoOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Marshal(b, m, deterministic) -} -func (m *RouteDistinguisherTwoOctetAS) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteDistinguisherTwoOctetAS.Merge(m, src) -} -func (m *RouteDistinguisherTwoOctetAS) XXX_Size() int { - return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Size(m) -} -func (m *RouteDistinguisherTwoOctetAS) XXX_DiscardUnknown() { - xxx_messageInfo_RouteDistinguisherTwoOctetAS.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteDistinguisherTwoOctetAS proto.InternalMessageInfo - -func (m *RouteDistinguisherTwoOctetAS) GetAdmin() uint32 { - if m != nil { - return m.Admin - } - return 0 -} - -func (m *RouteDistinguisherTwoOctetAS) GetAssigned() uint32 { - if m != nil { - return m.Assigned - } - return 0 -} - -// Route Distinguisher is expressed by IP address -type RouteDistinguisherIPAddress struct { - Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` - Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteDistinguisherIPAddress) Reset() { *m = RouteDistinguisherIPAddress{} } -func (m *RouteDistinguisherIPAddress) String() string { return proto.CompactTextString(m) } -func (*RouteDistinguisherIPAddress) ProtoMessage() {} -func (*RouteDistinguisherIPAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{7} -} - -func (m *RouteDistinguisherIPAddress) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RouteDistinguisherIPAddress.Unmarshal(m, b) -} -func (m *RouteDistinguisherIPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RouteDistinguisherIPAddress.Marshal(b, m, deterministic) -} -func (m *RouteDistinguisherIPAddress) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteDistinguisherIPAddress.Merge(m, src) -} -func (m *RouteDistinguisherIPAddress) XXX_Size() int { - return xxx_messageInfo_RouteDistinguisherIPAddress.Size(m) -} -func (m *RouteDistinguisherIPAddress) XXX_DiscardUnknown() { - xxx_messageInfo_RouteDistinguisherIPAddress.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteDistinguisherIPAddress proto.InternalMessageInfo - -func (m *RouteDistinguisherIPAddress) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *RouteDistinguisherIPAddress) GetAssigned() uint32 { - if m != nil { - return m.Assigned - } - return 0 -} - -// Route Distinguisher is expressed by 4 bytes Autonomous System -type RouteDistinguisherFourOctetAS struct { - Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` - Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RouteDistinguisherFourOctetAS) Reset() { *m = RouteDistinguisherFourOctetAS{} } -func (m *RouteDistinguisherFourOctetAS) String() string { return proto.CompactTextString(m) } -func (*RouteDistinguisherFourOctetAS) ProtoMessage() {} -func (*RouteDistinguisherFourOctetAS) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{8} -} - -func (m *RouteDistinguisherFourOctetAS) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RouteDistinguisherFourOctetAS.Unmarshal(m, b) -} -func (m *RouteDistinguisherFourOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RouteDistinguisherFourOctetAS.Marshal(b, m, deterministic) -} -func (m *RouteDistinguisherFourOctetAS) XXX_Merge(src proto.Message) { - xxx_messageInfo_RouteDistinguisherFourOctetAS.Merge(m, src) -} -func (m *RouteDistinguisherFourOctetAS) XXX_Size() int { - return xxx_messageInfo_RouteDistinguisherFourOctetAS.Size(m) -} -func (m *RouteDistinguisherFourOctetAS) XXX_DiscardUnknown() { - xxx_messageInfo_RouteDistinguisherFourOctetAS.DiscardUnknown(m) -} - -var xxx_messageInfo_RouteDistinguisherFourOctetAS proto.InternalMessageInfo - -func (m *RouteDistinguisherFourOctetAS) GetAdmin() uint32 { - if m != nil { - return m.Admin - } - return 0 -} - -func (m *RouteDistinguisherFourOctetAS) GetAssigned() uint32 { - if m != nil { - return m.Assigned - } - return 0 -} - // RequestVPNLabel defines the rpc message which is sent by the client to the Gateway // to request Layer3 VPN label for the corresponding Route Distinguisher. type RequestVPNLabel struct { - // Types that are valid to be assigned to RdType: - // *RequestVPNLabel_Rd2As - // *RequestVPNLabel_RdIPAddr - // *RequestVPNLabel_Rd4As - RdType isRequestVPNLabel_RdType `protobuf_oneof:"rd_type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type RouteDistinguisherType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.RouteDistinguisherType" json:"type,omitempty"` + Rd []byte `protobuf:"bytes,2,opt,name=rd,proto3" json:"rd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RequestVPNLabel) Reset() { *m = RequestVPNLabel{} } func (m *RequestVPNLabel) String() string { return proto.CompactTextString(m) } func (*RequestVPNLabel) ProtoMessage() {} func (*RequestVPNLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{9} + return fileDescriptor_f1a937782ebbded5, []int{6} } func (m *RequestVPNLabel) XXX_Unmarshal(b []byte) error { @@ -576,65 +459,20 @@ func (m *RequestVPNLabel) XXX_DiscardUnknown() { var xxx_messageInfo_RequestVPNLabel proto.InternalMessageInfo -type isRequestVPNLabel_RdType interface { - isRequestVPNLabel_RdType() -} - -type RequestVPNLabel_Rd2As struct { - Rd2As *RouteDistinguisherTwoOctetAS `protobuf:"bytes,1,opt,name=rd2as,proto3,oneof"` -} - -type RequestVPNLabel_RdIPAddr struct { - RdIPAddr *RouteDistinguisherIPAddress `protobuf:"bytes,2,opt,name=rdIPAddr,proto3,oneof"` -} - -type RequestVPNLabel_Rd4As struct { - Rd4As *RouteDistinguisherFourOctetAS `protobuf:"bytes,3,opt,name=rd4as,proto3,oneof"` -} - -func (*RequestVPNLabel_Rd2As) isRequestVPNLabel_RdType() {} - -func (*RequestVPNLabel_RdIPAddr) isRequestVPNLabel_RdType() {} - -func (*RequestVPNLabel_Rd4As) isRequestVPNLabel_RdType() {} - -func (m *RequestVPNLabel) GetRdType() isRequestVPNLabel_RdType { +func (m *RequestVPNLabel) GetType() RouteDistinguisherType { if m != nil { - return m.RdType - } - return nil -} - -func (m *RequestVPNLabel) GetRd2As() *RouteDistinguisherTwoOctetAS { - if x, ok := m.GetRdType().(*RequestVPNLabel_Rd2As); ok { - return x.Rd2As - } - return nil -} - -func (m *RequestVPNLabel) GetRdIPAddr() *RouteDistinguisherIPAddress { - if x, ok := m.GetRdType().(*RequestVPNLabel_RdIPAddr); ok { - return x.RdIPAddr + return m.Type } - return nil + return RouteDistinguisherType_INVALID } -func (m *RequestVPNLabel) GetRd4As() *RouteDistinguisherFourOctetAS { - if x, ok := m.GetRdType().(*RequestVPNLabel_Rd4As); ok { - return x.Rd4As +func (m *RequestVPNLabel) GetRd() []byte { + if m != nil { + return m.Rd } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*RequestVPNLabel) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*RequestVPNLabel_Rd2As)(nil), - (*RequestVPNLabel_RdIPAddr)(nil), - (*RequestVPNLabel_Rd4As)(nil), - } -} - // ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client // in response to RequestVPNLabel. If VPN label is not found, the error will be returned. type ResponseVPNLabel struct { @@ -649,7 +487,7 @@ func (m *ResponseVPNLabel) Reset() { *m = ResponseVPNLabel{} } func (m *ResponseVPNLabel) String() string { return proto.CompactTextString(m) } func (*ResponseVPNLabel) ProtoMessage() {} func (*ResponseVPNLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{10} + return fileDescriptor_f1a937782ebbded5, []int{7} } func (m *ResponseVPNLabel) XXX_Unmarshal(b []byte) error { @@ -687,6 +525,7 @@ func (m *ResponseVPNLabel) GetErr() GatewayErrors { func init() { proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) proto.RegisterEnum("apis.GatewayErrors", GatewayErrors_name, GatewayErrors_value) + proto.RegisterEnum("apis.RouteDistinguisherType", RouteDistinguisherType_name, RouteDistinguisherType_value) proto.RegisterType((*Endpoint)(nil), "apis.endpoint") proto.RegisterType((*Latency)(nil), "apis.latency") proto.RegisterType((*QoeParameters)(nil), "apis.qoe_parameters") @@ -695,9 +534,6 @@ func init() { proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.RequestQoE.QoesEntry") proto.RegisterType((*ResponseQoE)(nil), "apis.ResponseQoE") proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.ResponseQoE.QoesEntry") - proto.RegisterType((*RouteDistinguisherTwoOctetAS)(nil), "apis.RouteDistinguisherTwoOctetAS") - proto.RegisterType((*RouteDistinguisherIPAddress)(nil), "apis.RouteDistinguisherIPAddress") - proto.RegisterType((*RouteDistinguisherFourOctetAS)(nil), "apis.RouteDistinguisherFourOctetAS") proto.RegisterType((*RequestVPNLabel)(nil), "apis.RequestVPNLabel") proto.RegisterType((*ResponseVPNLabel)(nil), "apis.ResponseVPNLabel") } @@ -705,50 +541,45 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 677 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x5d, 0x6f, 0xd3, 0x4a, - 0x10, 0x8d, 0xe3, 0xa4, 0x49, 0x26, 0x4d, 0xae, 0xef, 0xde, 0xde, 0xab, 0x28, 0xed, 0x15, 0xc1, - 0x08, 0x88, 0xfa, 0x10, 0xa4, 0x10, 0xa1, 0x52, 0x84, 0x50, 0xab, 0x18, 0x1a, 0x5a, 0xec, 0x74, - 0x93, 0x96, 0xc7, 0x6a, 0x1b, 0xaf, 0x8a, 0x45, 0xea, 0x75, 0x76, 0x37, 0xad, 0xf2, 0x86, 0xf8, - 0x41, 0xfc, 0x1c, 0x7e, 0x0f, 0x5a, 0xaf, 0xed, 0x36, 0xf4, 0x43, 0x08, 0x89, 0x37, 0xcf, 0xee, - 0x39, 0x67, 0x66, 0x8e, 0x67, 0x16, 0x6a, 0x67, 0x44, 0xd2, 0x4b, 0xb2, 0xe8, 0x44, 0x9c, 0x49, - 0x86, 0x0a, 0x24, 0x0a, 0x84, 0x7d, 0x00, 0x65, 0x1a, 0xfa, 0x11, 0x0b, 0x42, 0x89, 0x9e, 0x40, - 0x41, 0x2e, 0x22, 0xda, 0x30, 0x5a, 0x46, 0xbb, 0xde, 0x45, 0x1d, 0x05, 0xe8, 0x38, 0xc9, 0xed, - 0x78, 0x11, 0x51, 0x1c, 0xdf, 0xa3, 0x06, 0x94, 0x88, 0xef, 0x73, 0x2a, 0x44, 0x23, 0xdf, 0x32, - 0xda, 0xab, 0x38, 0x0d, 0xed, 0xd7, 0x50, 0x9a, 0x12, 0x49, 0xc3, 0xc9, 0x02, 0xad, 0x41, 0xf1, - 0x82, 0x4c, 0xe7, 0x5a, 0xad, 0x88, 0x75, 0x80, 0x36, 0xa0, 0x72, 0x41, 0x78, 0x40, 0x64, 0xc0, - 0xc2, 0x98, 0x5c, 0xc4, 0x57, 0x07, 0xf6, 0x4b, 0xa8, 0xcf, 0x18, 0x3d, 0x89, 0x08, 0x27, 0xe7, - 0x54, 0x52, 0x2e, 0xd0, 0xd3, 0x4c, 0x30, 0xd6, 0xa9, 0x76, 0x6b, 0xba, 0xaa, 0xe4, 0x10, 0xa7, - 0xb7, 0xf6, 0x37, 0x03, 0xcc, 0x19, 0xa3, 0xa8, 0x05, 0xa6, 0xe0, 0x93, 0x04, 0x5c, 0xd7, 0xe0, - 0xb4, 0x41, 0xac, 0xae, 0x14, 0xc2, 0x17, 0x32, 0x4e, 0x7e, 0x0b, 0xc2, 0x17, 0xca, 0x07, 0x25, - 0xd5, 0x30, 0x63, 0xc4, 0x9a, 0x46, 0x2c, 0xd7, 0x85, 0xe3, 0x5c, 0x6b, 0x50, 0x9c, 0x92, 0x53, - 0x3a, 0x6d, 0x14, 0x5a, 0x66, 0xbb, 0x86, 0x75, 0x80, 0x1e, 0x83, 0x49, 0x39, 0x6f, 0x14, 0x63, - 0x13, 0xff, 0xd1, 0xec, 0x77, 0xda, 0x79, 0x87, 0x73, 0xa6, 0xc8, 0x94, 0x73, 0xfb, 0x8b, 0x01, - 0x80, 0xe9, 0x6c, 0x4e, 0x85, 0x3c, 0x64, 0x0e, 0xea, 0x40, 0x61, 0xc6, 0xa8, 0x68, 0x18, 0x2d, - 0xb3, 0x5d, 0xed, 0x36, 0x35, 0xed, 0xea, 0xbe, 0x73, 0xc8, 0xa8, 0x70, 0x42, 0xc9, 0x17, 0x38, - 0xc6, 0x35, 0x77, 0xa1, 0x92, 0x1d, 0x21, 0x0b, 0xcc, 0xcf, 0x74, 0x91, 0x38, 0xad, 0x3e, 0xd1, - 0x83, 0xd4, 0x7d, 0xdd, 0x66, 0x25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xdb, 0x13, 0xe3, - 0x96, 0x3d, 0xc9, 0xdf, 0xbf, 0x27, 0x9b, 0x5b, 0xb0, 0x7a, 0xfd, 0x09, 0x42, 0x55, 0x28, 0x1d, - 0xb9, 0xfb, 0xae, 0xf7, 0xd1, 0xb5, 0x72, 0xa8, 0x0c, 0x85, 0xc1, 0xf0, 0xb8, 0x67, 0x19, 0xc9, - 0xd7, 0x0b, 0x2b, 0x8f, 0x4a, 0x60, 0x8e, 0x06, 0x7d, 0xcb, 0xdc, 0x7c, 0x0f, 0xb5, 0x25, 0x3d, - 0xb4, 0x02, 0x79, 0x6f, 0xdf, 0xca, 0x29, 0x84, 0x33, 0xf0, 0x2c, 0x03, 0x01, 0xac, 0x38, 0xae, - 0xe7, 0xb8, 0x63, 0x2b, 0x8f, 0x6a, 0x50, 0x71, 0xc6, 0x83, 0x0f, 0x4e, 0xdf, 0x3b, 0x1a, 0x5b, - 0x66, 0x1c, 0xee, 0x79, 0xa3, 0x71, 0x5f, 0x25, 0x2a, 0x74, 0x39, 0xd4, 0x13, 0xad, 0x11, 0xe5, - 0x17, 0xc1, 0x84, 0xa2, 0x4d, 0x30, 0xd5, 0xce, 0x58, 0x3f, 0x6f, 0x6a, 0xf3, 0xef, 0x1b, 0x7b, - 0x83, 0x7a, 0x60, 0x1e, 0x0f, 0x5d, 0xf4, 0xef, 0x12, 0x36, 0xb5, 0xa7, 0xf9, 0xdf, 0x32, 0x21, - 0x3d, 0x3f, 0x5d, 0x89, 0xdf, 0xe9, 0xe7, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf4, 0x15, - 0x5d, 0xb8, 0x05, 0x00, 0x00, + // 607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0xad, 0xbd, 0x49, 0xd3, 0x4c, 0x9a, 0x74, 0x7f, 0xfb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xb3, 0x7b, 0x6b, 0xd8, 0x4a, 0xf5, 0xee, 0xc1, 0x7a, 0x42, 0xe5, 0xbf, 0xdc, 0xce, 0x7f, 0x42, + 0xcf, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x15, 0xa8, 0xba, 0xfd, 0x95, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 5716f47..fffa3bb 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -55,32 +55,18 @@ message RequestQoE { map qoes = 1; } // it is the same message as request, but the gateway populates labels and // err for each qoe. message ResponseQoE { map qoes = 1; } - -// Borrowed from gobgp project -// -// Route Distinguisher is expressed by 2 bytes Autonomous System -message RouteDistinguisherTwoOctetAS { - uint32 admin = 1; - uint32 assigned = 2; -} -// Route Distinguisher is expressed by IP address -message RouteDistinguisherIPAddress { - string admin = 1; - uint32 assigned = 2; -} -// Route Distinguisher is expressed by 4 bytes Autonomous System -message RouteDistinguisherFourOctetAS { - uint32 admin = 1; - uint32 assigned = 2; +// RouteDistinguisherType lists supported Route Destinguisher types +enum RouteDistinguisherType { + INVALID = 0; + TWOOCTETAS = 1; + FOUROCTETAS = 2; + IPADDRESS = 3; } // RequestVPNLabel defines the rpc message which is sent by the client to the Gateway // to request Layer3 VPN label for the corresponding Route Distinguisher. message RequestVPNLabel { - oneof rd_type { - RouteDistinguisherTwoOctetAS rd2as = 1; - RouteDistinguisherIPAddress rdIPAddr = 2; - RouteDistinguisherFourOctetAS rd4as = 3; - } + RouteDistinguisherType type = 1; + bytes rd = 2; } // ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client // in response to RequestVPNLabel. If VPN label is not found, the error will be returned. @@ -88,7 +74,7 @@ message ResponseVPNLabel { repeated uint32 label = 1; GatewayErrors err = 2; } - +// GatewayService lists rpc services supported by the gateway api service GatewayService { // API to request specified Quality of Experience rpc QoE(RequestQoE) returns (ResponseQoE); From ef7704ec3f4273b887b6cc2f2f210d25458e560e Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Fri, 31 Jan 2020 19:27:23 -0500 Subject: [PATCH 10/13] Update api Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 677 +++++++++++++++++++++++++++++++---------- pkg/apis/gateway.proto | 82 +++-- 2 files changed, 585 insertions(+), 174 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 5a11fbd..d23dbdf 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" + any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -96,38 +97,6 @@ func (GatewayErrors) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{1} } -// RouteDistinguisherType lists supported Route Destinguisher types -type RouteDistinguisherType int32 - -const ( - RouteDistinguisherType_INVALID RouteDistinguisherType = 0 - RouteDistinguisherType_TWOOCTETAS RouteDistinguisherType = 1 - RouteDistinguisherType_FOUROCTETAS RouteDistinguisherType = 2 - RouteDistinguisherType_IPADDRESS RouteDistinguisherType = 3 -) - -var RouteDistinguisherType_name = map[int32]string{ - 0: "INVALID", - 1: "TWOOCTETAS", - 2: "FOUROCTETAS", - 3: "IPADDRESS", -} - -var RouteDistinguisherType_value = map[string]int32{ - "INVALID": 0, - "TWOOCTETAS": 1, - "FOUROCTETAS": 2, - "IPADDRESS": 3, -} - -func (x RouteDistinguisherType) String() string { - return proto.EnumName(RouteDistinguisherType_name, int32(x)) -} - -func (RouteDistinguisherType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{2} -} - // endpoint is an object defining a source or a destination of a communication path. // The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. // The list of supported endpoint types may be extended in future. @@ -424,108 +393,459 @@ func (m *ResponseQoE) GetQoes() map[int32]*Qoe { return nil } -// RequestVPNLabel defines the rpc message which is sent by the client to the Gateway -// to request Layer3 VPN label for the corresponding Route Distinguisher. -type RequestVPNLabel struct { - Type RouteDistinguisherType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.RouteDistinguisherType" json:"type,omitempty"` - Rd []byte `protobuf:"bytes,2,opt,name=rd,proto3" json:"rd,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +type RouteDistinguisherTwoOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *RequestVPNLabel) Reset() { *m = RequestVPNLabel{} } -func (m *RequestVPNLabel) String() string { return proto.CompactTextString(m) } -func (*RequestVPNLabel) ProtoMessage() {} -func (*RequestVPNLabel) Descriptor() ([]byte, []int) { +func (m *RouteDistinguisherTwoOctetAS) Reset() { *m = RouteDistinguisherTwoOctetAS{} } +func (m *RouteDistinguisherTwoOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherTwoOctetAS) ProtoMessage() {} +func (*RouteDistinguisherTwoOctetAS) Descriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{6} } -func (m *RequestVPNLabel) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RequestVPNLabel.Unmarshal(m, b) +func (m *RouteDistinguisherTwoOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Unmarshal(m, b) } -func (m *RequestVPNLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RequestVPNLabel.Marshal(b, m, deterministic) +func (m *RouteDistinguisherTwoOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Marshal(b, m, deterministic) } -func (m *RequestVPNLabel) XXX_Merge(src proto.Message) { - xxx_messageInfo_RequestVPNLabel.Merge(m, src) +func (m *RouteDistinguisherTwoOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.Merge(m, src) } -func (m *RequestVPNLabel) XXX_Size() int { - return xxx_messageInfo_RequestVPNLabel.Size(m) +func (m *RouteDistinguisherTwoOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherTwoOctetAS.Size(m) } -func (m *RequestVPNLabel) XXX_DiscardUnknown() { - xxx_messageInfo_RequestVPNLabel.DiscardUnknown(m) +func (m *RouteDistinguisherTwoOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherTwoOctetAS.DiscardUnknown(m) } -var xxx_messageInfo_RequestVPNLabel proto.InternalMessageInfo +var xxx_messageInfo_RouteDistinguisherTwoOctetAS proto.InternalMessageInfo -func (m *RequestVPNLabel) GetType() RouteDistinguisherType { +func (m *RouteDistinguisherTwoOctetAS) GetAdmin() uint32 { if m != nil { - return m.Type + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherTwoOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type RouteDistinguisherIPAddress struct { + Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherIPAddress) Reset() { *m = RouteDistinguisherIPAddress{} } +func (m *RouteDistinguisherIPAddress) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherIPAddress) ProtoMessage() {} +func (*RouteDistinguisherIPAddress) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{7} +} + +func (m *RouteDistinguisherIPAddress) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherIPAddress.Unmarshal(m, b) +} +func (m *RouteDistinguisherIPAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherIPAddress.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherIPAddress) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherIPAddress.Merge(m, src) +} +func (m *RouteDistinguisherIPAddress) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherIPAddress.Size(m) +} +func (m *RouteDistinguisherIPAddress) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherIPAddress.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherIPAddress proto.InternalMessageInfo + +func (m *RouteDistinguisherIPAddress) GetAdmin() string { + if m != nil { + return m.Admin + } + return "" +} + +func (m *RouteDistinguisherIPAddress) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type RouteDistinguisherFourOctetAS struct { + Admin uint32 `protobuf:"varint,1,opt,name=admin,proto3" json:"admin,omitempty"` + Assigned uint32 `protobuf:"varint,2,opt,name=assigned,proto3" json:"assigned,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RouteDistinguisherFourOctetAS) Reset() { *m = RouteDistinguisherFourOctetAS{} } +func (m *RouteDistinguisherFourOctetAS) String() string { return proto.CompactTextString(m) } +func (*RouteDistinguisherFourOctetAS) ProtoMessage() {} +func (*RouteDistinguisherFourOctetAS) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{8} +} + +func (m *RouteDistinguisherFourOctetAS) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Unmarshal(m, b) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Marshal(b, m, deterministic) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Merge(src proto.Message) { + xxx_messageInfo_RouteDistinguisherFourOctetAS.Merge(m, src) +} +func (m *RouteDistinguisherFourOctetAS) XXX_Size() int { + return xxx_messageInfo_RouteDistinguisherFourOctetAS.Size(m) +} +func (m *RouteDistinguisherFourOctetAS) XXX_DiscardUnknown() { + xxx_messageInfo_RouteDistinguisherFourOctetAS.DiscardUnknown(m) +} + +var xxx_messageInfo_RouteDistinguisherFourOctetAS proto.InternalMessageInfo + +func (m *RouteDistinguisherFourOctetAS) GetAdmin() uint32 { + if m != nil { + return m.Admin + } + return 0 +} + +func (m *RouteDistinguisherFourOctetAS) GetAssigned() uint32 { + if m != nil { + return m.Assigned + } + return 0 +} + +type TwoOctetAsSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + As uint32 `protobuf:"varint,3,opt,name=as,proto3" json:"as,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOctetAsSpecificExtended) Reset() { *m = TwoOctetAsSpecificExtended{} } +func (m *TwoOctetAsSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*TwoOctetAsSpecificExtended) ProtoMessage() {} +func (*TwoOctetAsSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{9} +} + +func (m *TwoOctetAsSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Unmarshal(m, b) +} +func (m *TwoOctetAsSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Marshal(b, m, deterministic) +} +func (m *TwoOctetAsSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOctetAsSpecificExtended.Merge(m, src) +} +func (m *TwoOctetAsSpecificExtended) XXX_Size() int { + return xxx_messageInfo_TwoOctetAsSpecificExtended.Size(m) +} +func (m *TwoOctetAsSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOctetAsSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOctetAsSpecificExtended proto.InternalMessageInfo + +func (m *TwoOctetAsSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive + } + return false +} + +func (m *TwoOctetAsSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *TwoOctetAsSpecificExtended) GetAs() uint32 { + if m != nil { + return m.As + } + return 0 +} + +func (m *TwoOctetAsSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +type IPv4AddressSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IPv4AddressSpecificExtended) Reset() { *m = IPv4AddressSpecificExtended{} } +func (m *IPv4AddressSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*IPv4AddressSpecificExtended) ProtoMessage() {} +func (*IPv4AddressSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{10} +} + +func (m *IPv4AddressSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IPv4AddressSpecificExtended.Unmarshal(m, b) +} +func (m *IPv4AddressSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IPv4AddressSpecificExtended.Marshal(b, m, deterministic) +} +func (m *IPv4AddressSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPv4AddressSpecificExtended.Merge(m, src) +} +func (m *IPv4AddressSpecificExtended) XXX_Size() int { + return xxx_messageInfo_IPv4AddressSpecificExtended.Size(m) +} +func (m *IPv4AddressSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_IPv4AddressSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_IPv4AddressSpecificExtended proto.InternalMessageInfo + +func (m *IPv4AddressSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive } - return RouteDistinguisherType_INVALID + return false +} + +func (m *IPv4AddressSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *IPv4AddressSpecificExtended) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *IPv4AddressSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +type FourOctetAsSpecificExtended struct { + IsTransitive bool `protobuf:"varint,1,opt,name=is_transitive,json=isTransitive,proto3" json:"is_transitive,omitempty"` + SubType uint32 `protobuf:"varint,2,opt,name=sub_type,json=subType,proto3" json:"sub_type,omitempty"` + As uint32 `protobuf:"varint,3,opt,name=as,proto3" json:"as,omitempty"` + LocalAdmin uint32 `protobuf:"varint,4,opt,name=local_admin,json=localAdmin,proto3" json:"local_admin,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FourOctetAsSpecificExtended) Reset() { *m = FourOctetAsSpecificExtended{} } +func (m *FourOctetAsSpecificExtended) String() string { return proto.CompactTextString(m) } +func (*FourOctetAsSpecificExtended) ProtoMessage() {} +func (*FourOctetAsSpecificExtended) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{11} +} + +func (m *FourOctetAsSpecificExtended) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FourOctetAsSpecificExtended.Unmarshal(m, b) +} +func (m *FourOctetAsSpecificExtended) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FourOctetAsSpecificExtended.Marshal(b, m, deterministic) +} +func (m *FourOctetAsSpecificExtended) XXX_Merge(src proto.Message) { + xxx_messageInfo_FourOctetAsSpecificExtended.Merge(m, src) +} +func (m *FourOctetAsSpecificExtended) XXX_Size() int { + return xxx_messageInfo_FourOctetAsSpecificExtended.Size(m) +} +func (m *FourOctetAsSpecificExtended) XXX_DiscardUnknown() { + xxx_messageInfo_FourOctetAsSpecificExtended.DiscardUnknown(m) +} + +var xxx_messageInfo_FourOctetAsSpecificExtended proto.InternalMessageInfo + +func (m *FourOctetAsSpecificExtended) GetIsTransitive() bool { + if m != nil { + return m.IsTransitive + } + return false +} + +func (m *FourOctetAsSpecificExtended) GetSubType() uint32 { + if m != nil { + return m.SubType + } + return 0 +} + +func (m *FourOctetAsSpecificExtended) GetAs() uint32 { + if m != nil { + return m.As + } + return 0 +} + +func (m *FourOctetAsSpecificExtended) GetLocalAdmin() uint32 { + if m != nil { + return m.LocalAdmin + } + return 0 +} + +// RequestVPN call used to request L3 VPN entries, identified by one Route Distinguisher +// which can be one of listed below types, and one or more Route Targets. +type RequestVPN struct { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + ImportRt []*any.Any `protobuf:"bytes,2,rep,name=import_rt,json=importRt,proto3" json:"import_rt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequestVPN) Reset() { *m = RequestVPN{} } +func (m *RequestVPN) String() string { return proto.CompactTextString(m) } +func (*RequestVPN) ProtoMessage() {} +func (*RequestVPN) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{12} } -func (m *RequestVPNLabel) GetRd() []byte { +func (m *RequestVPN) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequestVPN.Unmarshal(m, b) +} +func (m *RequestVPN) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequestVPN.Marshal(b, m, deterministic) +} +func (m *RequestVPN) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequestVPN.Merge(m, src) +} +func (m *RequestVPN) XXX_Size() int { + return xxx_messageInfo_RequestVPN.Size(m) +} +func (m *RequestVPN) XXX_DiscardUnknown() { + xxx_messageInfo_RequestVPN.DiscardUnknown(m) +} + +var xxx_messageInfo_RequestVPN proto.InternalMessageInfo + +func (m *RequestVPN) GetRd() *any.Any { if m != nil { return m.Rd } return nil } -// ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client -// in response to RequestVPNLabel. If VPN label is not found, the error will be returned. -type ResponseVPNLabel struct { - Label []uint32 `protobuf:"varint,1,rep,packed,name=label,proto3" json:"label,omitempty"` - Err GatewayErrors `protobuf:"varint,2,opt,name=err,proto3,enum=apis.GatewayErrors" json:"err,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (m *RequestVPN) GetImportRt() []*any.Any { + if m != nil { + return m.ImportRt + } + return nil } -func (m *ResponseVPNLabel) Reset() { *m = ResponseVPNLabel{} } -func (m *ResponseVPNLabel) String() string { return proto.CompactTextString(m) } -func (*ResponseVPNLabel) ProtoMessage() {} -func (*ResponseVPNLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{7} +type ResponseVPNEntry struct { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + Rd *any.Any `protobuf:"bytes,1,opt,name=rd,proto3" json:"rd,omitempty"` + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + ImportRt []*any.Any `protobuf:"bytes,2,rep,name=import_rt,json=importRt,proto3" json:"import_rt,omitempty"` + Label uint32 `protobuf:"varint,3,opt,name=label,proto3" json:"label,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *ResponseVPNLabel) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseVPNLabel.Unmarshal(m, b) +func (m *ResponseVPNEntry) Reset() { *m = ResponseVPNEntry{} } +func (m *ResponseVPNEntry) String() string { return proto.CompactTextString(m) } +func (*ResponseVPNEntry) ProtoMessage() {} +func (*ResponseVPNEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{13} } -func (m *ResponseVPNLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseVPNLabel.Marshal(b, m, deterministic) + +func (m *ResponseVPNEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResponseVPNEntry.Unmarshal(m, b) } -func (m *ResponseVPNLabel) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseVPNLabel.Merge(m, src) +func (m *ResponseVPNEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResponseVPNEntry.Marshal(b, m, deterministic) } -func (m *ResponseVPNLabel) XXX_Size() int { - return xxx_messageInfo_ResponseVPNLabel.Size(m) +func (m *ResponseVPNEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResponseVPNEntry.Merge(m, src) } -func (m *ResponseVPNLabel) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseVPNLabel.DiscardUnknown(m) +func (m *ResponseVPNEntry) XXX_Size() int { + return xxx_messageInfo_ResponseVPNEntry.Size(m) +} +func (m *ResponseVPNEntry) XXX_DiscardUnknown() { + xxx_messageInfo_ResponseVPNEntry.DiscardUnknown(m) } -var xxx_messageInfo_ResponseVPNLabel proto.InternalMessageInfo +var xxx_messageInfo_ResponseVPNEntry proto.InternalMessageInfo -func (m *ResponseVPNLabel) GetLabel() []uint32 { +func (m *ResponseVPNEntry) GetRd() *any.Any { if m != nil { - return m.Label + return m.Rd } return nil } -func (m *ResponseVPNLabel) GetErr() GatewayErrors { +func (m *ResponseVPNEntry) GetImportRt() []*any.Any { if m != nil { - return m.Err + return m.ImportRt } - return GatewayErrors_OK + return nil +} + +func (m *ResponseVPNEntry) GetLabel() uint32 { + if m != nil { + return m.Label + } + return 0 } func init() { proto.RegisterEnum("apis.EndpointType", EndpointType_name, EndpointType_value) proto.RegisterEnum("apis.GatewayErrors", GatewayErrors_name, GatewayErrors_value) - proto.RegisterEnum("apis.RouteDistinguisherType", RouteDistinguisherType_name, RouteDistinguisherType_value) proto.RegisterType((*Endpoint)(nil), "apis.endpoint") proto.RegisterType((*Latency)(nil), "apis.latency") proto.RegisterType((*QoeParameters)(nil), "apis.qoe_parameters") @@ -534,52 +854,69 @@ func init() { proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.RequestQoE.QoesEntry") proto.RegisterType((*ResponseQoE)(nil), "apis.ResponseQoE") proto.RegisterMapType((map[int32]*Qoe)(nil), "apis.ResponseQoE.QoesEntry") - proto.RegisterType((*RequestVPNLabel)(nil), "apis.RequestVPNLabel") - proto.RegisterType((*ResponseVPNLabel)(nil), "apis.ResponseVPNLabel") + proto.RegisterType((*RouteDistinguisherTwoOctetAS)(nil), "apis.RouteDistinguisherTwoOctetAS") + proto.RegisterType((*RouteDistinguisherIPAddress)(nil), "apis.RouteDistinguisherIPAddress") + proto.RegisterType((*RouteDistinguisherFourOctetAS)(nil), "apis.RouteDistinguisherFourOctetAS") + proto.RegisterType((*TwoOctetAsSpecificExtended)(nil), "apis.TwoOctetAsSpecificExtended") + proto.RegisterType((*IPv4AddressSpecificExtended)(nil), "apis.IPv4AddressSpecificExtended") + proto.RegisterType((*FourOctetAsSpecificExtended)(nil), "apis.FourOctetAsSpecificExtended") + proto.RegisterType((*RequestVPN)(nil), "apis.RequestVPN") + proto.RegisterType((*ResponseVPNEntry)(nil), "apis.ResponseVPNEntry") } func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 607 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x4f, 0x6f, 0xd3, 0x4e, - 0x10, 0xad, 0xbd, 0x49, 0xd3, 0x4c, 0x9a, 0x74, 0x7f, 0xfb, 0x2b, 0x95, 0x15, 0x2a, 0x11, 0x59, - 0x02, 0xa2, 0x1c, 0x02, 0x0a, 0x15, 0x2a, 0x48, 0x1c, 0x0a, 0x36, 0x60, 0x5a, 0xec, 0x74, 0xed, - 0xa4, 0x47, 0xe4, 0xd6, 0xa3, 0x62, 0x11, 0x6c, 0x67, 0xd7, 0x29, 0xca, 0x0d, 0xf1, 0x81, 0xf8, - 0x8c, 0xc8, 0xff, 0xd2, 0x06, 0x22, 0x6e, 0xdc, 0x76, 0x66, 0xde, 0xcc, 0xbc, 0x79, 0x33, 0x36, - 0xb4, 0xaf, 0xfd, 0x14, 0xbf, 0xf9, 0xcb, 0x61, 0x22, 0xe2, 0x34, 0x66, 0x35, 0x3f, 0x09, 0xa5, - 0x7e, 0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b6, - 0x0d, 0xaa, 0x73, 0x4a, 0xb7, 0x32, 0x84, 0x69, 0x39, 0x54, 0x61, 0x00, 0xdb, 0xa6, 0xed, 0x98, - 0xb6, 0x47, 0x55, 0xd6, 0x86, 0xa6, 0xe9, 0x59, 0x1f, 0x4d, 0xc3, 0x99, 0x78, 0x94, 0xe4, 0xe6, - 0x7b, 0xc7, 0xf5, 0x8c, 0xac, 0x51, 0x6d, 0x30, 0x81, 0x83, 0xcd, 0x32, 0x64, 0x7c, 0x2c, 0x7b, - 0x7a, 0x72, 0x66, 0x19, 0x74, 0x8b, 0x75, 0x00, 0xbc, 0x0b, 0xc7, 0x79, 0xe3, 0x99, 0xde, 0x89, - 0x4b, 0x15, 0xb6, 0x07, 0xad, 0xb7, 0xce, 0x84, 0x57, 0x8e, 0xbc, 0x8b, 0x35, 0x3e, 0x31, 0x0c, - 0x6e, 0xba, 0x2e, 0x25, 0x23, 0x01, 0x9d, 0x92, 0xa2, 0x8b, 0xe2, 0x26, 0xbc, 0x42, 0x36, 0x00, - 0x92, 0x1d, 0x04, 0xfd, 0xfd, 0x0c, 0xbb, 0xff, 0xfd, 0x71, 0x14, 0xec, 0x08, 0xc8, 0x74, 0x6c, - 0xb3, 0x7b, 0x6b, 0xd8, 0x4a, 0xf5, 0xee, 0xc1, 0x7a, 0x42, 0xe5, 0xbf, 0xdc, 0xce, 0x7f, 0x42, - 0xcf, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x15, 0xa8, 0xba, 0xfd, 0x95, 0x04, 0x00, 0x00, + // 783 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6f, 0xe3, 0x44, + 0x14, 0x5e, 0xdb, 0x49, 0x93, 0xbc, 0xd4, 0x91, 0x19, 0x2a, 0x94, 0x4d, 0x17, 0x6d, 0x64, 0x7e, + 0x55, 0x3d, 0xa4, 0x6c, 0x59,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c0, 0x88, 0xf4, + 0xc1, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x5b, 0x7a, 0xbe, 0x4d, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -597,7 +934,7 @@ type GatewayServiceClient interface { // API to request specified Quality of Experience QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) // API to request L3 VPN label for specified VRF, identified by Route Distinguisher - VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) + VPN(ctx context.Context, in *RequestVPN, opts ...grpc.CallOption) (GatewayService_VPNClient, error) } type gatewayServiceClient struct { @@ -617,13 +954,36 @@ func (c *gatewayServiceClient) QoE(ctx context.Context, in *RequestQoE, opts ... return out, nil } -func (c *gatewayServiceClient) VPN(ctx context.Context, in *RequestVPNLabel, opts ...grpc.CallOption) (*ResponseVPNLabel, error) { - out := new(ResponseVPNLabel) - err := c.cc.Invoke(ctx, "/apis.GatewayService/VPN", in, out, opts...) +func (c *gatewayServiceClient) VPN(ctx context.Context, in *RequestVPN, opts ...grpc.CallOption) (GatewayService_VPNClient, error) { + stream, err := c.cc.NewStream(ctx, &_GatewayService_serviceDesc.Streams[0], "/apis.GatewayService/VPN", opts...) if err != nil { return nil, err } - return out, nil + x := &gatewayServiceVPNClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type GatewayService_VPNClient interface { + Recv() (*ResponseVPNEntry, error) + grpc.ClientStream +} + +type gatewayServiceVPNClient struct { + grpc.ClientStream +} + +func (x *gatewayServiceVPNClient) Recv() (*ResponseVPNEntry, error) { + m := new(ResponseVPNEntry) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil } // GatewayServiceServer is the server API for GatewayService service. @@ -631,7 +991,7 @@ type GatewayServiceServer interface { // API to request specified Quality of Experience QoE(context.Context, *RequestQoE) (*ResponseQoE, error) // API to request L3 VPN label for specified VRF, identified by Route Distinguisher - VPN(context.Context, *RequestVPNLabel) (*ResponseVPNLabel, error) + VPN(*RequestVPN, GatewayService_VPNServer) error } // UnimplementedGatewayServiceServer can be embedded to have forward compatible implementations. @@ -641,8 +1001,8 @@ type UnimplementedGatewayServiceServer struct { func (*UnimplementedGatewayServiceServer) QoE(ctx context.Context, req *RequestQoE) (*ResponseQoE, error) { return nil, status.Errorf(codes.Unimplemented, "method QoE not implemented") } -func (*UnimplementedGatewayServiceServer) VPN(ctx context.Context, req *RequestVPNLabel) (*ResponseVPNLabel, error) { - return nil, status.Errorf(codes.Unimplemented, "method VPN not implemented") +func (*UnimplementedGatewayServiceServer) VPN(req *RequestVPN, srv GatewayService_VPNServer) error { + return status.Errorf(codes.Unimplemented, "method VPN not implemented") } func RegisterGatewayServiceServer(s *grpc.Server, srv GatewayServiceServer) { @@ -667,22 +1027,25 @@ func _GatewayService_QoE_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _GatewayService_VPN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestVPNLabel) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GatewayServiceServer).VPN(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/apis.GatewayService/VPN", +func _GatewayService_VPN_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(RequestVPN) + if err := stream.RecvMsg(m); err != nil { + return err } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatewayServiceServer).VPN(ctx, req.(*RequestVPNLabel)) - } - return interceptor(ctx, in, info, handler) + return srv.(GatewayServiceServer).VPN(m, &gatewayServiceVPNServer{stream}) +} + +type GatewayService_VPNServer interface { + Send(*ResponseVPNEntry) error + grpc.ServerStream +} + +type gatewayServiceVPNServer struct { + grpc.ServerStream +} + +func (x *gatewayServiceVPNServer) Send(m *ResponseVPNEntry) error { + return x.ServerStream.SendMsg(m) } var _GatewayService_serviceDesc = grpc.ServiceDesc{ @@ -693,11 +1056,13 @@ var _GatewayService_serviceDesc = grpc.ServiceDesc{ MethodName: "QoE", Handler: _GatewayService_QoE_Handler, }, + }, + Streams: []grpc.StreamDesc{ { - MethodName: "VPN", - Handler: _GatewayService_VPN_Handler, + StreamName: "VPN", + Handler: _GatewayService_VPN_Handler, + ServerStreams: true, }, }, - Streams: []grpc.StreamDesc{}, Metadata: "gateway.proto", } diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index fffa3bb..0a5eb7b 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -1,5 +1,7 @@ syntax = "proto3"; +import "google/protobuf/any.proto"; + package apis; // EndpointType defines supported endpoints' types @@ -55,29 +57,73 @@ message RequestQoE { map qoes = 1; } // it is the same message as request, but the gateway populates labels and // err for each qoe. message ResponseQoE { map qoes = 1; } -// RouteDistinguisherType lists supported Route Destinguisher types -enum RouteDistinguisherType { - INVALID = 0; - TWOOCTETAS = 1; - FOUROCTETAS = 2; - IPADDRESS = 3; + +message RouteDistinguisherTwoOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +message RouteDistinguisherIPAddress { + string admin = 1; + uint32 assigned = 2; +} +message RouteDistinguisherFourOctetAS { + uint32 admin = 1; + uint32 assigned = 2; +} +message TwoOctetAsSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; } -// RequestVPNLabel defines the rpc message which is sent by the client to the Gateway -// to request Layer3 VPN label for the corresponding Route Distinguisher. -message RequestVPNLabel { - RouteDistinguisherType type = 1; - bytes rd = 2; + +message IPv4AddressSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + string address = 3; + uint32 local_admin = 4; } -// ResponseVPNLabel defines the rpc message which is sent by the Gateway to the client -// in response to RequestVPNLabel. If VPN label is not found, the error will be returned. -message ResponseVPNLabel { - repeated uint32 label = 1; - GatewayErrors err = 2; + +message FourOctetAsSpecificExtended { + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; } -// GatewayService lists rpc services supported by the gateway api + +// RequestVPN call used to request L3 VPN entries, identified by one Route Distinguisher +// which can be one of listed below types, and one or more Route Targets. +message RequestVPN { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any import_rt = 2; + } + + message ResponseVPNEntry { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any import_rt = 2; + uint32 label = 3; + } + + // GatewayService lists rpc services supported by the gateway api service GatewayService { // API to request specified Quality of Experience rpc QoE(RequestQoE) returns (ResponseQoE); // API to request L3 VPN label for specified VRF, identified by Route Distinguisher - rpc VPN(RequestVPNLabel) returns (ResponseVPNLabel); + rpc VPN(RequestVPN) returns (stream ResponseVPNEntry); } \ No newline at end of file From 3a1d6cc187dc2f3a8d933fbeeb62e1ef12000119 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Fri, 31 Jan 2020 22:46:19 -0500 Subject: [PATCH 11/13] update rt name Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 101 +++++++++++++++++++++-------------------- pkg/apis/gateway.proto | 2 +- 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index d23dbdf..e83cd3b 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -735,7 +735,7 @@ type RequestVPN struct { // TwoOctetAsSpecificExtended, // IPv4AddressSpecificExtended, // or FourOctetAsSpecificExtended. - ImportRt []*any.Any `protobuf:"bytes,2,rep,name=import_rt,json=importRt,proto3" json:"import_rt,omitempty"` + Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -773,9 +773,9 @@ func (m *RequestVPN) GetRd() *any.Any { return nil } -func (m *RequestVPN) GetImportRt() []*any.Any { +func (m *RequestVPN) GetRt() []*any.Any { if m != nil { - return m.ImportRt + return m.Rt } return nil } @@ -867,56 +867,57 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 783 bytes of a gzipped FileDescriptorProto + // 787 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6f, 0xe3, 0x44, 0x14, 0x5e, 0xdb, 0x49, 0x93, 0xbc, 0xd4, 0x91, 0x19, 0x2a, 0x94, 0x4d, 0x17, 0x6d, 0x64, 0x7e, 0x55, 0x3d, 0xa4, 0x6c, 0x59, 0xa1, 0x05, 0x89, 0x43, 0x51, 0x0d, 0x84, 0x05, 0x3b, 0x9d, 0x64, - 0xcb, 0x31, 0x9a, 0xc4, 0xb3, 0x61, 0x44, 0xea, 0x71, 0x67, 0xc6, 0x59, 0x72, 0x03, 0xee, 0x70, - 0xe6, 0xaf, 0xe0, 0x6f, 0x44, 0x33, 0x63, 0x3b, 0x1b, 0x0a, 0x02, 0x21, 0x56, 0xe2, 0xe6, 0xf7, - 0xde, 0xf7, 0xbe, 0x79, 0xf3, 0x8d, 0xdf, 0x07, 0xfe, 0x8a, 0x28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6, 0xbd, 0x6f, 0xfc, 0x3e, 0xf0, 0x57, 0x44, 0xd1, 0x17, 0x64, 0x3b, 0xca, + 0x05, 0x57, 0x1c, 0x35, 0x48, 0xce, 0xe4, 0xe0, 0xfe, 0x8a, 0xf3, 0xd5, 0x9a, 0x9e, 0x98, 0xdc, + 0xa2, 0x78, 0x7e, 0x42, 0xb2, 0x12, 0x10, 0x7e, 0x05, 0x6d, 0x9a, 0xa5, 0x39, 0x67, 0x99, 0x42, + 0xef, 0x42, 0x43, 0x6d, 0x73, 0xda, 0x77, 0x86, 0xce, 0x51, 0xef, 0x14, 0x8d, 0xf4, 0xd9, 0x51, + 0x54, 0x56, 0x67, 0xdb, 0x9c, 0x62, 0x53, 0x47, 0x7d, 0x68, 0x91, 0x34, 0x15, 0x54, 0xca, 0xbe, + 0x3b, 0x74, 0x8e, 0xf6, 0x71, 0x15, 0x86, 0x9f, 0x40, 0x6b, 0x4d, 0x14, 0xcd, 0x96, 0x5b, 0x74, + 0x00, 0xcd, 0x0d, 0x59, 0x17, 0x96, 0xad, 0x89, 0x6d, 0x80, 0x1e, 0x40, 0x67, 0x43, 0x04, 0x23, + 0x8a, 0xf1, 0xcc, 0x1c, 0x6e, 0xe2, 0x9b, 0x44, 0xf8, 0x11, 0xf4, 0xae, 0x39, 0x9d, 0xe7, 0x44, + 0x90, 0x2b, 0xaa, 0xa8, 0x90, 0xe8, 0xbd, 0x9a, 0xd0, 0xf0, 0x74, 0x4f, 0x7d, 0xdb, 0x55, 0x99, + 0xc4, 0x55, 0x35, 0xfc, 0xdd, 0x01, 0xef, 0x9a, 0x53, 0x34, 0x04, 0x4f, 0x8a, 0x65, 0x09, 0xee, + 0x59, 0x70, 0x35, 0x20, 0xd6, 0x25, 0x8d, 0x48, 0xa5, 0x32, 0x97, 0xff, 0x05, 0x22, 0x95, 0x5a, + 0x07, 0x4d, 0xd5, 0xf7, 0x0c, 0xe2, 0xc0, 0x22, 0x76, 0xfb, 0xc2, 0xe6, 0xae, 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, 0x61, 0x58, 0xdd, 0xd8, 0x97, 0x9d, + 0xdd, 0x06, 0xc7, 0x4f, 0x60, 0xff, 0x65, 0xcb, 0x47, 0x5d, 0x68, 0x3d, 0x8b, 0x9f, 0xc6, 0xc9, + 0x37, 0x71, 0x70, 0x0f, 0xb5, 0xa1, 0x31, 0x9e, 0x5c, 0x3e, 0x0e, 0x9c, 0xf2, 0xeb, 0xc3, 0xc0, + 0x45, 0x2d, 0xf0, 0xa6, 0xe3, 0xf3, 0xc0, 0x3b, 0xfe, 0x12, 0xfc, 0x1d, 0x9f, 0x43, 0x7b, 0xe0, + 0x26, 0x4f, 0x83, 0x7b, 0x1a, 0x11, 0x8d, 0x93, 0xc0, 0x41, 0x00, 0x7b, 0x51, 0x9c, 0x44, 0xf1, + 0x2c, 0x70, 0x91, 0x0f, 0x9d, 0x68, 0x36, 0xfe, 0x3a, 0x3a, 0x4f, 0x9e, 0xcd, 0x02, 0xcf, 0x84, + 0x5f, 0x24, 0xd3, 0xd9, 0xb9, 0xbe, 0xa8, 0x71, 0xca, 0xa1, 0x57, 0x72, 0x4d, 0xa9, 0xd8, 0xb0, + 0x25, 0x45, 0xc7, 0xe0, 0x69, 0x8f, 0x0a, 0xfe, 0xec, 0x8c, 0x83, 0xd7, 0x6e, 0xf9, 0x14, 0x7a, + 0x04, 0x9e, 0x7e, 0x9a, 0x5d, 0xec, 0xe5, 0x24, 0x1e, 0xbc, 0xb1, 0x8b, 0xad, 0x34, 0x7e, 0xdf, + 0x59, 0xec, 0x19, 0x91, 0x3e, 0xf8, 0x23, 0x00, 0x00, 0xff, 0xff, 0x97, 0x4e, 0xf1, 0xf7, 0x40, + 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 0a5eb7b..f770930 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -103,7 +103,7 @@ message RequestVPN { // TwoOctetAsSpecificExtended, // IPv4AddressSpecificExtended, // or FourOctetAsSpecificExtended. - repeated google.protobuf.Any import_rt = 2; + repeated google.protobuf.Any rt = 2; } message ResponseVPNEntry { From 0e4f13f752edffbfb26926573690a808ff7a2513 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Sat, 1 Feb 2020 11:48:00 -0500 Subject: [PATCH 12/13] change name Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 123 +++++++++++++++++++++-------------------- pkg/apis/gateway.proto | 109 ++++++++++++++++++------------------ 2 files changed, 119 insertions(+), 113 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index e83cd3b..9383ba5 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -97,10 +97,11 @@ func (GatewayErrors) EnumDescriptor() ([]byte, []int) { return fileDescriptor_f1a937782ebbded5, []int{1} } -// endpoint is an object defining a source or a destination of a communication path. -// The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. -// The list of supported endpoint types may be extended in future. -// The address of endpoint is stored in a slice of bytes and should be decoded according to the endpoint type. +// endpoint is an object defining a source or a destination of a communication +// path. The type of the endpoint is defined by EndpointType, it can be ipv4, +// ipv6 addresses or segment routing SIDs etc. The list of supported endpoint +// types may be extended in future. The address of endpoint is stored in a slice +// of bytes and should be decoded according to the endpoint type. type Endpoint struct { Type EndpointType `protobuf:"varint,1,opt,name=type,proto3,enum=apis.EndpointType" json:"type,omitempty"` Address []byte `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` @@ -723,8 +724,9 @@ func (m *FourOctetAsSpecificExtended) GetLocalAdmin() uint32 { return 0 } -// RequestVPN call used to request L3 VPN entries, identified by one Route Distinguisher -// which can be one of listed below types, and one or more Route Targets. +// RequestVPN call used to request L3 VPN entries, identified by one Route +// Distinguisher which can be one of listed below types, and one or more Route +// Targets. type RequestVPN struct { // Route Distinguisher must be one of // RouteDistinguisherTwoOctetAS, @@ -790,7 +792,7 @@ type ResponseVPNEntry struct { // TwoOctetAsSpecificExtended, // IPv4AddressSpecificExtended, // or FourOctetAsSpecificExtended. - ImportRt []*any.Any `protobuf:"bytes,2,rep,name=import_rt,json=importRt,proto3" json:"import_rt,omitempty"` + Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` Label uint32 `protobuf:"varint,3,opt,name=label,proto3" json:"label,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -829,9 +831,9 @@ func (m *ResponseVPNEntry) GetRd() *any.Any { return nil } -func (m *ResponseVPNEntry) GetImportRt() []*any.Any { +func (m *ResponseVPNEntry) GetRt() []*any.Any { if m != nil { - return m.ImportRt + return m.Rt } return nil } @@ -867,57 +869,56 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 787 bytes of a gzipped FileDescriptorProto + // 772 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6f, 0xe3, 0x44, 0x14, 0x5e, 0xdb, 0x49, 0x93, 0xbc, 0xd4, 0x91, 0x19, 0x2a, 0x94, 0x4d, 0x17, 0x6d, 0x64, 0x7e, - 0x55, 0x3d, 0xa4, 0x6c, 0x59, 0xa1, 0x05, 0x89, 0x43, 0x51, 0x0d, 0x84, 0x05, 0x3b, 0x9d, 0x64, - 0x0b, 0xb7, 0x68, 0x12, 0xcf, 0x86, 0x11, 0xa9, 0xc7, 0x9d, 0x19, 0x67, 0xc9, 0x0d, 0xb8, 0xc3, - 0x99, 0xbf, 0x82, 0xbf, 0x11, 0xcd, 0x8c, 0xed, 0x6e, 0x28, 0x62, 0x2b, 0x04, 0x12, 0x37, 0xbf, - 0xf7, 0xbe, 0xf9, 0xe6, 0xbd, 0x6f, 0xfc, 0x3e, 0xf0, 0x57, 0x44, 0xd1, 0x17, 0x64, 0x3b, 0xca, - 0x05, 0x57, 0x1c, 0x35, 0x48, 0xce, 0xe4, 0xe0, 0xfe, 0x8a, 0xf3, 0xd5, 0x9a, 0x9e, 0x98, 0xdc, - 0xa2, 0x78, 0x7e, 0x42, 0xb2, 0x12, 0x10, 0x7e, 0x05, 0x6d, 0x9a, 0xa5, 0x39, 0x67, 0x99, 0x42, - 0xef, 0x42, 0x43, 0x6d, 0x73, 0xda, 0x77, 0x86, 0xce, 0x51, 0xef, 0x14, 0x8d, 0xf4, 0xd9, 0x51, - 0x54, 0x56, 0x67, 0xdb, 0x9c, 0x62, 0x53, 0x47, 0x7d, 0x68, 0x91, 0x34, 0x15, 0x54, 0xca, 0xbe, - 0x3b, 0x74, 0x8e, 0xf6, 0x71, 0x15, 0x86, 0x9f, 0x40, 0x6b, 0x4d, 0x14, 0xcd, 0x96, 0x5b, 0x74, - 0x00, 0xcd, 0x0d, 0x59, 0x17, 0x96, 0xad, 0x89, 0x6d, 0x80, 0x1e, 0x40, 0x67, 0x43, 0x04, 0x23, - 0x8a, 0xf1, 0xcc, 0x1c, 0x6e, 0xe2, 0x9b, 0x44, 0xf8, 0x11, 0xf4, 0xae, 0x39, 0x9d, 0xe7, 0x44, - 0x90, 0x2b, 0xaa, 0xa8, 0x90, 0xe8, 0xbd, 0x9a, 0xd0, 0xf0, 0x74, 0x4f, 0x7d, 0xdb, 0x55, 0x99, - 0xc4, 0x55, 0x35, 0xfc, 0xdd, 0x01, 0xef, 0x9a, 0x53, 0x34, 0x04, 0x4f, 0x8a, 0x65, 0x09, 0xee, - 0x59, 0x70, 0x35, 0x20, 0xd6, 0x25, 0x8d, 0x48, 0xa5, 0x32, 0x97, 0xff, 0x05, 0x22, 0x95, 0x5a, - 0x07, 0x4d, 0xd5, 0xf7, 0x0c, 0xe2, 0xc0, 0x22, 0x76, 0xfb, 0xc2, 0xe6, 0xae, 0x03, 0x68, 0xae, - 0xc9, 0x82,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, 0x2a, 0x08, 0xea, 0x75, 0xbb, 0x9c, 0x26, 0x76, 0xad, 0xee, 0x90, 0xff, 0xc6, 0xb0, 0xec, + 0xb4, 0x36, 0x38, 0x7e, 0x0c, 0xfb, 0x2f, 0x9b, 0x3c, 0xea, 0x43, 0xe7, 0x69, 0xf2, 0x24, 0x49, + 0xbf, 0x4d, 0x82, 0x7b, 0xa8, 0x0b, 0xad, 0xc9, 0xf4, 0xf2, 0x51, 0xe0, 0x54, 0x5f, 0x1f, 0x05, + 0x2e, 0xea, 0x80, 0x37, 0x9b, 0x9c, 0x07, 0xde, 0xf1, 0x57, 0xe0, 0xef, 0x38, 0x1b, 0xda, 0x03, + 0x37, 0x7d, 0x12, 0xdc, 0xd3, 0x88, 0x78, 0x92, 0x06, 0x0e, 0x02, 0xd8, 0x8b, 0x93, 0x34, 0x4e, + 0xe6, 0x81, 0x8b, 0x7c, 0xe8, 0xc5, 0xf3, 0xc9, 0x37, 0xf1, 0x79, 0xfa, 0x74, 0x1e, 0x78, 0x26, + 0xfc, 0x32, 0x9d, 0xcd, 0xcf, 0xf5, 0x45, 0xad, 0x53, 0x0e, 0x83, 0x8a, 0x6b, 0x46, 0xc5, 0x86, + 0x2d, 0x29, 0x3a, 0x06, 0x4f, 0xbb, 0x52, 0xf0, 0x67, 0x2f, 0x1c, 0xbd, 0x76, 0xcb, 0x99, 0xd0, + 0x07, 0xe0, 0xe9, 0xc7, 0xd8, 0xc5, 0x5e, 0x4e, 0x93, 0xd1, 0x1b, 0xbb, 0xd8, 0x5a, 0xd6, 0xf7, + 0x9d, 0xc5, 0x9e, 0x91, 0xe7, 0xc3, 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xad, 0x99, 0x2b, 0x1b, + 0x32, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -934,7 +935,8 @@ const _ = grpc.SupportPackageIsVersion4 type GatewayServiceClient interface { // API to request specified Quality of Experience QoE(ctx context.Context, in *RequestQoE, opts ...grpc.CallOption) (*ResponseQoE, error) - // API to request L3 VPN label for specified VRF, identified by Route Distinguisher + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher VPN(ctx context.Context, in *RequestVPN, opts ...grpc.CallOption) (GatewayService_VPNClient, error) } @@ -991,7 +993,8 @@ func (x *gatewayServiceVPNClient) Recv() (*ResponseVPNEntry, error) { type GatewayServiceServer interface { // API to request specified Quality of Experience QoE(context.Context, *RequestQoE) (*ResponseQoE, error) - // API to request L3 VPN label for specified VRF, identified by Route Distinguisher + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher VPN(*RequestVPN, GatewayService_VPNServer) error } diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index f770930..5f87d98 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -25,10 +25,11 @@ enum GatewayErrors { // Returned when a gateway cannot reach a DB host EHOSTDOWN = 4; } -// endpoint is an object defining a source or a destination of a communication path. -// The type of the endpoint is defined by EndpointType, it can be ipv4, ipv6 addresses or segment routing SIDs etc. -// The list of supported endpoint types may be extended in future. -// The address of endpoint is stored in a slice of bytes and should be decoded according to the endpoint type. +// endpoint is an object defining a source or a destination of a communication +// path. The type of the endpoint is defined by EndpointType, it can be ipv4, +// ipv6 addresses or segment routing SIDs etc. The list of supported endpoint +// types may be extended in future. The address of endpoint is stored in a slice +// of bytes and should be decoded according to the endpoint type. message endpoint { EndpointType type = 1; bytes address = 2; @@ -59,71 +60,73 @@ message RequestQoE { map qoes = 1; } message ResponseQoE { map qoes = 1; } message RouteDistinguisherTwoOctetAS { - uint32 admin = 1; - uint32 assigned = 2; + uint32 admin = 1; + uint32 assigned = 2; } message RouteDistinguisherIPAddress { - string admin = 1; - uint32 assigned = 2; + string admin = 1; + uint32 assigned = 2; } message RouteDistinguisherFourOctetAS { - uint32 admin = 1; - uint32 assigned = 2; + uint32 admin = 1; + uint32 assigned = 2; } message TwoOctetAsSpecificExtended { - bool is_transitive = 1; - uint32 sub_type = 2; - uint32 as = 3; - uint32 local_admin = 4; + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; } message IPv4AddressSpecificExtended { - bool is_transitive = 1; - uint32 sub_type = 2; - string address = 3; - uint32 local_admin = 4; + bool is_transitive = 1; + uint32 sub_type = 2; + string address = 3; + uint32 local_admin = 4; } message FourOctetAsSpecificExtended { - bool is_transitive = 1; - uint32 sub_type = 2; - uint32 as = 3; - uint32 local_admin = 4; + bool is_transitive = 1; + uint32 sub_type = 2; + uint32 as = 3; + uint32 local_admin = 4; } -// RequestVPN call used to request L3 VPN entries, identified by one Route Distinguisher -// which can be one of listed below types, and one or more Route Targets. +// RequestVPN call used to request L3 VPN entries, identified by one Route +// Distinguisher which can be one of listed below types, and one or more Route +// Targets. message RequestVPN { - // Route Distinguisher must be one of - // RouteDistinguisherTwoOctetAS, - // RouteDistinguisherIPAddressAS, - // or RouteDistinguisherFourOctetAS. - google.protobuf.Any rd = 1; - // List of the Route Targets. Each must be one of - // TwoOctetAsSpecificExtended, - // IPv4AddressSpecificExtended, - // or FourOctetAsSpecificExtended. - repeated google.protobuf.Any rt = 2; - } + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any rt = 2; +} - message ResponseVPNEntry { - // Route Distinguisher must be one of - // RouteDistinguisherTwoOctetAS, - // RouteDistinguisherIPAddressAS, - // or RouteDistinguisherFourOctetAS. - google.protobuf.Any rd = 1; - // List of the Route Targets. Each must be one of - // TwoOctetAsSpecificExtended, - // IPv4AddressSpecificExtended, - // or FourOctetAsSpecificExtended. - repeated google.protobuf.Any import_rt = 2; - uint32 label = 3; - } +message ResponseVPNEntry { + // Route Distinguisher must be one of + // RouteDistinguisherTwoOctetAS, + // RouteDistinguisherIPAddressAS, + // or RouteDistinguisherFourOctetAS. + google.protobuf.Any rd = 1; + // List of the Route Targets. Each must be one of + // TwoOctetAsSpecificExtended, + // IPv4AddressSpecificExtended, + // or FourOctetAsSpecificExtended. + repeated google.protobuf.Any rt = 2; + uint32 label = 3; +} - // GatewayService lists rpc services supported by the gateway api +// GatewayService lists rpc services supported by the gateway api service GatewayService { - // API to request specified Quality of Experience - rpc QoE(RequestQoE) returns (ResponseQoE); - // API to request L3 VPN label for specified VRF, identified by Route Distinguisher - rpc VPN(RequestVPN) returns (stream ResponseVPNEntry); + // API to request specified Quality of Experience + rpc QoE(RequestQoE) returns (ResponseQoE); + // API to request L3 VPN label for specified VRF, identified by Route + // Distinguisher + rpc VPN(RequestVPN) returns (stream ResponseVPNEntry); } \ No newline at end of file From 31198380488322c2b686ce157b4b9c13f6527720 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Tue, 4 Feb 2020 08:15:50 -0500 Subject: [PATCH 13/13] Add vpn prefix to vpn request Signed-off-by: Serguei Bezverkhi --- pkg/apis/gateway.pb.go | 172 +++++++++++++++++++++++++++-------------- pkg/apis/gateway.proto | 6 ++ 2 files changed, 122 insertions(+), 56 deletions(-) diff --git a/pkg/apis/gateway.pb.go b/pkg/apis/gateway.pb.go index 9383ba5..7fc5696 100644 --- a/pkg/apis/gateway.pb.go +++ b/pkg/apis/gateway.pb.go @@ -724,6 +724,53 @@ func (m *FourOctetAsSpecificExtended) GetLocalAdmin() uint32 { return 0 } +type Prefix struct { + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + MaskLength uint32 `protobuf:"varint,2,opt,name=mask_length,json=maskLength,proto3" json:"mask_length,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Prefix) Reset() { *m = Prefix{} } +func (m *Prefix) String() string { return proto.CompactTextString(m) } +func (*Prefix) ProtoMessage() {} +func (*Prefix) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{12} +} + +func (m *Prefix) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Prefix.Unmarshal(m, b) +} +func (m *Prefix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Prefix.Marshal(b, m, deterministic) +} +func (m *Prefix) XXX_Merge(src proto.Message) { + xxx_messageInfo_Prefix.Merge(m, src) +} +func (m *Prefix) XXX_Size() int { + return xxx_messageInfo_Prefix.Size(m) +} +func (m *Prefix) XXX_DiscardUnknown() { + xxx_messageInfo_Prefix.DiscardUnknown(m) +} + +var xxx_messageInfo_Prefix proto.InternalMessageInfo + +func (m *Prefix) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *Prefix) GetMaskLength() uint32 { + if m != nil { + return m.MaskLength + } + return 0 +} + // RequestVPN call used to request L3 VPN entries, identified by one Route // Distinguisher which can be one of listed below types, and one or more Route // Targets. @@ -737,17 +784,19 @@ type RequestVPN struct { // TwoOctetAsSpecificExtended, // IPv4AddressSpecificExtended, // or FourOctetAsSpecificExtended. - Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Rt []*any.Any `protobuf:"bytes,2,rep,name=rt,proto3" json:"rt,omitempty"` + // vpn_prefix is L3 VPN prefix which vpn label is requested for. + VpnPrefix *Prefix `protobuf:"bytes,3,opt,name=vpn_prefix,json=vpnPrefix,proto3" json:"vpn_prefix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *RequestVPN) Reset() { *m = RequestVPN{} } func (m *RequestVPN) String() string { return proto.CompactTextString(m) } func (*RequestVPN) ProtoMessage() {} func (*RequestVPN) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{12} + return fileDescriptor_f1a937782ebbded5, []int{13} } func (m *RequestVPN) XXX_Unmarshal(b []byte) error { @@ -782,6 +831,13 @@ func (m *RequestVPN) GetRt() []*any.Any { return nil } +func (m *RequestVPN) GetVpnPrefix() *Prefix { + if m != nil { + return m.VpnPrefix + } + return nil +} + type ResponseVPNEntry struct { // Route Distinguisher must be one of // RouteDistinguisherTwoOctetAS, @@ -803,7 +859,7 @@ func (m *ResponseVPNEntry) Reset() { *m = ResponseVPNEntry{} } func (m *ResponseVPNEntry) String() string { return proto.CompactTextString(m) } func (*ResponseVPNEntry) ProtoMessage() {} func (*ResponseVPNEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{13} + return fileDescriptor_f1a937782ebbded5, []int{14} } func (m *ResponseVPNEntry) XXX_Unmarshal(b []byte) error { @@ -862,6 +918,7 @@ func init() { proto.RegisterType((*TwoOctetAsSpecificExtended)(nil), "apis.TwoOctetAsSpecificExtended") proto.RegisterType((*IPv4AddressSpecificExtended)(nil), "apis.IPv4AddressSpecificExtended") proto.RegisterType((*FourOctetAsSpecificExtended)(nil), "apis.FourOctetAsSpecificExtended") + proto.RegisterType((*Prefix)(nil), "apis.Prefix") proto.RegisterType((*RequestVPN)(nil), "apis.RequestVPN") proto.RegisterType((*ResponseVPNEntry)(nil), "apis.ResponseVPNEntry") } @@ -869,56 +926,59 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 772 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x54, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x5e, 0xdb, 0x49, 0x93, 0xbc, 0xd4, 0x91, 0x19, 0x2a, 0x94, 0x4d, 0x17, 0x6d, 0x64, 0x7e, - 0x55, 0x3d, 0xb8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00, 0xff, 0xff, 0xad, 0x99, 0x2b, 0x1b, - 0x32, 0x07, 0x00, 0x00, + // 827 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x5d, 0x6f, 0x23, 0x35, + 0x14, 0xdd, 0x99, 0x49, 0x9a, 0xe4, 0xa6, 0x13, 0x0d, 0xa6, 0x42, 0xd9, 0x74, 0xd1, 0x46, 0xc3, + 0x57, 0x55, 0xa4, 0x14, 0xca, 0x0a, 0x2d, 0x48, 0x3c, 0x14, 0x3a, 0x40, 0xd8, 0x25, 0x49, 0x9d, + 0x6c, 0x79, 0x8c, 0x9c, 0x8c, 0x9b, 0xb5, 0x36, 0xb5, 0xa7, 0xb6, 0x93, 0xdd, 0xbc, 0x21, 0x24, + 0x1e, 0xe1, 0x99, 0x5f, 0xc1, 0x6f, 0x44, 0xb6, 0x67, 0xa6, 0x0d, 0x45, 0x80, 0x50, 0x91, 0xf6, + 0x6d, 0xee, 0xf5, 0xf1, 0xf1, 0xf1, 0x71, 0xee, 0x09, 0x84, 0x0b, 0xa2, 0xe9, 0x4b, 0xb2, 0xe9, + 0x65, 0x52, 0x68, 0x81, 0x2a, 0x24, 0x63, 0xaa, 0x73, 0x7f, 0x21, 0xc4, 0x62, 0x49, 0x8f, 0x6c, + 0x6f, 0xb6, 0xba, 0x38, 0x22, 0x3c, 0x07, 0xc4, 0x4f, 0xa1, 0x4e, 0x79, 0x9a, 0x09, 0xc6, 0x35, + 0x7a, 0x1f, 0x2a, 0x7a, 0x93, 0xd1, 0xb6, 0xd7, 0xf5, 0x0e, 0x5a, 0xc7, 0xa8, 0x67, 0xf6, 0xf6, + 0x92, 0x7c, 0x75, 0xb2, 0xc9, 0x28, 0xb6, 0xeb, 0xa8, 0x0d, 0x35, 0x92, 0xa6, 0x92, 0x2a, 0xd5, + 0xf6, 0xbb, 0xde, 0xc1, 0x2e, 0x2e, 0xca, 0xf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0x10, 0x8c, 0xfb, 0xa7, 0x51, 0x70, 0xf8, 0x1d, + 0x84, 0x5b, 0x61, 0x8a, 0x76, 0xc0, 0x1f, 0x3e, 0x89, 0xee, 0x19, 0x44, 0xd2, 0x1f, 0x46, 0x1e, + 0x02, 0xd8, 0x49, 0x06, 0xc3, 0x64, 0x30, 0x89, 0x7c, 0x14, 0x42, 0x23, 0x99, 0xf4, 0xbf, 0x4f, + 0x4e, 0x87, 0xcf, 0x26, 0x51, 0x60, 0xcb, 0x6f, 0x87, 0xe3, 0xc9, 0xa9, 0x39, 0xa8, 0x72, 0x2c, + 0xa0, 0x95, 0x73, 0x8d, 0xa9, 0x5c, 0xb3, 0x39, 0x45, 0x87, 0x10, 0x98, 0x20, 0x8c, 0xfe, 0x1c, + 0xbf, 0x9d, 0x37, 0x6e, 0x85, 0x21, 0xfa, 0x18, 0x02, 0xf3, 0x72, 0xdb, 0xd8, 0xf3, 0xd1, 0xa0, + 0xf3, 0xd6, 0x36, 0xb6, 0xb0, 0xf5, 0x23, 0x6f, 0xb6, 0x63, 0xed, 0xf9, 0xe4, 0x8f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x23, 0x51, 0xb2, 0x66, 0xa5, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/apis/gateway.proto b/pkg/apis/gateway.proto index 5f87d98..1aaabba 100644 --- a/pkg/apis/gateway.proto +++ b/pkg/apis/gateway.proto @@ -92,6 +92,10 @@ message FourOctetAsSpecificExtended { uint32 local_admin = 4; } +message Prefix { + bytes address = 1; + uint32 mask_length = 2; +} // RequestVPN call used to request L3 VPN entries, identified by one Route // Distinguisher which can be one of listed below types, and one or more Route // Targets. @@ -106,6 +110,8 @@ message RequestVPN { // IPv4AddressSpecificExtended, // or FourOctetAsSpecificExtended. repeated google.protobuf.Any rt = 2; + // vpn_prefix is L3 VPN prefix which vpn label is requested for. + Prefix vpn_prefix = 3; } message ResponseVPNEntry {