forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
069a174129
commit
4b8ca75274
2 changed files with 20 additions and 18 deletions
|
@ -2,15 +2,12 @@ package morphsubnet
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
)
|
||||
|
||||
// GetPrm groups parameters of Get method of Subnet contract.
|
||||
type GetPrm struct {
|
||||
cliPrm client.TestInvokePrm
|
||||
|
||||
args [1]interface{}
|
||||
}
|
||||
|
||||
|
@ -33,12 +30,13 @@ var errEmptyResponse = errors.New("empty response")
|
|||
|
||||
// Get reads the subnet through the call of the corresponding method of the Subnet contract.
|
||||
func (x *Client) Get(prm GetPrm) (*GetRes, error) {
|
||||
prm.cliPrm.SetMethod("get")
|
||||
prm.cliPrm.SetArgs(prm.args[:]...)
|
||||
var prmGet client.TestInvokePrm
|
||||
|
||||
res, err := x.client.TestInvoke(prm.cliPrm)
|
||||
prmGet.SetMethod("get")
|
||||
prmGet.SetArgs(prm.args[:]...)
|
||||
|
||||
res, err := x.client.TestInvoke(prmGet)
|
||||
if err != nil {
|
||||
fmt.Println()
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue