From 238b8f10a0799fa0d0d1d36de3cf1e8af57e25a0 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 21 Aug 2023 19:11:43 +0300 Subject: [PATCH] [#630] cli: Fix SDK SetEACLPrm usage for PrmContainerSetEACL Signed-off-by: Airat Arifullin --- cmd/frostfs-cli/internal/client/client.go | 6 +++--- cmd/frostfs-cli/modules/container/set_eacl.go | 12 ++++++------ go.mod | 2 +- go.sum | Bin 100798 -> 100798 bytes 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/frostfs-cli/internal/client/client.go b/cmd/frostfs-cli/internal/client/client.go index ae76780bd..0c6d2a38d 100644 --- a/cmd/frostfs-cli/internal/client/client.go +++ b/cmd/frostfs-cli/internal/client/client.go @@ -201,8 +201,8 @@ func EACL(ctx context.Context, prm EACLPrm) (res EACLRes, err error) { // SetEACLPrm groups parameters of SetEACL operation. type SetEACLPrm struct { - commonPrm - client.PrmContainerSetEACL + Client *client.Client + ClientParams client.PrmContainerSetEACL } // SetEACLRes groups the resulting values of SetEACL operation. @@ -217,7 +217,7 @@ type SetEACLRes struct{} // // Returns any error which prevented the operation from completing correctly in error return. func SetEACL(ctx context.Context, prm SetEACLPrm) (res SetEACLRes, err error) { - _, err = prm.cli.ContainerSetEACL(ctx, prm.PrmContainerSetEACL) + _, err = prm.Client.ContainerSetEACL(ctx, prm.ClientParams) return } diff --git a/cmd/frostfs-cli/modules/container/set_eacl.go b/cmd/frostfs-cli/modules/container/set_eacl.go index 51805d69d..f2f60f5c3 100644 --- a/cmd/frostfs-cli/modules/container/set_eacl.go +++ b/cmd/frostfs-cli/modules/container/set_eacl.go @@ -49,12 +49,12 @@ Container ID in EACL table will be substituted with ID from the CLI.`, cmd.Println("ACL extension is enabled in the container, continue processing.") } - var setEACLPrm internalclient.SetEACLPrm - setEACLPrm.SetClient(cli) - setEACLPrm.SetTable(*eaclTable) - - if tok != nil { - setEACLPrm.WithinSession(*tok) + setEACLPrm := internalclient.SetEACLPrm{ + Client: cli, + ClientParams: client.PrmContainerSetEACL{ + Table: eaclTable, + Session: tok, + }, } _, err := internalclient.SetEACL(cmd.Context(), setEACLPrm) diff --git a/go.mod b/go.mod index a1d99fcc6..46639d49c 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.15.1-0.20230802075510-964c3edb3f44 git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230627134746-36f3d39c406a git.frostfs.info/TrueCloudLab/frostfs-observability v0.0.0-20230531082742-c97d21411eb6 - git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230816095347-6fdbe755179e + git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230821090303-202412230a05 git.frostfs.info/TrueCloudLab/hrw v1.2.1 git.frostfs.info/TrueCloudLab/tzhash v1.8.0 github.com/cheggaaa/pb v1.0.29 diff --git a/go.sum b/go.sum index fd7be9463bc70207a5388f6821be3d81aa74b8b0..58f1fb21748eece55918e20bae740ce6ebc5d638 100644 GIT binary patch delta 117 zcmdltnQh->whb17E=Gn1mIlTK#=1rZMka$o&8C8isMPB-@;r=-RK8EF?*_pYn29q0jH72VFiil!0tof|q_OpVFAIky4 CFCr}f delta 117 zcmdltnQh->whb17E{0|XmZrug=DKESDM_j3rlyAGmZ=IEhF03<7R6C1A#SPOMkU%t zg