Skip to content

Commit 47fc67d

Browse files
authored
Merge pull request Azure#578 from Azure/dev
huangpf PR: dev <- Azure:dev
2 parents aea524d + 9f31a39 commit 47fc67d

File tree

172 files changed

+8406
-2431
lines changed

Some content is hidden

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

172 files changed

+8406
-2431
lines changed

setup/azurecmdfiles.wxi

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,9 +1640,6 @@
16401640
<Component Id="cmp97087B286DB8BA716A4D1CB18ABCAEAE" Guid="*">
16411641
<File Id="fil7433D00EFB79F3A4CCFD09E45AA44359" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.LogicApp\Microsoft.Azure.Commands.Resources.format.ps1xml" />
16421642
</Component>
1643-
<Component Id="cmp31A15C935A4B99F456D6B8BCD2D2E607" Guid="*">
1644-
<File Id="filA627F4EBDC76F2F28011727F50240470" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.LogicApp\Microsoft.Azure.Commands.Tags.dll" />
1645-
</Component>
16461643
<Component Id="cmpE99FD9F5AA46D65F845DC100BCC04143" Guid="*">
16471644
<File Id="fil4493CA681A6906CF28E2206F03AAC26F" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.LogicApp\Microsoft.Azure.Commands.Tags.dll-help.xml" />
16481645
</Component>
@@ -2800,9 +2797,6 @@
28002797
<Component Id="cmpF84401F8328D5324A149A870ED0F7301" Guid="*">
28012798
<File Id="fil306FAD8819A1173AE5A9586132F0D45D" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\Microsoft.Azure.Commands.Sql.Types.ps1xml" />
28022799
</Component>
2803-
<Component Id="cmpB9A36BC1052E6D29CA114E101033DD08" Guid="*">
2804-
<File Id="fil8798955DF65FB78CCF9FA55BCFEA7D22" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\Microsoft.Azure.Commands.Tags.dll" />
2805-
</Component>
28062800
<Component Id="cmp2AC64458897F6B7E0BF3138ED38D02AB" Guid="*">
28072801
<File Id="fil52EF96572CC6A4EDE16B1D6FDF0413CD" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Sql\Microsoft.Azure.Commands.Tags.dll-help.xml" />
28082802
</Component>
@@ -3385,9 +3379,6 @@
33853379
<Component Id="cmpAF6FDD36F73DF1B8825F6FCDBF99D507" Guid="*">
33863380
<File Id="filE60B89A0375025D8078CBBE13C43626A" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Websites\Microsoft.Azure.Commands.Resources.format.ps1xml" />
33873381
</Component>
3388-
<Component Id="cmp7FD7399FBFB41BA93701CD0B54D3E590" Guid="*">
3389-
<File Id="filD2AC6C37607AB4FA8D87E34E6C5E70C7" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Websites\Microsoft.Azure.Commands.Tags.dll" />
3390-
</Component>
33913382
<Component Id="cmp9CD7A6B4A060D1905998AF07D0B4B02A" Guid="*">
33923383
<File Id="filF0458BC5D689F3255BB60BB64ACD3FAF" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Websites\Microsoft.Azure.Commands.Tags.dll-help.xml" />
33933384
</Component>
@@ -5999,7 +5990,6 @@
59995990
<ComponentRef Id="cmp1ACAC80DFD34A6D24C01FC970917FBA3" />
60005991
<ComponentRef Id="cmp8DE41CF6364D106A835E7C826522203E" />
60015992
<ComponentRef Id="cmp97087B286DB8BA716A4D1CB18ABCAEAE" />
6002-
<ComponentRef Id="cmp31A15C935A4B99F456D6B8BCD2D2E607" />
60035993
<ComponentRef Id="cmpE99FD9F5AA46D65F845DC100BCC04143" />
60045994
<ComponentRef Id="cmp3C615E8BF013B4F5F438749CFE015D29" />
60055995
<ComponentRef Id="cmp9EA2D01CED057826033649A3949A590C" />
@@ -6377,7 +6367,6 @@
63776367
<ComponentRef Id="cmp5A0DCA5FB70CF654DDE7FB3D9F1876BE" />
63786368
<ComponentRef Id="cmp90CFE28929C10FB584749B3E6662A8D9" />
63796369
<ComponentRef Id="cmpF84401F8328D5324A149A870ED0F7301" />
6380-
<ComponentRef Id="cmpB9A36BC1052E6D29CA114E101033DD08" />
63816370
<ComponentRef Id="cmp2AC64458897F6B7E0BF3138ED38D02AB" />
63826371
<ComponentRef Id="cmpF639DACA74489D20363DF71CB7BBAEAF" />
63836372
<ComponentRef Id="cmp1D909E9D8F129592EECF82B544F73D88" />
@@ -6568,7 +6557,6 @@
65686557
<ComponentRef Id="cmp93772AC2745F6B6E807F7B5A7028523B" />
65696558
<ComponentRef Id="cmp24DFBDAA3B9275C9231D1F7FCC9DAC35" />
65706559
<ComponentRef Id="cmpAF6FDD36F73DF1B8825F6FCDBF99D507" />
6571-
<ComponentRef Id="cmp7FD7399FBFB41BA93701CD0B54D3E590" />
65726560
<ComponentRef Id="cmp9CD7A6B4A060D1905998AF07D0B4B02A" />
65736561
<ComponentRef Id="cmpC3F5E35306467501723E692635390B24" />
65746562
<ComponentRef Id="cmp8F839B12289A46E7A8870014F8111911" />
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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 Microsoft.Azure.Management.Storage;
16+
using Microsoft.WindowsAzure.Commands.Common.Storage;
17+
18+
namespace Microsoft.Azure.Commands.Management.Storage.Models
19+
{
20+
public class ARMStorageProvider : IStorageServiceProvider
21+
{
22+
IStorageManagementClient _client;
23+
24+
public ARMStorageProvider(IStorageManagementClient client)
25+
{
26+
_client = client;
27+
}
28+
public IStorageService GetStorageService(string name, string resourceGroupName)
29+
{
30+
var account = _client.StorageAccounts.GetProperties(resourceGroupName, name);
31+
var keys = _client.StorageAccounts.ListKeys(resourceGroupName, name);
32+
return new ARMStorageService(account, keys.Key1,
33+
keys.Key2);
34+
}
35+
}
36+
}
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
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 Microsoft.WindowsAzure.Commands.Common.Storage;
16+
using System;
17+
using System.Collections.Generic;
18+
19+
namespace Microsoft.Azure.Commands.Management.Storage.Models
20+
{
21+
public class ARMStorageService : IStorageService
22+
{
23+
Azure.Management.Storage.Models.StorageAccount _account;
24+
List<string> _authenticationKeys = new List<string>();
25+
public ARMStorageService(Azure.Management.Storage.Models.StorageAccount account,
26+
params string[] authenticationKeys)
27+
{
28+
_account = account;
29+
foreach (var key in authenticationKeys)
30+
{
31+
_authenticationKeys.Add(key);
32+
}
33+
}
34+
35+
public Uri BlobEndpoint
36+
{
37+
get { return new Uri(_account.PrimaryEndpoints.Blob); }
38+
}
39+
40+
public Uri FileEndpoint
41+
{
42+
get { return new Uri(_account.PrimaryEndpoints.File); }
43+
}
44+
45+
public Uri QueueEndpoint
46+
{
47+
get { return new Uri(_account.PrimaryEndpoints.Queue); }
48+
}
49+
50+
public Uri TableEndpoint
51+
{
52+
get { return new Uri(_account.PrimaryEndpoints.Table); }
53+
}
54+
55+
public string Name
56+
{
57+
get { return _account.Name; }
58+
}
59+
60+
public List<string> AuthenticationKeys
61+
{
62+
get { return _authenticationKeys; }
63+
}
64+
65+
/// <summary>
66+
/// Get the resource group name from a storage account resource Id
67+
/// </summary>
68+
/// <param name="resourceId">The resource Id for the storage account</param>
69+
/// <returns>The resource group containing the storage account</returns>
70+
public static string ParseResourceGroupFromId(string resourceId)
71+
{
72+
if (!string.IsNullOrEmpty(resourceId))
73+
{
74+
string[] tokens = resourceId.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
75+
if (tokens == null || tokens.Length < 4)
76+
{
77+
throw new ArgumentOutOfRangeException("resourceId");
78+
}
79+
80+
return tokens[3];
81+
}
82+
83+
return null;
84+
}
85+
86+
}
87+
}

