Skip to content

Commit fc37086

Browse files
committed
RDBug 7069788:[PSH] fix the breaking change on New/Get/Set-AzureRMStorageAccount for Sku.Name, and New-AzureRMstorageAccountKey - update
1 parent e7b7343 commit fc37086

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

ChangeLog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
##2016.08.22 version 1.7.0
22
* Azure Storage
3-
* Change the return type of Get-AzureRmStorageAccountKey cmdlet, to make both of following works (Migrate breaking change from 1.4.0)
3+
* Change the return type of Get-AzureRmStorageAccountKey cmdlet, to make both of following works (Mitigate breaking change from 1.4.0)
44
- $key = (Get-AzureRmStorageAccountKey -ResourceGroupName $groupname -Name $accountname).Key1
55
- $key = (Get-AzureRmStorageAccountKey -ResourceGroupName $groupname -Name $accountname)[0].Value
6-
* Change the return type of New/Get/Set-AzureRMStorageAccount cmdlet by add back AccountType, to make both of following works (Migrate breaking change from 1.4.0)
6+
* Change the return type of New/Get/Set-AzureRMStorageAccount cmdlet by add back AccountType, to make both of following works (Mitigate breaking change from 1.4.0)
77
- $AccountType = (Get-AzureRmStorageAccount -ResourceGroupName $groupname -Name $accountname).AccountType
88
- $AccountType = (Get-AzureRmStorageAccount -ResourceGroupName $groupname -Name $accountname).Sku.Name
9-
* Change the return type of New-AzureRmStorageAccountKey cmdlet, to make both of following works (Migrate breaking change from 1.4.0)
9+
* Change the return type of New-AzureRmStorageAccountKey cmdlet, to make both of following works (Mitigate breaking change from 1.4.0)
1010
- $key = (Get-AzureRmStorageAccountKey -ResourceGroupName $groupname -Name $accountname -KeyName $keyname).StorageAccountKeys.Key1
1111
- $key = (Get-AzureRmStorageAccountKey -ResourceGroupName $groupname -Name $accountname -KeyName $keyname).Keys[0].Value
1212

src/ResourceManager/Storage/Commands.Management.Storage/Models/AccountType.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
62

73
namespace Microsoft.Azure.Management.Storage.Models
84
{

src/ResourceManager/Storage/Commands.Management.Storage/Models/StorageAccountKeys.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public StorageAccountKeys(IList<StorageAccountKey> storageKeys) : base()
1212
this.Key2 = storageKeys[1].Value;
1313
}
1414

15-
public string Key1 { get; set; }
16-
public string Key2 { get; set; }
15+
public string Key1 { get; }
16+
public string Key2 { get; }
1717
}
1818
}
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Text;
5-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
62

73
namespace Microsoft.Azure.Management.Storage.Models
84
{
95
class StorageAccountRegenerateKeyResponse
106
{
117
public StorageAccountRegenerateKeyResponse(StorageAccountListKeysResult result)
128
{
13-
if (result.Keys !=null)
9+
if (result.Keys != null)
1410
{
1511
StorageAccountKeys = new StorageAccountKeys(result.Keys);
1612
Keys = result.Keys;
1713
}
1814
}
19-
public StorageAccountKeys StorageAccountKeys { get; set; }
15+
public StorageAccountKeys StorageAccountKeys { get; }
2016
public IList<StorageAccountKey> Keys { get; }
2117
}
2218
}

0 commit comments

Comments
 (0)