Commit Graph

9 Commits

Author SHA1 Message Date
Sven Anderson 87041ee7d8 gofmt: reformat everything with new gofmt of go 1.19
Signed-off-by: Sven Anderson <sven@redhat.com>
2023-02-20 20:50:24 +00:00
Niels de Vos e8c006b3af cephfs/admin: add CloneStatus.GetFailure()
In case cloning failed, Ceph Mgr returns an additional attribute in the
response. The "failed" attribute contains an errno (as string?!) and a
description. It is useful for applications using go-ceph to report the
error back to the user.

As the CloneStatus is on the same level as the CloneFailure object in
the response, keeping strictly to the CephFS Mgr API would break
compatibility. Instead, a new CloneStatus.GetFailure() method has been
introduced, returning a CloneFailure type (or nil) object with details
about the failure.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-06-09 19:47:04 +00:00
John Mulligan e79f1d786f cephfs: remove luminous and mimic build tags
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +00:00
Sven Anderson 87f4563118 format: run gofmt on all files
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
John Mulligan 20b3c151b3 cephfs admin: replace response with commands.Response
Now that we have shared support working with "command json" we attempt
a minimal conversion, using aliases where appropriate, to the
new commands.Response type.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-04-07 00:25:44 +00:00
John Mulligan c23e1a8659 cephfs admin: doc comment improvements for clone
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-07 08:54:34 -04:00
John Mulligan dcc4f67f1d cephfs admin: have clone test work on older and newer ceph versions
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-02 09:12:02 -04:00
John Mulligan b001f1a4d2 cephfs admin: refactor response handling with a dedicated response type
The response type simplifies the error handling as a "pipeline" of
checks that are applied one after another.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-02 09:12:02 -04:00
John Mulligan 07722a0111 cephfs admin: add basic functionality for clone support
I think I'm a clone now

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-10-02 09:12:02 -04:00