Skip to content

Commit 8c7ba4a

Browse files
author
Klein Hu
committed
Merge branch 'release-1.5.0' of https://github.com/azure/azure-powershell into preparePR
2 parents 2f890c5 + 7b41a66 commit 8c7ba4a

File tree

641 files changed

+79565
-62106
lines changed

Some content is hidden

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

641 files changed

+79565
-62106
lines changed

ChangeLog.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,55 @@
1+
##2016.06.01 version 1.5.0
2+
* Azure Resource Manager
3+
- (Get/Set/New/Remove)-AzureRmResourceGroup cmdlets will now use the new autorest generated ARM assembly
4+
- (Get/New/Remove)-AzureRmResourceGroupDeployment cmdlets will now use the new autorest generated ARM assembly
5+
- (Get/Register)-AzureRmProviderFeature cmdlets will now use the new autorest generated ARM assembly
6+
- (Get/Register/Unregister)-AzureRmResourceProvider cmdlets will now use the new autorest generated ARM assembly
7+
- Use a constant backoff interval when polling for deployment progress in New-AzureRmResourceGroupDeployment cmdlet
8+
- Add support to specify file share paths for cmdlets that take input file as parameter
9+
- Improve error message when Move-AzureRmResource cmdlet fails
10+
- Improve error message when New-AzureRmResourceGroupDeployment cmdlet fails
11+
- Enable object and array type parameters for template deployment
12+
- Preserve casing for resource properties in New/Set-AzureRmResource cmdlet
13+
- PropertyObject parameter is now optional in New-AzureRmResource cmdlet
14+
* Azure Compute (CRP)
15+
- Add additional validation for fixed vhd in Add-AzureRmVhd cmdlet
16+
- Add -ForceRerun parameter to Set-AzureRmVMCustomExtension, Set-AzureRmVMBginfoExtension, and Set-AzureRmAccessExtension
17+
- Update -VhdUri parameter from optional to mandatory (bug fix)
18+
- Remove GeoReplicationEnabled deprecation warning message for Get-AzureStorageAccount cmdlet
19+
- Fix piping issue for Remove-AzureRmExtension
20+
- Create one storage account for Boot diagnostics (one for each location, instead of one for each resource group)
21+
- Add -DiskSizeInGB paramter to Set-AzureRmVMOSDisk cmdlet
22+
- Show operation id and status for POST Async cmdlets.
23+
- Fix Remove-AzureRmNetworkInterface issue for not throwing error when all NICs are removed.
24+
- Fix 'Type' output for List cmdlet
25+
- Remove xmlCfg contents from output format.
26+
- Show warning message for upcoming breaking update of Tag fix.
27+
- Change Set-AzureBootDiagnostics cmdlets name to Set-AzureVMBootDiagnostics (and set alias)
28+
* Azure Compute (ASM)
29+
- Storage Migration cmdlet (Move-AzureStorageAccount)
30+
- Fix Add-AzureCertificate issue
31+
* Azure Storage
32+
* Fix get Storage Account throttling failures when run it on subscription with many accounts
33+
- Get-AzureRmStorageAccount
34+
- Get-AzureStorageAccount
35+
* Azure Batch
36+
* Added Batch account usage cmdlets
37+
- Get-BatchPoolUsageMetrics
38+
- Get-BatchPoolStatistics
39+
- Get-BatchJobStatistics
40+
* Added application packages and task dependencies cmdlets
41+
- Get-AzureRmBatchApplication
42+
- Get-AzureRmBatchApplicationPackage
43+
- New-AzureRmBatchApplication
44+
- New-AzureRmBatchApplicationPackage
45+
- Set-AzureRmBatchApplication
46+
- Remove-AzureRmBatchApplicationPackage
47+
- Remove-AzureRmBatchApplication
48+
* Added bulk task option to New-AzureBatchTask cmdlet
49+
150
##2016.05.04 version 1.4.0
251
* Azure Resource Manager
3-
- Get-AzureRmLocation cmdley: New cmdlet Lists all public Azure locatiosn with available provider namespaces
52+
- Get-AzureRmLocation cmdlet: New cmdlet Lists all public Azure locatiosn with available provider namespaces
453
- Get-AzureRMResourceGroupDeploymentOperations: Improved output format
554
- Get-AzureRMDeployment: Responses contain all error details
655
- Added cmdlet help anbd examples

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - May 2016" ?>
4+
<?define productName="Microsoft Azure PowerShell - June 2016" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="1.4.0" ?>
8+
<?define version="1.5.0" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

