Skip to content

Commit

Permalink
chore: rename crypto.Manager RegisterKmipCluster > RegisterKmsCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
dougm committed Sep 19, 2024
1 parent f81e83d commit 796892a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion crypto/manager_kmip.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (m ManagerKmip) SetDefaultKmsClusterId(
return nil
}

func (m ManagerKmip) RegisterKmipCluster(
func (m ManagerKmip) RegisterKmsCluster(
ctx context.Context,
providerID string,
managementType types.KmipClusterInfoKmsManagementType) error {
Expand Down
68 changes: 34 additions & 34 deletions crypto/manager_kmip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestCryptoManagerKmip(t *testing.T) {

providerID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand All @@ -53,7 +53,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.NoError(t, err)
assert.True(t, isValid)

err = m.RegisterKmipCluster(
err = m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown)
Expand All @@ -73,7 +73,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.EqualError(t, err, "invalid cluster ID")
assert.Nil(t, status)

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand All @@ -96,7 +96,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.EqualError(t, err, "ServerFaultCode: Invalid cluster ID")
assert.True(t, fault.Is(err, &types.RuntimeFault{}))

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -124,7 +124,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.NoError(t, err)
assert.False(t, ok)

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand All @@ -144,15 +144,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2ID := uuid.NewString()
provider3ID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -230,7 +230,7 @@ func TestCryptoManagerKmip(t *testing.T) {
},
}

err = m.RegisterKmipCluster(
err = m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeVCenter)
Expand Down Expand Up @@ -260,7 +260,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.EqualError(t, err, "invalid cluster ID")
assert.Nil(t, status)

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -305,15 +305,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2serverName3 := uuid.NewString()
provider3serverName1 := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -451,7 +451,7 @@ func TestCryptoManagerKmip(t *testing.T) {
providerID := uuid.NewString()
serverName := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -521,7 +521,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.EqualError(t, err, "ServerFaultCode: Invalid cluster ID")
assert.True(t, fault.Is(err, &types.RuntimeFault{}))

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -559,7 +559,7 @@ func TestCryptoManagerKmip(t *testing.T) {
providerID := uuid.NewString()
serverName := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -605,15 +605,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2serverName3 := uuid.NewString()
provider3serverName1 := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -720,15 +720,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2ID := uuid.NewString()
provider3ID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand All @@ -755,15 +755,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2ID := uuid.NewString()
provider3ID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -800,15 +800,15 @@ func TestCryptoManagerKmip(t *testing.T) {
provider2ID := uuid.NewString()
provider3ID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider1ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider2ID,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
provider3ID,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -848,7 +848,7 @@ func TestCryptoManagerKmip(t *testing.T) {
providerID1 := uuid.NewString()
providerID2 := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID1,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand All @@ -866,7 +866,7 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.True(t, fault.Is(err, &types.RuntimeFault{}))
assert.Empty(t, keyID)

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID2,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -896,15 +896,15 @@ func TestCryptoManagerKmip(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, keys, 0)

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID1,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID2,
types.KmipClusterInfoKmsManagementTypeUnknown))
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID3,
types.KmipClusterInfoKmsManagementTypeNativeProvider))
Expand Down Expand Up @@ -976,7 +976,7 @@ func TestCryptoManagerKmip(t *testing.T) {

providerID := uuid.NewString()

assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down
6 changes: 3 additions & 3 deletions simulator/virtual_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3423,7 +3423,7 @@ func TestCreateVmWithDefaultKeyProvider(t *testing.T) {
Test(func(ctx context.Context, c *vim25.Client) {
providerID := uuid.NewString()
m := crypto.NewManagerKmip(c)
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -3495,7 +3495,7 @@ func TestCreateVmWithDefaultKeyProvider(t *testing.T) {
Test(func(ctx context.Context, c *vim25.Client) {
providerID := uuid.NewString()
m := crypto.NewManagerKmip(c)
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down Expand Up @@ -3557,7 +3557,7 @@ func TestCreateVmWithGeneratedKey(t *testing.T) {
Test(func(ctx context.Context, c *vim25.Client) {
providerID := uuid.NewString()
m := crypto.NewManagerKmip(c)
assert.NoError(t, m.RegisterKmipCluster(
assert.NoError(t, m.RegisterKmsCluster(
ctx,
providerID,
types.KmipClusterInfoKmsManagementTypeUnknown))
Expand Down

0 comments on commit 796892a

Please sign in to comment.