cli: fix SDK PrmContainerGet usage for GetContainerPrm #590

Merged
fyrchik merged 2 commits from aarifullin/frostfs-node:fix/sdk_types_usage into master 2023-08-10 11:09:33 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 47556f9ee5 - Show all commits

View file

@ -70,8 +70,8 @@ func ListContainers(ctx context.Context, prm ListContainersPrm) (res ListContain
// PutContainerPrm groups parameters of PutContainer operation.
type PutContainerPrm struct {
commonPrm
client.PrmContainerPut
Client *client.Client
ClientParams client.PrmContainerPut
}
// PutContainerRes groups the resulting values of PutContainer operation.
@ -93,7 +93,7 @@ func (x PutContainerRes) ID() cid.ID {
//
// Returns any error which prevented the operation from completing correctly in error return.
func PutContainer(ctx context.Context, prm PutContainerPrm) (res PutContainerRes, err error) {
cliRes, err := prm.cli.ContainerPut(ctx, prm.PrmContainerPut)
cliRes, err := prm.Client.ContainerPut(ctx, prm.ClientParams)
if err == nil {
res.cnr = cliRes.ID()
}

View file

@ -101,12 +101,12 @@ It will be stored in sidechain when inner ring will accepts it.`,
commonCmd.ExitOnErr(cmd, "syncing container's settings rpc error: %w", err)
putPrm := internalclient.PutContainerPrm{
PrmContainerPut: client.PrmContainerPut{
Client: cli,
ClientParams: 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)