setup/azurecmdfiles.wxi

Lines changed: 209 additions & 7 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Authentication.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828

2929
[assembly: ComVisible(false)]
3030
[assembly: CLSCompliant(false)]
31-
[assembly: AssemblyVersion("1.4.0")]
32-
[assembly: AssemblyFileVersion("1.4.0")]
31+
[assembly: AssemblyVersion("1.5.0")]
32+
[assembly: AssemblyFileVersion("1.5.0")]
3333
[assembly: CollectionBehavior(DisableTestParallelization = true)]

src/Common/Commands.Common.Authentication/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
// You can specify all the values or you can default the Build and Revision Numbers
4747
// by using the '*' as shown below:
4848
// [assembly: AssemblyVersion("1.0.*")]
49-
[assembly: AssemblyVersion("1.4.0")]
50-
[assembly: AssemblyFileVersion("1.4.0")]
49+
[assembly: AssemblyVersion("1.5.0")]
50+
[assembly: AssemblyFileVersion("1.5.0")]

src/Common/Commands.Common.Storage/AzureStorageContext.cs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,42 @@ public class AzureStorageContext
2828
/// <summary>
2929
/// Storage account name used in this context
3030
/// </summary>
31-
public string StorageAccountName { get; private set; }
31+
public string StorageAccountName { get; protected set; }
3232

3333
/// <summary>
3434
/// Blob end point of the storage context
3535
/// </summary>
36-
public string BlobEndPoint { get; private set; }
36+
public virtual string BlobEndPoint { get; protected set; }
3737

3838
/// <summary>
3939
/// Table end point of the storage context
4040
/// </summary>
41-
public string TableEndPoint { get; private set; }
41+
public virtual string TableEndPoint { get; protected set; }
4242

4343
/// <summary>
4444
/// Queue end point of the storage context
4545
/// </summary>
46-
public string QueueEndPoint { get; private set; }
46+
public virtual string QueueEndPoint { get; protected set; }
47+
48+
/// <summary>
49+
/// File end point of the storage context
50+
/// </summary>
51+
public virtual string FileEndPoint { get; protected set; }
4752

4853
/// <summary>
4954
/// Self reference, it could enable New-AzureStorageContext can be used in pipeline
5055
/// </summary>
51-
public AzureStorageContext Context { get; private set; }
56+
public AzureStorageContext Context { get; protected set; }
5257

5358
/// <summary>
5459
/// Name place holder, and force pipeline to ignore this property
5560
/// </summary>
56-
public string Name { get; private set; }
61+
public virtual string Name { get; protected set; }
5762

5863
/// <summary>
5964
/// Storage account in context
6065
/// </summary>
61-
public CloudStorageAccount StorageAccount { get; private set; }
66+
public virtual CloudStorageAccount StorageAccount { get; protected set; }
6267

