[#1211] neofs-cli: Specify address in session token

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2022-03-03 11:29:14 +03:00 committed by Alex Vanin
parent 1b5cb2dfe2
commit 99749ea042
3 changed files with 40 additions and 18 deletions

View file

@ -19,6 +19,7 @@ import (
"github.com/nspcc-dev/neofs-sdk-go/eacl"
"github.com/nspcc-dev/neofs-sdk-go/netmap"
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
"github.com/nspcc-dev/neofs-sdk-go/owner"
"github.com/nspcc-dev/neofs-sdk-go/policy"
"github.com/nspcc-dev/neofs-sdk-go/session"
@ -276,7 +277,9 @@ var listContainerObjectsCmd = &cobra.Command{
var prm internalclient.SearchObjectsPrm
prepareSessionPrm(cmd, &prm)
sessionObjectCtxAddress := addressSDK.NewAddress()
sessionObjectCtxAddress.SetContainerID(id)
prepareSessionPrm(cmd, sessionObjectCtxAddress, &prm)
prepareObjectPrm(cmd, &prm)
prm.SetContainerID(id)
prm.SetFilters(*filters)