From 087b64162e70efb812c1ebd8ec3f60d8c82d68fa Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Mon, 4 Nov 2024 21:07:25 +0530 Subject: [PATCH] add generated changes Signed-off-by: Rewant Soni --- .../services/provider/api/v4/client/client.go | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) 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 490c97b036..3915b0a780 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 @@ -227,3 +227,35 @@ func (cc *OCSProviderClient) PeerStorageCluster(ctx context.Context, onboardingT return cc.Client.PeerStorageCluster(apiCtx, req) } + +func (cc *OCSProviderClient) GetClientsInfo(ctx context.Context, storageClusterUID string, clientIDs []string) (*pb.GetClientsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("OCS client is closed") + } + + req := &pb.GetClientsInfoRequest{ + StorageClusterUID: storageClusterUID, + ClientIDs: clientIDs, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetClientsInfo(apiCtx, req) +} + +func (cc *OCSProviderClient) GetBlockPoolsInfo(ctx context.Context, storageClusterUID string, blockPoolNames []string) (*pb.GetBlockPoolsInfoResponse, error) { + if cc.Client == nil || cc.clientConn == nil { + return nil, fmt.Errorf("OCS client is closed") + } + + req := &pb.GetBlockPoolsInfoRequest{ + StorageClusterUID: storageClusterUID, + BlockPoolNames: blockPoolNames, + } + + apiCtx, cancel := context.WithTimeout(ctx, cc.timeout) + defer cancel() + + return cc.Client.GetBlockPoolsInfo(apiCtx, req) +}