diff --git a/pkg/operator/ceph/version/version.go b/pkg/operator/ceph/version/version.go index ceb1d0836..7290f471b 100644 --- a/pkg/operator/ceph/version/version.go +++ b/pkg/operator/ceph/version/version.go @@ -46,6 +46,8 @@ var ( Octopus = CephVersion{15, 0, 0, 0} // Pacific Ceph version Pacific = CephVersion{16, 0, 0, 0} + // Quincy Ceph version + Quincy = CephVersion{17, 0, 0, 0} // cephVolumeLVMDiskSortingCephVersion introduced a major regression in c-v and thus is not suitable for production cephVolumeLVMDiskSortingCephVersion = CephVersion{Major: 14, Minor: 2, Extra: 13} @@ -86,6 +88,8 @@ func (v *CephVersion) ReleaseName() string { return "octopus" case Pacific.Major: return "pacific" + case Quincy.Major: + return "quincy" default: return unknownVersionString } @@ -170,6 +174,11 @@ func (v *CephVersion) IsPacific() bool { return v.isRelease(Pacific) } +// IsQuincy checks if the Ceph version is Quincy +func (v *CephVersion) IsQuincy() bool { + return v.isRelease(Quincy) +} + // IsAtLeast checks a given Ceph version is at least a given one func (v *CephVersion) IsAtLeast(other CephVersion) bool { if v.Major > other.Major { @@ -193,6 +202,11 @@ func (v *CephVersion) IsAtLeast(other CephVersion) bool { return true } +// IsAtLeastQuincy check that the Ceph version is at least Quincy +func (v *CephVersion) IsAtLeastQuincy() bool { + return v.IsAtLeast(Quincy) +} + // IsAtLeastPacific check that the Ceph version is at least Pacific func (v *CephVersion) IsAtLeastPacific() bool { return v.IsAtLeast(Pacific) diff --git a/pkg/operator/ceph/version/version_test.go b/pkg/operator/ceph/version/version_test.go index a6efbd3c2..51425d41f 100644 --- a/pkg/operator/ceph/version/version_test.go +++ b/pkg/operator/ceph/version/version_test.go @@ -102,6 +102,8 @@ func TestSupported(t *testing.T) { func TestIsRelease(t *testing.T) { assert.True(t, Nautilus.isRelease(Nautilus)) assert.True(t, Octopus.isRelease(Octopus)) + assert.True(t, Pacific.isRelease(Pacific)) + assert.True(t, Quincy.isRelease(Quincy)) assert.False(t, Octopus.isRelease(Nautilus))