Skip to content

Commit 197f1a6

Browse files
committed
Merge pull request #181 from huangpf/vmss
HPF PR: vmss <- huangpf:vmss
2 parents cdcb655 + c3c3009 commit 197f1a6

File tree

249 files changed

+4607
-3355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+4607
-3355
lines changed

setup/azurecmdfiles.wxi

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
<Component Id="cmpA478F262D7EEA3E8F5BE546683E3EB19" Guid="*">
3030
<File Id="fil200D141E094B70EFFEAA31952211E176" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.Storage\Microsoft.Azure.KeyVault.Core.dll" />
3131
</Component>
32-
<Component Id="cmp39B24AC536C9043FBE5A877B12AFDD07" Guid="*">
33-
<File Id="filBD5DC688555FC5A058DE709AC4E971D2" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.Storage\Microsoft.Azure.Management.Storage.dll" />
34-
</Component>
3532
<Component Id="cmp723E587B6DF6F6C0065C72D8E7A76722" Guid="*">
3633
<File Id="fil76DD8779D9A96840E77DE3847A54DF05" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\Azure.Storage\Microsoft.Azure.ResourceManager.dll" />
3734
</Component>
@@ -163,9 +160,6 @@
163160
<Component Id="cmpFEDC3AEB5D8A3668BB3C0FE9A281BA9D" Guid="*">
164161
<File Id="fil4FCB05816DC4A28666A38E3DB6B2CEF0" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\Microsoft.Azure.Management.ApiManagement.dll" />
165162
</Component>
166-
<Component Id="cmp084E12F37EE0E84079000E0CA21BBEB6" Guid="*">
167-
<File Id="fil5C064F37094F8CD05C63FAA747E98838" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\Microsoft.Azure.Management.Storage.dll" />
168-
</Component>
169163
<Component Id="cmpCDB09F5BF9ED75F39E75D25609E4EBFA" Guid="*">
170164
<File Id="filE4B8948270BD5C9E5660AEFAB8189FE2" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\Microsoft.Azure.ResourceManager.dll" />
171165
</Component>
@@ -634,9 +628,6 @@
634628
<Component Id="cmp4F1B147652795AAF834377CCD9CAF2A7" Guid="*">
635629
<File Id="fil7BE9FD1B89B50D33752D678E66FE8F0F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\AzureRM.Resources.psd1" />
636630
</Component>
637-
<Component Id="cmp9FDC7E987C84705E62A1E3E6958A7A34" Guid="*">
638-
<File Id="filE5BCEBB31C52D77D25E394F16AD431F4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\AzureRM.Storage.psd1" />
639-
</Component>
640631
<Component Id="cmp0BDDC10BCAFF9EC25710B20367203609" Guid="*">
641632
<File Id="fil1B9798D9FA9E8F9FC7A4235BCFAB93E4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\AzureRM.Tags.psd1" />
642633
</Component>
@@ -670,15 +661,6 @@
670661
<Component Id="cmp2F89409867C32CA8990F3AA1CDACA176" Guid="*">
671662
<File Id="fil7A56A2D46B44AC34038EFEFAFAF61564" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml" />
672663
</Component>
673-
<Component Id="cmpC402A7C0F68459832EB5C5EF9B538D05" Guid="*">
674-
<File Id="filB3E2D4F0E1187A90766E80D6DB6885EE" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Management.Storage.dll" />
675-
</Component>
676-
<Component Id="cmp046D498D47FB9CE6BBA53BBF0A1A5576" Guid="*">
677-
<File Id="fil9CCFEF50BFF34A931B8574891A142011" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Management.Storage.dll-Help.xml" />
678-
</Component>
679-
<Component Id="cmp40AE98B84A0899A3DE5C48938E39CDB7" Guid="*">
680-
<File Id="filAF4D4D68D04718A941D3D067A86793ED" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Management.Storage.format.ps1xml" />
681-
</Component>
682664
<Component Id="cmp8D5568ABA06D6A2BC2F3649BFF7A8017" Guid="*">
683665
<File Id="fil98347E064DEFC8CFC6F20B7F1FE82375" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Compute\Microsoft.Azure.Commands.Network.dll" />
684666
</Component>
@@ -3087,9 +3069,6 @@
30873069
<Component Id="cmp89CC09DB4DBDB9D4628CAD12DC3F1679" Guid="*">
30883070
<File Id="fil1B5DFFEE67D288152062ACC47A59ABD0" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Azure.Storage\Microsoft.Azure.KeyVault.Core.dll" />
30893071
</Component>
3090-
<Component Id="cmpE6D6ED16D744D1E0F52387CEBF8BD182" Guid="*">
3091-
<File Id="fil7CA310AB60994ED471AE645F794EC2FE" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Azure.Storage\Microsoft.Azure.Management.Storage.dll" />
3092-
</Component>
30933072
<Component Id="cmp5626BA90313D631FCA8B656DA0854D0E" Guid="*">
30943073
<File Id="fil51D8091906316F331BD3810DC6FE0D31" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Azure.Storage\Microsoft.Azure.ResourceManager.dll" />
30953074
</Component>
@@ -3590,9 +3569,6 @@
35903569
<Component Id="cmp8E18C5784C3EFBC582E3939340E3CD6D" Guid="*">
35913570
<File Id="filF9A8EA3F180DD7E81BE332B724C36D7C" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.KeyVault.Core.dll" />
35923571
</Component>
3593-
<Component Id="cmp52E4780277F8BEC67754F72B580F93A6" Guid="*">
3594-
<File Id="fil041902D767CD923116A863D957855C6D" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.Management.Storage.dll" />
3595-
</Component>
35963572
<Component Id="cmpF337D07C78C9EA8AF46D4FBA46E2B659" Guid="*">
35973573
<File Id="fil9E957A7E9D6730B23D2E5694BBFEF91B" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\ManagedCache\Microsoft.Azure.ResourceManager.dll" />
35983574
</Component>
@@ -3745,9 +3721,6 @@
37453721
<Component Id="cmp844772384C0923BF32EEFB91E2724F8B" Guid="*">
37463722
<File Id="fil16581DB56A17EFBFC3998671FA4DCA32" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Networking\Microsoft.Azure.KeyVault.Core.dll" />
37473723
</Component>
3748-
<Component Id="cmp10C99007868B1F2166E9D001E1CEC9B9" Guid="*">
3749-
<File Id="filBAA9F8F29E496F8EEBAB7DA5072F2AC1" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Networking\Microsoft.Azure.Management.Storage.dll" />
3750-
</Component>
37513724
<Component Id="cmp376619CF1737E3DFBCF802CFC718DC17" Guid="*">
37523725
<File Id="fil1A83B1782D96253AEB45F8C7D7C70435" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Networking\Microsoft.Azure.ResourceManager.dll" />
37533726
</Component>
@@ -4308,9 +4281,6 @@
43084281
<Component Id="cmpB5530AB070E5EBD970CBE61AB78EEABB" Guid="*">
43094282
<File Id="fil017743799CCCB392FEB0B31E97BFC829" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.KeyVault.Core.dll" />
43104283
</Component>
4311-
<Component Id="cmpE4B3D8612919AECFBEE6E2FE824FDCD4" Guid="*">
4312-
<File Id="filF03CE42E3E21E74C3109580CE13E1389" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.Management.Storage.dll" />
4313-
</Component>
43144284
<Component Id="cmpA0D584195279B4D66D7B42152BE83B46" Guid="*">
43154285
<File Id="fil170B60ADE61FB4B182FDB5A192AB53A7" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.Azure.ResourceManager.dll" />
43164286
</Component>
@@ -4694,9 +4664,6 @@
46944664
<Component Id="cmp755719BF8C89385B0BC1EC8745FE6612" Guid="*">
46954665
<File Id="fil0C5FDBE4D63F18505B84B13EA1A0D656" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.KeyVault.Core.dll" />
46964666
</Component>
4697-
<Component Id="cmp2C76B7125651272E291DE1C2F956AB55" Guid="*">
4698-
<File Id="fil0CF85006146C9D884F0D8E8D051DCBDE" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.Management.Storage.dll" />
4699-
</Component>
47004667
<Component Id="cmp940CE83AD0420A4BB3435E2A8DC13E30" Guid="*">
47014668
<File Id="fil2406269AC1B5ACC345416E1F7C62C0EF" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Sql\Microsoft.Azure.ResourceManager.dll" />
47024669
</Component>
@@ -5028,7 +4995,6 @@
50284995
<ComponentRef Id="cmp8442839E6CCDD8A283EF37DF080C3AE1" />
50294996
<ComponentRef Id="cmp39B0D2598A6CE580733F0226C08A3242" />
50304997
<ComponentRef Id="cmpA478F262D7EEA3E8F5BE546683E3EB19" />
5031-
<ComponentRef Id="cmp39B24AC536C9043FBE5A877B12AFDD07" />
50324998
<ComponentRef Id="cmp723E587B6DF6F6C0065C72D8E7A76722" />
50334999
<ComponentRef Id="cmp6DEC1DD283771C536AFF2404379FDCE9" />
50345000
<ComponentRef Id="cmpB3D63A4D206DFA52DD89CEC6F42CDC21" />
@@ -5072,7 +5038,6 @@
50725038
<ComponentRef Id="cmpECF981B9839654E15E12F970548E5E3A" />
50735039
<ComponentRef Id="cmp84413471BF270FE012784E7AA843B787" />
50745040
<ComponentRef Id="cmpFEDC3AEB5D8A3668BB3C0FE9A281BA9D" />
5075-
<ComponentRef Id="cmp084E12F37EE0E84079000E0CA21BBEB6" />
50765041
<ComponentRef Id="cmpCDB09F5BF9ED75F39E75D25609E4EBFA" />
50775042
<ComponentRef Id="cmpAA2A3AD0C3815A3E746112EBECCE2C78" />
50785043
<ComponentRef Id="cmp56AE231AE54FF94653E51734FEA684B6" />
@@ -5225,7 +5190,6 @@
52255190
<ComponentRef Id="cmp62338AF9F953CEE8318F8EF07FDDF6AD" />
52265191
<ComponentRef Id="cmp30EDC6EA2C80A9FC62537EE1A73B699A" />
52275192
<ComponentRef Id="cmp4F1B147652795AAF834377CCD9CAF2A7" />
5228-
<ComponentRef Id="cmp9FDC7E987C84705E62A1E3E6958A7A34" />
52295193
<ComponentRef Id="cmp0BDDC10BCAFF9EC25710B20367203609" />
52305194
<ComponentRef Id="cmpC7297788AE102ED861765ADE84F7A59B" />
52315195
<ComponentRef Id="cmpE2DA894B67E7F107B24A69AD6B87F8B3" />
@@ -5237,9 +5201,6 @@
52375201
<ComponentRef Id="cmpAA00FCFEE63D9A20C2618B36B1848D7C" />
52385202
<ComponentRef Id="cmpA1AC15C575696EA327A2CAA9148BE517" />
52395203
<ComponentRef Id="cmp2F89409867C32CA8990F3AA1CDACA176" />
5240-
<ComponentRef Id="cmpC402A7C0F68459832EB5C5EF9B538D05" />
5241-
<ComponentRef Id="cmp046D498D47FB9CE6BBA53BBF0A1A5576" />
5242-
<ComponentRef Id="cmp40AE98B84A0899A3DE5C48938E39CDB7" />
52435204
<ComponentRef Id="cmp8D5568ABA06D6A2BC2F3649BFF7A8017" />
52445205
<ComponentRef Id="cmp038C04BC57D5706B5BE749340101FF2B" />
52455206
<ComponentRef Id="cmp6DFF88AE7B93A36864378B172E784B10" />
@@ -6024,7 +5985,6 @@
60245985
<ComponentRef Id="cmp51CCFF2E9C905ED4449EBAD3F5F9CA52" />
60255986
<ComponentRef Id="cmp4967A1F479006EA37BC07F96B7FBBFC3" />
60265987
<ComponentRef Id="cmp89CC09DB4DBDB9D4628CAD12DC3F1679" />
6027-
<ComponentRef Id="cmpE6D6ED16D744D1E0F52387CEBF8BD182" />
60285988
<ComponentRef Id="cmp5626BA90313D631FCA8B656DA0854D0E" />
60295989
<ComponentRef Id="cmp06939A2282FF2E7483CFB298304C51E8" />
60305990
<ComponentRef Id="cmpE2C37F49DA189DEAB3D25D680742694A" />
@@ -6189,7 +6149,6 @@
61896149
<ComponentRef Id="cmp251FD3E326DDCE15861F27468BA833F6" />
61906150
<ComponentRef Id="cmp5FF3FBE070BD35E9B47D2CE060362F16" />
61916151
<ComponentRef Id="cmp8E18C5784C3EFBC582E3939340E3CD6D" />
6192-
<ComponentRef Id="cmp52E4780277F8BEC67754F72B580F93A6" />
61936152
<ComponentRef Id="cmpF337D07C78C9EA8AF46D4FBA46E2B659" />
61946153
<ComponentRef Id="cmp5C260DEA6AC958F28815FC05C0529EBE" />
61956154
<ComponentRef Id="cmp451B04CD73B2F71A2D07A8A8DF6CBAAF" />
@@ -6240,7 +6199,6 @@
62406199
<ComponentRef Id="cmp6EF74500F8C5864E4C97AF617F709A3D" />
62416200
<ComponentRef Id="cmp4825A8273E6E3207AA24CD61156AEA19" />
62426201
<ComponentRef Id="cmp844772384C0923BF32EEFB91E2724F8B" />
6243-
<ComponentRef Id="cmp10C99007868B1F2166E9D001E1CEC9B9" />
62446202
<ComponentRef Id="cmp376619CF1737E3DFBCF802CFC718DC17" />
62456203
<ComponentRef Id="cmp1604CAE86B20EAEF9965D72B5BA1639A" />
62466204
<ComponentRef Id="cmp408B743E6BFCEB50C5F8D346EF326292" />
@@ -6415,7 +6373,6 @@
64156373
<ComponentRef Id="cmp23C361C4E13CFE366910008069F72682" />
64166374
<ComponentRef Id="cmp9960D1074D8095DBAE42055E438F961F" />
64176375
<ComponentRef Id="cmpB5530AB070E5EBD970CBE61AB78EEABB" />
6418-
<ComponentRef Id="cmpE4B3D8612919AECFBEE6E2FE824FDCD4" />
64196376
<ComponentRef Id="cmpA0D584195279B4D66D7B42152BE83B46" />
64206377
<ComponentRef Id="cmp18250DED1265B0C56638731995A93E0E" />
64216378
<ComponentRef Id="cmpA7EAD5A16FDC38416C52434EF0240652" />
@@ -6533,7 +6490,6 @@
65336490
<ComponentRef Id="cmp09F316A7E95457F48227B20D09F687C7" />
65346491
<ComponentRef Id="cmpB6B3D29C26A5E102831B92476CC50A1D" />
65356492
<ComponentRef Id="cmp755719BF8C89385B0BC1EC8745FE6612" />
6536-
<ComponentRef Id="cmp2C76B7125651272E291DE1C2F956AB55" />
65376493
<ComponentRef Id="cmp940CE83AD0420A4BB3435E2A8DC13E30" />
65386494
<ComponentRef Id="cmp5F9F224B35A12C7DAF144BC06205E603" />
65396495
<ComponentRef Id="cmpE06B535ABED3D66AA1204C8EA27D5313" />

