Skip to content

Commit

Permalink
[#2089] neofs-cli: Remove -g option from neofs-cli control ... an…
Browse files Browse the repository at this point in the history
…d `neofs-cli container create` commands

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
  • Loading branch information
acid-ant authored and fyrchik committed Nov 30, 2022
1 parent dd76cea commit 79130f7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 7 additions & 3 deletions cmd/neofs-cli/modules/container/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
))
Expand Down
4 changes: 2 additions & 2 deletions cmd/neofs-cli/modules/control/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 79130f7

Please sign in to comment.