Skip to content

Commit

Permalink
Correct minor typos (#1575)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
akankshakumari393 and mergify[bot] committed Aug 3, 2022
1 parent 9198399 commit 3d862c3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ func parseMountTargetValue(value string) (*mountTarget, error) {
// After that "+" separates security groups
// Example value:
// subnet-123+securityGroup-1+securityGroup-2
tokens := strings.Split(value, securityGroupSeperator)
tokens := strings.Split(value, securityGroupSeparator)
if len(tokens) < 1 {
return nil, errors.New("Malformed string for mount target values")
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/blockstorage/awsefs/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
securityGroupSeperator = "+"
securityGroupSeparator = "+"
mountTargetKeyPrefix = "kasten.io/aws-mount-target/"
)

Expand Down Expand Up @@ -190,13 +190,13 @@ func mergeSecurityGroups(securityGroups []*string) string {
for _, d := range securityGroups {
dereferenced = append(dereferenced, *d)
}
return strings.Join(dereferenced, securityGroupSeperator)
return strings.Join(dereferenced, securityGroupSeparator)
}

func mountTargetKey(mountTargetID string) string {
return mountTargetKeyPrefix + mountTargetID
}

func mountTargetValue(subnetID string, securityGroups []*string) string {
return subnetID + securityGroupSeperator + mergeSecurityGroups(securityGroups)
return subnetID + securityGroupSeparator + mergeSecurityGroups(securityGroups)
}
6 changes: 3 additions & 3 deletions pkg/blockstorage/azure/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ func NewClient(ctx context.Context, config map[string]string) (*Client, error) {
}
}

if id, ok := config[blockstorage.AzureCloudEnviornmentID]; !ok || id == "" {
config[blockstorage.AzureCloudEnviornmentID] = azure.PublicCloud.Name
if id, ok := config[blockstorage.AzureCloudEnvironmentID]; !ok || id == "" {
config[blockstorage.AzureCloudEnvironmentID] = azure.PublicCloud.Name
}

env, err := azure.EnvironmentFromName(config[blockstorage.AzureCloudEnviornmentID])
env, err := azure.EnvironmentFromName(config[blockstorage.AzureCloudEnvironmentID])
if err != nil {
return nil, errors.Wrap(err, "Failed to fetch the cloud environment.")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/blockstorage/azure/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s *ClientSuite) TestClient(c *C) {
config[blockstorage.AzureCientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCientID)
config[blockstorage.AzureClentSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClentSecret)
config[blockstorage.AzureResurceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureResurceGroup)
config[blockstorage.AzureCloudEnviornmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnviornmentID)
config[blockstorage.AzureCloudEnvironmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnvironmentID)
azCli, err := NewClient(context.Background(), config)
c.Assert(err, IsNil)

Expand Down
2 changes: 1 addition & 1 deletion pkg/blockstorage/blockstorage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (s *BlockStorageProviderSuite) getConfig(c *C, region string) map[string]st
config[blockstorage.AzureCientID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCientID)
config[blockstorage.AzureClentSecret] = envconfig.GetEnvOrSkip(c, blockstorage.AzureClentSecret)
config[blockstorage.AzureResurceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureResurceGroup)
config[blockstorage.AzureCloudEnviornmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnviornmentID)
config[blockstorage.AzureCloudEnvironmentID] = envconfig.GetEnvOrSkip(c, blockstorage.AzureCloudEnvironmentID)
s.args[blockstorage.AzureMigrateStorageAccount] = envconfig.GetEnvOrSkip(c, blockstorage.AzureMigrateStorageAccount)
s.args[blockstorage.AzureMigrateStorageKey] = envconfig.GetEnvOrSkip(c, blockstorage.AzureMigrateStorageKey)
s.args[blockstorage.AzureMigrateResourceGroup] = envconfig.GetEnvOrSkip(c, blockstorage.AzureMigrateResourceGroup)
Expand Down
2 changes: 1 addition & 1 deletion pkg/blockstorage/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
AzureMigrateResourceGroup = "AZURE_MIGRATE_RESOURCE_GROUP"
AzureActiveDirEndpoint = "AZURE_AD_ENDPOINT"
AzureActiveDirResourceID = "AZURE_AD_RESOURCE"
AzureCloudEnviornmentID = "AZURE_CLOUD_ENV_ID"
AzureCloudEnvironmentID = "AZURE_CLOUD_ENV_ID"
)

// SanitizeTags are used to sanitize the tags
Expand Down
4 changes: 2 additions & 2 deletions pkg/blockstorage/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ func (p *FcdProvider) SnapshotGet(ctx context.Context, id string) (*blockstorage
}
log.Debug().Print("RetrieveMetadata done: " + volID + "," + snapshotID)
tags := convertKeyValueToTags(kvs)
additonalTags, err := p.getSnapshotTags(ctx, id)
additionalTags, err := p.getSnapshotTags(ctx, id)
if err != nil {
return nil, errors.Wrap(err, "Failed to get snapshot tags")
}
tags = append(tags, additonalTags...)
tags = append(tags, additionalTags...)
snapshot.Tags = tags
return snapshot, nil
}
Expand Down

0 comments on commit 3d862c3

Please sign in to comment.