From 91e6ebfa4e7a3d6bb55342e650f39b40a84ea3c0 Mon Sep 17 00:00:00 2001 From: Melanie Rush Date: Thu, 9 Apr 2020 12:43:38 -0600 Subject: [PATCH] Storage account name switch --- pkg/resourcemanager/mock/storages/storageaccount.go | 8 ++++---- .../storages/storageaccount/storageaccount.go | 6 +++--- .../storages/storageaccount/storageaccount_manager.go | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/resourcemanager/mock/storages/storageaccount.go b/pkg/resourcemanager/mock/storages/storageaccount.go index ec7c86ed64e..83f8d88a115 100644 --- a/pkg/resourcemanager/mock/storages/storageaccount.go +++ b/pkg/resourcemanager/mock/storages/storageaccount.go @@ -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 { @@ -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 { diff --git a/pkg/resourcemanager/storages/storageaccount/storageaccount.go b/pkg/resourcemanager/storages/storageaccount/storageaccount.go index f14c92e3db6..f8357e57817 100644 --- a/pkg/resourcemanager/storages/storageaccount/storageaccount.go +++ b/pkg/resourcemanager/storages/storageaccount/storageaccount.go @@ -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 diff --git a/pkg/resourcemanager/storages/storageaccount/storageaccount_manager.go b/pkg/resourcemanager/storages/storageaccount/storageaccount_manager.go index e06f1577d53..00e5a6577f1 100644 --- a/pkg/resourcemanager/storages/storageaccount/storageaccount_manager.go +++ b/pkg/resourcemanager/storages/storageaccount/storageaccount_manager.go @@ -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)