From c7f85994e550d4c990c08d1ea6529ec99c954770 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Mon, 19 Sep 2022 16:10:56 +0300 Subject: [PATCH] [nspcc-dev#1692] cli: Remove --generate-key option in neofs-cli container delete Signed-off-by: Anton Nikiforov --- CHANGELOG.md | 2 ++ cmd/neofs-cli/modules/container/delete.go | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf62c1dfe..40bedf743 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Changelog for NeoFS Node ### Removed - Remove WIF and NEP2 support in `neofs-cli`'s --wallet flag (#1128) +- Remove --generate-key option in `neofs-cli container delete` (#1692) + ### Updated ### Updating from v0.32.0 diff --git a/cmd/neofs-cli/modules/container/delete.go b/cmd/neofs-cli/modules/container/delete.go index 981df9f25..8625931f1 100644 --- a/cmd/neofs-cli/modules/container/delete.go +++ b/cmd/neofs-cli/modules/container/delete.go @@ -31,7 +31,7 @@ Only owner of the container has a permission to remove container.`, common.ReadSessionToken(cmd, tok, sessionTokenPath) } - pk := key.GetOrGenerate(cmd) + pk := key.Get(cmd) cli := internalclient.GetSDKClientByFlag(cmd, pk, commonflags.RPC) if force, _ := cmd.Flags().GetBool(forceFlag); !force { @@ -92,10 +92,12 @@ Only owner of the container has a permission to remove container.`, } func initContainerDeleteCmd() { - commonflags.Init(deleteContainerCmd) - flags := deleteContainerCmd.Flags() + flags.StringP(commonflags.WalletPath, commonflags.WalletPathShorthand, commonflags.WalletPathDefault, commonflags.WalletPathUsage) + flags.StringP(commonflags.Account, commonflags.AccountShorthand, commonflags.AccountDefault, commonflags.AccountUsage) + flags.StringP(commonflags.RPC, commonflags.RPCShorthand, commonflags.RPCDefault, commonflags.RPCUsage) + flags.StringVar(&containerID, "cid", "", "container ID") flags.BoolVar(&containerAwait, "await", false, "block execution until container is removed") flags.Bool(forceFlag, false, "do not check whether container contains locks and remove immediately")