Commit graph

15 commits

Author SHA1 Message Date
Alex Vanin
d89ffbfbdf [#1020] neofs-adm: Make key flag non global in subnet
Key flag should not be global because `subnet get` command
does not require any credentials.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-08 18:49:41 +03:00
Alex Vanin
3bb67075f4 [#1020] neofs-adm: Do not ask key in morph subnet get command
There is no need to provide credential to fetch public data from
side chain.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-12-08 18:49:41 +03:00
Pavel Karpy
15ff98c229 [#1024] adm: Change private key to wallet in subnet flags
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-08 15:57:22 +03:00
Pavel Karpy
b4c36a109d [#1019] adm: Fetch subnet SH from NNS
Also, delete `-a` (`--contract`) flag.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-12-08 13:33:36 +03:00
Leonard Lyubich
1b698867a7 [#979] adm/subnet: Fix typos
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
dd2998d724 [#979] adm/subnet: Rename id flag to node in node cmd
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
5f915dfb43 [#979] adm/subnet: Rename id flag to admin in admin cmd
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
cc8a0037e0 [#979] adm/subnet: Fix print out of subnet info in get cmd
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
3fcd7bc948 [#979] adm/subnet: Always set group ID parameter in client cmds
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
4d79195ede [#979] adm/subnet: Fix notary issues
Only `subnet create` command can generate notary requests.

Remove global `non-notary` flag. Add `notary` flag to `create` cmd.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
98e0792b08 [#979] adm/subnet: Add commands to add/remove nodes
Implement `ManageNodes` operation on morph subnet client.
 Add `node add` and `node remove` commands to `subnet` section.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
579c3717a5 [#979] adm/subnet: Inherit pre-run functions in child commands
Cobra commands don't call `PreRun` functions on parent by default. We
need to do it in `subnet` command of admin utility in order to inherit
viper bindings.

Add `inheritPreRun` function which makes sub-commands to call `PreRun`
functions before its own `PreRun`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
6facc26cb9 [#979] adm/subnet: Fix handling of non-notary flag in initClient
`initSubnetClient` must call `EnableNotarySupport` only if non-notary
flag is not set.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
4b8ca75274 [#979] adm: Fix problems after testing
Use persistent flags on parent command in order to inherit flags in
sub-commands. Turn on notary mode of morph client in `subnet` command of
admin utility for notary environments.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00
Leonard Lyubich
e8f8e58e90 [#979] adm: Add subnet-related commands
Add `subnet` command which contains all subnet-related commands. Add
sub-commands:
  * `create` for creation;
  * `remove` for removal;
  * `get` for reading;
  * `admin` for admin management;
  * `client` for client management.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-12-01 17:31:04 +03:00