diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c64c930..3c5258fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ Changelog for NeoFS Node - ObjectID signature output in the CLI (#2104) ### Removed +- `-g` option from `neofs-cli control ...` and `neofs-cli container create` commands + ### Updated ### Updating from v0.34.0 Pass CID and OID parameters via the `--cid` and `--oid` flags, not as the command arguments. diff --git a/cmd/neofs-cli/modules/container/create.go b/cmd/neofs-cli/modules/container/create.go index 5b25b38f..f4c91bc5 100644 --- a/cmd/neofs-cli/modules/container/create.go +++ b/cmd/neofs-cli/modules/container/create.go @@ -39,7 +39,7 @@ It will be stored in sidechain when inner ring will accepts it.`, placementPolicy, err := parseContainerPolicy(containerPolicy) common.ExitOnErr(cmd, "", err) - key := key.GetOrGenerate(cmd) + key := key.Get(cmd) cli := internalclient.GetSDKClientByFlag(cmd, key, commonflags.RPC) if !force { @@ -133,10 +133,14 @@ It will be stored in sidechain when inner ring will accepts it.`, } func initContainerCreateCmd() { - commonflags.Init(createContainerCmd) - flags := createContainerCmd.Flags() + // Init common flags + flags.StringP(commonflags.RPC, commonflags.RPCShorthand, commonflags.RPCDefault, commonflags.RPCUsage) + flags.DurationP(commonflags.Timeout, commonflags.TimeoutShorthand, commonflags.TimeoutDefault, commonflags.TimeoutUsage) + flags.StringP(commonflags.WalletPath, commonflags.WalletPathShorthand, commonflags.WalletPathDefault, commonflags.WalletPathUsage) + flags.StringP(commonflags.Account, commonflags.AccountShorthand, commonflags.AccountDefault, commonflags.AccountUsage) + flags.StringVar(&containerACL, "basic-acl", acl.NamePrivate, fmt.Sprintf("HEX encoded basic ACL value or keywords like '%s', '%s', '%s'", acl.NamePublicRW, acl.NamePrivate, acl.NamePublicROExtended, )) diff --git a/cmd/neofs-cli/modules/control/util.go b/cmd/neofs-cli/modules/control/util.go index 04459c3f..59bae90e 100644 --- a/cmd/neofs-cli/modules/control/util.go +++ b/cmd/neofs-cli/modules/control/util.go @@ -15,9 +15,9 @@ import ( ) func initControlFlags(cmd *cobra.Command) { - commonflags.InitWithoutRPC(cmd) - ff := cmd.Flags() + ff.StringP(commonflags.WalletPath, commonflags.WalletPathShorthand, commonflags.WalletPathDefault, commonflags.WalletPathUsage) + ff.StringP(commonflags.Account, commonflags.AccountShorthand, commonflags.AccountDefault, commonflags.AccountUsage) ff.String(controlRPC, controlRPCDefault, controlRPCUsage) ff.DurationP(commonflags.Timeout, commonflags.TimeoutShorthand, commonflags.TimeoutDefault, commonflags.TimeoutUsage) }