Add the functions DaemonStatus and PeerList which provide information
about the cephfs mirroring daemon and mirroring peers.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
These functions require support in the ceph mgr and pertain to setting
up mirroring in the file system, adding directories to mirror, and
setting up mirroring peers.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add functions EnableMirroringModule and DisableMirroringModule for
turning on an off the mirroring module at the ceph mgr.
This also adds the lower level EnableModule and DisableModule that take
a string parameter naming the module, and are the base for
EnableMirroringModule and DisableMirroringModule.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This mirroring daemon is required to test the cephfs mirroring calls
that will be added to cephfs/admin.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The fsConnect function is used by the tests to support getting a
data-path cephfs connection, in order to support those fs admin tests
that need to make changes in the file system directly. The new second
argument to the call allows for the cephfs connection to be made with a
non-default configuration.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, the getFSAdmin function always fetched a cached (if
available) fsadmin instance set up for the default configuration of
ceph. This change makes getFSAdmin based on newFSAdmin a function
that always returns a new instance and allows a custom configuration
to be passed.
Otherwise, newFSAdmin works like getFSAdmin did previously, supporting
debugging via an environment variable.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
go-ceph stopped supporting luminous in v0.6.0. There's no need to
keep the build tag for it any more.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Drop the _mimic from watchers go file and tests go file.
The mimic was not specific to the version supported, just the version
it was new for. Clean up the naming to reflect that.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
go-ceph stopped supporting mimic in v0.7.0. Separate go files for
feature flags added in mimic are no longer needed. Constants and
tests from these files have been moved into the appropriate files.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
go-ceph stopped supporting mimic in v0.7.0. Keeping the constants
that were added in mimic in a standalone file is no longer needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Instead of implementing our own logging let's the consumer implement
their own potential debug for each HTTP requests.
Closes: https://github.com/ceph/go-ceph/issues/508
Signed-off-by: Sébastien Han <seb@redhat.com>
We don't need to export the mock, the consumer will generate its own.
What really matters is to have an interface that consumer can mock it
desired. Reference: https://github.com/golang/go/wiki/CodeReviewComments#interfaces
Signed-off-by: Sébastien Han <seb@redhat.com>
Now that we use http.Method* constant from the http package, we don't
need to have verbHTTP type anymore.
Signed-off-by: Sébastien Han <seb@redhat.com>
We now have a new interface `HTTPClient` which helps us doing various
operations such as mutating and mocking the HTTP Client.
Signed-off-by: Sébastien Han <seb@redhat.com>