Skip to content

Commit d11c418

Browse files
committed
Merge branch 'preview' of https://github.com/Azure/azure-powershell into remove-xml-help
# Conflicts: # src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj # src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.dll-Help.xml # src/ResourceManager/Sql/Commands.Sql/help/New-AzureRmSqlElasticPool.md
2 parents 63f2a98 + 0458675 commit d11c418

File tree

26 files changed

+10031
-6915
lines changed

26 files changed

+10031
-6915
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ For Storage, this change log is located at `src\Storage\ChangeLog.md`.
117117

118118
#### Breaking Changes
119119

120-
Breaking changes should **not** be introduced into the repository without giving customers at least six months notice. For a description of breaking changes in Azure PowerShell, see [here](https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes.md).
120+
Breaking changes should **not** be introduced into the repository without giving customers at least six months notice. For a description of breaking changes in Azure PowerShell, see [here](https://github.com/Azure/azure-powershell/blob/dev/documentation/breaking-changes/breaking-changes-definition.md).
121121

122122
Whenever a service team announces a breaking change, they must add it to the `upcoming-breaking-changes.md` file in their respective service folder. When the service team is ready to release the module with the breaking change, they must move the corresponding information from `upcoming-breaking-changes.md` into the `current-breaking-changes.md` file located in their service folder.
123123

@@ -179,4 +179,4 @@ The following guidelines must be followed in pull requests that make changes to
179179
- Only one parameter should use `ValueFromPipeline` per parameter set; parameters from different parameter sets may have this attribute, but should not be convertible
180180
- No parameter is of type `object`
181181
- Each management cmdlet should have a parameter set that takes `ResourceGroupName` and `Name` from the pipeline by property value
182-
- For a given resource type, it should be possible to pipe the output of `Get` and `New` cmdlets to the input of `Set`, `Update`, `Remove` and other action cmdlets for that resource
182+
- For a given resource type, it should be possible to pipe the output of `Get` and `New` cmdlets to the input of `Set`, `Update`, `Remove` and other action cmdlets for that resource

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This repository contains a set of PowerShell cmdlets for developers and administ
77
* For documentation on how to build and deploy applications to Microsoft Azure please see the [Microsoft Azure Documentation Center](https://azure.microsoft.com/en-us/documentation/).
88
* For comprehensive documentation on the developer cmdlets see [How to install and configure Azure PowerShell](https://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/).
99
* For comprehensive documentation on the full set of Microsoft Azure cmdlets see [Microsoft Azure Management Center](http://go.microsoft.com/fwlink/?linkID=254459&clcid=0x409).
10+
* For suggesting improvements, join our improvement discussion ([#3692](https://github.com/Azure/azure-powershell/issues/3692)).
1011

1112
## Features
1213

documentation/Using-Azure-TestFramework.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
1. This starts VS Dev command prompt in PowerShell
1818
2. Import module that helps in performing basic repository tasks
1919
1. Import-Module Repo-Tasks.psd1
20-
2. Type Get-Commands -Module Repo-Tasks to see list of cmdlets
20+
2. Type Get-Command -Module Repo-Tasks to see list of cmdlets
2121
3. Get-Help <CommandName> to get help on individual commands.
2222

23-
## 2. Accquring TestFramework
23+
## 2. Acquiring TestFramework
2424

2525
TestFramework is available on NuGet at https://www.nuget.org/packages/Microsoft.Rest.ClientRuntime.Azure.TestFramework/ .
2626

src/Common/Commands.Common/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,11 +1472,11 @@ The file needs to be a PowerShell script (.ps1 or .psm1).</value>
14721472
<value>Microsoft Azure PowerShell collects data about how users use PowerShell cmdlets and some problems they encounter. Microsoft uses this information to improve our PowerShell cmdlets. Participation is voluntary and when you choose to participate your device automatically sends information to Microsoft about how you use Azure PowerShell.
14731473

14741474
If you choose to participate, you can stop at any time by using Azure PowerShell as follows:
1475-
1. Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureResourceManager module
1475+
1. Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module
14761476
To disable data collection: PS &gt; Disable-AzureDataCollection
14771477

14781478
If you choose to not participate, you can enable at any time by using Azure PowerShell as follows:
1479-
1. Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureResourceManager module
1479+
1. Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module
14801480
To enable data collection: PS &gt; Enable-AzureDataCollection
14811481

14821482
Select Y to enable data collection [Y/N]:</value>

src/ResourceManager/Common/Commands.ResourceManager.Common/Properties/Resources.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@
136136
<value>Microsoft Azure PowerShell collects data about how users use PowerShell cmdlets and some problems they encounter. Microsoft uses this information to improve our PowerShell cmdlets. Participation is voluntary and when you choose to participate your device automatically sends information to Microsoft about how you use Azure PowerShell.
137137

138138
If you choose to participate, you can stop at any time by using Azure PowerShell as follows:
139-
1. Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureResourceManager module
139+
1. Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the AzureRM.Profile module
140140
To disable data collection: PS &gt; Disable-AzureDataCollection
141141

142142
If you choose to not participate, you can enable at any time by using Azure PowerShell as follows:
143-
1. Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureResourceManager module
143+
1. Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the AzureRM.Profile module
144144
To enable data collection: PS &gt; Enable-AzureDataCollection
145145

146146
Select Y to enable data collection [Y/N]:</value>

src/ResourceManager/Compute/Commands.Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.AEMExtensionTests/TestAEMExtensionAdvancedWindowsMD.json

Lines changed: 5722 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
44
<PropertyGroup>
@@ -52,6 +52,9 @@
5252
<SpecificVersion>False</SpecificVersion>
5353
<HintPath>..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.dll</HintPath>
5454
</Reference>
55+
<Reference Include="AutoMapper.Net4, Version=3.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
56+
<HintPath>..\..\..\packages\AutoMapper.3.1.1\lib\net40\AutoMapper.Net4.dll</HintPath>
57+
</Reference>
5558
<Reference Include="Hyak.Common">
5659
<HintPath>..\..\..\packages\Hyak.Common.1.0.3\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
5760
</Reference>

src/ResourceManager/DataLakeStore/ChangeLog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
Please leave this section at the top of the change log.
33
44
Changes for the current release should go under the section titled "Current Release", and should adhere to the following format:
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* For `Import-AzureRMDataLakeStoreItem` and `Export-AzureRMDataLakeStoreItem` trace logging has been disabled by default to improve performance. If trace logging is desired please use the `-DiagnosticLogLevel` and `-DiagnosticLogPath` parameters
2122

2223
## Version 3.6.0
2324
* Add support for head and tail to the `Get-AzureRMDataLakeStoreItemContent` cmdlet. This enables returning the top N or last N new line delimited rows to be displayed.

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ExportAzureRmDataLakeStoreItem.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using Microsoft.Rest.Azure;
1919
using System.Management.Automation;
2020
using Microsoft.IdentityModel.Clients.ActiveDirectory;
21+
using Microsoft.Rest;
2122

2223
namespace Microsoft.Azure.Commands.DataLakeStore
2324
{
@@ -148,6 +149,7 @@ public override void ExecuteCmdlet()
148149
DataLakeStoreTraceLogger logger = null;
149150
var originalLevel = AdalTrace.TraceSource.Switch.Level;
150151
var originalLegacyLevel = AdalTrace.LegacyTraceSwitch.Level;
152+
var previousTracing = ServiceClientTracing.IsEnabled;
151153
try
152154
{
153155
if (ParameterSetName.Equals(DiagnosticParameterSetName) && DiagnosticLogLevel != LogLevel.None)
@@ -156,6 +158,13 @@ public override void ExecuteCmdlet()
156158
logger = new DataLakeStoreTraceLogger(this, diagnosticPath, DiagnosticLogLevel);
157159
}
158160

161+
if (logger == null)
162+
{
163+
// if the caller does not explicitly want logging, we will explicitly turn it off
164+
// for performance reasons
165+
ServiceClientTracing.IsEnabled = false;
166+
}
167+
159168
if (type == FileType.FILE)
160169
{
161170
DataLakeStoreFileSystemClient.CopyFile(powerShellReadyPath, Account, Path.TransformedPath, CmdletCancellationToken,
@@ -173,6 +182,8 @@ public override void ExecuteCmdlet()
173182
}
174183
finally
175184
{
185+
// set service client tracing back always
186+
ServiceClientTracing.IsEnabled = previousTracing;
176187
if (logger != null)
177188
{
178189
// dispose and free the logger.

src/ResourceManager/DataLakeStore/Commands.DataLakeStore/Commands/ImportAzureRmDataLakeStoreItem.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.DataLakeStore.Models;
1616
using Microsoft.Azure.Commands.DataLakeStore.Properties;
1717
using Microsoft.IdentityModel.Clients.ActiveDirectory;
18+
using Microsoft.Rest;
1819
using System.IO;
1920
using System.Management.Automation;
2021

@@ -153,6 +154,7 @@ public override void ExecuteCmdlet()
153154
DataLakeStoreTraceLogger logger = null;
154155
var originalLevel = AdalTrace.TraceSource.Switch.Level;
155156
var originalLegacyLevel = AdalTrace.LegacyTraceSwitch.Level;
157+
var previousTracing = ServiceClientTracing.IsEnabled;
156158
try
157159
{
158160
if (ParameterSetName.Equals(DiagnosticParameterSetName) && DiagnosticLogLevel != LogLevel.None)
@@ -161,6 +163,13 @@ public override void ExecuteCmdlet()
161163
logger = new DataLakeStoreTraceLogger(this, diagnosticPath, DiagnosticLogLevel);
162164
}
163165

166+
if (logger == null)
167+
{
168+
// if the caller does not explicitly want logging, we will explicitly turn it off
169+
// for performance reasons
170+
ServiceClientTracing.IsEnabled = false;
171+
}
172+
164173
if (Directory.Exists(powerShellSourcePath))
165174
{
166175
DataLakeStoreFileSystemClient.CopyDirectory(
@@ -200,6 +209,8 @@ public override void ExecuteCmdlet()
200209
}
201210
finally
202211
{
212+
// set service client tracing back always
213+
ServiceClientTracing.IsEnabled = previousTracing;
203214
if (logger != null)
204215
{
205216
// dispose and free the logger.

src/ResourceManager/IotHub/Commands.IotHub/Common/IotHubUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static class IotHubUtils
2626
{
2727
const string TotalDeviceCountMetricName = "TotalDeviceCount";
2828
const string UnlimitedString = "Unlimited";
29-
const string IotHubConnectionStringTemplate = "HostName={0};ShareAccessKeyName={1};SharedAccessKey={2}";
29+
const string IotHubConnectionStringTemplate = "HostName={0};SharedAccessKeyName={1};SharedAccessKey={2}";
3030

3131
public static T2 ConvertObject<T1, T2>(T1 iotHubObject)
3232
{

src/ResourceManager/KeyVault/Commands.KeyVault.Test/Scripts/VaultCertificateTests.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,15 @@ function Test_NewCertificatePolicy
362362
Assert-NotNull $policy
363363
$policy = New-AzureKeyVaultCertificatePolicy -SubjectName "CN=testCertificate" -Ekus "1.0","2.0" -SecretContentType application/x-pem-file -ReuseKeyOnRenewal -Disabled -RenewAtNumberOfDaysBeforeExpiry 10 -ValidityInMonths 10 -IssuerName Self -EmailAtNumberOfDaysBeforeExpiry 15
364364
Assert-NotNull $policy
365+
366+
$customEkus = @("1.0", "2.0")
367+
$customKeyUsage = @("DecipherOnly", "KeyCertSign")
368+
$policy = New-AzureKeyVaultCertificatePolicy -SubjectName "CN=testCertificate" -Ekus $customEkus -SecretContentType application/x-pem-file -ReuseKeyOnRenewal -Disabled -RenewAtNumberOfDaysBeforeExpiry 10 -ValidityInMonths 10 -IssuerName Self -KeyUsage $customKeyUsage
369+
Assert-NotNull $policy
370+
Assert-NotNull $policy.KeyUsage
371+
Assert-True { Equal-OperationList $policy.KeyUsage $customKeyUsage }
372+
Assert-NotNull $policy.Ekus
373+
Assert-True { Equal-OperationList $policy.Ekus $customEkus }
365374
}
366375

367376
<#

src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVaultCertificatePolicy.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ protected override void ProcessRecord()
169169
var policy = new KeyVaultCertificatePolicy
170170
{
171171
DnsNames = DnsNames,
172+
KeyUsage = KeyUsage,
172173
Ekus = Ekus,
173174
Enabled = !Disabled.IsPresent,
174175
IssuerName = IssuerName,

src/ResourceManager/Network/ChangeLog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!--
1+
<!--
22
Please leave this section at the top of the change log.
33
44
Changes for the current release should go under the section titled "Current Release", and should adhere to the following format:

src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/Commands.NotificationHubs.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@
182182
<None Include="Resources\NewAuthorizationRule.json">
183183
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
184184
</None>
185+
<None Include="Resources\NewNotificationHubNoTags.json">
186+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
187+
</None>
185188
<None Include="ScenarioTests\NHServiceTests.ps1">
186189
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
187190
</None>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"Name": "TestNh",
3+
"Location": "South Central US"
4+
}

src/ResourceManager/NotificationHubs/Commands.NotificationHubs.Test/ScenarioTests/NHServiceTests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ function Test-CRUDNotificationHub
481481
Assert-AreEqual $createdNotificationHub.WnsCredential.SecretKey $pnsCredentials.WnsCredential.SecretKey
482482
Assert-AreEqual $createdNotificationHub.WnsCredential.WindowsLiveEndpoint $pnsCredentials.WnsCredential.WindowsLiveEndpoint
483483

484+
#Test NotificationHub creation with tags as null
485+
$result = New-AzureRmNotificationHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -InputFile .\Resources\NewNotificationHubNoTags.json
486+
$createdNotificationHub = Get-AzureRmNotificationHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName
487+
Assert-True {$createdNotificationHub.Count -eq 1}
488+
489+
484490
Write-Debug " Delete the NotificationHub"
485491
$delete1 = Remove-AzureRmNotificationHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName -Force
486492
$delete2 = Remove-AzureRmNotificationHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -NotificationHub $notificationHubName2 -Force

0 commit comments

Comments
 (0)