Evgenii Stratonikov
e5ea95c045
It was unused and we employ better abstractions now. gopatch: ``` @@ var a, b expression @@ -a, b, _ := getRPCClient(...) +a, b := getRPCClient(...) ``` Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
26 lines
948 B
Go
26 lines
948 B
Go
package nns
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/commonflags"
|
|
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func initRenewCmd() {
|
|
Cmd.AddCommand(renewCmd)
|
|
renewCmd.Flags().StringP(commonflags.EndpointFlag, commonflags.EndpointFlagShort, "", commonflags.EndpointFlagDesc)
|
|
renewCmd.Flags().String(commonflags.AlphabetWalletsFlag, "", commonflags.AlphabetWalletsFlagDesc)
|
|
renewCmd.Flags().String(nnsNameFlag, "", nnsNameFlagDesc)
|
|
}
|
|
|
|
func renewDomain(cmd *cobra.Command, _ []string) {
|
|
c, actor := getRPCClient(cmd)
|
|
name, _ := cmd.Flags().GetString(nnsNameFlag)
|
|
h, vub, err := c.Renew(name)
|
|
commonCmd.ExitOnErr(cmd, "unable to renew domain: %w", err)
|
|
|
|
cmd.Println("Waiting for transaction to persist...")
|
|
_, err = actor.Wait(h, vub, err)
|
|
commonCmd.ExitOnErr(cmd, "renew domain error: %w", err)
|
|
cmd.Println("Domain renewed successfully")
|
|
}
|