src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAffinityInformation.cs

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// -----------------------------------------------------------------------------
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-
// -----------------------------------------------------------------------------
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+
// -----------------------------------------------------------------------------
1414
//------------------------------------------------------------------------------
1515
// <auto-generated>
1616
// This code was generated by a tool.
@@ -23,18 +23,22 @@
2323

2424
namespace Microsoft.Azure.Commands.Batch.Models
2525
{
26-
27-
28-
public class PSAffinityInformation
26+
using System;
27+
using System.Collections;
28+
using System.Collections.Generic;
29+
using Microsoft.Azure.Batch;
30+
31+
32+
public partial class PSAffinityInformation
2933
{
30-
34+
3135
internal Microsoft.Azure.Batch.AffinityInformation omObject;
32-
36+
3337
public PSAffinityInformation(string affinityId)
3438
{
3539
this.omObject = new Microsoft.Azure.Batch.AffinityInformation(affinityId);
3640
}
37-
41+
3842
internal PSAffinityInformation(Microsoft.Azure.Batch.AffinityInformation omObject)
3943
{
4044
if ((omObject == null))
@@ -43,7 +47,7 @@ internal PSAffinityInformation(Microsoft.Azure.Batch.AffinityInformation omObjec
4347
}
4448
this.omObject = omObject;
4549
}
46-
50+
4751
public string AffinityId
4852
{
4953
get

src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSApplicationPackageReference.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Microsoft.Azure.Commands.Batch.Models
2929
using Microsoft.Azure.Batch;
3030

3131

32-
public class PSApplicationPackageReference
32+
public partial class PSApplicationPackageReference
3333
{
3434

3535
internal Microsoft.Azure.Batch.ApplicationPackageReference omObject;

src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSAutoPoolSpecification.cs

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// -----------------------------------------------------------------------------
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-
// -----------------------------------------------------------------------------
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+
// -----------------------------------------------------------------------------
1414
//------------------------------------------------------------------------------
1515
// <auto-generated>
1616
// This code was generated by a tool.
@@ -23,20 +23,24 @@
2323

2424
namespace Microsoft.Azure.Commands.Batch.Models
2525
{
26-
27-
28-
public class PSAutoPoolSpecification
26+
using System;
27+
using System.Collections;
28+
using System.Collections.Generic;
29+
using Microsoft.Azure.Batch;
30+
31+
32+
public partial class PSAutoPoolSpecification
2933
{
30-
34+
3135
internal Microsoft.Azure.Batch.AutoPoolSpecification omObject;
32-
36+
3337
private PSPoolSpecification poolSpecification;
34-
38+
3539
public PSAutoPoolSpecification()
3640
{
3741
this.omObject = new Microsoft.Azure.Batch.AutoPoolSpecification();
3842
}
39-
43+
4044
internal PSAutoPoolSpecification(Microsoft.Azure.Batch.AutoPoolSpecification omObject)
4145
{
4246
if ((omObject == null))
@@ -45,7 +49,7 @@ internal PSAutoPoolSpecification(Microsoft.Azure.Batch.AutoPoolSpecification omO
4549
}
4650
this.omObject = omObject;
4751
}
48-
52+
4953
public string AutoPoolIdPrefix
5054
{
5155
get
@@ -57,7 +61,7 @@ public string AutoPoolIdPrefix
5761
this.omObject.AutoPoolIdPrefix = value;
5862
}
5963
}
60-
64+
6165
public System.Boolean? KeepAlive
6266
{
6367
get
@@ -69,7 +73,7 @@ public System.Boolean? KeepAlive
6973
this.omObject.KeepAlive = value;
7074
}
7175
}
72-
76+
7377
public Microsoft.Azure.Batch.Common.PoolLifetimeOption PoolLifetimeOption
7478
{
7579
get
@@ -81,12 +85,12 @@ public Microsoft.Azure.Batch.Common.PoolLifetimeOption PoolLifetimeOption
8185
this.omObject.PoolLifetimeOption = value;
8286
}
8387
}
84-
88+
8589
public PSPoolSpecification PoolSpecification
8690
{
8791
get
8892
{
89-
if (((this.poolSpecification == null)
93+
if (((this.poolSpecification == null)
9094
&& (this.omObject.PoolSpecification != null)))
9195
{
9296
this.poolSpecification = new PSPoolSpecification(this.omObject.PoolSpecification);

0 commit comments

Comments
 (0)