From a207d9c913cd6bb4b2e6c8e352b30c595b1289f5 Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Wed, 13 Nov 2024 23:35:05 +0530 Subject: [PATCH] controllers: send storageclient uid from status reporter Signed-off-by: Rewant Soni --- go.mod | 2 +- go.sum | 4 +- service/status-report/main.go | 3 +- .../services/provider/api/v4/client/client.go | 16 + .../provider/api/v4/interfaces/interfaces.go | 2 + .../services/provider/api/v4/provider.pb.go | 303 +++++++++++++----- .../provider/api/v4/provider_grpc.pb.go | 38 +++ .../services/provider/api/v4/storageclient.go | 5 + vendor/modules.txt | 2 +- 9 files changed, 294 insertions(+), 81 deletions(-) diff --git a/go.mod b/go.mod index 4938e3aa..c922468a 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.0 github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237 github.com/red-hat-storage/ocs-client-operator/api v0.0.0-00010101000000-000000000000 - github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241015071140-98c8184c6eec + github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.66.0 k8s.io/api v0.31.0 diff --git a/go.sum b/go.sum index f700b2af..f9204213 100644 --- a/go.sum +++ b/go.sum @@ -325,8 +325,8 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237 h1:ig6ePD0yopC5Qi5BRmhsIsKaOkdsGXTSmG3HTYIpquo= github.com/ramendr/ramen/api v0.0.0-20241001141243-29d6f22ad237/go.mod h1:nO6VM/+PEhcPGyFIQJdhY6ip822cA61PAy/s6IjenAA= -github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241015071140-98c8184c6eec h1:M64BdwKMV3jKxcRsZiaGbRKsvlbhRGVZgcb4V/MFeWk= -github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241015071140-98c8184c6eec/go.mod h1:t9GJk69TGXABBF8fFPB+ImpbA9mJyRS86wW6+Qn8xHo= +github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd h1:WIdoP1CE/8yl9tnHFVY7g/h4ZDFk+2Y9Ri0PrHXfx1g= +github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd/go.mod h1:t9GJk69TGXABBF8fFPB+ImpbA9mJyRS86wW6+Qn8xHo= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= diff --git a/service/status-report/main.go b/service/status-report/main.go index 862ee2ed..ead70518 100644 --- a/service/status-report/main.go +++ b/service/status-report/main.go @@ -113,7 +113,8 @@ func main() { defer providerClient.Close() status := providerclient.NewStorageClientStatus(). - SetClientName(storageClientName) + SetClientName(storageClientName). + SetClientID(string(storageClient.UID)) setPlatformInformation(ctx, cl, status) setOperatorInformation(ctx, cl, status, operatorNamespace) setClusterInformation(ctx, cl, status) 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 fe05dff2..490c97b0 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 @@ -211,3 +211,19 @@ func (cc *OCSProviderClient) ReportStatus(ctx context.Context, consumerUUID stri return cc.Client.ReportStatus(apiCtx, req) } + +func (cc *OCSProviderClient) PeerStorageCluster(ctx context.Context, onboardingToken, storageClusterUID string) (*pb.PeerStorageClusterResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("OCS client is closed") + } + + req := &pb.PeerStorageClusterRequest{ + OnboardingToken: onboardingToken, + StorageClusterUID: storageClusterUID, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.PeerStorageCluster(apiCtx, req) +} diff --git a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/interfaces/interfaces.go b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/interfaces/interfaces.go index e296616b..596342c3 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/interfaces/interfaces.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/interfaces/interfaces.go @@ -9,6 +9,7 @@ type StorageClientStatus interface { GetClusterID() string GetClusterName() string GetClientName() string + GetClientID() string GetStorageQuotaUtilizationRatio() float64 SetPlatformVersion(string) StorageClientStatus @@ -16,6 +17,7 @@ type StorageClientStatus interface { SetClusterID(string) StorageClientStatus SetClusterName(string) StorageClientStatus SetClientName(string) StorageClientStatus + SetClientID(string) StorageClientStatus SetStorageQuotaUtilizationRatio(float64) StorageClientStatus } 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 a8d4e89c..261e53a2 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 @@ -899,6 +899,8 @@ type ReportStatusRequest struct { ClientName string `protobuf:"bytes,6,opt,name=clientName,proto3" json:"clientName,omitempty"` // storageQuotaUtilizationRatio is the ratio of utilized quota of connected client StorageQuotaUtilizationRatio float64 `protobuf:"fixed64,7,opt,name=storageQuotaUtilizationRatio,proto3" json:"storageQuotaUtilizationRatio,omitempty"` + // clientID is the k8s UID of storageClient + ClientID string `protobuf:"bytes,8,opt,name=clientID,proto3" json:"clientID,omitempty"` } func (x *ReportStatusRequest) Reset() { @@ -982,6 +984,13 @@ func (x *ReportStatusRequest) GetStorageQuotaUtilizationRatio() float64 { return 0 } +func (x *ReportStatusRequest) GetClientID() string { + if x != nil { + return x.ClientID + } + return "" +} + type ReportStatusResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1038,6 +1047,103 @@ func (x *ReportStatusResponse) GetDesiredConfigHash() string { return "" } +// PeerStorageClusterRequest holds the required information to Peer to remote StorageCluster +type PeerStorageClusterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // onboardingToken authenticates the StorageCluster + OnboardingToken string `protobuf:"bytes,1,opt,name=onboardingToken,proto3" json:"onboardingToken,omitempty"` + // storageClusterUID is the k8s UID of the StorageCluster in the same namespace + StorageClusterUID string `protobuf:"bytes,2,opt,name=storageClusterUID,proto3" json:"storageClusterUID,omitempty"` +} + +func (x *PeerStorageClusterRequest) Reset() { + *x = PeerStorageClusterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerStorageClusterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerStorageClusterRequest) ProtoMessage() {} + +func (x *PeerStorageClusterRequest) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[17] + 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 PeerStorageClusterRequest.ProtoReflect.Descriptor instead. +func (*PeerStorageClusterRequest) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{17} +} + +func (x *PeerStorageClusterRequest) GetOnboardingToken() string { + if x != nil { + return x.OnboardingToken + } + return "" +} + +func (x *PeerStorageClusterRequest) GetStorageClusterUID() string { + if x != nil { + return x.StorageClusterUID + } + return "" +} + +// PeerStorageClusterResponse holds the response for OnboardStorageClusterPeer API request +type PeerStorageClusterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PeerStorageClusterResponse) Reset() { + *x = PeerStorageClusterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_provider_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PeerStorageClusterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PeerStorageClusterResponse) ProtoMessage() {} + +func (x *PeerStorageClusterResponse) ProtoReflect() protoreflect.Message { + mi := &file_provider_proto_msgTypes[18] + 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 PeerStorageClusterResponse.ProtoReflect.Descriptor instead. +func (*PeerStorageClusterResponse) Descriptor() ([]byte, []int) { + return file_provider_proto_rawDescGZIP(), []int{18} +} + var File_provider_proto protoreflect.FileDescriptor var file_provider_proto_rawDesc = []byte{ @@ -1155,7 +1261,7 @@ var file_provider_proto_rawDesc = []byte{ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x10, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0xd7, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, + 0x72, 0x63, 0x65, 0x22, 0xf3, 0x02, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x55, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, @@ -1176,66 +1282,83 @@ var file_provider_proto_rawDesc = []byte{ 0x72, 0x61, 0x67, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x1c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x55, 0x74, 0x69, - 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x22, 0x88, 0x01, - 0x0a, 0x14, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, + 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x22, 0x88, 0x01, 0x0a, 0x14, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x42, 0x0a, 0x1c, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x64, 0x65, - 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x65, - 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x61, 0x73, 0x68, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x48, 0x61, 0x73, 0x68, 0x32, 0x87, 0x06, 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, 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, + 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x48, 0x61, 0x73, 0x68, 0x22, 0x73, 0x0a, 0x19, 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, 0x12, 0x28, 0x0a, 0x0f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x6e, 0x62, 0x6f, + 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2c, 0x0a, 0x11, 0x73, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x55, 0x49, 0x44, 0x22, 0x1c, 0x0a, 0x1a, 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, 0x32, 0xea, 0x06, 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, 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 ( @@ -1251,7 +1374,7 @@ func file_provider_proto_rawDescGZIP() []byte { } var file_provider_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 19) +var file_provider_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_provider_proto_goTypes = []interface{}{ (FulfillStorageClaimRequest_StorageType)(0), // 0: provider.FulfillStorageClaimRequest.StorageType (*OnboardConsumerRequest)(nil), // 1: provider.OnboardConsumerRequest @@ -1271,12 +1394,14 @@ var file_provider_proto_goTypes = []interface{}{ (*StorageClaimConfigResponse)(nil), // 15: provider.StorageClaimConfigResponse (*ReportStatusRequest)(nil), // 16: provider.ReportStatusRequest (*ReportStatusResponse)(nil), // 17: provider.ReportStatusResponse - nil, // 18: provider.ExternalResource.LabelsEntry - nil, // 19: provider.ExternalResource.AnnotationsEntry + (*PeerStorageClusterRequest)(nil), // 18: provider.PeerStorageClusterRequest + (*PeerStorageClusterResponse)(nil), // 19: provider.PeerStorageClusterResponse + nil, // 20: provider.ExternalResource.LabelsEntry + nil, // 21: provider.ExternalResource.AnnotationsEntry } var file_provider_proto_depIdxs = []int32{ - 18, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry - 19, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry + 20, // 0: provider.ExternalResource.Labels:type_name -> provider.ExternalResource.LabelsEntry + 21, // 1: provider.ExternalResource.Annotations:type_name -> provider.ExternalResource.AnnotationsEntry 4, // 2: provider.StorageConfigResponse.externalResource:type_name -> provider.ExternalResource 0, // 3: provider.FulfillStorageClaimRequest.storageType:type_name -> provider.FulfillStorageClaimRequest.StorageType 4, // 4: provider.StorageClaimConfigResponse.externalResource:type_name -> provider.ExternalResource @@ -1288,16 +1413,18 @@ var file_provider_proto_depIdxs = []int32{ 12, // 10: provider.OCSProvider.RevokeStorageClaim:input_type -> provider.RevokeStorageClaimRequest 14, // 11: provider.OCSProvider.GetStorageClaimConfig:input_type -> provider.StorageClaimConfigRequest 16, // 12: provider.OCSProvider.ReportStatus:input_type -> provider.ReportStatusRequest - 2, // 13: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse - 5, // 14: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse - 7, // 15: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse - 9, // 16: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse - 11, // 17: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse - 13, // 18: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse - 15, // 19: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse - 17, // 20: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse - 13, // [13:21] is the sub-list for method output_type - 5, // [5:13] is the sub-list for method input_type + 18, // 13: provider.OCSProvider.PeerStorageCluster:input_type -> provider.PeerStorageClusterRequest + 2, // 14: provider.OCSProvider.OnboardConsumer:output_type -> provider.OnboardConsumerResponse + 5, // 15: provider.OCSProvider.GetStorageConfig:output_type -> provider.StorageConfigResponse + 7, // 16: provider.OCSProvider.OffboardConsumer:output_type -> provider.OffboardConsumerResponse + 9, // 17: provider.OCSProvider.AcknowledgeOnboarding:output_type -> provider.AcknowledgeOnboardingResponse + 11, // 18: provider.OCSProvider.FulfillStorageClaim:output_type -> provider.FulfillStorageClaimResponse + 13, // 19: provider.OCSProvider.RevokeStorageClaim:output_type -> provider.RevokeStorageClaimResponse + 15, // 20: provider.OCSProvider.GetStorageClaimConfig:output_type -> provider.StorageClaimConfigResponse + 17, // 21: provider.OCSProvider.ReportStatus:output_type -> provider.ReportStatusResponse + 19, // 22: provider.OCSProvider.PeerStorageCluster:output_type -> provider.PeerStorageClusterResponse + 14, // [14:23] is the sub-list for method output_type + 5, // [5:14] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name 5, // [5:5] is the sub-list for extension extendee 0, // [0:5] is the sub-list for field type_name @@ -1513,6 +1640,30 @@ func file_provider_proto_init() { return nil } } + file_provider_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerStorageClusterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_provider_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PeerStorageClusterResponse); 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{ @@ -1520,7 +1671,7 @@ func file_provider_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_provider_proto_rawDesc, NumEnums: 1, - NumMessages: 19, + NumMessages: 21, 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 64c45e2b..6a7c6596 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 @@ -37,6 +37,8 @@ type OCSProviderClient interface { // specific resources. GetStorageClaimConfig(ctx context.Context, in *StorageClaimConfigRequest, opts ...grpc.CallOption) (*StorageClaimConfigResponse, error) ReportStatus(ctx context.Context, in *ReportStatusRequest, opts ...grpc.CallOption) (*ReportStatusResponse, error) + // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote + PeerStorageCluster(ctx context.Context, in *PeerStorageClusterRequest, opts ...grpc.CallOption) (*PeerStorageClusterResponse, error) } type oCSProviderClient struct { @@ -119,6 +121,15 @@ func (c *oCSProviderClient) ReportStatus(ctx context.Context, in *ReportStatusRe return out, nil } +func (c *oCSProviderClient) PeerStorageCluster(ctx context.Context, in *PeerStorageClusterRequest, opts ...grpc.CallOption) (*PeerStorageClusterResponse, error) { + out := new(PeerStorageClusterResponse) + err := c.cc.Invoke(ctx, "/provider.OCSProvider/PeerStorageCluster", 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 @@ -142,6 +153,8 @@ type OCSProviderServer interface { // specific resources. GetStorageClaimConfig(context.Context, *StorageClaimConfigRequest) (*StorageClaimConfigResponse, error) ReportStatus(context.Context, *ReportStatusRequest) (*ReportStatusResponse, error) + // PeerStorageCluster RPC call to Peer the local Storage Cluster to the remote + PeerStorageCluster(context.Context, *PeerStorageClusterRequest) (*PeerStorageClusterResponse, error) mustEmbedUnimplementedOCSProviderServer() } @@ -173,6 +186,9 @@ func (UnimplementedOCSProviderServer) GetStorageClaimConfig(context.Context, *St func (UnimplementedOCSProviderServer) ReportStatus(context.Context, *ReportStatusRequest) (*ReportStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ReportStatus not implemented") } +func (UnimplementedOCSProviderServer) PeerStorageCluster(context.Context, *PeerStorageClusterRequest) (*PeerStorageClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PeerStorageCluster not implemented") +} func (UnimplementedOCSProviderServer) mustEmbedUnimplementedOCSProviderServer() {} // UnsafeOCSProviderServer may be embedded to opt out of forward compatibility for this service. @@ -330,6 +346,24 @@ func _OCSProvider_ReportStatus_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _OCSProvider_PeerStorageCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PeerStorageClusterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OCSProviderServer).PeerStorageCluster(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/provider.OCSProvider/PeerStorageCluster", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OCSProviderServer).PeerStorageCluster(ctx, req.(*PeerStorageClusterRequest)) + } + 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) @@ -369,6 +403,10 @@ var OCSProvider_ServiceDesc = grpc.ServiceDesc{ MethodName: "ReportStatus", Handler: _OCSProvider_ReportStatus_Handler, }, + { + MethodName: "PeerStorageCluster", + Handler: _OCSProvider_PeerStorageCluster_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "provider.proto", diff --git a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/storageclient.go b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/storageclient.go index f88489b5..59439ea5 100644 --- a/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/storageclient.go +++ b/vendor/github.com/red-hat-storage/ocs-operator/services/provider/api/v4/storageclient.go @@ -40,6 +40,11 @@ func (r *ReportStatusRequest) SetClusterName(clusterName string) ifaces.StorageC return r } +func (r *ReportStatusRequest) SetClientID(clientID string) ifaces.StorageClientStatus { + r.ClientID = clientID + return r +} + func (r *ReportStatusRequest) SetStorageQuotaUtilizationRatio(storageQuotaUtilizationRatio float64) ifaces.StorageClientStatus { r.StorageQuotaUtilizationRatio = storageQuotaUtilizationRatio return r diff --git a/vendor/modules.txt b/vendor/modules.txt index bcf8c215..a0861f01 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -216,7 +216,7 @@ github.com/ramendr/ramen/api/v1alpha1 # github.com/red-hat-storage/ocs-client-operator/api v0.0.0-00010101000000-000000000000 => ./api ## explicit; go 1.22.5 github.com/red-hat-storage/ocs-client-operator/api/v1alpha1 -# github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241015071140-98c8184c6eec +# github.com/red-hat-storage/ocs-operator/services/provider/api/v4 v4.0.0-20241113175552-201c936738fd ## explicit; go 1.22.5 github.com/red-hat-storage/ocs-operator/services/provider/api/v4 github.com/red-hat-storage/ocs-operator/services/provider/api/v4/client