From 1b7b54ba8931d4783e34f902dbbabf55842a2111 Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Mon, 24 Jul 2023 15:23:25 +0300 Subject: [PATCH] [#540] cli: refactor client parameters usage Signed-off-by: Airat Arifullin a.arifullin@yadro.com --- cmd/frostfs-cli/modules/container/create.go | 13 +++++++------ go.mod | 2 +- go.sum | Bin 99007 -> 99007 bytes 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cmd/frostfs-cli/modules/container/create.go b/cmd/frostfs-cli/modules/container/create.go index e5bbeacd4..29c2422ed 100644 --- a/cmd/frostfs-cli/modules/container/create.go +++ b/cmd/frostfs-cli/modules/container/create.go @@ -13,6 +13,7 @@ import ( "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags" "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/key" commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common" + "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/acl" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/netmap" @@ -99,13 +100,13 @@ It will be stored in sidechain when inner ring will accepts it.`, _, err = internalclient.SyncContainerSettings(cmd.Context(), syncContainerPrm) commonCmd.ExitOnErr(cmd, "syncing container's settings rpc error: %w", err) - var putPrm internalclient.PutContainerPrm - putPrm.SetClient(cli) - putPrm.SetContainer(cnr) - - if tok != nil { - putPrm.WithinSession(*tok) + putPrm := internalclient.PutContainerPrm{ + PrmContainerPut: client.PrmContainerPut{ + Container: &cnr, + Session: tok, + }, } + putPrm.SetClient(cli) res, err := internalclient.PutContainer(cmd.Context(), putPrm) commonCmd.ExitOnErr(cmd, "put container rpc error: %w", err) diff --git a/go.mod b/go.mod index 05e720a75..980086dcd 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.15.1-0.20230726155259-7a5ee927c8a2 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-20230731113339-0fe0d716784b + git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230801095957-13d0b170d2ad 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 e3310bbe583d2a4909bd4d117a77e3ffde341ba7..e7c11c7a9ec325d4adf335500e710835b45ce046 100644 GIT binary patch delta 118 zcmdnr%C^6iZG*X>i-m!qfu*UXskyG9af(5bp}9edQDTZhhM`rKitGThEp`o#{v8Ap-TB<>cxuKc4g-Mb^hM`rESBSZ}VX3)!YE`6H zMQB)6nX`vssZT|ec7TbKV`+G(d4z>|RhDIyh3n)7UX95rg2H0hO=~_Yxc#gk