forked from TrueCloudLab/frostfs-node
[#243] cmd/cli: Write tombstone address in Object.Delete cmd
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
fe3906c295
commit
09916f21b5
3 changed files with 6 additions and 5 deletions
|
@ -248,7 +248,8 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = cli.DeleteObject(ctx,
|
||||
|
||||
tombstoneAddr, err := client.DeleteObject(cli, ctx,
|
||||
new(client.DeleteObjectParams).WithAddress(objAddr),
|
||||
client.WithTTL(getTTL()),
|
||||
client.WithSession(tok),
|
||||
|
@ -258,7 +259,7 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
|
|||
}
|
||||
|
||||
cmd.Println("Object removed successfully.")
|
||||
cmd.Printf(" ID: %s\n CID: %s\n", objAddr.ObjectID(), objAddr.ContainerID())
|
||||
cmd.Printf(" ID: %s\n CID: %s\n", tombstoneAddr.ObjectID(), tombstoneAddr.ContainerID())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
2
go.mod
2
go.mod
|
@ -17,7 +17,7 @@ require (
|
|||
github.com/multiformats/go-multihash v0.0.13 // indirect
|
||||
github.com/nspcc-dev/hrw v1.0.9
|
||||
github.com/nspcc-dev/neo-go v0.91.1-pre.0.20201030072836-71216865717b
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201210152623-803c91b3eb2b
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211081945-1bc91466aa7b
|
||||
github.com/nspcc-dev/neofs-crypto v0.3.0
|
||||
github.com/nspcc-dev/tzhash v1.4.0
|
||||
github.com/panjf2000/ants/v2 v2.3.0
|
||||
|
|
4
go.sum
4
go.sum
|
@ -283,8 +283,8 @@ github.com/nspcc-dev/neo-go v0.73.1-pre.0.20200303142215-f5a1b928ce09/go.mod h1:
|
|||
github.com/nspcc-dev/neo-go v0.91.0/go.mod h1:G6HdOWvzQ6tlvFdvFSN/PgCzLPN/X/X4d5hTjFRUDcc=
|
||||
github.com/nspcc-dev/neo-go v0.91.1-pre.0.20201030072836-71216865717b h1:gk5bZgpWOehaDVKI5vBDkcjXTpRkKqcvIb1h/vHnBH4=
|
||||
github.com/nspcc-dev/neo-go v0.91.1-pre.0.20201030072836-71216865717b/go.mod h1:9s7LNp2lMgf0caH2t0sam4+WT2SIauXozwP0AdBqnEo=
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201210152623-803c91b3eb2b h1:crUr2jA84f0cQabYAN40uTYNTlu3xI9ZoB0BUBooQTA=
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201210152623-803c91b3eb2b/go.mod h1:G7dqincfdjBrAbL5nxVp82emF05fSVEqe59ICsoRDI8=
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211081945-1bc91466aa7b h1:0IdLNZHFrPKS7o2gvwo+dWO80k49nTrQq2YmzXN9I/4=
|
||||
github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211081945-1bc91466aa7b/go.mod h1:G7dqincfdjBrAbL5nxVp82emF05fSVEqe59ICsoRDI8=
|
||||
github.com/nspcc-dev/neofs-crypto v0.2.0/go.mod h1:F/96fUzPM3wR+UGsPi3faVNmFlA9KAEAUQR7dMxZmNA=
|
||||
github.com/nspcc-dev/neofs-crypto v0.2.3/go.mod h1:8w16GEJbH6791ktVqHN9YRNH3s9BEEKYxGhlFnp0cDw=
|
||||
github.com/nspcc-dev/neofs-crypto v0.3.0 h1:zlr3pgoxuzrmGCxc5W8dGVfA9Rro8diFvVnBg0L4ifM=
|
||||
|
|
Loading…
Reference in a new issue