Skip to content

Commit

Permalink
rbd: remove features_nautilus.go
Browse files Browse the repository at this point in the history
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
  • Loading branch information
jarrpa authored and mergify[bot] committed Apr 5, 2024
1 parent 3075e63 commit cfae965
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 31 deletions.
9 changes: 9 additions & 0 deletions rbd/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const (
// from librbd
FeatureOperations = uint64(C.RBD_FEATURE_OPERATIONS)

// FeatureMigrating is the representation of RBD_FEATURE_MIGRATING from
// librbd
FeatureMigrating = uint64(C.RBD_FEATURE_MIGRATING)

// RBD features, strings

// FeatureNameLayering is the representation of
Expand Down Expand Up @@ -81,6 +85,10 @@ const (
// RBD_FEATURE_NAME_OPERATIONS from librbd
FeatureNameOperations = C.RBD_FEATURE_NAME_OPERATIONS

// FeatureNameMigrating is the representation of
// RBD_FEATURE_NAME_MIGRATING from librbd
FeatureNameMigrating = C.RBD_FEATURE_NAME_MIGRATING

// old names for backwards compatibility (unused?)

// RbdFeatureLayering deprecated alias for FeatureLayering
Expand Down Expand Up @@ -124,6 +132,7 @@ var (
FeatureNameJournaling: FeatureJournaling,
FeatureNameDataPool: FeatureDataPool,
FeatureNameOperations: FeatureOperations,
FeatureNameMigrating: FeatureMigrating,
}
)

Expand Down
18 changes: 0 additions & 18 deletions rbd/features_nautilus.go

This file was deleted.

13 changes: 0 additions & 13 deletions rbd/features_nautilus_test.go

This file was deleted.

6 changes: 6 additions & 0 deletions rbd/features_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func TestGetFeaturesInMimic(t *testing.T) {
assert.Equal(t, f, FeatureOperations)
}

func TestGetFeaturesInNautilus(t *testing.T) {
f, ok := featureNameToBit[FeatureNameMigrating]
assert.True(t, ok)
assert.Equal(t, f, FeatureMigrating)
}

func TestFeatureSet(t *testing.T) {
fsBits := FeatureSet(FeatureExclusiveLock | FeatureDeepFlatten)
fsNames := FeatureSetFromNames([]string{FeatureNameExclusiveLock, FeatureNameDeepFlatten})
Expand Down

0 comments on commit cfae965

Please sign in to comment.