[#1365] cli: Sync container with network config

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-04-29 19:59:05 +03:00 committed by Evgenii Stratonikov
parent 7308c333cc
commit a455f4e3a7

View file

@ -80,6 +80,13 @@ It will be stored in sidechain when inner ring will accepts it.`,
cli := internalclient.GetSDKClientByFlag(cmd, key, commonflags.RPC)
var syncContainerPrm internalclient.SyncContainerPrm
syncContainerPrm.SetClient(cli)
syncContainerPrm.SetContainer(&cnr)
_, err = internalclient.SyncContainerSettings(syncContainerPrm)
common.ExitOnErr(cmd, "syncing container's settings rpc error: %w", err)
var putPrm internalclient.PutContainerPrm
putPrm.SetClient(cli)
putPrm.SetContainer(cnr)
@ -89,7 +96,7 @@ It will be stored in sidechain when inner ring will accepts it.`,
}
res, err := internalclient.PutContainer(putPrm)
common.ExitOnErr(cmd, "rpc error: %w", err)
common.ExitOnErr(cmd, "put container rpc error: %w", err)
id := res.ID()