mirror of
https://github.com/ceph/go-ceph
synced 2025-01-03 12:22:07 +00:00
85208d213f
Now that we've moved the logic over to common admin, replace the implementation in cephfs admin. Signed-off-by: John Mulligan <jmulligan@redhat.com>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package admin
|
|
|
|
import (
|
|
"github.com/ceph/go-ceph/common/admin/manager"
|
|
)
|
|
|
|
const mirroring = "mirroring"
|
|
|
|
// EnableModule will enable the specified manager module.
|
|
//
|
|
// Similar To:
|
|
// ceph mgr module enable <module> [--force]
|
|
func (fsa *FSAdmin) EnableModule(module string, force bool) error {
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
return mgradmin.EnableModule(module, force)
|
|
}
|
|
|
|
// DisableModule will disable the specified manager module.
|
|
//
|
|
// Similar To:
|
|
// ceph mgr module disable <module>
|
|
func (fsa *FSAdmin) DisableModule(module string) error {
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
return mgradmin.DisableModule(module)
|
|
}
|
|
|
|
// EnableMirroringModule will enable the mirroring module for cephfs.
|
|
//
|
|
// Similar To:
|
|
// ceph mgr module enable mirroring [--force]
|
|
func (fsa *FSAdmin) EnableMirroringModule(force bool) error {
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
return mgradmin.EnableModule(mirroring, force)
|
|
}
|
|
|
|
// DisableMirroringModule will disable the mirroring module for cephfs.
|
|
//
|
|
// Similar To:
|
|
// ceph mgr module disable mirroring
|
|
func (fsa *FSAdmin) DisableMirroringModule() error {
|
|
mgradmin := manager.NewFromConn(fsa.conn)
|
|
return mgradmin.DisableModule(mirroring)
|
|
}
|