[#279] container: Use new methods to work with container format
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9680dfbdea
commit
e53bf574b5
6 changed files with 18 additions and 20 deletions
|
@ -138,7 +138,7 @@ It will be stored in sidechain when inner ring will accepts it.`,
|
|||
cnr.SetPlacementPolicy(placementPolicy)
|
||||
cnr.SetBasicACL(basicACL)
|
||||
cnr.SetAttributes(attributes)
|
||||
cnr.SetNonce(nonce[:])
|
||||
cnr.SetNonceUUID(nonce)
|
||||
|
||||
id, err := cli.PutContainer(ctx, cnr, client.WithTTL(getTTL()))
|
||||
if err != nil {
|
||||
|
@ -674,9 +674,11 @@ func prettyPrintContainer(cnr *container.Container, jsonEncoding bool) {
|
|||
fmt.Printf("attribute: %s=%s\n", attribute.Key(), attribute.Value())
|
||||
}
|
||||
|
||||
nonce, err := uuid.FromBytes(cnr.Nonce())
|
||||
nonce, err := cnr.NonceUUID()
|
||||
if err == nil {
|
||||
fmt.Println("nonce:", nonce)
|
||||
} else {
|
||||
fmt.Println("invalid nonce:", err)
|
||||
}
|
||||
|
||||
fmt.Println("placement policy:")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue