frostfs-node/cmd/frostfs-adm/internal/modules/morph
Evgenii Stratonikov e82f79b0a8
Some checks failed
Tests and linters / Run gofumpt (pull_request) Successful in 3m21s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m10s
Tests and linters / Tests (pull_request) Successful in 4m16s
DCO action / DCO (pull_request) Failing after 4m29s
Vulncheck / Vulncheck (pull_request) Successful in 5m44s
Tests and linters / Tests with -race (pull_request) Successful in 6m13s
Build / Build Components (pull_request) Successful in 6m23s
Tests and linters / Staticcheck (pull_request) Successful in 6m25s
Tests and linters / gopls check (pull_request) Successful in 6m27s
Tests and linters / Lint (pull_request) Successful in 7m27s
adm: Allow to use --local-dump everywhere --rpc-endpoint is present
Currently, we allow using `--local-dump` in `morph init` command.
We also have this flag in other commands, but no `--protocol` which is
also needed. And in new command we do not have the ability to use local
dump at all.

This commit makes it possible to work either with an RPC or with
local-dump in every command.

Refs #1035.
Refs TrueCloudLab/frostfs-dev-env#42.

Writing gopatch this time was really satisfying, btw:
```
@@
var flags expression
@@
-flags.StringP(commonflags.EndpointFlag, ...)
+commonflags.InitRPC(flags)

@@
var flags expression
@@
-_ = viper.BindPFlag(commonflags.EndpointFlag, flags.Lookup(...))
+commonflags.BindRPC(flags)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-20 14:38:26 +03:00
..
ape adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
balance adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
config adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
constants adm: Move ProtoConfigPath from constants to commonflags package 2024-11-20 14:16:34 +03:00
container adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
contract adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
frostfsid adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
generate adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
helper adm: Move ProtoConfigPath from constants to commonflags package 2024-11-20 14:16:34 +03:00
initialize adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
netmap adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
nns adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
node adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
notary adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
policy adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
proxy adm: Allow to use --local-dump everywhere --rpc-endpoint is present 2024-11-20 14:38:26 +03:00
root.go [#932] adm: Add commands to manipulate with NNS contract 2024-02-28 18:57:16 +00:00