Skip to content

Commit

Permalink
Storage account name switch
Browse files Browse the repository at this point in the history
  • Loading branch information
melonrush13 committed Apr 9, 2020
1 parent 985eafe commit 91e6ebf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions pkg/resourcemanager/mock/storages/storageaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ func (manager *mockStorageManager) CreateStorage(ctx context.Context, groupName
}

// Get gets the description of the specified storage account.
func (manager *mockStorageManager) GetStorage(ctx context.Context, resourceGroupName string, accountName string) (storage.Account, error) {
func (manager *mockStorageManager) GetStorage(ctx context.Context, resourceGroupName string, storageAccountName string) (storage.Account, error) {
groups := manager.storageResource

index, group := findStorage(groups, func(g storageResource) bool {
return g.resourceGroupName == resourceGroupName &&
g.storageAccountName == accountName
g.storageAccountName == storageAccountName
})

if index == -1 {
Expand All @@ -86,12 +86,12 @@ func (manager *mockStorageManager) GetStorage(ctx context.Context, resourceGroup
}

// removes the storage account
func (manager *mockStorageManager) DeleteStorage(ctx context.Context, resourceGroupName string, accountName string) (autorest.Response, error) {
func (manager *mockStorageManager) DeleteStorage(ctx context.Context, resourceGroupName string, storageAccountName string) (autorest.Response, error) {
groups := manager.storageResource

index, _ := findStorage(groups, func(g storageResource) bool {
return g.resourceGroupName == resourceGroupName &&
g.storageAccountName == accountName
g.storageAccountName == storageAccountName
})

if index == -1 {
Expand Down
6 changes: 3 additions & 3 deletions pkg/resourcemanager/storages/storageaccount/storageaccount.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ func (_ *azureStorageManager) CreateStorage(ctx context.Context, groupName strin
// Get gets the description of the specified storage account.
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// accountName - the name of the storage account
func (_ *azureStorageManager) GetStorage(ctx context.Context, resourceGroupName string, accountName string) (result storage.Account, err error) {
// storageAccountName - the name of the storage account
func (_ *azureStorageManager) GetStorage(ctx context.Context, resourceGroupName string, storageAccountName string) (result storage.Account, err error) {
storagesClient := getStoragesClient()
return storagesClient.GetProperties(ctx, resourceGroupName, accountName, "")
return storagesClient.GetProperties(ctx, resourceGroupName, storageAccountName, "")
}

// DeleteStorage removes the resource group named by env var
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ type StorageManager interface {
// Get gets the description of the specified storage account.
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// accountName - the name of the storage account
GetStorage(ctx context.Context, resourceGroupName string, accountName string) (result storage.Account, err error)
// storageAccountName - the name of the storage account
GetStorage(ctx context.Context, resourceGroupName string, storageAccountName string) (result storage.Account, err error)

// DeleteStorage removes the storage account
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// accountName - the name of the storage account
// storageAccountName - the name of the storage account
DeleteStorage(ctx context.Context, groupName string, storageAccountName string) (result autorest.Response, err error)

ListKeys(ctx context.Context, groupName string, storageAccountName string) (result storage.AccountListKeysResult, err error)
Expand Down

0 comments on commit 91e6ebf

Please sign in to comment.