6368
/// <summary>
6469
/// Endpoint suffix (everything after "table.", "blob." or "queue.")
@@ -70,41 +75,31 @@ public string EndPointSuffix
7075
{
7176
get
7277
{
73-
if (string.IsNullOrEmpty(BlobEndPoint) || string.IsNullOrEmpty(TableEndPoint))
78+
if (!string.IsNullOrEmpty(BlobEndPoint))
7479
{
75-
return string.Empty;
80+
string blobSpliter = "blob.";
81+
if (BlobEndPoint.LastIndexOf(blobSpliter) >= 0)
82+
return BlobEndPoint.Substring(BlobEndPoint.LastIndexOf(blobSpliter) + blobSpliter.Length);
7683
}
77-
78-
string suffix;
79-
80-
if (StorageAccountName.EndsWith("blob", StringComparison.InvariantCultureIgnoreCase))
84+
if (!string.IsNullOrEmpty(TableEndPoint))
8185
{
82-
// Cannot use the blob endpoint if the account name ends with blob...
83-
// However it is OK if "blob" is in the account name but not as a suffix
84-
int tableIndex = TableEndPoint.IndexOf("table.", 0, StringComparison.InvariantCultureIgnoreCase);
85-
if (tableIndex <= 0)
86-
{
87-
suffix = string.Empty;
88-
}
89-
else
90-
{
91-
suffix = TableEndPoint.Substring(tableIndex + "table.".Length);
92-
}
86+
string tableSpliter = "table.";
87+
if (TableEndPoint.LastIndexOf(tableSpliter) >= 0)
88+
return TableEndPoint.Substring(TableEndPoint.LastIndexOf(tableSpliter) + tableSpliter.Length);
9389
}
94-
else
90+
if (!string.IsNullOrEmpty(QueueEndPoint))
9591
{
96-
int blobIndex = BlobEndPoint.IndexOf("blob.", 0, StringComparison.InvariantCultureIgnoreCase);
97-
if (blobIndex <= 0)
98-
{
99-
suffix = string.Empty;
100-
}
101-
else
102-
{
103-
suffix = BlobEndPoint.Substring(blobIndex + "blob.".Length);
104-
}
92+
string queueSpliter = "queue.";
93+
if (QueueEndPoint.LastIndexOf(queueSpliter) >= 0)
94+
return QueueEndPoint.Substring(QueueEndPoint.LastIndexOf(queueSpliter) + queueSpliter.Length);
10595
}
106-
107-
return suffix;
96+
if (!string.IsNullOrEmpty(FileEndPoint))
97+
{
98+
string fileSpliter = "file.";
99+
if (FileEndPoint.LastIndexOf(fileSpliter) >= 0)
100+
return FileEndPoint.Substring(FileEndPoint.LastIndexOf(fileSpliter) + fileSpliter.Length);
101+
}
102+
return string.Empty;
108103
}
109104
}
110105

@@ -131,6 +126,11 @@ public AzureStorageContext(CloudStorageAccount account)
131126
QueueEndPoint = account.QueueEndpoint.ToString();
132127
}
133128

129+
if (account.FileEndpoint != null)
130+
{
131+
FileEndPoint = account.FileEndpoint.ToString();
132+
}
133+
134134
StorageAccountName = account.Credentials.AccountName;
135135
Context = this;
136136
Name = String.Empty;
@@ -152,7 +152,7 @@ public AzureStorageContext(CloudStorageAccount account)
152152
/// Proivides a private constructor for building empty instance which
153153
/// contains no account information.
154154
/// </summary>
155-
private AzureStorageContext()
155+
protected AzureStorageContext()
156156
{
157157
}
158158

src/Common/Commands.Common.Storage/Commands.Common.Storage.csproj

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,12 @@
107107
<SpecificVersion>False</SpecificVersion>
108108
<HintPath>..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
109109
</Reference>
110-
<Reference Include="Microsoft.WindowsAzure.Configuration">
111-
<SpecificVersion>False</SpecificVersion>
112-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.0\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath>
113-
</Reference>
114110
<Reference Include="Microsoft.WindowsAzure.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115111
<SpecificVersion>False</SpecificVersion>
116112
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
117113
</Reference>
118114
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
119-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
115+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
120116
</Reference>
121117
<Reference Include="Microsoft.WindowsAzure.Storage, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
122118
<SpecificVersion>False</SpecificVersion>
@@ -154,6 +150,7 @@
154150
<Reference Include="System.Xml" />
155151
</ItemGroup>
156152
<ItemGroup>
153+
<Compile Include="LazyAzureStorageContext.cs" />
157154
<Compile Include="AzureStorageContext.cs" />
158155
<Compile Include="BlobUploadParameters.cs" />
159156
<Compile Include="IStorageClientWrapper.cs" />
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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;
16+
using Microsoft.WindowsAzure.Storage;
17+
18+
namespace Microsoft.WindowsAzure.Commands.Common.Storage
19+
{
20+
public class LazyAzureStorageContext : AzureStorageContext
21+
{
22+
Func<string, CloudStorageAccount> _factory;
23+
CloudStorageAccount _account = null;
24+
public LazyAzureStorageContext(Func<string, CloudStorageAccount> accountFactory, string accountName)
25+
{
26+
_factory = accountFactory;
27+
Name = accountName;
28+
Context = this;
29+
StorageAccountName = accountName;
30+
}
31+
32+
public override string BlobEndPoint
33+
{
34+
get
35+
{
36+
return StorageAccount.BlobEndpoint.ToString();
37+
}
38+
}
39+
public override string TableEndPoint
40+
{
41+
get
42+
{
43+
return StorageAccount.TableEndpoint.ToString();
44+
}
45+
}
46+
47+
public override string QueueEndPoint
48+
{
49+
get
50+
{
51+
return StorageAccount.QueueEndpoint.ToString();
52+
}
53+
}
54+
55+
public override string FileEndPoint
56+
{
57+
get
58+
{
59+
return StorageAccount.FileEndpoint.ToString();
60+
}
61+
}
62+
63+
public override CloudStorageAccount StorageAccount
64+
{
65+
get
66+
{
67+
if (_account == null)
68+
{
69+
_account = _factory(StorageAccountName);
70+
}
71+
72+
return _account;
73+
}
74+
}
75+
}
76+
}
77+

