Skip to content

Update for storage v2 #5133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/ResourceManager/Storage/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
- Additional information about change #1
-->
## Current Release

* Upgrade SRP SDK to 7.1.0
* Add StorageV2 account kind to resource mode storage account cmdlets
- New-AzureRmStorageAccount

## Version 4.0.1
* Fixed assembly loading issue that caused some cmdlets to fail when executing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<Reference Include="Microsoft.Azure.Management.Authorization">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.5.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Storage, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.7.1.0-preview\lib\net452\Microsoft.Azure.Management.Storage.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -72,10 +72,10 @@
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.10\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.Authentication.2.2.9-preview\lib\net45\Microsoft.Rest.ClientRuntime.Azure.Authentication.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,14 @@ Gets the Canary location for a provider
function Get-ProviderLocation_Canary($provider)
{
"eastus2euap"
}


<#
.SYNOPSIS
Gets the Stage location for a provider
#>
function Get-ProviderLocation_Stage($provider)
{
"eastus2(stage)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,21 @@ function Test-NewAzureStorageAccount
{
# Test
$stoname = 'sto' + $rgname;
$stotype = 'Standard_GRS';
$loc = Get-ProviderLocation ResourceManagement;
$stotype = 'Standard_ZRS';
$kind = 'StorageV2'

$loc = Get-ProviderLocation ResourceManagement;
New-AzureRmResourceGroup -Name $rgname -Location $loc;

New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
$loc = Get-ProviderLocation_Stage ResourceManagement;
New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype -Kind $kind;

$sto = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname;
$stotype = 'StandardZRS';
Assert-AreEqual $sto.StorageAccountName $stoname;
Assert-AreEqual $sto.Sku.Name $stotype;
Assert-AreEqual $sto.Location $loc;
Assert-AreEqual $sto.Kind $kind;

Retry-IfException { Remove-AzureRmStorageAccount -Force -ResourceGroupName $rgname -Name $stoname; }
}
Expand Down
Loading