src/Common/Commands.Common.Authentication.Test/Commands.Common.Authentication.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
<Private>True</Private>
6969
</Reference>
7070
<Reference Include="Microsoft.Rest.ClientRuntime">
71-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.0.1\lib\portable-net45+win+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
71+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\portable-net45+win+wpa81\Microsoft.Rest.ClientRuntime.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.0.2\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
7676
<Private>True</Private>
7777
</Reference>
7878
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication">

src/Common/Commands.Common.Authentication.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
99
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1010
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
11-
<package id="Microsoft.Rest.ClientRuntime" version="2.0.1" targetFramework="net45" />
12-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.0.2" targetFramework="net45" />
11+
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
12+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.1.0" targetFramework="net45" />
1313
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.0.1-preview" targetFramework="net45" />
1414
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
1515
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />

src/Common/Commands.Common.Authentication/Commands.Common.Authentication.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.0.1\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
75+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.1.0\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
7676
<Private>True</Private>
7777
</Reference>
7878
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79-
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.0.2\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
79+
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.1.0\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
8080
<Private>True</Private>
8181
</Reference>
8282
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/Common/Commands.Common.Authentication/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
99
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.18.206251556" targetFramework="net45" />
1010
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
11-
<package id="Microsoft.Rest.ClientRuntime" version="2.0.1" targetFramework="net45" />
12-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.0.2" targetFramework="net45" />
11+
<package id="Microsoft.Rest.ClientRuntime" version="2.1.0" targetFramework="net45" />
12+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.1.0" targetFramework="net45" />
1313
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.0.1-preview" targetFramework="net45" />
1414
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
1515
</packages>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using System.Management.Automation;
16+
using Microsoft.Azure.Management.Storage;
17+
using Microsoft.WindowsAzure.Commands.Common.Storage;
18+
19+
namespace Microsoft.Azure.Commands.Management.Storage.Models
20+
{
21+
public class ARMStorageProvider : IStorageServiceProvider
22+
{
23+
IStorageManagementClient _client;
24+
25+
public ARMStorageProvider(IStorageManagementClient client)
26+
{
27+
_client = client;
28+
}
29+
public IStorageService GetStorageService(string name, string resourceGroupName)
30+
{
31+
var account = _client.StorageAccounts.GetProperties(resourceGroupName, name);
32+
var keys = _client.StorageAccounts.ListKeys(resourceGroupName, name);
33+
return new ARMStorageService(account.StorageAccount, keys.StorageAccountKeys.Key1,
34+
keys.StorageAccountKeys.Key2);
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)