From 4ed30632120df11a052cfa1dc4d9162cd6b46669 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 2 Jun 2022 17:28:01 +0300 Subject: [PATCH] [#1466] adm: Remove `notary` flag in for subnet command It is possible to deduce that information from the network. Signed-off-by: Pavel Karpy --- cmd/neofs-adm/docs/subnetwork-creation.md | 8 +++----- cmd/neofs-adm/internal/modules/morph/subnet.go | 7 ------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cmd/neofs-adm/docs/subnetwork-creation.md b/cmd/neofs-adm/docs/subnetwork-creation.md index 0d5e42c6..52435d9b 100644 --- a/cmd/neofs-adm/docs/subnetwork-creation.md +++ b/cmd/neofs-adm/docs/subnetwork-creation.md @@ -21,11 +21,9 @@ $ neofs-adm morph subnet create \ Create subnet request sent successfully. ID: 4223489767. ``` -**NOTE:** use `--notary` only in a notary-enabled environment. You need to -have a sufficient notary deposit (not expired, with enough GAS balance). This -is the only command that requires an alphabet signature and, therefore, -the only command that needs `--notary` flag. Your subnet ID will differ -from the example. +**NOTE:** in notary-enabled environment you should have a sufficient +notary deposit (not expired, with enough GAS balance). Your subnet ID +will differ from the example. The default account in the wallet that has been passed with `-w` flag is the owner of the just created subnetwork. diff --git a/cmd/neofs-adm/internal/modules/morph/subnet.go b/cmd/neofs-adm/internal/modules/morph/subnet.go index 8f8f8866..e8dc67c8 100644 --- a/cmd/neofs-adm/internal/modules/morph/subnet.go +++ b/cmd/neofs-adm/internal/modules/morph/subnet.go @@ -112,11 +112,6 @@ func readSubnetKey(key *keys.PrivateKey) error { return nil } -const ( - // enable notary - flagSubnetNotary = "notary" -) - // create subnet command. var cmdSubnetCreate = &cobra.Command{ Use: "create", @@ -125,7 +120,6 @@ var cmdSubnetCreate = &cobra.Command{ viperBindFlags(cmd, flagSubnetWallet, flagSubnetAddress, - flagSubnetNotary, ) }, RunE: func(cmd *cobra.Command, _ []string) error { @@ -709,7 +703,6 @@ func addCommandInheritPreRun(par *cobra.Command, subs ...*cobra.Command) { // registers flags and binds sub-commands for subnet commands. func init() { - cmdSubnetCreate.Flags().Bool(flagSubnetNotary, false, "Flag to create subnet in notary environment") cmdSubnetCreate.Flags().StringP(flagSubnetWallet, "w", "", "Path to file with wallet") _ = cmdSubnetCreate.MarkFlagRequired(flagSubnetWallet) cmdSubnetCreate.Flags().StringP(flagSubnetAddress, "a", "", "Address in the wallet, optional")