rebase: bump github.com/ceph/go-ceph from 0.19.0 to 0.20.0

Bumps [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](https://github.com/ceph/go-ceph/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/ceph/go-ceph
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2023-02-20 14:30:50 +00:00
committed by mergify[bot]
parent b7d2d28e69
commit 8854c8523d
8 changed files with 239 additions and 12 deletions

View File

@ -4,6 +4,8 @@
package nfs
import (
"errors"
"github.com/ceph/go-ceph/internal/commands"
)
@ -26,6 +28,10 @@ const (
Unspecifiedquash SquashMode = ""
)
var (
errNoExportInfo = errors.New("No export info found")
)
// SecType indicates the kind of security/authentication to be used by an export.
type SecType string
@ -115,6 +121,11 @@ func parseExportsList(res commands.Response) ([]ExportInfo, error) {
func parseExportInfo(res commands.Response) (ExportInfo, error) {
i := ExportInfo{}
// different versions of ceph may return nothing or empty json.
// detect these cases and return a specific error
if res.NoStatus().EmptyBody().Ok() {
return i, errNoExportInfo
}
if err := res.NoStatus().Unmarshal(&i).End(); err != nil {
return i, err
}