diff --git a/charts/smi-conformance-0.1.0.tgz b/charts/smi-conformance-0.1.0.tgz index 17c2c51..b381554 100644 Binary files a/charts/smi-conformance-0.1.0.tgz and b/charts/smi-conformance-0.1.0.tgz differ diff --git a/smi-conformance/conformance/conformance.pb.go b/smi-conformance/conformance/conformance.pb.go index 34d9028..3a8c779 100644 --- a/smi-conformance/conformance/conformance.pb.go +++ b/smi-conformance/conformance/conformance.pb.go @@ -1,14 +1,17 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.21.0 -// protoc v3.12.3 -// source: conformance/conformance.proto +// protoc-gen-go v1.24.0 +// protoc v3.6.1 +// source: learn-layer5/smi-conformance/conformance/conformance.proto package conformance import ( context "context" proto "github.com/golang/protobuf/proto" + empty "github.com/golang/protobuf/ptypes/empty" + service "github.com/layer5io/service-mesh-performance/service" + spec "github.com/layer5io/service-mesh-performance/spec" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -29,21 +32,162 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 +type Capability int32 + +const ( + Capability_FULL Capability = 0 + Capability_HALF Capability = 1 + Capability_NONE Capability = 2 +) + +// Enum value maps for Capability. +var ( + Capability_name = map[int32]string{ + 0: "FULL", + 1: "HALF", + 2: "NONE", + } + Capability_value = map[string]int32{ + "FULL": 0, + "HALF": 1, + "NONE": 2, + } +) + +func (x Capability) Enum() *Capability { + p := new(Capability) + *p = x + return p +} + +func (x Capability) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Capability) Descriptor() protoreflect.EnumDescriptor { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[0].Descriptor() +} + +func (Capability) Type() protoreflect.EnumType { + return &file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[0] +} + +func (x Capability) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Capability.Descriptor instead. +func (Capability) EnumDescriptor() ([]byte, []int) { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{0} +} + +type TestStatus int32 + +const ( + TestStatus_COMPLETED TestStatus = 0 + TestStatus_INPROGRESS TestStatus = 1 + TestStatus_CRASHED TestStatus = 2 +) + +// Enum value maps for TestStatus. +var ( + TestStatus_name = map[int32]string{ + 0: "COMPLETED", + 1: "INPROGRESS", + 2: "CRASHED", + } + TestStatus_value = map[string]int32{ + "COMPLETED": 0, + "INPROGRESS": 1, + "CRASHED": 2, + } +) + +func (x TestStatus) Enum() *TestStatus { + p := new(TestStatus) + *p = x + return p +} + +func (x TestStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TestStatus) Descriptor() protoreflect.EnumDescriptor { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[1].Descriptor() +} + +func (TestStatus) Type() protoreflect.EnumType { + return &file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[1] +} + +func (x TestStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TestStatus.Descriptor instead. +func (TestStatus) EnumDescriptor() ([]byte, []int) { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{1} +} + +type ResultStatus int32 + +const ( + ResultStatus_PASSED ResultStatus = 0 + ResultStatus_FAILED ResultStatus = 1 +) + +// Enum value maps for ResultStatus. +var ( + ResultStatus_name = map[int32]string{ + 0: "PASSED", + 1: "FAILED", + } + ResultStatus_value = map[string]int32{ + "PASSED": 0, + "FAILED": 1, + } +) + +func (x ResultStatus) Enum() *ResultStatus { + p := new(ResultStatus) + *p = x + return p +} + +func (x ResultStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResultStatus) Descriptor() protoreflect.EnumDescriptor { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[2].Descriptor() +} + +func (ResultStatus) Type() protoreflect.EnumType { + return &file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes[2] +} + +func (x ResultStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResultStatus.Descriptor instead. +func (ResultStatus) EnumDescriptor() ([]byte, []int) { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{2} +} + type Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Meshname string `protobuf:"bytes,1,opt,name=meshname,proto3" json:"meshname,omitempty"` - Annotations map[string]string `protobuf:"bytes,2,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Meshversion string `protobuf:"bytes,4,opt,name=meshversion,proto3" json:"meshversion,omitempty"` + Mesh *spec.ServiceMesh `protobuf:"bytes,1,opt,name=mesh,proto3" json:"mesh,omitempty"` } func (x *Request) Reset() { *x = Request{} if protoimpl.UnsafeEnabled { - mi := &file_conformance_conformance_proto_msgTypes[0] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +200,7 @@ func (x *Request) String() string { func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[0] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,55 +213,114 @@ func (x *Request) ProtoReflect() protoreflect.Message { // Deprecated: Use Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{0} + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{0} } -func (x *Request) GetMeshname() string { +func (x *Request) GetMesh() *spec.ServiceMesh { if x != nil { - return x.Meshname + return x.Mesh } - return "" + return nil } -func (x *Request) GetAnnotations() map[string]string { - if x != nil { - return x.Annotations +type Result struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Result: + // *Result_Message + // *Result_Error + Result isResult_Result `protobuf_oneof:"result"` +} + +func (x *Result) Reset() { + *x = Result{} + if protoimpl.UnsafeEnabled { + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *Request) GetLabels() map[string]string { - if x != nil { - return x.Labels +func (x *Result) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Result) ProtoMessage() {} + +func (x *Result) ProtoReflect() protoreflect.Message { + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Result.ProtoReflect.Descriptor instead. +func (*Result) Descriptor() ([]byte, []int) { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{1} +} + +func (m *Result) GetResult() isResult_Result { + if m != nil { + return m.Result } return nil } -func (x *Request) GetMeshversion() string { - if x != nil { - return x.Meshversion +func (x *Result) GetMessage() string { + if x, ok := x.GetResult().(*Result_Message); ok { + return x.Message } return "" } +func (x *Result) GetError() *service.CommonError { + if x, ok := x.GetResult().(*Result_Error); ok { + return x.Error + } + return nil +} + +type isResult_Result interface { + isResult_Result() +} + +type Result_Message struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3,oneof"` +} + +type Result_Error struct { + Error *service.CommonError `protobuf:"bytes,2,opt,name=error,proto3,oneof"` +} + +func (*Result_Message) isResult_Result() {} + +func (*Result_Error) isResult_Result() {} + type Detail struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Smispec string `protobuf:"bytes,1,opt,name=smispec,proto3" json:"smispec,omitempty"` - Time string `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` - Assertions string `protobuf:"bytes,3,opt,name=assertions,proto3" json:"assertions,omitempty"` - Result string `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` - Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` - Capability string `protobuf:"bytes,6,opt,name=capability,proto3" json:"capability,omitempty"` - Status string `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"` + Smispec string `protobuf:"bytes,1,opt,name=smispec,proto3" json:"smispec,omitempty"` + Specversion string `protobuf:"bytes,2,opt,name=specversion,proto3" json:"specversion,omitempty"` + Assertion string `protobuf:"bytes,3,opt,name=assertion,proto3" json:"assertion,omitempty"` + Duration string `protobuf:"bytes,4,opt,name=duration,proto3" json:"duration,omitempty"` + Result *Result `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` + Capability Capability `protobuf:"varint,6,opt,name=capability,proto3,enum=smi_conformance.Capability" json:"capability,omitempty"` + Status ResultStatus `protobuf:"varint,7,opt,name=status,proto3,enum=smi_conformance.ResultStatus" json:"status,omitempty"` } func (x *Detail) Reset() { *x = Detail{} if protoimpl.UnsafeEnabled { - mi := &file_conformance_conformance_proto_msgTypes[1] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -130,7 +333,7 @@ func (x *Detail) String() string { func (*Detail) ProtoMessage() {} func (x *Detail) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[1] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -143,7 +346,7 @@ func (x *Detail) ProtoReflect() protoreflect.Message { // Deprecated: Use Detail.ProtoReflect.Descriptor instead. func (*Detail) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{1} + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{2} } func (x *Detail) GetSmispec() string { @@ -153,46 +356,46 @@ func (x *Detail) GetSmispec() string { return "" } -func (x *Detail) GetTime() string { +func (x *Detail) GetSpecversion() string { if x != nil { - return x.Time + return x.Specversion } return "" } -func (x *Detail) GetAssertions() string { +func (x *Detail) GetAssertion() string { if x != nil { - return x.Assertions + return x.Assertion } return "" } -func (x *Detail) GetResult() string { +func (x *Detail) GetDuration() string { if x != nil { - return x.Result + return x.Duration } return "" } -func (x *Detail) GetReason() string { +func (x *Detail) GetResult() *Result { if x != nil { - return x.Reason + return x.Result } - return "" + return nil } -func (x *Detail) GetCapability() string { +func (x *Detail) GetCapability() Capability { if x != nil { return x.Capability } - return "" + return Capability_FULL } -func (x *Detail) GetStatus() string { +func (x *Detail) GetStatus() ResultStatus { if x != nil { return x.Status } - return "" + return ResultStatus_PASSED } type Response struct { @@ -200,15 +403,16 @@ type Response struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Passpercent string `protobuf:"bytes,1,opt,name=passpercent,proto3" json:"passpercent,omitempty"` - Casespassed string `protobuf:"bytes,2,opt,name=casespassed,proto3" json:"casespassed,omitempty"` - Details []*Detail `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` + Passpercent string `protobuf:"bytes,1,opt,name=passpercent,proto3" json:"passpercent,omitempty"` + Casespassed string `protobuf:"bytes,2,opt,name=casespassed,proto3" json:"casespassed,omitempty"` + Mesh *spec.ServiceMesh `protobuf:"bytes,3,opt,name=mesh,proto3" json:"mesh,omitempty"` + Details []*Detail `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"` } func (x *Response) Reset() { *x = Response{} if protoimpl.UnsafeEnabled { - mi := &file_conformance_conformance_proto_msgTypes[2] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -221,7 +425,7 @@ func (x *Response) String() string { func (*Response) ProtoMessage() {} func (x *Response) ProtoReflect() protoreflect.Message { - mi := &file_conformance_conformance_proto_msgTypes[2] + mi := &file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -234,7 +438,7 @@ func (x *Response) ProtoReflect() protoreflect.Message { // Deprecated: Use Response.ProtoReflect.Descriptor instead. func (*Response) Descriptor() ([]byte, []int) { - return file_conformance_conformance_proto_rawDescGZIP(), []int{2} + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP(), []int{3} } func (x *Response) GetPasspercent() string { @@ -251,6 +455,13 @@ func (x *Response) GetCasespassed() string { return "" } +func (x *Response) GetMesh() *spec.ServiceMesh { + if x != nil { + return x.Mesh + } + return nil +} + func (x *Response) GetDetails() []*Detail { if x != nil { return x.Details @@ -258,103 +469,147 @@ func (x *Response) GetDetails() []*Detail { return nil } -var File_conformance_conformance_proto protoreflect.FileDescriptor - -var file_conformance_conformance_proto_rawDesc = []byte{ - 0x0a, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x63, 0x6f, - 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x0f, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, - 0x22, 0xcd, 0x02, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x6d, 0x65, 0x73, 0x68, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, +var File_learn_layer5_smi_conformance_conformance_conformance_proto protoreflect.FileDescriptor + +var file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDesc = []byte{ + 0x0a, 0x3a, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x2d, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x35, 0x2f, 0x73, + 0x6d, 0x69, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x63, + 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6d, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, + 0x63, 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x68, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x2d, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, + 0x65, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, 0x6d, 0x65, + 0x73, 0x68, 0x2d, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6d, 0x65, + 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x6d, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, + 0x65, 0x73, 0x68, 0x52, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x22, 0x5c, 0x0a, 0x06, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, + 0x2c, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x08, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0xa3, 0x02, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x6d, 0x69, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6d, 0x69, 0x73, 0x70, 0x65, 0x63, 0x12, 0x20, 0x0a, 0x0b, + 0x73, 0x70, 0x65, 0x63, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x70, 0x65, 0x63, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x3b, 0x0a, 0x0a, 0x63, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x68, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xbe, 0x01, 0x0a, 0x06, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x73, - 0x6d, 0x69, 0x73, 0x70, 0x65, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x6d, - 0x69, 0x73, 0x70, 0x65, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, - 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x81, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, - 0x0a, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0x73, 0x73, - 0x65, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x07, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x73, 0x32, 0x54, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x6e, 0x63, 0x65, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x07, 0x52, - 0x75, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, - 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, 0x63, - 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa7, 0x01, + 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, + 0x73, 0x73, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x70, 0x61, 0x73, 0x73, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x63, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x61, 0x73, 0x65, 0x73, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x12, 0x24, + 0x0a, 0x04, 0x6d, 0x65, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, + 0x6d, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4d, 0x65, 0x73, 0x68, 0x52, 0x04, + 0x6d, 0x65, 0x73, 0x68, 0x12, 0x31, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x07, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2a, 0x2a, 0x0a, 0x0a, 0x43, 0x61, 0x70, 0x61, 0x62, + 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x48, 0x41, 0x4c, 0x46, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x02, 0x2a, 0x38, 0x0a, 0x0a, 0x54, 0x65, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, + 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x52, 0x41, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x26, 0x0a, + 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, + 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x32, 0xc4, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x04, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x3e, 0x0a, 0x07, + 0x52, 0x75, 0x6e, 0x54, 0x65, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x6d, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x19, 0x5a, 0x17, + 0x63, 0x6f, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x3b, 0x63, 0x6f, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_conformance_conformance_proto_rawDescOnce sync.Once - file_conformance_conformance_proto_rawDescData = file_conformance_conformance_proto_rawDesc + file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescOnce sync.Once + file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescData = file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDesc ) -func file_conformance_conformance_proto_rawDescGZIP() []byte { - file_conformance_conformance_proto_rawDescOnce.Do(func() { - file_conformance_conformance_proto_rawDescData = protoimpl.X.CompressGZIP(file_conformance_conformance_proto_rawDescData) +func file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescGZIP() []byte { + file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescOnce.Do(func() { + file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescData = protoimpl.X.CompressGZIP(file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescData) }) - return file_conformance_conformance_proto_rawDescData -} - -var file_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_conformance_conformance_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: smi_conformance.Request - (*Detail)(nil), // 1: smi_conformance.Detail - (*Response)(nil), // 2: smi_conformance.Response - nil, // 3: smi_conformance.Request.AnnotationsEntry - nil, // 4: smi_conformance.Request.LabelsEntry -} -var file_conformance_conformance_proto_depIdxs = []int32{ - 3, // 0: smi_conformance.Request.annotations:type_name -> smi_conformance.Request.AnnotationsEntry - 4, // 1: smi_conformance.Request.labels:type_name -> smi_conformance.Request.LabelsEntry - 1, // 2: smi_conformance.Response.details:type_name -> smi_conformance.Detail - 0, // 3: smi_conformance.conformanceTesting.RunTest:input_type -> smi_conformance.Request - 2, // 4: smi_conformance.conformanceTesting.RunTest:output_type -> smi_conformance.Response - 4, // [4:5] is the sub-list for method output_type - 3, // [3:4] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_conformance_conformance_proto_init() } -func file_conformance_conformance_proto_init() { - if File_conformance_conformance_proto != nil { + return file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDescData +} + +var file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_learn_layer5_smi_conformance_conformance_conformance_proto_goTypes = []interface{}{ + (Capability)(0), // 0: smi_conformance.Capability + (TestStatus)(0), // 1: smi_conformance.TestStatus + (ResultStatus)(0), // 2: smi_conformance.ResultStatus + (*Request)(nil), // 3: smi_conformance.Request + (*Result)(nil), // 4: smi_conformance.Result + (*Detail)(nil), // 5: smi_conformance.Detail + (*Response)(nil), // 6: smi_conformance.Response + (*spec.ServiceMesh)(nil), // 7: smp.ServiceMesh + (*service.CommonError)(nil), // 8: service.CommonError + (*empty.Empty)(nil), // 9: google.protobuf.Empty + (*service.ServiceInfo)(nil), // 10: service.ServiceInfo + (*service.ServiceHealth)(nil), // 11: service.ServiceHealth +} +var file_learn_layer5_smi_conformance_conformance_conformance_proto_depIdxs = []int32{ + 7, // 0: smi_conformance.Request.mesh:type_name -> smp.ServiceMesh + 8, // 1: smi_conformance.Result.error:type_name -> service.CommonError + 4, // 2: smi_conformance.Detail.result:type_name -> smi_conformance.Result + 0, // 3: smi_conformance.Detail.capability:type_name -> smi_conformance.Capability + 2, // 4: smi_conformance.Detail.status:type_name -> smi_conformance.ResultStatus + 7, // 5: smi_conformance.Response.mesh:type_name -> smp.ServiceMesh + 5, // 6: smi_conformance.Response.details:type_name -> smi_conformance.Detail + 9, // 7: smi_conformance.conformanceTesting.Info:input_type -> google.protobuf.Empty + 9, // 8: smi_conformance.conformanceTesting.Health:input_type -> google.protobuf.Empty + 3, // 9: smi_conformance.conformanceTesting.RunTest:input_type -> smi_conformance.Request + 10, // 10: smi_conformance.conformanceTesting.Info:output_type -> service.ServiceInfo + 11, // 11: smi_conformance.conformanceTesting.Health:output_type -> service.ServiceHealth + 6, // 12: smi_conformance.conformanceTesting.RunTest:output_type -> smi_conformance.Response + 10, // [10:13] is the sub-list for method output_type + 7, // [7:10] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_learn_layer5_smi_conformance_conformance_conformance_proto_init() } +func file_learn_layer5_smi_conformance_conformance_conformance_proto_init() { + if File_learn_layer5_smi_conformance_conformance_conformance_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_conformance_conformance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Request); i { case 0: return &v.state @@ -366,7 +621,19 @@ func file_conformance_conformance_proto_init() { return nil } } - file_conformance_conformance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Detail); i { case 0: return &v.state @@ -378,7 +645,7 @@ func file_conformance_conformance_proto_init() { return nil } } - file_conformance_conformance_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Response); i { case 0: return &v.state @@ -391,24 +658,29 @@ func file_conformance_conformance_proto_init() { } } } + file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Result_Message)(nil), + (*Result_Error)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_conformance_conformance_proto_rawDesc, - NumEnums: 0, - NumMessages: 5, + RawDescriptor: file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDesc, + NumEnums: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_conformance_conformance_proto_goTypes, - DependencyIndexes: file_conformance_conformance_proto_depIdxs, - MessageInfos: file_conformance_conformance_proto_msgTypes, + GoTypes: file_learn_layer5_smi_conformance_conformance_conformance_proto_goTypes, + DependencyIndexes: file_learn_layer5_smi_conformance_conformance_conformance_proto_depIdxs, + EnumInfos: file_learn_layer5_smi_conformance_conformance_conformance_proto_enumTypes, + MessageInfos: file_learn_layer5_smi_conformance_conformance_conformance_proto_msgTypes, }.Build() - File_conformance_conformance_proto = out.File - file_conformance_conformance_proto_rawDesc = nil - file_conformance_conformance_proto_goTypes = nil - file_conformance_conformance_proto_depIdxs = nil + File_learn_layer5_smi_conformance_conformance_conformance_proto = out.File + file_learn_layer5_smi_conformance_conformance_conformance_proto_rawDesc = nil + file_learn_layer5_smi_conformance_conformance_conformance_proto_goTypes = nil + file_learn_layer5_smi_conformance_conformance_conformance_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -423,6 +695,8 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ConformanceTestingClient interface { + Info(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*service.ServiceInfo, error) + Health(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*service.ServiceHealth, error) RunTest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) } @@ -434,6 +708,24 @@ func NewConformanceTestingClient(cc grpc.ClientConnInterface) ConformanceTesting return &conformanceTestingClient{cc} } +func (c *conformanceTestingClient) Info(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*service.ServiceInfo, error) { + out := new(service.ServiceInfo) + err := c.cc.Invoke(ctx, "/smi_conformance.conformanceTesting/Info", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *conformanceTestingClient) Health(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*service.ServiceHealth, error) { + out := new(service.ServiceHealth) + err := c.cc.Invoke(ctx, "/smi_conformance.conformanceTesting/Health", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *conformanceTestingClient) RunTest(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/smi_conformance.conformanceTesting/RunTest", in, out, opts...) @@ -445,6 +737,8 @@ func (c *conformanceTestingClient) RunTest(ctx context.Context, in *Request, opt // ConformanceTestingServer is the server API for ConformanceTesting service. type ConformanceTestingServer interface { + Info(context.Context, *empty.Empty) (*service.ServiceInfo, error) + Health(context.Context, *empty.Empty) (*service.ServiceHealth, error) RunTest(context.Context, *Request) (*Response, error) } @@ -452,6 +746,12 @@ type ConformanceTestingServer interface { type UnimplementedConformanceTestingServer struct { } +func (*UnimplementedConformanceTestingServer) Info(context.Context, *empty.Empty) (*service.ServiceInfo, error) { + return nil, status.Errorf(codes.Unimplemented, "method Info not implemented") +} +func (*UnimplementedConformanceTestingServer) Health(context.Context, *empty.Empty) (*service.ServiceHealth, error) { + return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") +} func (*UnimplementedConformanceTestingServer) RunTest(context.Context, *Request) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method RunTest not implemented") } @@ -460,6 +760,42 @@ func RegisterConformanceTestingServer(s *grpc.Server, srv ConformanceTestingServ s.RegisterService(&_ConformanceTesting_serviceDesc, srv) } +func _ConformanceTesting_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConformanceTestingServer).Info(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/smi_conformance.conformanceTesting/Info", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConformanceTestingServer).Info(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _ConformanceTesting_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ConformanceTestingServer).Health(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/smi_conformance.conformanceTesting/Health", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ConformanceTestingServer).Health(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _ConformanceTesting_RunTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Request) if err := dec(in); err != nil { @@ -482,11 +818,19 @@ var _ConformanceTesting_serviceDesc = grpc.ServiceDesc{ ServiceName: "smi_conformance.conformanceTesting", HandlerType: (*ConformanceTestingServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Info", + Handler: _ConformanceTesting_Info_Handler, + }, + { + MethodName: "Health", + Handler: _ConformanceTesting_Health_Handler, + }, { MethodName: "RunTest", Handler: _ConformanceTesting_RunTest_Handler, }, }, Streams: []grpc.StreamDesc{}, - Metadata: "conformance/conformance.proto", + Metadata: "learn-layer5/smi-conformance/conformance/conformance.proto", } diff --git a/smi-conformance/conformance/conformance.proto b/smi-conformance/conformance/conformance.proto index 6a8fdfc..625aa6b 100644 --- a/smi-conformance/conformance/conformance.proto +++ b/smi-conformance/conformance/conformance.proto @@ -1,31 +1,60 @@ syntax = "proto3"; -package smi_conformance; +import "google/protobuf/empty.proto"; +import "service-mesh-performance/service/error.proto"; +import "service-mesh-performance/service/health.proto"; +import "service-mesh-performance/service/info.proto"; +import "service-mesh-performance/protos/service_mesh.proto"; +package smi_conformance; option go_package = "conformance;conformance"; +enum Capability { + FULL = 0; + HALF = 1; + NONE = 2; +} + +enum TestStatus { + COMPLETED = 0; + INPROGRESS = 1; + CRASHED = 2; +} + +enum ResultStatus { + PASSED = 0; + FAILED = 1; +} + message Request { - string meshname = 1; - map annotations = 2; - map labels = 3; - string meshversion = 4; + smp.ServiceMesh mesh = 1; +} + +message Result { + oneof result { + string message = 1; + service.CommonError error = 2; + } } message Detail { string smispec = 1; - string time = 2; - string assertions = 3; - string result = 4; - string reason = 5; - string capability = 6; - string status = 7; + string specversion = 2; + string assertion = 3; + string duration = 4; + Result result = 5; + Capability capability = 6; + ResultStatus status = 7; } message Response { - string passpercent = 1; + string passpercent = 1; string casespassed = 2; - repeated Detail details = 3; + smp.ServiceMesh mesh = 3; + repeated Detail details = 5; } service conformanceTesting{ + rpc Info (google.protobuf.Empty) returns (service.ServiceInfo); + rpc Health (google.protobuf.Empty) returns (service.ServiceHealth); rpc RunTest (Request) returns (Response); } \ No newline at end of file diff --git a/smi-conformance/go.mod b/smi-conformance/go.mod index 4f0a1f9..7a805f6 100644 --- a/smi-conformance/go.mod +++ b/smi-conformance/go.mod @@ -9,6 +9,8 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 github.com/kr/text v0.2.0 // indirect github.com/kudobuilder/kuttl v0.0.0-00010101000000-000000000000 + // github.com/layer5io/meshkit v0.2.0 + github.com/layer5io/service-mesh-performance v0.3.2-0.20210122142912-a94e0658b021 github.com/mattn/go-isatty v0.0.12 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/onsi/ginkgo v1.14.1 // indirect @@ -19,9 +21,8 @@ require ( golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect golang.org/x/sys v0.0.0-20201009025420-dfb3f7c4e634 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a // indirect google.golang.org/grpc v1.30.0 - google.golang.org/protobuf v1.23.0 + google.golang.org/protobuf v1.24.0 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect k8s.io/api v0.17.3 k8s.io/client-go v0.17.3 diff --git a/smi-conformance/go.sum b/smi-conformance/go.sum index b8567e1..d359273 100644 --- a/smi-conformance/go.sum +++ b/smi-conformance/go.sum @@ -54,6 +54,7 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= @@ -102,6 +103,7 @@ github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkg github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -190,6 +192,7 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -270,6 +273,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/layer5io/kuttl v0.4.1-0.20200806180306-b7e46afd657f h1:L424py/DKSmjUDk+CAisjtS2kHaYEJhsC/6bc7CCnKI= github.com/layer5io/kuttl v0.4.1-0.20200806180306-b7e46afd657f/go.mod h1:UmrVd7x+bNVKrpmKgTtfRiTKHZeNPcMjQproJ0vGwhE= +github.com/layer5io/service-mesh-performance v0.3.2-0.20210122142912-a94e0658b021 h1:qwyekCeWBRBpPMi5inmU7hYLYFUW+6X0VWWZPLFZk7s= +github.com/layer5io/service-mesh-performance v0.3.2-0.20210122142912-a94e0658b021/go.mod h1:W153amv8aHAeIWxO7b7d7Vibt9RhaEVh4Uh+RG+BumQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -590,8 +595,8 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -599,6 +604,7 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -606,8 +612,12 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/smi-conformance/grpc/handlers.go b/smi-conformance/grpc/handlers.go index 6c80187..b17301a 100644 --- a/smi-conformance/grpc/handlers.go +++ b/smi-conformance/grpc/handlers.go @@ -4,8 +4,11 @@ import ( "context" "strconv" + empty "github.com/golang/protobuf/ptypes/empty" "github.com/layer5io/learn-layer5/smi-conformance/conformance" test_gen "github.com/layer5io/learn-layer5/smi-conformance/test-gen" + service "github.com/layer5io/service-mesh-performance/service" + smp "github.com/layer5io/service-mesh-performance/spec" ) var ( @@ -37,41 +40,58 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo var config test_gen.ServiceMesh config = linkerdConfig - switch req.Meshname { - case "linkerd": + switch req.Mesh.Type { + case smp.ServiceMesh_APP_MESH: config = linkerdConfig - req.Annotations["linkerd.io/inject"] = "enabled" - case "maesh": + req.Mesh.Annotations["linkerd.io/inject"] = "enabled" + case smp.ServiceMesh_MAESH: config = maeshConfig - case "istio": + case smp.ServiceMesh_ISTIO: config = istioConfig - req.Labels["istio-injection"] = "enabled" - case "osm": + req.Mesh.Labels["istio-injection"] = "enabled" + case smp.ServiceMesh_OPEN_SERVICE_MESH: config = osmConfig - req.Labels["openservicemesh.io/monitored-by"] = "osm" + req.Mesh.Labels["openservicemesh.io/monitored-by"] = "osm" + } - result := test_gen.RunTest(config, req.Annotations, req.Labels) + result := test_gen.RunTest(config, req.Mesh.Annotations, req.Mesh.Labels) totalcases := 3 failures := 0 details := make([]*conformance.Detail, 0) for _, res := range result.Testsuite[0].Testcase { d := &conformance.Detail{ - Smispec: res.Name, - Time: res.Time, - Assertions: strconv.Itoa(res.Assertions), - Capability: "Full", - Status: "Passing", + Smispec: res.Name, + Specversion: "v1alpha1", + Assertion: strconv.Itoa(res.Assertions), + Duration: res.Time, + Capability: conformance.Capability_FULL, + Status: conformance.ResultStatus_PASSED, + Result: &conformance.Result{ + Result: &conformance.Result_Message{ + Message: "All test passed", + }, + }, } if len(res.Failure.Text) > 2 { - d.Reason = res.Failure.Text - d.Result = res.Failure.Message - d.Status = "Failing" - d.Capability = "None" - failures++ + d.Result = &conformance.Result{ + Result: &conformance.Result_Error{ + Error: &service.CommonError{ + Code: "", + Severity: "", + ShortDescription: res.Failure.Text, + LongDescription: res.Failure.Message, + ProbableCause: "", + SuggestedRemediation: "", + }, + }, + } + d.Status = conformance.ResultStatus_FAILED + d.Capability = conformance.Capability_NONE + failures += 1 if (res.Assertions - failures) > (res.Assertions / 2) { - d.Capability = "Half" + d.Capability = conformance.Capability_HALF } } details = append(details, d) @@ -80,6 +100,15 @@ func (s *Service) RunTest(ctx context.Context, req *conformance.Request) (*confo return &conformance.Response{ Casespassed: strconv.Itoa(totalcases - failures), Passpercent: strconv.Itoa(((totalcases - failures) / totalcases) * 100), + Mesh: req.Mesh, Details: details, }, nil } + +func (s *Service) Info(context.Context, *empty.Empty) (*service.ServiceInfo, error) { + return &service.ServiceInfo{}, nil +} + +func (s *Service) Health(context.Context, *empty.Empty) (*service.ServiceHealth, error) { + return &service.ServiceHealth{}, nil +} diff --git a/smi-conformance/main.go b/smi-conformance/main.go index 196cfce..2afa3b5 100644 --- a/smi-conformance/main.go +++ b/smi-conformance/main.go @@ -1,10 +1,11 @@ package main import ( - "github.com/layer5io/learn-layer5/smi-conformance/grpc" "os" - "sigs.k8s.io/controller-runtime/pkg/log" "time" + + "github.com/layer5io/learn-layer5/smi-conformance/grpc" + "sigs.k8s.io/controller-runtime/pkg/log" ) func main() {