[#2089] neofs-cli: Remove -g option from neofs-cli control ... and neofs-cli container create commands

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2022-11-29 13:22:17 +03:00 committed by fyrchik
parent dd76ceadf1
commit 79130f781e
3 changed files with 11 additions and 5 deletions

View file

@ -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.

View file

@ -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,
))

View file

@ -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)
}