forked from TrueCloudLab/frostfs-node
[#590] cli: fix SDK PrmContainerPut usage for PutContainerPrm
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com
This commit is contained in:
parent
6186329aec
commit
34b5d90441
2 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue