[#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 fyrchik
parent 49ba1ef1b6
commit 68e583f143

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()