src/Common/Commands.Common.Storage/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
[assembly: ComVisible(false)]
2525
[assembly: CLSCompliant(false)]
2626
[assembly: Guid("c565107e-98a9-4703-85cd-a7efc3d8da7b")]
27-
[assembly: AssemblyVersion("1.4.0")]
28-
[assembly: AssemblyFileVersion("1.4.0")]
27+
[assembly: AssemblyVersion("1.5.0")]
28+
[assembly: AssemblyFileVersion("1.5.0")]

src/Common/Commands.Common.Storage/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.0.1-preview" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
21-
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
21+
<package id="Microsoft.WindowsAzure.Management.Storage" version="6.0.0" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2323
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
2424
<package id="WindowsAzure.Storage" version="6.1.0" targetFramework="net45" />

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class AzurePowerShell
2626

2727
public const string AssemblyCopyright = "Copyright © Microsoft";
2828

29-
public const string AssemblyVersion = "1.4.0";
29+
public const string AssemblyVersion = "1.5.0";
3030

31-
public const string AssemblyFileVersion = "1.4.0";
31+
public const string AssemblyFileVersion = "1.5.0";
3232

3333
public const string ProfileFile = "AzureProfile.json";
3434

src/Common/Commands.Common/CmdletExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static string ResolvePath(this PSCmdlet psCmdlet, string path)
5858

5959
if (result != null && result.Count > 0)
6060
{
61-
fullPath = result[0].Path;
61+
fullPath = result[0].ProviderPath;
6262
}
6363

6464
return fullPath;

src/Common/Commands.Common/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
[assembly: ComVisible(false)]
2626
[assembly: CLSCompliant(false)]
2727
[assembly: Guid("4f3ab2e4-cc7a-43ac-bb15-f481fcf94d58")]
28-
[assembly: AssemblyVersion("1.4.0")]
29-
[assembly: AssemblyFileVersion("1.4.0")]
28+
[assembly: AssemblyVersion("1.5.0")]
29+
[assembly: AssemblyFileVersion("1.5.0")]
3030
#if SIGN
3131
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
3232
[assembly: InternalsVisibleTo("Microsoft.WindowsAzure.Commands.CloudService, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]

src/Common/Commands.ScenarioTests.Common/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class Category
5858

5959
public const string Network = "Network";
6060

61+
public const string DevTestLabs = "DevTestLabs";
62+
6163
// Owners
6264
public const string OneSDK = "OneSDK";
6365

src/Common/Commands.ScenarioTests.Common/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.4.0")]
36-
[assembly: AssemblyFileVersion("1.4.0")]
35+
[assembly: AssemblyVersion("1.5.0")]
36+
[assembly: AssemblyFileVersion("1.5.0")]
3737
[assembly: CollectionBehavior(DisableTestParallelization = true)]

0 commit comments

Comments
 (0)