frostfs-node/cmd/frostfs-adm/internal/modules/morph/update.go
Anton Nikiforov 77694a2f3b [#932] adm: Move InitializeContext to util package
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-02-13 09:59:27 +03:00

22 lines
491 B
Go

package morph
import (
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
func updateContracts(cmd *cobra.Command, _ []string) error {
wCtx, err := util.NewInitializeContext(cmd, viper.GetViper())
if err != nil {
return fmt.Errorf("initialization error: %w", err)
}
if err := deployNNS(wCtx, updateMethodName); err != nil {
return err
}
return updateContractsInternal(wCtx)
}