rebase: bump go-ceph version to v0.16.0

go-ceph v0.16.0 contains subvolume metadata APIs and subvolume snapshot
metadata APIs.

Please note, as the APIs can not be tested in the go-ceph CI, it requires
build-tag `ceph_ci_untested`.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever
2022-06-15 11:04:25 +05:30
committed by mergify[bot]
parent 025b90f74c
commit 23c324898a
26 changed files with 384 additions and 113 deletions

View File

@ -84,10 +84,20 @@ type CloneSource struct {
type CloneStatus struct {
State CloneState `json:"state"`
Source CloneSource `json:"source"`
// failure can be obtained through .GetFailure()
failure *CloneFailure
}
// CloneFailure reports details of a failure after a subvolume clone failed.
type CloneFailure struct {
Errno string `json:"errno"`
ErrStr string `json:"errstr"`
}
type cloneStatusWrapper struct {
Status CloneStatus `json:"status"`
Status CloneStatus `json:"status"`
Failure CloneFailure `json:"failure"`
}
func parseCloneStatus(res response) (*CloneStatus, error) {
@ -95,6 +105,9 @@ func parseCloneStatus(res response) (*CloneStatus, error) {
if err := res.NoStatus().Unmarshal(&status).End(); err != nil {
return nil, err
}
if status.Failure.Errno != "" || status.Failure.ErrStr != "" {
status.Status.failure = &status.Failure
}
return &status.Status, nil
}