Files
my-rook-config/pkg/daemon/ceph/client/mgr.go
T

22 lines
474 B
Go
Raw Normal View History

2017-10-30 17:33:17 +01:00
package client
import (
"fmt"
"github.com/rook/rook/pkg/clusterd"
)
// MgrEnableModule Enable module for mgr
func MgrEnableModule(context *clusterd.Context, clusterName, name string, force bool) error {
args := []string{"mgr", "module", "enable", name}
if force {
args = append(args, "--force")
}
_, err := ExecuteCephCommand(context, clusterName, args)
if err != nil {
return fmt.Errorf("failed to mgr module enable for %s: %+v", name, err)
}
return nil
}