Skip to content

Commit 4d62fda

Browse files
committed
Updating storage account names and tests
1 parent de7b45e commit 4d62fda

17 files changed

+18
-18
lines changed

examples/storage-management/01-Storage-Accounts.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export BASEDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
55
az reource group get -n $groupName
66
if [ $? -ne 0 ]; then
77
printf "\n Creating group %s in location %s \n" $groupName $location
8-
az group create -n "$groupName" --location "$location"
8+
az resource group create -n "$groupName" --location "$location"
99
fi
1010

1111
set -e
@@ -16,7 +16,7 @@ printf "\n1. Creating storage account %s in resrouce group %s with type %s in lo
1616
az storage account create -g "$groupName" -n "$accountName" -t "$accountType" -l "$location"
1717

1818
printf "\n2. Get account info of storage account %s in group %s\n" $accountName $groupName
19-
az storage account get -g $groupName -n $accountName > $BASEDIR/$accountName.json
19+
az storage account ls -g $groupName -n $accountName > $BASEDIR/$accountName.json
2020
[ $(cat $BASEDIR/$accountName.json | jq '.ResourceGroupName' --raw-output) == "$groupName" ]
2121
[ $(cat $BASEDIR/$accountName.json | jq '.StorageAccountName' --raw-output) == "$accountName" ]
2222
[ $(cat $BASEDIR/$accountName.json | jq '.AccountType' --raw-output) == "$accountType" ]
@@ -30,23 +30,23 @@ az storage account set -g $groupName -n $accountName -t "$accountType1" > $BASED
3030
rm -f $BASEDIR/$accountName.json
3131

3232
printf "\n4. Get account key of storage account %s in group %s\n" $accountName $groupName
33-
az storage account key get -g $groupName -n $accountName > $BASEDIR/$accountName.json
33+
az storage key ls -g $groupName -n $accountName > $BASEDIR/$accountName.json
3434
key1=$(cat $BASEDIR/$accountName.json | jq '.key1' --raw-output)
3535
key2=$(cat $BASEDIR/$accountName.json | jq '.key2' --raw-output)
3636
[ $key1 != $key2 ]
3737
rm -f $BASEDIR/$accountName.json
3838

3939
printf "\n5. Renew account key1 of storage account %s in group %s\n" $accountName $groupName
40-
az storage account key create -g $groupName -n $accountName -k "key1"
41-
az storage account key get -g $groupName -n $accountName > $BASEDIR/$accountName.json
40+
az storage key create -g $groupName -n $accountName -k "key1"
41+
az storage key ls -g $groupName -n $accountName > $BASEDIR/$accountName.json
4242
[ $(cat $BASEDIR/$accountName.json | jq '.key1' --raw-output) != $key1 ]
4343
rm -f $BASEDIR/$accountName.json
4444

4545
printf "\n6. Renew account key2 of storage account %s in group %s\n" $accountName $groupName
46-
az storage account key create -g $groupName -n $accountName -k "key2"
47-
az storage account key get -g $groupName -n $accountName > $BASEDIR/$accountName.json
46+
az storage key create -g $groupName -n $accountName -k "key2"
47+
az storage key ls -g $groupName -n $accountName > $BASEDIR/$accountName.json
4848
[ $(cat $BASEDIR/$accountName.json | jq '.key2' --raw-output) != $key2 ]
4949
rm -f $BASEDIR/$accountName.json
5050

5151
printf "\n7. Removing account %s in group %s\n" $accountName $groupName
52-
az storage account remove -g $groupName -n $accountName
52+
az storage account rm -g $groupName -n $accountName

