mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 06:10:09 +00:00
rbd: remove features_mimic.go
go-ceph stopped supporting mimic in v0.7.0. Separate go files for feature flags added in mimic are no longer needed. Constants and tests from these files have been moved into the appropriate files. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
b3ed5036f3
commit
aca200e407
@ -39,6 +39,10 @@ const (
|
||||
// librbd
|
||||
FeatureDataPool = uint64(C.RBD_FEATURE_DATA_POOL)
|
||||
|
||||
// FeatureOperations is the representation of RBD_FEATURE_OPERATIONS
|
||||
// from librbd
|
||||
FeatureOperations = uint64(C.RBD_FEATURE_OPERATIONS)
|
||||
|
||||
// RBD features, strings
|
||||
|
||||
// FeatureNameLayering is the representation of
|
||||
@ -73,6 +77,10 @@ const (
|
||||
// RBD_FEATURE_NAME_DATA_POOL from librbd
|
||||
FeatureNameDataPool = C.RBD_FEATURE_NAME_DATA_POOL
|
||||
|
||||
// FeatureNameOperations is the representation of
|
||||
// RBD_FEATURE_NAME_OPERATIONS from librbd
|
||||
FeatureNameOperations = C.RBD_FEATURE_NAME_OPERATIONS
|
||||
|
||||
// old names for backwards compatibility (unused?)
|
||||
|
||||
// RbdFeatureLayering deprecated alias for FeatureLayering
|
||||
@ -115,6 +123,7 @@ var (
|
||||
FeatureNameDeepFlatten: FeatureDeepFlatten,
|
||||
FeatureNameJournaling: FeatureJournaling,
|
||||
FeatureNameDataPool: FeatureDataPool,
|
||||
FeatureNameOperations: FeatureOperations,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
// +build !luminous
|
||||
|
||||
package rbd
|
||||
|
||||
// #include <rbd/librbd.h>
|
||||
import "C"
|
||||
|
||||
const (
|
||||
// FeatureOperations is the representation of RBD_FEATURE_OPERATIONS
|
||||
// from librbd
|
||||
FeatureOperations = uint64(C.RBD_FEATURE_OPERATIONS)
|
||||
|
||||
// FeatureNameOperations is the representation of
|
||||
// RBD_FEATURE_NAME_OPERATIONS from librbd
|
||||
FeatureNameOperations = C.RBD_FEATURE_NAME_OPERATIONS
|
||||
)
|
||||
|
||||
func init() {
|
||||
featureNameToBit[FeatureNameOperations] = FeatureOperations
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
// +build !luminous
|
||||
|
||||
package rbd
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGetFeaturesInMimic(t *testing.T) {
|
||||
f, ok := featureNameToBit[FeatureNameOperations]
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, f, FeatureOperations)
|
||||
}
|
@ -58,6 +58,12 @@ func TestGetFeatures(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestGetFeaturesInMimic(t *testing.T) {
|
||||
f, ok := featureNameToBit[FeatureNameOperations]
|
||||
assert.True(t, ok)
|
||||
assert.Equal(t, f, FeatureOperations)
|
||||
}
|
||||
|
||||
func TestFeatureSet(t *testing.T) {
|
||||
fsBits := FeatureSet(FeatureExclusiveLock | FeatureDeepFlatten)
|
||||
fsNames := FeatureSetFromNames([]string{FeatureNameExclusiveLock, FeatureNameDeepFlatten})
|
||||
|
Loading…
Reference in New Issue
Block a user