From 5f331fa5fd41396dc94ad65de1d43bc8695cf2c2 Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Mon, 4 Nov 2024 21:01:54 +0530 Subject: [PATCH 1/4] add rpc calls related to mirroring Signed-off-by: Rewant Soni --- services/provider/api/provider.pb.go | 967 +++++++++++++++--- services/provider/api/provider_grpc.pb.go | 76 ++ services/provider/proto/provider.proto | 66 ++ .../services/provider/api/v4/provider.pb.go | 967 +++++++++++++++--- .../provider/api/v4/provider_grpc.pb.go | 76 ++ 5 files changed, 1900 insertions(+), 252 deletions(-) diff --git a/services/provider/api/provider.pb.go b/services/provider/api/provider.pb.go index 4f718d11fe..810a4ff150 100644 --- a/services/provider/api/provider.pb.go +++ b/services/provider/api/provider.pb.go @@ -21,6 +21,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ErrorCode int32 + +const ( + ErrorCode_NotFound ErrorCode = 0 + ErrorCode_Internal ErrorCode = 1 + ErrorCode_InvalidArgument ErrorCode = 2 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "NotFound", + 1: "Internal", + 2: "InvalidArgument", + } + ErrorCode_value = map[string]int32{ + "NotFound": 0, + "Internal": 1, + "InvalidArgument": 2, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_provider_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_provider_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{0} +} + // StorageType of the storageClaim type FulfillStorageClaimRequest_StorageType int32 @@ -52,11 +101,11 @@ func (x FulfillStorageClaimRequest_StorageType) String() string { } func (FulfillStorageClaimRequest_StorageType) Descriptor() protoreflect.EnumDescriptor { - return file_provider_proto_enumTypes[0].Descriptor() + return file_provider_proto_enumTypes[1].Descriptor() } func (FulfillStorageClaimRequest_StorageType) Type() protoreflect.EnumType { - return &file_provider_proto_enumTypes[0] + return &file_provider_proto_enumTypes[1] } func (x FulfillStorageClaimRequest_StorageType) Number() protoreflect.EnumNumber { @@ -1293,6 +1342,480 @@ func (*RequestMaintenanceModeResponse) Descriptor() ([]byte, []int) { return file_provider_proto_rawDescGZIP(), []int{21} } +// StorageClientsInfoRequest holds the required information to get Peer Client Info +type StorageClientsInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // storageClusterUID is the k8s UID of the peer StorageCluster + StorageClusterUID string `protobuf:"bytes,1,opt,name=storageClusterUID,proto3" json:"storageClusterUID,omitempty"` + // clientID is the k8s UID of the peer StorageConsumers + ClientIDs []string `protobuf:"bytes,2,rep,name=clientIDs,proto3" json:"clientIDs,omitempty"` +} + +func (x *StorageClientsInfoRequest) Reset() { + *x = StorageClientsInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientsInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientsInfoRequest) ProtoMessage() {} + +func (x *StorageClientsInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[22] + 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 StorageClientsInfoRequest.ProtoReflect.Descriptor instead. +func (*StorageClientsInfoRequest) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{22} +} + +func (x *StorageClientsInfoRequest) GetStorageClusterUID() string { + if x != nil { + return x.StorageClusterUID + } + return "" +} + +func (x *StorageClientsInfoRequest) GetClientIDs() []string { + if x != nil { + return x.ClientIDs + } + return nil +} + +type ClientInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientID string `protobuf:"bytes,1,opt,name=clientID,proto3" json:"clientID,omitempty"` + // For each client we are going to have the same radosnamespace, + // assumption based on existing supported feature set and plan for converged mode + RadosNamespace string `protobuf:"bytes,2,opt,name=radosNamespace,proto3" json:"radosNamespace,omitempty"` +} + +func (x *ClientInfo) Reset() { + *x = ClientInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientInfo) ProtoMessage() {} + +func (x *ClientInfo) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[23] + 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 ClientInfo.ProtoReflect.Descriptor instead. +func (*ClientInfo) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{23} +} + +func (x *ClientInfo) GetClientID() string { + if x != nil { + return x.ClientID + } + return "" +} + +func (x *ClientInfo) GetRadosNamespace() string { + if x != nil { + return x.RadosNamespace + } + return "" +} + +type StorageClientInfoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=provider.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + ClientID string `protobuf:"bytes,3,opt,name=clientID,proto3" json:"clientID,omitempty"` +} + +func (x *StorageClientInfoError) Reset() { + *x = StorageClientInfoError{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientInfoError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientInfoError) ProtoMessage() {} + +func (x *StorageClientInfoError) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[24] + 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 StorageClientInfoError.ProtoReflect.Descriptor instead. +func (*StorageClientInfoError) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{24} +} + +func (x *StorageClientInfoError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_NotFound +} + +func (x *StorageClientInfoError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *StorageClientInfoError) GetClientID() string { + if x != nil { + return x.ClientID + } + return "" +} + +// StorageClientsInfoResponse holds the response for GetClientInfo API request +type StorageClientsInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientsInfo []*ClientInfo `protobuf:"bytes,1,rep,name=clientsInfo,proto3" json:"clientsInfo,omitempty"` + Errors []*StorageClientInfoError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *StorageClientsInfoResponse) Reset() { + *x = StorageClientsInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientsInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientsInfoResponse) ProtoMessage() {} + +func (x *StorageClientsInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[25] + 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 StorageClientsInfoResponse.ProtoReflect.Descriptor instead. +func (*StorageClientsInfoResponse) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{25} +} + +func (x *StorageClientsInfoResponse) GetClientsInfo() []*ClientInfo { + if x != nil { + return x.ClientsInfo + } + return nil +} + +func (x *StorageClientsInfoResponse) GetErrors() []*StorageClientInfoError { + if x != nil { + return x.Errors + } + return nil +} + +// BlockPoolsInfoRequest holds the required information to get Peer BlockPool Info +type BlockPoolsInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // storageClusterUID is the k8s UID of the Peer StorageCluster + StorageClusterUID string `protobuf:"bytes,1,opt,name=storageClusterUID,proto3" json:"storageClusterUID,omitempty"` + // blockPoolNames are blockPool names requested for mirroring + BlockPoolNames []string `protobuf:"bytes,2,rep,name=blockPoolNames,proto3" json:"blockPoolNames,omitempty"` +} + +func (x *BlockPoolsInfoRequest) Reset() { + *x = BlockPoolsInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolsInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolsInfoRequest) ProtoMessage() {} + +func (x *BlockPoolsInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[26] + 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 BlockPoolsInfoRequest.ProtoReflect.Descriptor instead. +func (*BlockPoolsInfoRequest) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{26} +} + +func (x *BlockPoolsInfoRequest) GetStorageClusterUID() string { + if x != nil { + return x.StorageClusterUID + } + return "" +} + +func (x *BlockPoolsInfoRequest) GetBlockPoolNames() []string { + if x != nil { + return x.BlockPoolNames + } + return nil +} + +type BlockPoolInfoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=provider.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + BlockPoolName string `protobuf:"bytes,3,opt,name=blockPoolName,proto3" json:"blockPoolName,omitempty"` +} + +func (x *BlockPoolInfoError) Reset() { + *x = BlockPoolInfoError{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolInfoError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolInfoError) ProtoMessage() {} + +func (x *BlockPoolInfoError) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[27] + 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 BlockPoolInfoError.ProtoReflect.Descriptor instead. +func (*BlockPoolInfoError) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{27} +} + +func (x *BlockPoolInfoError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_NotFound +} + +func (x *BlockPoolInfoError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *BlockPoolInfoError) GetBlockPoolName() string { + if x != nil { + return x.BlockPoolName + } + return "" +} + +type BlockPoolInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolName string `protobuf:"bytes,1,opt,name=blockPoolName,proto3" json:"blockPoolName,omitempty"` + MirroringToken string `protobuf:"bytes,2,opt,name=mirroringToken,proto3" json:"mirroringToken,omitempty"` + BlockPoolID string `protobuf:"bytes,3,opt,name=blockPoolID,proto3" json:"blockPoolID,omitempty"` +} + +func (x *BlockPoolInfo) Reset() { + *x = BlockPoolInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolInfo) ProtoMessage() {} + +func (x *BlockPoolInfo) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[28] + 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 BlockPoolInfo.ProtoReflect.Descriptor instead. +func (*BlockPoolInfo) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{28} +} + +func (x *BlockPoolInfo) GetBlockPoolName() string { + if x != nil { + return x.BlockPoolName + } + return "" +} + +func (x *BlockPoolInfo) GetMirroringToken() string { + if x != nil { + return x.MirroringToken + } + return "" +} + +func (x *BlockPoolInfo) GetBlockPoolID() string { + if x != nil { + return x.BlockPoolID + } + return "" +} + +// BlockPoolsInfoResponse holds the response for GetBlockPoolInfo API request +type BlockPoolsInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolsInfo []*BlockPoolInfo `protobuf:"bytes,1,rep,name=blockPoolsInfo,proto3" json:"blockPoolsInfo,omitempty"` + Errors []*BlockPoolInfoError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *BlockPoolsInfoResponse) Reset() { + *x = BlockPoolsInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolsInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolsInfoResponse) ProtoMessage() {} + +func (x *BlockPoolsInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[29] + 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 BlockPoolsInfoResponse.ProtoReflect.Descriptor instead. +func (*BlockPoolsInfoResponse) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{29} +} + +func (x *BlockPoolsInfoResponse) GetBlockPoolsInfo() []*BlockPoolInfo { + if x != nil { + return x.BlockPoolsInfo + } + return nil +} + +func (x *BlockPoolsInfoResponse) GetErrors() []*BlockPoolInfoError { + if x != nil { + return x.Errors + } + return nil +} + var File_provider_proto protoreflect.FileDescriptor var file_provider_proto_rawDesc = []byte{ @@ -1469,70 +1992,147 @@ var file_provider_proto_rawDesc = []byte{ 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd9, 0x07, 0x0a, 0x0b, 0x4f, - 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x12, 0x20, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x4f, - 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x12, - 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x66, 0x66, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x66, - 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, 0x41, 0x63, 0x6b, 0x6e, - 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, - 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x13, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x24, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, - 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x19, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x55, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, + 0x0e, 0x72, 0x61, 0x64, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x64, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x77, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x27, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x8e, + 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, + 0x6d, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x7d, + 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7f, 0x0a, + 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, + 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x22, 0x8f, + 0x01, 0x0a, 0x16, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x2a, 0x3c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, + 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x32, 0x99, + 0x09, 0x0a, 0x0b, 0x4f, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x58, + 0x0a, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, + 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x5b, 0x0a, 0x10, 0x4f, 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, + 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x4f, 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, + 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x13, 0x46, 0x75, 0x6c, 0x66, + 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, + 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, + 0x0a, 0x12, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x50, 0x65, 0x65, 0x72, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, + 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x16, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, + 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1547,67 +2147,86 @@ func file_provider_proto_rawDescGZIP() []byte { return file_provider_proto_rawDescData } -var file_provider_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_provider_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_provider_proto_goTypes = []interface{}{ - (FulfillStorageClaimRequest_StorageType)(0), // 0: provider.FulfillStorageClaimRequest.StorageType - (*OnboardConsumerRequest)(nil), // 1: provider.OnboardConsumerRequest - (*OnboardConsumerResponse)(nil), // 2: provider.OnboardConsumerResponse - (*StorageConfigRequest)(nil), // 3: provider.StorageConfigRequest - (*ExternalResource)(nil), // 4: provider.ExternalResource - (*SystemAttributes)(nil), // 5: provider.SystemAttributes - (*StorageConfigResponse)(nil), // 6: provider.StorageConfigResponse - (*OffboardConsumerRequest)(nil), // 7: provider.OffboardConsumerRequest - (*OffboardConsumerResponse)(nil), // 8: provider.OffboardConsumerResponse - (*AcknowledgeOnboardingRequest)(nil), // 9: provider.AcknowledgeOnboardingRequest - (*AcknowledgeOnboardingResponse)(nil), // 10: provider.AcknowledgeOnboardingResponse - (*FulfillStorageClaimRequest)(nil), // 11: provider.FulfillStorageClaimRequest - (*FulfillStorageClaimResponse)(nil), // 12: provider.FulfillStorageClaimResponse - (*RevokeStorageClaimRequest)(nil), // 13: provider.RevokeStorageClaimRequest - (*RevokeStorageClaimResponse)(nil), // 14: provider.RevokeStorageClaimResponse - (*StorageClaimConfigRequest)(nil), // 15: provider.StorageClaimConfigRequest - (*StorageClaimConfigResponse)(nil), // 16: provider.StorageClaimConfigResponse - (*ReportStatusRequest)(nil), // 17: provider.ReportStatusRequest - (*ReportStatusResponse)(nil), // 18: provider.ReportStatusResponse - (*PeerStorageClusterRequest)(nil), // 19: provider.PeerStorageClusterRequest - (*PeerStorageClusterResponse)(nil), // 20: provider.PeerStorageClusterResponse - (*RequestMaintenanceModeRequest)(nil), // 21: provider.RequestMaintenanceModeRequest - (*RequestMaintenanceModeResponse)(nil), // 22: provider.RequestMaintenanceModeResponse - nil, // 23: provider.ExternalResource.LabelsEntry - nil, // 24: provider.ExternalResource.AnnotationsEntry + (ErrorCode)(0), // 0: provider.ErrorCode + (FulfillStorageClaimRequest_StorageType)(0), // 1: provider.FulfillStorageClaimRequest.StorageType + (*OnboardConsumerRequest)(nil), // 2: provider.OnboardConsumerRequest + (*OnboardConsumerResponse)(nil), // 3: provider.OnboardConsumerResponse + (*StorageConfigRequest)(nil), // 4: provider.StorageConfigRequest + (*ExternalResource)(nil), // 5: provider.ExternalResource + (*SystemAttributes)(nil), // 6: provider.SystemAttributes + (*StorageConfigResponse)(nil), // 7: provider.StorageConfigResponse + (*OffboardConsumerRequest)(nil), // 8: provider.OffboardConsumerRequest + (*OffboardConsumerResponse)(nil), // 9: provider.OffboardConsumerResponse + (*AcknowledgeOnboardingRequest)(nil), // 10: provider.AcknowledgeOnboardingRequest + (*AcknowledgeOnboardingResponse)(nil), // 11: provider.AcknowledgeOnboardingResponse + (*FulfillStorageClaimRequest)(nil), // 12: provider.FulfillStorageClaimRequest + (*FulfillStorageClaimResponse)(nil), // 13: provider.FulfillStorageClaimResponse + (*RevokeStorageClaimRequest)(nil), // 14: provider.RevokeStorageClaimRequest + (*RevokeStorageClaimResponse)(nil), // 15: provider.RevokeStorageClaimResponse + (*StorageClaimConfigRequest)(nil), // 16: provider.StorageClaimConfigRequest + (*StorageClaimConfigResponse)(nil), // 17: provider.StorageClaimConfigResponse + (*ReportStatusRequest)(nil), // 18: provider.ReportStatusRequest + (*ReportStatusResponse)(nil), // 19: provider.ReportStatusResponse + (*PeerStorageClusterRequest)(nil), // 20: provider.PeerStorageClusterRequest + (*PeerStorageClusterResponse)(nil), // 21: provider.PeerStorageClusterResponse + (*RequestMaintenanceModeRequest)(nil), // 22: provider.RequestMaintenanceModeRequest + (*RequestMaintenanceModeResponse)(nil), // 23: provider.RequestMaintenanceModeResponse + (*StorageClientsInfoRequest)(nil), // 24: provider.StorageClientsInfoRequest + (*ClientInfo)(nil), // 25: provider.ClientInfo + (*StorageClientInfoError)(nil), // 26: provider.StorageClientInfoError + (*StorageClientsInfoResponse)(nil), // 27: provider.StorageClientsInfoResponse + (*BlockPoolsInfoRequest)(nil), // 28: provider.BlockPoolsInfoRequest + (*BlockPoolInfoError)(nil), // 29: provider.BlockPoolInfoError + (*BlockPoolInfo)(nil), // 30: provider.BlockPoolInfo + (*BlockPoolsInfoResponse)(nil), // 31: provider.BlockPoolsInfoResponse + nil, // 32: provider.ExternalResource.LabelsEntry + nil, // 33: provider.ExternalResource.AnnotationsEntry } var file_provider_proto_depIdxs = []int32{ - 23, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry - 24, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry - 4, // 2: provider.StorageConfigResponse.externalResource:type_name -> provider.ExternalResource - 5, // 3: provider.StorageConfigResponse.systemAttributes:type_name -> provider.SystemAttributes - 0, // 4: provider.FulfillStorageClaimRequest.storageType:type_name -> provider.FulfillStorageClaimRequest.StorageType - 4, // 5: provider.StorageClaimConfigResponse.externalResource:type_name -> provider.ExternalResource - 1, // 6: provider.OCSProvider.OnboardConsumer:input_type -> provider.OnboardConsumerRequest - 3, // 7: provider.OCSProvider.GetStorageConfig:input_type -> provider.StorageConfigRequest - 7, // 8: provider.OCSProvider.OffboardConsumer:input_type -> provider.OffboardConsumerRequest - 9, // 9: provider.OCSProvider.AcknowledgeOnboarding:input_type -> provider.AcknowledgeOnboardingRequest - 11, // 10: provider.OCSProvider.FulfillStorageClaim:input_type -> provider.FulfillStorageClaimRequest - 13, // 11: provider.OCSProvider.RevokeStorageClaim:input_type -> provider.RevokeStorageClaimRequest - 15, // 12: provider.OCSProvider.GetStorageClaimConfig:input_type -> provider.StorageClaimConfigRequest - 17, // 13: provider.OCSProvider.ReportStatus:input_type -> provider.ReportStatusRequest - 19, // 14: provider.OCSProvider.PeerStorageCluster:input_type -> provider.PeerStorageClusterRequest - 21, // 15: provider.OCSProvider.RequestMaintenanceMode:input_type -> provider.RequestMaintenanceModeRequest - 2, // 16: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse - 6, // 17: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse - 8, // 18: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse - 10, // 19: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse - 12, // 20: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse - 14, // 21: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse - 16, // 22: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse - 18, // 23: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse - 20, // 24: provider.OCSProvider.PeerStorageCluster:output_type -> provider.PeerStorageClusterResponse - 22, // 25: provider.OCSProvider.RequestMaintenanceMode:output_type -> provider.RequestMaintenanceModeResponse - 16, // [16:26] is the sub-list for method output_type - 6, // [6:16] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 32, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry + 33, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry + 5, // 2: provider.StorageConfigResponse.externalResource:type_name -> provider.ExternalResource + 6, // 3: provider.StorageConfigResponse.systemAttributes:type_name -> provider.SystemAttributes + 1, // 4: provider.FulfillStorageClaimRequest.storageType:type_name -> provider.FulfillStorageClaimRequest.StorageType + 5, // 5: provider.StorageClaimConfigResponse.externalResource:type_name -> provider.ExternalResource + 0, // 6: provider.StorageClientInfoError.code:type_name -> provider.ErrorCode + 25, // 7: provider.StorageClientsInfoResponse.clientsInfo:type_name -> provider.ClientInfo + 26, // 8: provider.StorageClientsInfoResponse.errors:type_name -> provider.StorageClientInfoError + 0, // 9: provider.BlockPoolInfoError.code:type_name -> provider.ErrorCode + 30, // 10: provider.BlockPoolsInfoResponse.blockPoolsInfo:type_name -> provider.BlockPoolInfo + 29, // 11: provider.BlockPoolsInfoResponse.errors:type_name -> provider.BlockPoolInfoError + 2, // 12: provider.OCSProvider.OnboardConsumer:input_type -> provider.OnboardConsumerRequest + 4, // 13: provider.OCSProvider.GetStorageConfig:input_type -> provider.StorageConfigRequest + 8, // 14: provider.OCSProvider.OffboardConsumer:input_type -> provider.OffboardConsumerRequest + 10, // 15: provider.OCSProvider.AcknowledgeOnboarding:input_type -> provider.AcknowledgeOnboardingRequest + 12, // 16: provider.OCSProvider.FulfillStorageClaim:input_type -> provider.FulfillStorageClaimRequest + 14, // 17: provider.OCSProvider.RevokeStorageClaim:input_type -> provider.RevokeStorageClaimRequest + 16, // 18: provider.OCSProvider.GetStorageClaimConfig:input_type -> provider.StorageClaimConfigRequest + 18, // 19: provider.OCSProvider.ReportStatus:input_type -> provider.ReportStatusRequest + 20, // 20: provider.OCSProvider.PeerStorageCluster:input_type -> provider.PeerStorageClusterRequest + 22, // 21: provider.OCSProvider.RequestMaintenanceMode:input_type -> provider.RequestMaintenanceModeRequest + 24, // 22: provider.OCSProvider.GetStorageClientsInfo:input_type -> provider.StorageClientsInfoRequest + 28, // 23: provider.OCSProvider.GetBlockPoolsInfo:input_type -> provider.BlockPoolsInfoRequest + 3, // 24: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse + 7, // 25: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse + 9, // 26: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse + 11, // 27: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse + 13, // 28: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse + 15, // 29: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse + 17, // 30: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse + 19, // 31: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse + 21, // 32: provider.OCSProvider.PeerStorageCluster:output_type -> provider.PeerStorageClusterResponse + 23, // 33: provider.OCSProvider.RequestMaintenanceMode:output_type -> provider.RequestMaintenanceModeResponse + 27, // 34: provider.OCSProvider.GetStorageClientsInfo:output_type -> provider.StorageClientsInfoResponse + 31, // 35: provider.OCSProvider.GetBlockPoolsInfo:output_type -> provider.BlockPoolsInfoResponse + 24, // [24:36] is the sub-list for method output_type + 12, // [12:24] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_provider_proto_init() } @@ -1880,14 +2499,110 @@ func file_provider_proto_init() { return nil } } + file_provider_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientsInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientInfoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientsInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolsInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolInfoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolsInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_provider_proto_rawDesc, - NumEnums: 1, - NumMessages: 24, + NumEnums: 2, + NumMessages: 32, NumExtensions: 0, NumServices: 1, }, diff --git a/services/provider/api/provider_grpc.pb.go b/services/provider/api/provider_grpc.pb.go index 969a638a57..e8da8d5637 100644 --- a/services/provider/api/provider_grpc.pb.go +++ b/services/provider/api/provider_grpc.pb.go @@ -40,6 +40,10 @@ type OCSProviderClient interface { // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote PeerStorageCluster(ctx context.Context, in *PeerStorageClusterRequest, opts ...grpc.CallOption) (*PeerStorageClusterResponse, error) RequestMaintenanceMode(ctx context.Context, in *RequestMaintenanceModeRequest, opts ...grpc.CallOption) (*RequestMaintenanceModeResponse, error) + // GetStorageClientsInfo RPC call to get StorageClientInfo for Peer Storage Client + GetStorageClientsInfo(ctx context.Context, in *StorageClientsInfoRequest, opts ...grpc.CallOption) (*StorageClientsInfoResponse, error) + // GetBlockPoolsInfo RPC call to get BlockPoolInfo for Peer Storage Cluster + GetBlockPoolsInfo(ctx context.Context, in *BlockPoolsInfoRequest, opts ...grpc.CallOption) (*BlockPoolsInfoResponse, error) } type oCSProviderClient struct { @@ -140,6 +144,24 @@ func (c *oCSProviderClient) RequestMaintenanceMode(ctx context.Context, in *Requ return out, nil } +func (c *oCSProviderClient) GetStorageClientsInfo(ctx context.Context, in *StorageClientsInfoRequest, opts ...grpc.CallOption) (*StorageClientsInfoResponse, error) { + out := new(StorageClientsInfoResponse) + err := c.cc.Invoke(ctx, "/provider.OCSProvider/GetStorageClientsInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *oCSProviderClient) GetBlockPoolsInfo(ctx context.Context, in *BlockPoolsInfoRequest, opts ...grpc.CallOption) (*BlockPoolsInfoResponse, error) { + out := new(BlockPoolsInfoResponse) + err := c.cc.Invoke(ctx, "/provider.OCSProvider/GetBlockPoolsInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // OCSProviderServer is the server API for OCSProvider service. // All implementations must embed UnimplementedOCSProviderServer // for forward compatibility @@ -166,6 +188,10 @@ type OCSProviderServer interface { // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote PeerStorageCluster(context.Context, *PeerStorageClusterRequest) (*PeerStorageClusterResponse, error) RequestMaintenanceMode(context.Context, *RequestMaintenanceModeRequest) (*RequestMaintenanceModeResponse, error) + // GetStorageClientsInfo RPC call to get StorageClientInfo for Peer Storage Client + GetStorageClientsInfo(context.Context, *StorageClientsInfoRequest) (*StorageClientsInfoResponse, error) + // GetBlockPoolsInfo RPC call to get BlockPoolInfo for Peer Storage Cluster + GetBlockPoolsInfo(context.Context, *BlockPoolsInfoRequest) (*BlockPoolsInfoResponse, error) mustEmbedUnimplementedOCSProviderServer() } @@ -203,6 +229,12 @@ func (UnimplementedOCSProviderServer) PeerStorageCluster(context.Context, *PeerS func (UnimplementedOCSProviderServer) RequestMaintenanceMode(context.Context, *RequestMaintenanceModeRequest) (*RequestMaintenanceModeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestMaintenanceMode not implemented") } +func (UnimplementedOCSProviderServer) GetStorageClientsInfo(context.Context, *StorageClientsInfoRequest) (*StorageClientsInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorageClientsInfo not implemented") +} +func (UnimplementedOCSProviderServer) GetBlockPoolsInfo(context.Context, *BlockPoolsInfoRequest) (*BlockPoolsInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockPoolsInfo not implemented") +} func (UnimplementedOCSProviderServer) mustEmbedUnimplementedOCSProviderServer() {} // UnsafeOCSProviderServer may be embedded to opt out of forward compatibility for this service. @@ -396,6 +428,42 @@ func _OCSProvider_RequestMaintenanceMode_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _OCSProvider_GetStorageClientsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StorageClientsInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OCSProviderServer).GetStorageClientsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/provider.OCSProvider/GetStorageClientsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OCSProviderServer).GetStorageClientsInfo(ctx, req.(*StorageClientsInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OCSProvider_GetBlockPoolsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockPoolsInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OCSProviderServer).GetBlockPoolsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/provider.OCSProvider/GetBlockPoolsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OCSProviderServer).GetBlockPoolsInfo(ctx, req.(*BlockPoolsInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // OCSProvider_ServiceDesc is the grpc.ServiceDesc for OCSProvider service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -443,6 +511,14 @@ var OCSProvider_ServiceDesc = grpc.ServiceDesc{ MethodName: "RequestMaintenanceMode", Handler: _OCSProvider_RequestMaintenanceMode_Handler, }, + { + MethodName: "GetStorageClientsInfo", + Handler: _OCSProvider_GetStorageClientsInfo_Handler, + }, + { + MethodName: "GetBlockPoolsInfo", + Handler: _OCSProvider_GetBlockPoolsInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "provider.proto", diff --git a/services/provider/proto/provider.proto b/services/provider/proto/provider.proto index 695b24f22f..3b0d53d476 100644 --- a/services/provider/proto/provider.proto +++ b/services/provider/proto/provider.proto @@ -46,6 +46,13 @@ service OCSProvider { rpc RequestMaintenanceMode(RequestMaintenanceModeRequest) returns (RequestMaintenanceModeResponse) {} + // GetStorageClientsInfo RPC call to get StorageClientInfo for Peer Storage Client + rpc GetStorageClientsInfo(StorageClientsInfoRequest) + returns (StorageClientsInfoResponse) {} + + // GetBlockPoolsInfo RPC call to get BlockPoolInfo for Peer Storage Cluster + rpc GetBlockPoolsInfo(BlockPoolsInfoRequest) + returns (BlockPoolsInfoResponse) {} } // OnboardConsumerRequest holds the required information to validate the consumer and create StorageConsumer @@ -217,3 +224,62 @@ message RequestMaintenanceModeRequest{ } message RequestMaintenanceModeResponse{} + +// StorageClientsInfoRequest holds the required information to get Peer Client Info +message StorageClientsInfoRequest{ + // storageClusterUID is the k8s UID of the peer StorageCluster + string storageClusterUID = 1; + // clientID is the k8s UID of the peer StorageConsumers + repeated string clientIDs = 2; +} + +message ClientInfo{ + string clientID = 1; + // For each client we are going to have the same radosnamespace, + // assumption based on existing supported feature set and plan for converged mode + string radosNamespace = 2; +} + +enum ErrorCode{ + NotFound = 0; + Internal = 1; + InvalidArgument = 2; +} + +message StorageClientInfoError { + ErrorCode code = 1; + string message = 2; + string clientID = 3; +} + +// StorageClientsInfoResponse holds the response for GetClientInfo API request +message StorageClientsInfoResponse{ + repeated ClientInfo clientsInfo = 1; + repeated StorageClientInfoError errors = 2; +} + +// BlockPoolsInfoRequest holds the required information to get Peer BlockPool Info +message BlockPoolsInfoRequest{ + // storageClusterUID is the k8s UID of the Peer StorageCluster + string storageClusterUID = 1; + // blockPoolNames are blockPool names requested for mirroring + repeated string blockPoolNames = 2; +} + +message BlockPoolInfoError { + ErrorCode code = 1; + string message = 2; + string blockPoolName =3; +} + +message BlockPoolInfo{ + string blockPoolName = 1; + string mirroringToken = 2; + string blockPoolID = 3; +} + +// BlockPoolsInfoResponse holds the response for GetBlockPoolInfo API request +message BlockPoolsInfoResponse{ + repeated BlockPoolInfo blockPoolsInfo = 1; + repeated BlockPoolInfoError errors = 2; +} diff --git a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider.pb.go b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider.pb.go index 4f718d11fe..810a4ff150 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider.pb.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider.pb.go @@ -21,6 +21,55 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ErrorCode int32 + +const ( + ErrorCode_NotFound ErrorCode = 0 + ErrorCode_Internal ErrorCode = 1 + ErrorCode_InvalidArgument ErrorCode = 2 +) + +// Enum value maps for ErrorCode. +var ( + ErrorCode_name = map[int32]string{ + 0: "NotFound", + 1: "Internal", + 2: "InvalidArgument", + } + ErrorCode_value = map[string]int32{ + "NotFound": 0, + "Internal": 1, + "InvalidArgument": 2, + } +) + +func (x ErrorCode) Enum() *ErrorCode { + p := new(ErrorCode) + *p = x + return p +} + +func (x ErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_provider_proto_enumTypes[0].Descriptor() +} + +func (ErrorCode) Type() protoreflect.EnumType { + return &file_provider_proto_enumTypes[0] +} + +func (x ErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ErrorCode.Descriptor instead. +func (ErrorCode) EnumDescriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{0} +} + // StorageType of the storageClaim type FulfillStorageClaimRequest_StorageType int32 @@ -52,11 +101,11 @@ func (x FulfillStorageClaimRequest_StorageType) String() string { } func (FulfillStorageClaimRequest_StorageType) Descriptor() protoreflect.EnumDescriptor { - return file_provider_proto_enumTypes[0].Descriptor() + return file_provider_proto_enumTypes[1].Descriptor() } func (FulfillStorageClaimRequest_StorageType) Type() protoreflect.EnumType { - return &file_provider_proto_enumTypes[0] + return &file_provider_proto_enumTypes[1] } func (x FulfillStorageClaimRequest_StorageType) Number() protoreflect.EnumNumber { @@ -1293,6 +1342,480 @@ func (*RequestMaintenanceModeResponse) Descriptor() ([]byte, []int) { return file_provider_proto_rawDescGZIP(), []int{21} } +// StorageClientsInfoRequest holds the required information to get Peer Client Info +type StorageClientsInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // storageClusterUID is the k8s UID of the peer StorageCluster + StorageClusterUID string `protobuf:"bytes,1,opt,name=storageClusterUID,proto3" json:"storageClusterUID,omitempty"` + // clientID is the k8s UID of the peer StorageConsumers + ClientIDs []string `protobuf:"bytes,2,rep,name=clientIDs,proto3" json:"clientIDs,omitempty"` +} + +func (x *StorageClientsInfoRequest) Reset() { + *x = StorageClientsInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientsInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientsInfoRequest) ProtoMessage() {} + +func (x *StorageClientsInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[22] + 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 StorageClientsInfoRequest.ProtoReflect.Descriptor instead. +func (*StorageClientsInfoRequest) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{22} +} + +func (x *StorageClientsInfoRequest) GetStorageClusterUID() string { + if x != nil { + return x.StorageClusterUID + } + return "" +} + +func (x *StorageClientsInfoRequest) GetClientIDs() []string { + if x != nil { + return x.ClientIDs + } + return nil +} + +type ClientInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientID string `protobuf:"bytes,1,opt,name=clientID,proto3" json:"clientID,omitempty"` + // For each client we are going to have the same radosnamespace, + // assumption based on existing supported feature set and plan for converged mode + RadosNamespace string `protobuf:"bytes,2,opt,name=radosNamespace,proto3" json:"radosNamespace,omitempty"` +} + +func (x *ClientInfo) Reset() { + *x = ClientInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientInfo) ProtoMessage() {} + +func (x *ClientInfo) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[23] + 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 ClientInfo.ProtoReflect.Descriptor instead. +func (*ClientInfo) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{23} +} + +func (x *ClientInfo) GetClientID() string { + if x != nil { + return x.ClientID + } + return "" +} + +func (x *ClientInfo) GetRadosNamespace() string { + if x != nil { + return x.RadosNamespace + } + return "" +} + +type StorageClientInfoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=provider.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + ClientID string `protobuf:"bytes,3,opt,name=clientID,proto3" json:"clientID,omitempty"` +} + +func (x *StorageClientInfoError) Reset() { + *x = StorageClientInfoError{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientInfoError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientInfoError) ProtoMessage() {} + +func (x *StorageClientInfoError) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[24] + 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 StorageClientInfoError.ProtoReflect.Descriptor instead. +func (*StorageClientInfoError) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{24} +} + +func (x *StorageClientInfoError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_NotFound +} + +func (x *StorageClientInfoError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *StorageClientInfoError) GetClientID() string { + if x != nil { + return x.ClientID + } + return "" +} + +// StorageClientsInfoResponse holds the response for GetClientInfo API request +type StorageClientsInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ClientsInfo []*ClientInfo `protobuf:"bytes,1,rep,name=clientsInfo,proto3" json:"clientsInfo,omitempty"` + Errors []*StorageClientInfoError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *StorageClientsInfoResponse) Reset() { + *x = StorageClientsInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageClientsInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageClientsInfoResponse) ProtoMessage() {} + +func (x *StorageClientsInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[25] + 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 StorageClientsInfoResponse.ProtoReflect.Descriptor instead. +func (*StorageClientsInfoResponse) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{25} +} + +func (x *StorageClientsInfoResponse) GetClientsInfo() []*ClientInfo { + if x != nil { + return x.ClientsInfo + } + return nil +} + +func (x *StorageClientsInfoResponse) GetErrors() []*StorageClientInfoError { + if x != nil { + return x.Errors + } + return nil +} + +// BlockPoolsInfoRequest holds the required information to get Peer BlockPool Info +type BlockPoolsInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // storageClusterUID is the k8s UID of the Peer StorageCluster + StorageClusterUID string `protobuf:"bytes,1,opt,name=storageClusterUID,proto3" json:"storageClusterUID,omitempty"` + // blockPoolNames are blockPool names requested for mirroring + BlockPoolNames []string `protobuf:"bytes,2,rep,name=blockPoolNames,proto3" json:"blockPoolNames,omitempty"` +} + +func (x *BlockPoolsInfoRequest) Reset() { + *x = BlockPoolsInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolsInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolsInfoRequest) ProtoMessage() {} + +func (x *BlockPoolsInfoRequest) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[26] + 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 BlockPoolsInfoRequest.ProtoReflect.Descriptor instead. +func (*BlockPoolsInfoRequest) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{26} +} + +func (x *BlockPoolsInfoRequest) GetStorageClusterUID() string { + if x != nil { + return x.StorageClusterUID + } + return "" +} + +func (x *BlockPoolsInfoRequest) GetBlockPoolNames() []string { + if x != nil { + return x.BlockPoolNames + } + return nil +} + +type BlockPoolInfoError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=provider.ErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` + BlockPoolName string `protobuf:"bytes,3,opt,name=blockPoolName,proto3" json:"blockPoolName,omitempty"` +} + +func (x *BlockPoolInfoError) Reset() { + *x = BlockPoolInfoError{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolInfoError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolInfoError) ProtoMessage() {} + +func (x *BlockPoolInfoError) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[27] + 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 BlockPoolInfoError.ProtoReflect.Descriptor instead. +func (*BlockPoolInfoError) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{27} +} + +func (x *BlockPoolInfoError) GetCode() ErrorCode { + if x != nil { + return x.Code + } + return ErrorCode_NotFound +} + +func (x *BlockPoolInfoError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *BlockPoolInfoError) GetBlockPoolName() string { + if x != nil { + return x.BlockPoolName + } + return "" +} + +type BlockPoolInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolName string `protobuf:"bytes,1,opt,name=blockPoolName,proto3" json:"blockPoolName,omitempty"` + MirroringToken string `protobuf:"bytes,2,opt,name=mirroringToken,proto3" json:"mirroringToken,omitempty"` + BlockPoolID string `protobuf:"bytes,3,opt,name=blockPoolID,proto3" json:"blockPoolID,omitempty"` +} + +func (x *BlockPoolInfo) Reset() { + *x = BlockPoolInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolInfo) ProtoMessage() {} + +func (x *BlockPoolInfo) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[28] + 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 BlockPoolInfo.ProtoReflect.Descriptor instead. +func (*BlockPoolInfo) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{28} +} + +func (x *BlockPoolInfo) GetBlockPoolName() string { + if x != nil { + return x.BlockPoolName + } + return "" +} + +func (x *BlockPoolInfo) GetMirroringToken() string { + if x != nil { + return x.MirroringToken + } + return "" +} + +func (x *BlockPoolInfo) GetBlockPoolID() string { + if x != nil { + return x.BlockPoolID + } + return "" +} + +// BlockPoolsInfoResponse holds the response for GetBlockPoolInfo API request +type BlockPoolsInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockPoolsInfo []*BlockPoolInfo `protobuf:"bytes,1,rep,name=blockPoolsInfo,proto3" json:"blockPoolsInfo,omitempty"` + Errors []*BlockPoolInfoError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"` +} + +func (x *BlockPoolsInfoResponse) Reset() { + *x = BlockPoolsInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BlockPoolsInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BlockPoolsInfoResponse) ProtoMessage() {} + +func (x *BlockPoolsInfoResponse) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[29] + 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 BlockPoolsInfoResponse.ProtoReflect.Descriptor instead. +func (*BlockPoolsInfoResponse) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{29} +} + +func (x *BlockPoolsInfoResponse) GetBlockPoolsInfo() []*BlockPoolInfo { + if x != nil { + return x.BlockPoolsInfo + } + return nil +} + +func (x *BlockPoolsInfoResponse) GetErrors() []*BlockPoolInfoError { + if x != nil { + return x.Errors + } + return nil +} + var File_provider_proto protoreflect.FileDescriptor var file_provider_proto_rawDesc = []byte{ @@ -1469,70 +1992,147 @@ var file_provider_proto_rawDesc = []byte{ 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd9, 0x07, 0x0a, 0x0b, 0x4f, - 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x12, 0x20, 0x2e, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, - 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, - 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x10, 0x4f, - 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x12, - 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x66, 0x66, 0x62, 0x6f, - 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x66, - 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, 0x41, 0x63, 0x6b, 0x6e, - 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, - 0x67, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, - 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, - 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x13, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x24, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, - 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, - 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x52, 0x65, - 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x76, 0x6f, - 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, - 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x16, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, - 0x65, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, - 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x19, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x55, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, + 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x44, 0x73, 0x22, 0x50, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x26, 0x0a, + 0x0e, 0x72, 0x61, 0x64, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x61, 0x64, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x77, 0x0a, 0x16, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x27, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, + 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x8e, + 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x43, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x38, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, + 0x6d, 0x0a, 0x15, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, + 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x7d, + 0x0a, 0x12, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x27, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x7f, 0x0a, + 0x0d, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, + 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x69, 0x6e, + 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, + 0x72, 0x72, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0x22, 0x8f, + 0x01, 0x0a, 0x16, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x2a, 0x3c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0c, 0x0a, + 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x6e, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x41, 0x72, 0x67, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0x02, 0x32, 0x99, + 0x09, 0x0a, 0x0b, 0x4f, 0x43, 0x53, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x58, + 0x0a, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, + 0x72, 0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x62, + 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, + 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x5b, 0x0a, 0x10, 0x4f, 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, + 0x6d, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x4f, + 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x4f, 0x66, 0x66, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, + 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, + 0x72, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x41, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, + 0x65, 0x64, 0x67, 0x65, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x13, 0x46, 0x75, 0x6c, 0x66, + 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x12, + 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, + 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x46, 0x75, 0x6c, 0x66, 0x69, 0x6c, 0x6c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, + 0x0a, 0x12, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x12, 0x50, 0x65, 0x65, 0x72, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x23, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x53, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x50, + 0x65, 0x65, 0x72, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x16, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x15, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, + 0x64, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x58, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, + 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, + 0x3b, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1547,67 +2147,86 @@ func file_provider_proto_rawDescGZIP() []byte { return file_provider_proto_rawDescData } -var file_provider_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 24) +var file_provider_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_provider_proto_goTypes = []interface{}{ - (FulfillStorageClaimRequest_StorageType)(0), // 0: provider.FulfillStorageClaimRequest.StorageType - (*OnboardConsumerRequest)(nil), // 1: provider.OnboardConsumerRequest - (*OnboardConsumerResponse)(nil), // 2: provider.OnboardConsumerResponse - (*StorageConfigRequest)(nil), // 3: provider.StorageConfigRequest - (*ExternalResource)(nil), // 4: provider.ExternalResource - (*SystemAttributes)(nil), // 5: provider.SystemAttributes - (*StorageConfigResponse)(nil), // 6: provider.StorageConfigResponse - (*OffboardConsumerRequest)(nil), // 7: provider.OffboardConsumerRequest - (*OffboardConsumerResponse)(nil), // 8: provider.OffboardConsumerResponse - (*AcknowledgeOnboardingRequest)(nil), // 9: provider.AcknowledgeOnboardingRequest - (*AcknowledgeOnboardingResponse)(nil), // 10: provider.AcknowledgeOnboardingResponse - (*FulfillStorageClaimRequest)(nil), // 11: provider.FulfillStorageClaimRequest - (*FulfillStorageClaimResponse)(nil), // 12: provider.FulfillStorageClaimResponse - (*RevokeStorageClaimRequest)(nil), // 13: provider.RevokeStorageClaimRequest - (*RevokeStorageClaimResponse)(nil), // 14: provider.RevokeStorageClaimResponse - (*StorageClaimConfigRequest)(nil), // 15: provider.StorageClaimConfigRequest - (*StorageClaimConfigResponse)(nil), // 16: provider.StorageClaimConfigResponse - (*ReportStatusRequest)(nil), // 17: provider.ReportStatusRequest - (*ReportStatusResponse)(nil), // 18: provider.ReportStatusResponse - (*PeerStorageClusterRequest)(nil), // 19: provider.PeerStorageClusterRequest - (*PeerStorageClusterResponse)(nil), // 20: provider.PeerStorageClusterResponse - (*RequestMaintenanceModeRequest)(nil), // 21: provider.RequestMaintenanceModeRequest - (*RequestMaintenanceModeResponse)(nil), // 22: provider.RequestMaintenanceModeResponse - nil, // 23: provider.ExternalResource.LabelsEntry - nil, // 24: provider.ExternalResource.AnnotationsEntry + (ErrorCode)(0), // 0: provider.ErrorCode + (FulfillStorageClaimRequest_StorageType)(0), // 1: provider.FulfillStorageClaimRequest.StorageType + (*OnboardConsumerRequest)(nil), // 2: provider.OnboardConsumerRequest + (*OnboardConsumerResponse)(nil), // 3: provider.OnboardConsumerResponse + (*StorageConfigRequest)(nil), // 4: provider.StorageConfigRequest + (*ExternalResource)(nil), // 5: provider.ExternalResource + (*SystemAttributes)(nil), // 6: provider.SystemAttributes + (*StorageConfigResponse)(nil), // 7: provider.StorageConfigResponse + (*OffboardConsumerRequest)(nil), // 8: provider.OffboardConsumerRequest + (*OffboardConsumerResponse)(nil), // 9: provider.OffboardConsumerResponse + (*AcknowledgeOnboardingRequest)(nil), // 10: provider.AcknowledgeOnboardingRequest + (*AcknowledgeOnboardingResponse)(nil), // 11: provider.AcknowledgeOnboardingResponse + (*FulfillStorageClaimRequest)(nil), // 12: provider.FulfillStorageClaimRequest + (*FulfillStorageClaimResponse)(nil), // 13: provider.FulfillStorageClaimResponse + (*RevokeStorageClaimRequest)(nil), // 14: provider.RevokeStorageClaimRequest + (*RevokeStorageClaimResponse)(nil), // 15: provider.RevokeStorageClaimResponse + (*StorageClaimConfigRequest)(nil), // 16: provider.StorageClaimConfigRequest + (*StorageClaimConfigResponse)(nil), // 17: provider.StorageClaimConfigResponse + (*ReportStatusRequest)(nil), // 18: provider.ReportStatusRequest + (*ReportStatusResponse)(nil), // 19: provider.ReportStatusResponse + (*PeerStorageClusterRequest)(nil), // 20: provider.PeerStorageClusterRequest + (*PeerStorageClusterResponse)(nil), // 21: provider.PeerStorageClusterResponse + (*RequestMaintenanceModeRequest)(nil), // 22: provider.RequestMaintenanceModeRequest + (*RequestMaintenanceModeResponse)(nil), // 23: provider.RequestMaintenanceModeResponse + (*StorageClientsInfoRequest)(nil), // 24: provider.StorageClientsInfoRequest + (*ClientInfo)(nil), // 25: provider.ClientInfo + (*StorageClientInfoError)(nil), // 26: provider.StorageClientInfoError + (*StorageClientsInfoResponse)(nil), // 27: provider.StorageClientsInfoResponse + (*BlockPoolsInfoRequest)(nil), // 28: provider.BlockPoolsInfoRequest + (*BlockPoolInfoError)(nil), // 29: provider.BlockPoolInfoError + (*BlockPoolInfo)(nil), // 30: provider.BlockPoolInfo + (*BlockPoolsInfoResponse)(nil), // 31: provider.BlockPoolsInfoResponse + nil, // 32: provider.ExternalResource.LabelsEntry + nil, // 33: provider.ExternalResource.AnnotationsEntry } var file_provider_proto_depIdxs = []int32{ - 23, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry - 24, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry - 4, // 2: provider.StorageConfigResponse.externalResource:type_name -> provider.ExternalResource - 5, // 3: provider.StorageConfigResponse.systemAttributes:type_name -> provider.SystemAttributes - 0, // 4: provider.FulfillStorageClaimRequest.storageType:type_name -> provider.FulfillStorageClaimRequest.StorageType - 4, // 5: provider.StorageClaimConfigResponse.externalResource:type_name -> provider.ExternalResource - 1, // 6: provider.OCSProvider.OnboardConsumer:input_type -> provider.OnboardConsumerRequest - 3, // 7: provider.OCSProvider.GetStorageConfig:input_type -> provider.StorageConfigRequest - 7, // 8: provider.OCSProvider.OffboardConsumer:input_type -> provider.OffboardConsumerRequest - 9, // 9: provider.OCSProvider.AcknowledgeOnboarding:input_type -> provider.AcknowledgeOnboardingRequest - 11, // 10: provider.OCSProvider.FulfillStorageClaim:input_type -> provider.FulfillStorageClaimRequest - 13, // 11: provider.OCSProvider.RevokeStorageClaim:input_type -> provider.RevokeStorageClaimRequest - 15, // 12: provider.OCSProvider.GetStorageClaimConfig:input_type -> provider.StorageClaimConfigRequest - 17, // 13: provider.OCSProvider.ReportStatus:input_type -> provider.ReportStatusRequest - 19, // 14: provider.OCSProvider.PeerStorageCluster:input_type -> provider.PeerStorageClusterRequest - 21, // 15: provider.OCSProvider.RequestMaintenanceMode:input_type -> provider.RequestMaintenanceModeRequest - 2, // 16: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse - 6, // 17: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse - 8, // 18: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse - 10, // 19: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse - 12, // 20: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse - 14, // 21: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse - 16, // 22: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse - 18, // 23: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse - 20, // 24: provider.OCSProvider.PeerStorageCluster:output_type -> provider.PeerStorageClusterResponse - 22, // 25: provider.OCSProvider.RequestMaintenanceMode:output_type -> provider.RequestMaintenanceModeResponse - 16, // [16:26] is the sub-list for method output_type - 6, // [6:16] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 32, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry + 33, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry + 5, // 2: provider.StorageConfigResponse.externalResource:type_name -> provider.ExternalResource + 6, // 3: provider.StorageConfigResponse.systemAttributes:type_name -> provider.SystemAttributes + 1, // 4: provider.FulfillStorageClaimRequest.storageType:type_name -> provider.FulfillStorageClaimRequest.StorageType + 5, // 5: provider.StorageClaimConfigResponse.externalResource:type_name -> provider.ExternalResource + 0, // 6: provider.StorageClientInfoError.code:type_name -> provider.ErrorCode + 25, // 7: provider.StorageClientsInfoResponse.clientsInfo:type_name -> provider.ClientInfo + 26, // 8: provider.StorageClientsInfoResponse.errors:type_name -> provider.StorageClientInfoError + 0, // 9: provider.BlockPoolInfoError.code:type_name -> provider.ErrorCode + 30, // 10: provider.BlockPoolsInfoResponse.blockPoolsInfo:type_name -> provider.BlockPoolInfo + 29, // 11: provider.BlockPoolsInfoResponse.errors:type_name -> provider.BlockPoolInfoError + 2, // 12: provider.OCSProvider.OnboardConsumer:input_type -> provider.OnboardConsumerRequest + 4, // 13: provider.OCSProvider.GetStorageConfig:input_type -> provider.StorageConfigRequest + 8, // 14: provider.OCSProvider.OffboardConsumer:input_type -> provider.OffboardConsumerRequest + 10, // 15: provider.OCSProvider.AcknowledgeOnboarding:input_type -> provider.AcknowledgeOnboardingRequest + 12, // 16: provider.OCSProvider.FulfillStorageClaim:input_type -> provider.FulfillStorageClaimRequest + 14, // 17: provider.OCSProvider.RevokeStorageClaim:input_type -> provider.RevokeStorageClaimRequest + 16, // 18: provider.OCSProvider.GetStorageClaimConfig:input_type -> provider.StorageClaimConfigRequest + 18, // 19: provider.OCSProvider.ReportStatus:input_type -> provider.ReportStatusRequest + 20, // 20: provider.OCSProvider.PeerStorageCluster:input_type -> provider.PeerStorageClusterRequest + 22, // 21: provider.OCSProvider.RequestMaintenanceMode:input_type -> provider.RequestMaintenanceModeRequest + 24, // 22: provider.OCSProvider.GetStorageClientsInfo:input_type -> provider.StorageClientsInfoRequest + 28, // 23: provider.OCSProvider.GetBlockPoolsInfo:input_type -> provider.BlockPoolsInfoRequest + 3, // 24: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse + 7, // 25: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse + 9, // 26: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse + 11, // 27: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse + 13, // 28: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse + 15, // 29: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse + 17, // 30: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse + 19, // 31: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse + 21, // 32: provider.OCSProvider.PeerStorageCluster:output_type -> provider.PeerStorageClusterResponse + 23, // 33: provider.OCSProvider.RequestMaintenanceMode:output_type -> provider.RequestMaintenanceModeResponse + 27, // 34: provider.OCSProvider.GetStorageClientsInfo:output_type -> provider.StorageClientsInfoResponse + 31, // 35: provider.OCSProvider.GetBlockPoolsInfo:output_type -> provider.BlockPoolsInfoResponse + 24, // [24:36] is the sub-list for method output_type + 12, // [12:24] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_provider_proto_init() } @@ -1880,14 +2499,110 @@ func file_provider_proto_init() { return nil } } + file_provider_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientsInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientInfoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StorageClientsInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolsInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolInfoError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BlockPoolsInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_provider_proto_rawDesc, - NumEnums: 1, - NumMessages: 24, + NumEnums: 2, + NumMessages: 32, NumExtensions: 0, NumServices: 1, }, diff --git a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider_grpc.pb.go b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider_grpc.pb.go index 969a638a57..e8da8d5637 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider_grpc.pb.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/provider_grpc.pb.go @@ -40,6 +40,10 @@ type OCSProviderClient interface { // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote PeerStorageCluster(ctx context.Context, in *PeerStorageClusterRequest, opts ...grpc.CallOption) (*PeerStorageClusterResponse, error) RequestMaintenanceMode(ctx context.Context, in *RequestMaintenanceModeRequest, opts ...grpc.CallOption) (*RequestMaintenanceModeResponse, error) + // GetStorageClientsInfo RPC call to get StorageClientInfo for Peer Storage Client + GetStorageClientsInfo(ctx context.Context, in *StorageClientsInfoRequest, opts ...grpc.CallOption) (*StorageClientsInfoResponse, error) + // GetBlockPoolsInfo RPC call to get BlockPoolInfo for Peer Storage Cluster + GetBlockPoolsInfo(ctx context.Context, in *BlockPoolsInfoRequest, opts ...grpc.CallOption) (*BlockPoolsInfoResponse, error) } type oCSProviderClient struct { @@ -140,6 +144,24 @@ func (c *oCSProviderClient) RequestMaintenanceMode(ctx context.Context, in *Requ return out, nil } +func (c *oCSProviderClient) GetStorageClientsInfo(ctx context.Context, in *StorageClientsInfoRequest, opts ...grpc.CallOption) (*StorageClientsInfoResponse, error) { + out := new(StorageClientsInfoResponse) + err := c.cc.Invoke(ctx, "/provider.OCSProvider/GetStorageClientsInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *oCSProviderClient) GetBlockPoolsInfo(ctx context.Context, in *BlockPoolsInfoRequest, opts ...grpc.CallOption) (*BlockPoolsInfoResponse, error) { + out := new(BlockPoolsInfoResponse) + err := c.cc.Invoke(ctx, "/provider.OCSProvider/GetBlockPoolsInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // OCSProviderServer is the server API for OCSProvider service. // All implementations must embed UnimplementedOCSProviderServer // for forward compatibility @@ -166,6 +188,10 @@ type OCSProviderServer interface { // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote PeerStorageCluster(context.Context, *PeerStorageClusterRequest) (*PeerStorageClusterResponse, error) RequestMaintenanceMode(context.Context, *RequestMaintenanceModeRequest) (*RequestMaintenanceModeResponse, error) + // GetStorageClientsInfo RPC call to get StorageClientInfo for Peer Storage Client + GetStorageClientsInfo(context.Context, *StorageClientsInfoRequest) (*StorageClientsInfoResponse, error) + // GetBlockPoolsInfo RPC call to get BlockPoolInfo for Peer Storage Cluster + GetBlockPoolsInfo(context.Context, *BlockPoolsInfoRequest) (*BlockPoolsInfoResponse, error) mustEmbedUnimplementedOCSProviderServer() } @@ -203,6 +229,12 @@ func (UnimplementedOCSProviderServer) PeerStorageCluster(context.Context, *PeerS func (UnimplementedOCSProviderServer) RequestMaintenanceMode(context.Context, *RequestMaintenanceModeRequest) (*RequestMaintenanceModeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RequestMaintenanceMode not implemented") } +func (UnimplementedOCSProviderServer) GetStorageClientsInfo(context.Context, *StorageClientsInfoRequest) (*StorageClientsInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStorageClientsInfo not implemented") +} +func (UnimplementedOCSProviderServer) GetBlockPoolsInfo(context.Context, *BlockPoolsInfoRequest) (*BlockPoolsInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBlockPoolsInfo not implemented") +} func (UnimplementedOCSProviderServer) mustEmbedUnimplementedOCSProviderServer() {} // UnsafeOCSProviderServer may be embedded to opt out of forward compatibility for this service. @@ -396,6 +428,42 @@ func _OCSProvider_RequestMaintenanceMode_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _OCSProvider_GetStorageClientsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StorageClientsInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OCSProviderServer).GetStorageClientsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/provider.OCSProvider/GetStorageClientsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OCSProviderServer).GetStorageClientsInfo(ctx, req.(*StorageClientsInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OCSProvider_GetBlockPoolsInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BlockPoolsInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OCSProviderServer).GetBlockPoolsInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/provider.OCSProvider/GetBlockPoolsInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OCSProviderServer).GetBlockPoolsInfo(ctx, req.(*BlockPoolsInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // OCSProvider_ServiceDesc is the grpc.ServiceDesc for OCSProvider service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -443,6 +511,14 @@ var OCSProvider_ServiceDesc = grpc.ServiceDesc{ MethodName: "RequestMaintenanceMode", Handler: _OCSProvider_RequestMaintenanceMode_Handler, }, + { + MethodName: "GetStorageClientsInfo", + Handler: _OCSProvider_GetStorageClientsInfo_Handler, + }, + { + MethodName: "GetBlockPoolsInfo", + Handler: _OCSProvider_GetBlockPoolsInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "provider.proto", From 2293b8cdb60c847b27ce6ad3a44c08887214b137 Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Mon, 4 Nov 2024 21:05:07 +0530 Subject: [PATCH 2/4] add client side implementation Signed-off-by: Rewant Soni add generated changes Signed-off-by: Rewant Soni --- services/provider/api/client/client.go | 32 +++++++++++++++++++ .../services/provider/api/v4/client/client.go | 32 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/services/provider/api/client/client.go b/services/provider/api/client/client.go index 568964922e..4a2db6d72b 100644 --- a/services/provider/api/client/client.go +++ b/services/provider/api/client/client.go @@ -243,3 +243,35 @@ func (cc *OCSProviderClient) RequestMaintenanceMode(ctx context.Context, consume return cc.Client.RequestMaintenanceMode(apiCtx, req) } + +func (cc *OCSProviderClient) GetStorageClientsInfo(ctx context.Context, storageClusterUID string, clientIDs []string) (*pb.StorageClientsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("connection to Peer OCS is closed") + } + + req := &pb.StorageClientsInfoRequest{ + StorageClusterUID: storageClusterUID, + ClientIDs: clientIDs, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetStorageClientsInfo(apiCtx, req) +} + +func (cc *OCSProviderClient) GetBlockPoolsInfo(ctx context.Context, storageClusterUID string, blockPoolNames []string) (*pb.BlockPoolsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("connection to Peer OCS is closed") + } + + req := &pb.BlockPoolsInfoRequest{ + StorageClusterUID: storageClusterUID, + BlockPoolNames: blockPoolNames, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetBlockPoolsInfo(apiCtx, req) +} diff --git a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client/client.go b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client/client.go index 568964922e..4a2db6d72b 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client/client.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client/client.go @@ -243,3 +243,35 @@ func (cc *OCSProviderClient) RequestMaintenanceMode(ctx context.Context, consume return cc.Client.RequestMaintenanceMode(apiCtx, req) } + +func (cc *OCSProviderClient) GetStorageClientsInfo(ctx context.Context, storageClusterUID string, clientIDs []string) (*pb.StorageClientsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("connection to Peer OCS is closed") + } + + req := &pb.StorageClientsInfoRequest{ + StorageClusterUID: storageClusterUID, + ClientIDs: clientIDs, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetStorageClientsInfo(apiCtx, req) +} + +func (cc *OCSProviderClient) GetBlockPoolsInfo(ctx context.Context, storageClusterUID string, blockPoolNames []string) (*pb.BlockPoolsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("connection to Peer OCS is closed") + } + + req := &pb.BlockPoolsInfoRequest{ + StorageClusterUID: storageClusterUID, + BlockPoolNames: blockPoolNames, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetBlockPoolsInfo(apiCtx, req) +} From 6d895faa48e3d19ea053b7aee8416f44c2e5cda5 Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Mon, 4 Nov 2024 21:11:02 +0530 Subject: [PATCH 3/4] add server side implementation Signed-off-by: Rewant Soni --- controllers/storagecluster/reconcile.go | 27 +++++ services/provider/server/consumer.go | 15 +++ services/provider/server/server.go | 131 ++++++++++++++++++++++++ 3 files changed, 173 insertions(+) diff --git a/controllers/storagecluster/reconcile.go b/controllers/storagecluster/reconcile.go index 5ecd8d8350..06d04a6b40 100644 --- a/controllers/storagecluster/reconcile.go +++ b/controllers/storagecluster/reconcile.go @@ -408,6 +408,10 @@ func (r *StorageClusterReconciler) reconcilePhases( return reconcile.Result{}, err } + if res, err := r.ownStorageConsumersInNamespace(instance); err != nil || !res.IsZero() { + return reconcile.Result{}, err + } + // in-memory conditions should start off empty. It will only ever hold // negative conditions (!Available, Degraded, Progressing) r.conditions = nil @@ -816,6 +820,29 @@ func (r *StorageClusterReconciler) ownStorageClusterPeersInNamespace(instance *o return reconcile.Result{}, nil } +func (r *StorageClusterReconciler) ownStorageConsumersInNamespace(instance *ocsv1.StorageCluster) (reconcile.Result, error) { + storageConsumerList := &ocsv1alpha1.StorageConsumerList{} + err := r.Client.List(r.ctx, storageConsumerList, client.InNamespace(instance.Namespace)) + if err != nil { + return reconcile.Result{}, fmt.Errorf("failed to list storageConsumer: %w", err) + } + for i := range storageConsumerList.Items { + scp := &storageConsumerList.Items[i] + lenOwners := len(scp.OwnerReferences) + err := controllerutil.SetOwnerReference(instance, scp, r.Scheme) + if err != nil { + return reconcile.Result{}, fmt.Errorf("failed to set owner reference on storageConsumer %v: %w", scp.Name, err) + } + if lenOwners != len(scp.OwnerReferences) { + err = r.Client.Update(r.ctx, scp) + if err != nil { + return reconcile.Result{}, fmt.Errorf("failed to persist StorageCluster owner ref on storageConsumer %v: %w", scp.Name, err) + } + } + } + return reconcile.Result{}, nil +} + // Checks whether a string is contained within a slice func contains(slice []string, s string) bool { for _, item := range slice { diff --git a/services/provider/server/consumer.go b/services/provider/server/consumer.go index 63423fb620..f20f1c45cc 100644 --- a/services/provider/server/consumer.go +++ b/services/provider/server/consumer.go @@ -270,3 +270,18 @@ func (c *ocsConsumerManager) RemoveAnnotation(ctx context.Context, id string, an } return nil } + +func (c *ocsConsumerManager) GetByClientID(ctx context.Context, clientID string) (*ocsv1alpha1.StorageConsumer, error) { + consumerObjList := &ocsv1alpha1.StorageConsumerList{} + err := c.client.List(ctx, consumerObjList, client.InNamespace(c.namespace)) + if err != nil { + return nil, fmt.Errorf("failed to list storageConsumer objects: %v", err) + } + for i := range consumerObjList.Items { + consumer := consumerObjList.Items[i] + if consumer.Status.Client.ID == clientID { + return &consumer, nil + } + } + return nil, nil +} diff --git a/services/provider/server/server.go b/services/provider/server/server.go index 1733875208..6d8f8a9178 100644 --- a/services/provider/server/server.go +++ b/services/provider/server/server.go @@ -65,6 +65,7 @@ const ( monConfigMap = "rook-ceph-mon-endpoints" monSecret = "rook-ceph-mon" volumeReplicationClass5mSchedule = "5m" + mirroringTokenKey = "rbdMirrorBootstrapPeerSecretName" ) type OCSProviderServer struct { @@ -1124,6 +1125,136 @@ func (s *OCSProviderServer) RequestMaintenanceMode(ctx context.Context, req *pb. return &pb.RequestMaintenanceModeResponse{}, nil } +func (s *OCSProviderServer) GetStorageClientsInfo(ctx context.Context, req *pb.StorageClientsInfoRequest) (*pb.StorageClientsInfoResponse, error) { + klog.Infof("GetStorageClientsInfo called with request: %s", req) + + response := &pb.StorageClientsInfoResponse{} + for i := range req.ClientIDs { + consumer, err := s.consumerManager.GetByClientID(ctx, req.ClientIDs[i]) + if err != nil { + klog.Errorf("failed to get consumer with client id %v: %v", req.ClientIDs[i], err) + response.Errors = append(response.Errors, + &pb.StorageClientInfoError{ + ClientID: req.ClientIDs[i], + Code: pb.ErrorCode_Internal, + Message: "failed loading client information", + }, + ) + } + if consumer == nil { + klog.Infof("no consumer found with client id %v", req.ClientIDs[i]) + continue + } + + owner := util.FindOwnerRefByKind(consumer, "StorageCluster") + if owner == nil { + klog.Infof("no owner found for consumer %v", req.ClientIDs[i]) + continue + } + + if owner.UID != types.UID(req.StorageClusterUID) { + klog.Infof("storageCluster specified on the req does not own the client %v", req.ClientIDs[i]) + continue + } + + rnsList := &rookCephv1.CephBlockPoolRadosNamespaceList{} + err = s.client.List( + ctx, + rnsList, + client.InNamespace(s.namespace), + client.MatchingLabels{controllers.StorageConsumerNameLabel: consumer.Name}, + client.Limit(2), + ) + if err != nil { + response.Errors = append(response.Errors, + &pb.StorageClientInfoError{ + ClientID: req.ClientIDs[i], + Code: pb.ErrorCode_Internal, + Message: "failed loading client information", + }, + ) + klog.Error(err) + continue + } + if len(rnsList.Items) > 1 { + response.Errors = append(response.Errors, + &pb.StorageClientInfoError{ + ClientID: req.ClientIDs[i], + Code: pb.ErrorCode_Internal, + Message: "failed loading client information", + }, + ) + klog.Errorf("invalid number of radosnamespace found for the Client %v", req.ClientIDs[i]) + continue + } + clientInfo := &pb.ClientInfo{ClientID: req.ClientIDs[i]} + if len(rnsList.Items) == 1 { + clientInfo.RadosNamespace = rnsList.Items[0].Name + } + response.ClientsInfo = append(response.ClientsInfo, clientInfo) + } + + return response, nil +} + +func (s *OCSProviderServer) GetBlockPoolsInfo(ctx context.Context, req *pb.BlockPoolsInfoRequest) (*pb.BlockPoolsInfoResponse, error) { + klog.Infof("GetBlockPoolsInfo called with request: %s", req) + + response := &pb.BlockPoolsInfoResponse{} + for i := range req.BlockPoolNames { + cephBlockPool := &rookCephv1.CephBlockPool{} + cephBlockPool.Name = req.BlockPoolNames[i] + cephBlockPool.Namespace = s.namespace + err := s.client.Get(ctx, client.ObjectKeyFromObject(cephBlockPool), cephBlockPool) + if kerrors.IsNotFound(err) { + klog.Infof("blockpool %v not found", cephBlockPool.Name) + continue + } else if err != nil { + klog.Errorf("failed to get blockpool %v: %v", cephBlockPool.Name, err) + response.Errors = append(response.Errors, + &pb.BlockPoolInfoError{ + BlockPoolName: cephBlockPool.Name, + Code: pb.ErrorCode_Internal, + Message: "failed loading block pool information", + }, + ) + } + + var mirroringToken string + if cephBlockPool.Spec.Mirroring.Enabled && + cephBlockPool.Status.Info != nil && + cephBlockPool.Status.Info[mirroringTokenKey] != "" { + secret := &corev1.Secret{} + secret.Name = cephBlockPool.Status.Info[mirroringTokenKey] + secret.Namespace = s.namespace + err := s.client.Get(ctx, client.ObjectKeyFromObject(secret), secret) + if kerrors.IsNotFound(err) { + klog.Infof("bootstrap secret %v for blockpool %v not found", secret.Name, cephBlockPool.Name) + continue + } else if err != nil { + errMsg := fmt.Sprintf( + "failed to get bootstrap secret %s for CephBlockPool %s: %v", + cephBlockPool.Status.Info[mirroringTokenKey], + cephBlockPool.Name, + err, + ) + klog.Error(errMsg) + continue + } + mirroringToken = string(secret.Data["token"]) + } + + response.BlockPoolsInfo = append(response.BlockPoolsInfo, &pb.BlockPoolInfo{ + BlockPoolName: cephBlockPool.Name, + MirroringToken: mirroringToken, + BlockPoolID: strconv.Itoa(cephBlockPool.Status.PoolID), + }) + + } + + return response, nil +} + func (s *OCSProviderServer) isSystemInMaintenanceMode(ctx context.Context) (bool, error) { // found - false, not found - true cephRBDMirrors := &rookCephv1.CephRBDMirror{} From f3fb34d5eb4a21edc26dd574fcb1c4c9e05dd74d Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Tue, 12 Nov 2024 12:34:26 +0530 Subject: [PATCH 4/4] controllers: add a new controller to setup mirroring Signed-off-by: Rewant Soni --- config/rbac/role.yaml | 6 + controllers/mirroring/mirroring_controller.go | 565 ++++++++++++++++++ controllers/storagecluster/cephblockpools.go | 4 + .../storageclusterpeer_controller.go | 11 +- .../storagerequest_controller.go | 4 +- controllers/util/k8sutil.go | 17 +- deploy/csv-templates/ocs-operator.csv.yaml.in | 6 + .../ocs-operator.clusterserviceversion.yaml | 6 + go.mod | 2 +- main.go | 8 + metrics/go.mod | 1 + .../v4/controllers/util/k8sutil.go | 17 +- metrics/vendor/golang.org/x/exp/LICENSE | 27 + metrics/vendor/golang.org/x/exp/PATENTS | 22 + metrics/vendor/golang.org/x/exp/maps/maps.go | 94 +++ metrics/vendor/modules.txt | 3 + 16 files changed, 779 insertions(+), 14 deletions(-) create mode 100644 controllers/mirroring/mirroring_controller.go create mode 100644 metrics/vendor/golang.org/x/exp/LICENSE create mode 100644 metrics/vendor/golang.org/x/exp/PATENTS create mode 100644 metrics/vendor/golang.org/x/exp/maps/maps.go diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 08ee59544a..b2f47aecc2 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -122,6 +122,12 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update - apiGroups: - "" resources: diff --git a/controllers/mirroring/mirroring_controller.go b/controllers/mirroring/mirroring_controller.go new file mode 100644 index 0000000000..911e9e030d --- /dev/null +++ b/controllers/mirroring/mirroring_controller.go @@ -0,0 +1,565 @@ +/* +Copyright 2020 Red Hat OpenShift Container Storage. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package mirroring + +import ( + "context" + "fmt" + controllers "github.com/red-hat-storage/ocs-operator/v4/controllers/storageconsumer" + "golang.org/x/exp/maps" + "k8s.io/utils/ptr" + "slices" + "time" + + ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" + ocsv1alpha1 "github.com/red-hat-storage/ocs-operator/api/v4/v1alpha1" + providerClient "github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client" + "github.com/red-hat-storage/ocs-operator/v4/controllers/util" + + "github.com/go-logr/logr" + rookCephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" + corev1 "k8s.io/api/core/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/builder" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/handler" + "sigs.k8s.io/controller-runtime/pkg/log" + "sigs.k8s.io/controller-runtime/pkg/predicate" + "sigs.k8s.io/controller-runtime/pkg/reconcile" +) + +const ( + // internalKey is a special key for storage-client-mapping to establish mirroring between blockPools for internal mode + internalKey = "internal" + mirroringFinalizer = "mirroring.ocs.openshift.io" + clientIDIndexName = "clientID" +) + +// MirroringReconciler reconciles a Mirroring fields for Ceph Object(s) +// nolint:revive +type MirroringReconciler struct { + client.Client + Scheme *runtime.Scheme + + log logr.Logger + ctx context.Context +} + +// SetupWithManager sets up the controller with the Manager. +func (r *MirroringReconciler) SetupWithManager(mgr ctrl.Manager) error { + + ctx := context.Background() + + if err := mgr.GetCache().IndexField( + ctx, + &ocsv1alpha1.StorageConsumer{}, + util.AnnotationIndexName, + util.AnnotationIndexFieldFunc, + ); err != nil { + return fmt.Errorf("failed to set up FieldIndexer on StorageConsumer for annotations: %v", err) + } + + if err := mgr.GetCache().IndexField( + ctx, + &ocsv1alpha1.StorageConsumer{}, + clientIDIndexName, + func(obj client.Object) []string { + if storageConsumer, ok := obj.(*ocsv1alpha1.StorageConsumer); ok { + return []string{storageConsumer.Status.Client.ID} + } + return nil + }, + ); err != nil { + return fmt.Errorf("failed to set up FieldIndexer on StorageConsumer for clientID: %v", err) + } + + // Reconcile the OperatorConfigMap object when the cluster's version object is updated + enqueueConfigMapRequest := handler.EnqueueRequestsFromMapFunc( + func(_ context.Context, obj client.Object) []reconcile.Request { + return []reconcile.Request{{ + NamespacedName: types.NamespacedName{ + Name: util.StorageClientMappingConfigName, + Namespace: obj.GetNamespace(), + }, + }} + }, + ) + + generationChangePredicate := builder.WithPredicates(predicate.GenerationChangedPredicate{}) + + return ctrl.NewControllerManagedBy(mgr). + For( + &corev1.ConfigMap{}, + builder.WithPredicates(util.NamePredicate(util.StorageClientMappingConfigName)), + ). + Owns( + &rookCephv1.CephRBDMirror{}, + generationChangePredicate, + ). + Watches( + &ocsv1.StorageClusterPeer{}, + enqueueConfigMapRequest, + generationChangePredicate, + ). + Watches( + &ocsv1alpha1.StorageConsumer{}, + enqueueConfigMapRequest, + generationChangePredicate, + ). + Watches( + &rookCephv1.CephBlockPool{}, + enqueueConfigMapRequest, + generationChangePredicate, + ). + Watches( + &rookCephv1.CephBlockPoolRadosNamespace{}, + enqueueConfigMapRequest, + generationChangePredicate, + ). + Complete(r) +} + +//+kubebuilder:rbac:groups=ocs.openshift.io,resources=storageclusterpeers;storageconsumers,verbs=get;list;watch +//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch +//+kubebuilder:rbac:groups=core,resources=configmaps/finalizers,verbs=update +//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;delete +//+kubebuilder:rbac:groups=ceph.rook.io,resources=cephrbdmirrors,verbs=get;list;watch;create;update;delete +//+kubebuilder:rbac:groups=ceph.rook.io,resources=cephblockpools;cephblockpoolradosnamespaces,verbs=get;list;watch;create;update + +// Reconcile is part of the main kubernetes reconciliation loop which aims to +// move the current state of the cluster closer to the desired state. +func (r *MirroringReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) { + r.ctx = ctx + r.log = log.FromContext(ctx, "StorageClientMapping", request.NamespacedName) + r.log.Info("Starting reconcile") + + clientMappingConfig := &corev1.ConfigMap{} + clientMappingConfig.Name = request.Name + clientMappingConfig.Namespace = request.Namespace + + if err := r.get(clientMappingConfig); err != nil { + if k8serrors.IsNotFound(err) { + r.log.Info("ConfigMap %s not found. Ignoring since object must be deleted.") + return ctrl.Result{}, nil + } + r.log.Error(err, "Failed to get ConfigMap.") + return ctrl.Result{}, err + } + return r.reconcilePhases(clientMappingConfig) +} + +func (r *MirroringReconciler) reconcilePhases(clientMappingConfig *corev1.ConfigMap) (ctrl.Result, error) { + + shouldMirror := clientMappingConfig.DeletionTimestamp.IsZero() && + clientMappingConfig.Data != nil && + len(clientMappingConfig.Data) > 0 + + if shouldMirror { + if controllerutil.AddFinalizer(clientMappingConfig, mirroringFinalizer) { + r.log.Info("Finalizer not found for ConfigMap. Adding finalizer.") + if err := r.update(clientMappingConfig); err != nil { + return ctrl.Result{}, fmt.Errorf("failed to update ConfigMap: %v", err) + } + } + } + + // Fetch the StorageClusterPeer instance + storageClusterPeerList := &ocsv1.StorageClusterPeerList{} + if err := r.list( + storageClusterPeerList, + client.InNamespace(clientMappingConfig.Namespace), + client.Limit(2), + ); err != nil { + r.log.Error(err, "Failed to get StorageClusterPeer.") + return ctrl.Result{}, err + } + if len(storageClusterPeerList.Items) != 1 { + return ctrl.Result{}, fmt.Errorf("expected 1 StorageClusterPeer but got %d", len(storageClusterPeerList.Items)) + } + + storageClusterPeer := &storageClusterPeerList.Items[0] + + if storageClusterPeer.Status.State != ocsv1.StorageClusterPeerStatePeered || + storageClusterPeer.Status.PeerInfo == nil || + storageClusterPeer.Status.PeerInfo.StorageClusterUid == "" { + r.log.Info( + "waiting for StorageClusterPeer to be in Peered state", + "StorageClusterPeer", + storageClusterPeer.Name, + ) + return ctrl.Result{RequeueAfter: 3 * time.Second}, nil + } + + ocsClient, err := providerClient.NewProviderClient(r.ctx, storageClusterPeer.Spec.ApiEndpoint, util.OcsClientTimeout) + if err != nil { + return ctrl.Result{}, fmt.Errorf("failed to create a new provider client: %v", err) + } + defer ocsClient.Close() + + errorOccurred := false + + if errored := r.reconcileRbdMirror(clientMappingConfig, shouldMirror); errored { + errorOccurred = true + } + + if errored := r.reconcileBlockPoolMirroring( + ocsClient, + clientMappingConfig, + storageClusterPeer, + shouldMirror, + ); errored { + errorOccurred = true + } + + if errored := r.reconcileRadosNamespaceMirroring( + ocsClient, + clientMappingConfig, + storageClusterPeer, + shouldMirror, + ); errored { + errorOccurred = true + } + + if !shouldMirror { + if controllerutil.RemoveFinalizer(clientMappingConfig, mirroringFinalizer) { + r.log.Info("removing finalizer from ConfigMap.") + if err := r.update(clientMappingConfig); err != nil { + r.log.Info("Failed to remove finalizer from ConfigMap") + return ctrl.Result{}, fmt.Errorf("failed to remove finalizer from ConfigMap: %v", err) + } + } + } + + if errorOccurred { + return ctrl.Result{}, fmt.Errorf("failed to reconcile StorageClientMapping") + } + + return ctrl.Result{}, nil +} + +func (r *MirroringReconciler) reconcileRbdMirror(clientMappingConfig *corev1.ConfigMap, shouldMirror bool) bool { + + rbdMirror := &rookCephv1.CephRBDMirror{} + rbdMirror.Name = util.CephRBDMirrorName + rbdMirror.Namespace = clientMappingConfig.Namespace + + storageConsumers := &ocsv1alpha1.StorageConsumerList{} + if err := r.list( + storageConsumers, + client.MatchingFields{util.AnnotationIndexName: util.RequestMaintenanceModeAnnotation}, + ); err != nil { + r.log.Error(err, "failed to list StorageConsumer(s)") + return true + } + + maintenanceModeRequested := len(storageConsumers.Items) >= 1 + + if shouldMirror && !maintenanceModeRequested { + _, err := ctrl.CreateOrUpdate(r.ctx, r.Client, rbdMirror, func() error { + if err := r.own(clientMappingConfig, rbdMirror); err != nil { + return err + } + rbdMirror.Spec.Count = 1 + return nil + }) + if err != nil { + r.log.Error(err, "Failed to create/update the CephRBDMirror", "CephRBDMirror", rbdMirror.Name) + return true + } + } else { + if err := r.delete(rbdMirror); err != nil { + r.log.Error(err, "failed to delete CephRBDMirror", "CephRBDMirror", rbdMirror.Name) + return true + } + } + + return false +} + +func (r *MirroringReconciler) reconcileBlockPoolMirroring( + ocsClient *providerClient.OCSProviderClient, + clientMappingConfig *corev1.ConfigMap, + storageClusterPeer *ocsv1.StorageClusterPeer, + shouldMirror bool, +) bool { + errorOccurred := false + + cephBlockPoolsList := &rookCephv1.CephBlockPoolList{} + if err := r.list( + cephBlockPoolsList, + client.InNamespace(clientMappingConfig.Namespace), + ); err != nil { + r.log.Error(err, "failed to list cephBlockPools") + return true + } + + blockPoolByName := map[string]*rookCephv1.CephBlockPool{} + for i := range cephBlockPoolsList.Items { + cephBlockPool := &cephBlockPoolsList.Items[i] + if _, ok := cephBlockPool.GetLabels()[util.ForbidMirroringLabel]; ok { + continue + } + blockPoolByName[cephBlockPool.Name] = cephBlockPool + } + + if len(blockPoolByName) > 0 { + // fetch BlockPoolsInfo + response, err := ocsClient.GetBlockPoolsInfo( + r.ctx, + storageClusterPeer.Status.PeerInfo.StorageClusterUid, + maps.Keys(blockPoolByName), + ) + if err != nil { + r.log.Error(err, "failed to get CephBlockPool(s) info from Peer") + return true + } + + if response.Errors != nil { + for i := range response.Errors { + resp := response.Errors[i] + r.log.Error( + fmt.Errorf(resp.Message), + "failed to get BlockPoolsInfo", + "CephBlockPool", + resp.BlockPoolName, + ) + } + errorOccurred = true + } + + if shouldMirror { + for i := range response.BlockPoolsInfo { + blockPoolName := response.BlockPoolsInfo[i].BlockPoolName + cephBlockPool := blockPoolByName[blockPoolName] + + mirroringToken := response.BlockPoolsInfo[i].MirroringToken + secretName := fmt.Sprintf("rbd-mirroring-token-%s", util.CalculateMD5Hash(blockPoolName)) + if mirroringToken != "" { + mirroringSecret := &corev1.Secret{} + mirroringSecret.Name = secretName + mirroringSecret.Namespace = clientMappingConfig.Namespace + _, err = ctrl.CreateOrUpdate(r.ctx, r.Client, mirroringSecret, func() error { + if err = r.own(clientMappingConfig, mirroringSecret); err != nil { + return err + } + mirroringSecret.Data = map[string][]byte{ + "pool": []byte(blockPoolName), + "token": []byte(mirroringToken), + } + return nil + }) + if err != nil { + r.log.Error(err, "failed to create/update mirroring secret", "Secret", secretName) + errorOccurred = true + continue + } + } + + // We need to enable mirroring for the blockPool, else the mirroring secret will not be generated + _, err = controllerutil.CreateOrUpdate(r.ctx, r.Client, cephBlockPool, func() error { + util.AddAnnotation( + cephBlockPool, + util.BlockPoolMirroringTargetIDAnnotation, + response.BlockPoolsInfo[i].BlockPoolID, + ) + + cephBlockPool.Spec.Mirroring.Enabled = true + cephBlockPool.Spec.Mirroring.Mode = "image" + if mirroringToken != "" { + if cephBlockPool.Spec.Mirroring.Peers == nil { + cephBlockPool.Spec.Mirroring.Peers = &rookCephv1.MirroringPeerSpec{SecretNames: []string{}} + } + if !slices.Contains(cephBlockPool.Spec.Mirroring.Peers.SecretNames, secretName) { + cephBlockPool.Spec.Mirroring.Peers.SecretNames = append( + cephBlockPool.Spec.Mirroring.Peers.SecretNames, secretName) + } + } + return nil + }) + if err != nil { + r.log.Error( + err, + "failed to update CephBlockPool for mirroring", + "CephBlockPool", + cephBlockPool.Name, + ) + errorOccurred = true + } + } + } else { + for i := range response.BlockPoolsInfo { + blockPoolName := response.BlockPoolsInfo[i].BlockPoolName + cephBlockPool := blockPoolByName[blockPoolName] + _, err := controllerutil.CreateOrUpdate(r.ctx, r.Client, cephBlockPool, func() error { + cephBlockPool.Spec.Mirroring = rookCephv1.MirroringSpec{} + return nil + }) + if err != nil { + r.log.Error( + err, + "failed to disable mirroring for CephBlockPool", + "CephBlockPool", + cephBlockPool.Name, + ) + errorOccurred = true + } + } + } + } + + return errorOccurred +} + +func (r *MirroringReconciler) reconcileRadosNamespaceMirroring( + ocsClient *providerClient.OCSProviderClient, + clientMappingConfig *corev1.ConfigMap, + storageClusterPeer *ocsv1.StorageClusterPeer, + disableMirroring bool, +) bool { + /* + Algorithm: + make a list of peerClientIDs + send GetStorageClientsInfo with this Info + make a map of remoteNamespaceByClientID from response + list all radosNamespace and for each, + find out which consumer does it belong to + find the localClientID and use map to get radosnamespce + if radosnamespace is empty, disable mirroring + else enable mirroring + */ + errorOccurred := false + + peerClientIDs := []string{} + storageConsumerByName := map[string]*ocsv1alpha1.StorageConsumer{} + for localClientID, peerClientID := range clientMappingConfig.Data { + // for internal mode, we need only blockPool mirroring, hence skipping this for the special key "internal" + if localClientID == internalKey { + continue + } + // Check if the storageConsumer with the ClientID exists, this is a fancy get operation as + // there will be only one consumer with the clientID + storageConsumers := &ocsv1alpha1.StorageConsumerList{} + if err := r.list( + storageConsumers, + client.MatchingFields{clientIDIndexName: localClientID}, + client.Limit(2), + ); err != nil { + r.log.Error(err, "failed to list the StorageConsumer") + errorOccurred = true + continue + } + if len(storageConsumers.Items) != 1 { + r.log.Error( + fmt.Errorf("invalid number of StorageConumers found"), + fmt.Sprintf("expected 1 StorageConsumer but got %v", len(storageConsumers.Items)), + ) + errorOccurred = true + continue + } + storageConsumerByName[storageConsumers.Items[0].Name] = &storageConsumers.Items[0] + peerClientIDs = append(peerClientIDs, peerClientID) + } + + if len(peerClientIDs) > 0 { + response, err := ocsClient.GetStorageClientsInfo( + r.ctx, + storageClusterPeer.Status.PeerInfo.StorageClusterUid, + peerClientIDs, + ) + if err != nil { + r.log.Error(err, "failed to get StorageClient(s) info from Peer") + return true + } + + if response.Errors != nil { + for i := range response.Errors { + resp := response.Errors[i] + r.log.Error( + fmt.Errorf(resp.Message), + "failed to get StorageClientsInfo", + "CephBlockPool", + resp.ClientID, + ) + } + errorOccurred = true + } + + remoteNamespaceByClientID := map[string]string{} + for i := range response.ClientsInfo { + clientInfo := response.ClientsInfo[i] + remoteNamespaceByClientID[clientInfo.ClientID] = clientInfo.RadosNamespace + } + + radosNamespaceList := &rookCephv1.CephBlockPoolRadosNamespaceList{} + if err = r.list(radosNamespaceList, client.InNamespace(storageClusterPeer.Namespace)); err != nil { + r.log.Error(err, "failed to list CephBlockPoolRadosNamespace(s)") + return true + } + + for i := range radosNamespaceList.Items { + rns := &radosNamespaceList.Items[i] + consumer := storageConsumerByName[rns.GetLabels()[controllers.StorageConsumerNameLabel]] + if consumer == nil || consumer.Status.Client.ID == "" { + continue + } + remoteClientID := clientMappingConfig.Data[consumer.Status.Client.ID] + remoteNamespace := remoteNamespaceByClientID[remoteClientID] + _, err = controllerutil.CreateOrUpdate(r.ctx, r.Client, rns, func() error { + if remoteNamespace == "" || disableMirroring { + rns.Spec.Mirroring = nil + } else { + rns.Spec.Mirroring = &rookCephv1.RadosNamespaceMirroring{ + RemoteNamespace: ptr.To(remoteNamespace), + Mode: "image", + } + } + return nil + }) + if err != nil { + r.log.Error( + err, + "failed to update radosnamespace", + "CephBlockPoolRadosNamespace", + rns.Name, + ) + errorOccurred = true + } + } + } + return errorOccurred +} + +func (r *MirroringReconciler) get(obj client.Object) error { + return r.Client.Get(r.ctx, client.ObjectKeyFromObject(obj), obj) +} + +func (r *MirroringReconciler) list(obj client.ObjectList, listOptions ...client.ListOption) error { + return r.Client.List(r.ctx, obj, listOptions...) +} + +func (r *MirroringReconciler) update(obj client.Object, opts ...client.UpdateOption) error { + return r.Client.Update(r.ctx, obj, opts...) +} + +func (r *MirroringReconciler) delete(obj client.Object, opts ...client.DeleteOption) error { + return r.Client.Delete(r.ctx, obj, opts...) +} + +func (r *MirroringReconciler) own(owner *corev1.ConfigMap, obj client.Object) error { + return controllerutil.SetControllerReference(owner, obj, r.Scheme) +} diff --git a/controllers/storagecluster/cephblockpools.go b/controllers/storagecluster/cephblockpools.go index 361ea33238..6cd0ea92ef 100644 --- a/controllers/storagecluster/cephblockpools.go +++ b/controllers/storagecluster/cephblockpools.go @@ -4,6 +4,7 @@ import ( "fmt" ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" + "github.com/red-hat-storage/ocs-operator/v4/controllers/util" cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -149,6 +150,7 @@ func (o *ocsCephBlockPools) reconcileMgrCephBlockPool(r *StorageClusterReconcile cephBlockPool.Spec.PoolSpec.EnableCrushUpdates = true cephBlockPool.Spec.PoolSpec.FailureDomain = getFailureDomain(storageCluster) cephBlockPool.Spec.PoolSpec.Replicated = generateCephReplicatedSpec(storageCluster, "metadata") + util.AddLabel(cephBlockPool, util.ForbidMirroringLabel, "true") return controllerutil.SetControllerReference(storageCluster, cephBlockPool, r.Scheme) }) @@ -197,6 +199,8 @@ func (o *ocsCephBlockPools) reconcileNFSCephBlockPool(r *StorageClusterReconcile cephBlockPool.Spec.PoolSpec.FailureDomain = getFailureDomain(storageCluster) cephBlockPool.Spec.PoolSpec.Replicated = generateCephReplicatedSpec(storageCluster, "data") cephBlockPool.Spec.PoolSpec.EnableRBDStats = true + util.AddLabel(cephBlockPool, util.ForbidMirroringLabel, "true") + return controllerutil.SetControllerReference(storageCluster, cephBlockPool, r.Scheme) }) if err != nil { diff --git a/controllers/storageclusterpeer/storageclusterpeer_controller.go b/controllers/storageclusterpeer/storageclusterpeer_controller.go index 2da99f7d31..b32c2fcdac 100644 --- a/controllers/storageclusterpeer/storageclusterpeer_controller.go +++ b/controllers/storageclusterpeer/storageclusterpeer_controller.go @@ -21,9 +21,7 @@ import ( "encoding/base64" "encoding/json" "fmt" - "google.golang.org/grpc/codes" "strings" - "time" ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" providerClient "github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client" @@ -31,6 +29,7 @@ import ( "github.com/red-hat-storage/ocs-operator/v4/services" "github.com/go-logr/logr" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" k8serrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" @@ -56,7 +55,11 @@ type StorageClusterPeerReconciler struct { func (r *StorageClusterPeerReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&ocsv1.StorageClusterPeer{}). - Watches(&ocsv1.StorageCluster{}, &handler.EnqueueRequestForObject{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})). + Watches( + &ocsv1.StorageCluster{}, + &handler.EnqueueRequestForObject{}, + builder.WithPredicates(predicate.GenerationChangedPredicate{}), + ). Complete(r) } @@ -160,7 +163,7 @@ func (r *StorageClusterPeerReconciler) reconcileStates(storageClusterPeer *ocsv1 storageClusterPeer.Status.PeerInfo = &ocsv1.PeerInfo{StorageClusterUid: string(ticketData.StorageCluster)} } - ocsClient, err := providerClient.NewProviderClient(r.ctx, storageClusterPeer.Spec.ApiEndpoint, time.Second*10) + ocsClient, err := providerClient.NewProviderClient(r.ctx, storageClusterPeer.Spec.ApiEndpoint, util.OcsClientTimeout) if err != nil { storageClusterPeer.Status.State = ocsv1.StorageClusterPeerStateFailed return ctrl.Result{}, fmt.Errorf("failed to create a new provider client: %v", err) diff --git a/controllers/storagerequest/storagerequest_controller.go b/controllers/storagerequest/storagerequest_controller.go index c2c057ff3b..3ae21cd626 100644 --- a/controllers/storagerequest/storagerequest_controller.go +++ b/controllers/storagerequest/storagerequest_controller.go @@ -371,9 +371,7 @@ func (r *StorageRequestReconciler) reconcileRadosNamespace() error { // add a blockpool name in the label so UI can watch for the rados namespace // that belongs to the particular blockpool addLabel(r.cephRadosNamespace, blockPoolNameLabel, blockPoolName) - r.cephRadosNamespace.Spec = rookCephv1.CephBlockPoolRadosNamespaceSpec{ - BlockPoolName: blockPoolName, - } + r.cephRadosNamespace.Spec.BlockPoolName = blockPoolName return nil }) diff --git a/controllers/util/k8sutil.go b/controllers/util/k8sutil.go index 1acf5f649d..cc57894761 100644 --- a/controllers/util/k8sutil.go +++ b/controllers/util/k8sutil.go @@ -3,16 +3,18 @@ package util import ( "context" "fmt" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "os" "strings" + "time" ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" "github.com/go-logr/logr" configv1 "github.com/openshift/api/config/v1" + "golang.org/x/exp/maps" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -47,15 +49,20 @@ const ( EnableNFSKey = "ROOK_CSI_ENABLE_NFS" DisableCSIDriverKey = "ROOK_CSI_DISABLE_DRIVER" - // This is the name for the OwnerUID FieldIndex - OwnerUIDIndexName = "ownerUID" + // This is the name for the FieldIndex + OwnerUIDIndexName = "ownerUID" + AnnotationIndexName = "annotation" OdfInfoNamespacedNameClaimName = "odfinfo.odf.openshift.io" ExitCodeThatShouldRestartTheProcess = 42 + //ForbidMirroringLabel is used to forbid mirroring for ceph resources such as CephBlockPool + ForbidMirroringLabel = "ocs.openshift.io/forbid-mirroring" BlockPoolMirroringTargetIDAnnotation = "ocs.openshift.io/mirroring-target-id" RequestMaintenanceModeAnnotation = "ocs.openshift.io/request-maintenance-mode" CephRBDMirrorName = "cephrbdmirror" + OcsClientTimeout = 10 * time.Second + StorageClientMappingConfigName = "storage-client-mapping" ) var podNamespace = os.Getenv(PodNamespaceEnvVar) @@ -167,6 +174,10 @@ func OwnersIndexFieldFunc(obj client.Object) []string { return owners } +func AnnotationIndexFieldFunc(obj client.Object) []string { + return maps.Keys(obj.GetAnnotations()) +} + func GenerateNameForNonResilientCephBlockPoolSC(initData *ocsv1.StorageCluster) string { if initData.Spec.ManagedResources.CephNonResilientPools.StorageClassName != "" { return initData.Spec.ManagedResources.CephNonResilientPools.StorageClassName diff --git a/deploy/csv-templates/ocs-operator.csv.yaml.in b/deploy/csv-templates/ocs-operator.csv.yaml.in index ffa68ff072..71dde54fe0 100644 --- a/deploy/csv-templates/ocs-operator.csv.yaml.in +++ b/deploy/csv-templates/ocs-operator.csv.yaml.in @@ -293,6 +293,12 @@ spec: - patch - update - watch + - apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update - apiGroups: - "" resources: diff --git a/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml b/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml index 30a1d7cab1..438e2abda6 100644 --- a/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml +++ b/deploy/ocs-operator/manifests/ocs-operator.clusterserviceversion.yaml @@ -302,6 +302,12 @@ spec: - patch - update - watch + - apiGroups: + - "" + resources: + - configmaps/finalizers + verbs: + - update - apiGroups: - "" resources: diff --git a/go.mod b/go.mod index ec70120514..de1d1ef4e8 100644 --- a/go.mod +++ b/go.mod @@ -38,6 +38,7 @@ require ( github.com/rook/rook/pkg/apis v0.0.0-20241119201302-fc456553b3cc github.com/stretchr/testify v1.9.0 go.uber.org/multierr v1.11.0 + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c golang.org/x/net v0.31.0 google.golang.org/grpc v1.68.0 gopkg.in/ini.v1 v1.67.0 @@ -122,7 +123,6 @@ require ( go.mongodb.org/mongo-driver v1.16.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/crypto v0.29.0 // indirect - golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/term v0.26.0 // indirect diff --git a/main.go b/main.go index 37ea4d8d9e..19ff7324e6 100644 --- a/main.go +++ b/main.go @@ -58,6 +58,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" metrics "sigs.k8s.io/controller-runtime/pkg/metrics/server" + "github.com/red-hat-storage/ocs-operator/v4/controllers/mirroring" "github.com/red-hat-storage/ocs-operator/v4/controllers/ocsinitialization" "github.com/red-hat-storage/ocs-operator/v4/controllers/platform" "github.com/red-hat-storage/ocs-operator/v4/controllers/storagecluster" @@ -234,6 +235,13 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "StorageClusterPeer") os.Exit(1) } + if err = (&mirroring.MirroringReconciler{ + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + }).SetupWithManager(mgr); err != nil { + setupLog.Error(err, "unable to create controller", "controller", "Mirroring") + os.Exit(1) + } // +kubebuilder:scaffold:builder // Create OCSInitialization CR if it's not present diff --git a/metrics/go.mod b/metrics/go.mod index 3890af5560..be8e160183 100644 --- a/metrics/go.mod +++ b/metrics/go.mod @@ -103,6 +103,7 @@ require ( github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.29.0 // indirect + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.27.0 // indirect golang.org/x/term v0.26.0 // indirect diff --git a/metrics/vendor/github.com/red-hat-storage/ocs-operator/v4/controllers/util/k8sutil.go b/metrics/vendor/github.com/red-hat-storage/ocs-operator/v4/controllers/util/k8sutil.go index 1acf5f649d..cc57894761 100644 --- a/metrics/vendor/github.com/red-hat-storage/ocs-operator/v4/controllers/util/k8sutil.go +++ b/metrics/vendor/github.com/red-hat-storage/ocs-operator/v4/controllers/util/k8sutil.go @@ -3,16 +3,18 @@ package util import ( "context" "fmt" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "os" "strings" + "time" ocsv1 "github.com/red-hat-storage/ocs-operator/api/v4/v1" "github.com/go-logr/logr" configv1 "github.com/openshift/api/config/v1" + "golang.org/x/exp/maps" corev1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" @@ -47,15 +49,20 @@ const ( EnableNFSKey = "ROOK_CSI_ENABLE_NFS" DisableCSIDriverKey = "ROOK_CSI_DISABLE_DRIVER" - // This is the name for the OwnerUID FieldIndex - OwnerUIDIndexName = "ownerUID" + // This is the name for the FieldIndex + OwnerUIDIndexName = "ownerUID" + AnnotationIndexName = "annotation" OdfInfoNamespacedNameClaimName = "odfinfo.odf.openshift.io" ExitCodeThatShouldRestartTheProcess = 42 + //ForbidMirroringLabel is used to forbid mirroring for ceph resources such as CephBlockPool + ForbidMirroringLabel = "ocs.openshift.io/forbid-mirroring" BlockPoolMirroringTargetIDAnnotation = "ocs.openshift.io/mirroring-target-id" RequestMaintenanceModeAnnotation = "ocs.openshift.io/request-maintenance-mode" CephRBDMirrorName = "cephrbdmirror" + OcsClientTimeout = 10 * time.Second + StorageClientMappingConfigName = "storage-client-mapping" ) var podNamespace = os.Getenv(PodNamespaceEnvVar) @@ -167,6 +174,10 @@ func OwnersIndexFieldFunc(obj client.Object) []string { return owners } +func AnnotationIndexFieldFunc(obj client.Object) []string { + return maps.Keys(obj.GetAnnotations()) +} + func GenerateNameForNonResilientCephBlockPoolSC(initData *ocsv1.StorageCluster) string { if initData.Spec.ManagedResources.CephNonResilientPools.StorageClassName != "" { return initData.Spec.ManagedResources.CephNonResilientPools.StorageClassName diff --git a/metrics/vendor/golang.org/x/exp/LICENSE b/metrics/vendor/golang.org/x/exp/LICENSE new file mode 100644 index 0000000000..2a7cf70da6 --- /dev/null +++ b/metrics/vendor/golang.org/x/exp/LICENSE @@ -0,0 +1,27 @@ +Copyright 2009 The Go Authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google LLC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/metrics/vendor/golang.org/x/exp/PATENTS b/metrics/vendor/golang.org/x/exp/PATENTS new file mode 100644 index 0000000000..733099041f --- /dev/null +++ b/metrics/vendor/golang.org/x/exp/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/metrics/vendor/golang.org/x/exp/maps/maps.go b/metrics/vendor/golang.org/x/exp/maps/maps.go new file mode 100644 index 0000000000..ecc0dabb74 --- /dev/null +++ b/metrics/vendor/golang.org/x/exp/maps/maps.go @@ -0,0 +1,94 @@ +// Copyright 2021 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package maps defines various functions useful with maps of any type. +package maps + +// Keys returns the keys of the map m. +// The keys will be in an indeterminate order. +func Keys[M ~map[K]V, K comparable, V any](m M) []K { + r := make([]K, 0, len(m)) + for k := range m { + r = append(r, k) + } + return r +} + +// Values returns the values of the map m. +// The values will be in an indeterminate order. +func Values[M ~map[K]V, K comparable, V any](m M) []V { + r := make([]V, 0, len(m)) + for _, v := range m { + r = append(r, v) + } + return r +} + +// Equal reports whether two maps contain the same key/value pairs. +// Values are compared using ==. +func Equal[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || v1 != v2 { + return false + } + } + return true +} + +// EqualFunc is like Equal, but compares values using eq. +// Keys are still compared with ==. +func EqualFunc[M1 ~map[K]V1, M2 ~map[K]V2, K comparable, V1, V2 any](m1 M1, m2 M2, eq func(V1, V2) bool) bool { + if len(m1) != len(m2) { + return false + } + for k, v1 := range m1 { + if v2, ok := m2[k]; !ok || !eq(v1, v2) { + return false + } + } + return true +} + +// Clear removes all entries from m, leaving it empty. +func Clear[M ~map[K]V, K comparable, V any](m M) { + for k := range m { + delete(m, k) + } +} + +// Clone returns a copy of m. This is a shallow clone: +// the new keys and values are set using ordinary assignment. +func Clone[M ~map[K]V, K comparable, V any](m M) M { + // Preserve nil in case it matters. + if m == nil { + return nil + } + r := make(M, len(m)) + for k, v := range m { + r[k] = v + } + return r +} + +// Copy copies all key/value pairs in src adding them to dst. +// When a key in src is already present in dst, +// the value in dst will be overwritten by the value associated +// with the key in src. +func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) { + for k, v := range src { + dst[k] = v + } +} + +// DeleteFunc deletes any key/value pairs from m for which del returns true. +func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool) { + for k, v := range m { + if del(k, v) { + delete(m, k) + } + } +} diff --git a/metrics/vendor/modules.txt b/metrics/vendor/modules.txt index 89061c296c..00bd04484d 100644 --- a/metrics/vendor/modules.txt +++ b/metrics/vendor/modules.txt @@ -353,6 +353,9 @@ go.uber.org/zap/zapcore # golang.org/x/crypto v0.29.0 ## explicit; go 1.20 golang.org/x/crypto/pbkdf2 +# golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c +## explicit; go 1.22.0 +golang.org/x/exp/maps # golang.org/x/net v0.31.0 ## explicit; go 1.18 golang.org/x/net/context