src/CLU/Microsoft.Azure.Commands.Compute/StorageServices/AddAzureVhdCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.Compute.StorageServices
2828
/// Uploads a vhd as fixed disk format vhd to a blob in Microsoft Azure Storage
2929
/// </summary>
3030
[Cmdlet(VerbsCommon.Add, ProfileNouns.Vhd), OutputType(typeof(VhdUploadContext))]
31-
[CliCommandAlias("vm;vhd;add")] public class AddAzureVhdCommand : ComputeClientBaseCmdlet
31+
[CliCommandAlias("vm vhd add")] public class AddAzureVhdCommand : ComputeClientBaseCmdlet
3232
{
3333
private const int DefaultNumberOfUploaderThreads = 8;
3434

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/GetAzureStorageAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Microsoft.Azure.Commands.Management.Storage
2121
{
2222
[Cmdlet(VerbsCommon.Get, StorageAccountNounStr), OutputType(typeof(PSStorageAccount))]
23-
[CliCommandAlias("storage;account;ls")]
23+
[CliCommandAlias("storage account ls")]
2424
public class GetAzureStorageAccountCommand : StorageAccountBaseCmdlet
2525
{
2626
[Parameter(

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/GetAzureStorageAccountKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace Microsoft.Azure.Commands.Management.Storage
2020
{
2121
[Cmdlet(VerbsCommon.Get, StorageAccountKeyNounStr), OutputType(typeof(StorageAccountKeys))]
22-
[CliCommandAlias("storage;key;ls")]
22+
[CliCommandAlias("storage key ls")]
2323
public class GetAzureStorageAccountKeyCommand : StorageAccountBaseCmdlet
2424
{
2525
[Parameter(

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/GetAzureStorageAccountNameAvailability.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace Microsoft.Azure.Commands.Management.Storage.StorageAccount
2020
{
2121
[Cmdlet(VerbsCommon.Get, StorageAccountNameAvailabilityStr), OutputType(typeof(CheckNameAvailabilityResult))]
22-
[CliCommandAlias("storage;name;test")]
22+
[CliCommandAlias("storage name test")]
2323
public class GetAzureStorageAccountNameAvailability : StorageAccountBaseCmdlet
2424
{
2525
[Parameter(

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/GetAzureStorageUsage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace Microsoft.Azure.Commands.Management.Storage.StorageAccount
2020
{
2121
[Cmdlet(VerbsCommon.Get, StorageUsageNounStr), OutputType(typeof(PSUsage))]
22-
[CliCommandAlias("storage;usage;ls")]
22+
[CliCommandAlias("storage usage ls")]
2323
public class GetAzureStorageUsageCommand : StorageAccountBaseCmdlet
2424
{
2525
protected override void ProcessRecord()

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/NewAzureStorageAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace Microsoft.Azure.Commands.Management.Storage
2424
{
2525
[Cmdlet(VerbsCommon.New, StorageAccountNounStr), OutputType(typeof(PSStorageAccount))]
26-
[CliCommandAlias("storage;account;create")]
26+
[CliCommandAlias("storage account create")]
2727
public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet
2828
{
2929
[Parameter(

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/NewAzureStorageAccountKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
namespace Microsoft.Azure.Commands.Management.Storage
2121
{
2222
[Cmdlet(VerbsCommon.New, StorageAccountKeyNounStr), OutputType(typeof(StorageAccountKeys))]
23-
[CliCommandAlias("storage;key;create")]
23+
[CliCommandAlias("storage key create")]
2424
public class NewAzureStorageAccountKeyCommand : StorageAccountBaseCmdlet
2525
{
2626
private const string Key1 = "Key1";

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/RemoveAzureStorageAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Management.Storage
2121
/// Lists all storage services underneath the subscription.
2222
/// </summary>
2323
[Cmdlet(VerbsCommon.Remove, StorageAccountNounStr)]
24-
[CliCommandAlias("storage;account;rm")]
24+
[CliCommandAlias("storage account rm")]
2525
public class RemoveAzureStorageAccountCommand : StorageAccountBaseCmdlet
2626
{
2727
[Parameter(

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/SetAzureRmCurrentStorageAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.Management.Storage
2222
{
2323
[Cmdlet(VerbsCommon.Set, "AzureRmCurrentStorageAccount", DefaultParameterSetName=ResourceNameParameterSet),
2424
OutputType(typeof(string))]
25-
[CliCommandAlias("storage;account;current;set")]
25+
[CliCommandAlias("storage account current set")]
2626
public class SetAzureRmCurrentStorageAccount : StorageAccountBaseCmdlet
2727
{
2828
private const string StorageContextParameterSet = "UsingStorageContext";

src/CLU/Microsoft.Azure.Commands.Management.Storage/StorageAccount/SetAzureStorageAccount.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Management.Storage
2626
/// Lists all storage services underneath the subscription.
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.Set, StorageAccountNounStr, DefaultParameterSetName = UpdateAccountTypeParamSet), OutputType(typeof(StorageModels.StorageAccount))]
29-
[CliCommandAlias("storage;account;set")]
29+
[CliCommandAlias("storage account set")]
3030
public class SetAzureStorageAccountCommand : StorageAccountBaseCmdlet
3131
{
3232
protected const string UpdateAccountTypeParamSet = "UpdateAccountType";

0 commit comments

Comments
 (0)