ceph: add quincy version
Quincy just started https://github.com/ceph/ceph/pull/38996 so let's add it to our version code. Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
1 parent
00c3b371ca
commit
9f8404e330
2 files changed
+16
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in new issue
Block a user