2021-08-12 10:02:52 +00:00
|
|
|
package admin
|
|
|
|
|
|
|
|
import (
|
2022-02-21 20:13:09 +00:00
|
|
|
"github.com/ceph/go-ceph/common/admin/manager"
|
2021-08-12 10:02:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const mirroring = "mirroring"
|
|
|
|
|
|
|
|
// EnableModule will enable the specified manager module.
|
|
|
|
//
|
2022-02-21 20:13:09 +00:00
|
|
|
// Deprecated: use the equivalent function in cluster/admin/manager.
|
|
|
|
//
|
2021-08-12 10:02:52 +00:00
|
|
|
// Similar To:
|
|
|
|
// ceph mgr module enable <module> [--force]
|
|
|
|
func (fsa *FSAdmin) EnableModule(module string, force bool) error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.EnableModule(module, force)
|
2021-08-12 10:02:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DisableModule will disable the specified manager module.
|
|
|
|
//
|
2022-02-21 20:13:09 +00:00
|
|
|
// Deprecated: use the equivalent function in cluster/admin/manager.
|
|
|
|
//
|
2021-08-12 10:02:52 +00:00
|
|
|
// Similar To:
|
|
|
|
// ceph mgr module disable <module>
|
|
|
|
func (fsa *FSAdmin) DisableModule(module string) error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.DisableModule(module)
|
2021-08-12 10:02:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// EnableMirroringModule will enable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
|
|
|
// ceph mgr module enable mirroring [--force]
|
|
|
|
func (fsa *FSAdmin) EnableMirroringModule(force bool) error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.EnableModule(mirroring, force)
|
2021-08-12 10:02:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// DisableMirroringModule will disable the mirroring module for cephfs.
|
|
|
|
//
|
|
|
|
// Similar To:
|
|
|
|
// ceph mgr module disable mirroring
|
|
|
|
func (fsa *FSAdmin) DisableMirroringModule() error {
|
2022-02-21 20:13:09 +00:00
|
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
|
|
return mgradmin.DisableModule(mirroring)
|
2021-12-15 05:26:34 +00:00
|
|
|
}
|