Skip to content

Commit d422bc2

Browse files
authored
Merge branch 'master' into shenglol/fix-deployment-dynamic-param-conflict-issue
2 parents fa1bc97 + 1f373a5 commit d422bc2

File tree

273 files changed

+3173968
-5107453
lines changed

Some content is hidden

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

273 files changed

+3173968
-5107453
lines changed

ChangeLog.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1+
## 3.1.0 - November 2019
2+
### Highlights since the last major release
3+
* Az.DataBoxEdge 1.0.0 released
4+
* Az.SqlVirtualMachine 1.0.0 released
5+
6+
#### Az.Compute
7+
* VM Reapply feature
8+
- Add Reapply parameter to Set-AzVM cmdlet
9+
* VM Scale Set AutomaticRepairs feature:
10+
- Add EnableAutomaticRepair, AutomaticRepairGracePeriod, and AutomaticRepairMaxInstanceRepairsPercent parameters to the following cmdlets:
11+
New-AzVmssConfig
12+
Update-AzVmss
13+
* Cross tenant gallery image support for New-AzVM
14+
* Add 'Spot' to the argument completer of Priority parameter in New-AzVM, New-AzVMConfig and New-AzVmss cmdlets
15+
* Add DiskIOPSReadWrite and DiskMBpsReadWrite parameters to Add-AzVmssDataDisk cmdlet
16+
* Change SourceImageId parameter of New-AzGalleryImageVersion cmdlet to optional
17+
* Add OSDiskImage and DataDiskImage parameters to New-AzGalleryImageVersion cmdlet
18+
* Add HyperVGeneration parameter to New-AzGalleryImageDefinition cmdlet
19+
* Add SkipExtensionsOnOverprovisionedVMs parameters to New-AzVmss, New-AzVmssConfig and Update-AzVmss cmdlets
20+
21+
#### Az.DataBoxEdge
22+
* Added cmdlet `Get-AzDataBoxEdgeOrder`
23+
- Get the Order
24+
* Added cmdlet `New-AzDataBoxEdgeOrder`
25+
- Create new Order
26+
* Added cmdlet `Remove-AzDataBoxEdgeOrder`
27+
- Remove the Order
28+
* Change in cmdlet `New-AzDataBoxEdgeShare`
29+
- Now creates Local Share
30+
* Added cmdlet `Set-AzDataBoxEdgeRole`
31+
- Now IotRole can be mapped to Share
32+
* Added cmdlet `Invoke-AzDataBoxEdgeDevice`
33+
- Invoke scan update, download update, install updates on the device
34+
* Added cmdlet `Get-AzDataBoxEdgeTrigger`
35+
- Gets the information about Triggers
36+
* Added cmdlet `New-AzDataBoxEdgeTrigger`
37+
- Create new Triggers
38+
* Added cmdlet `Remove-AzDataBoxEdgeTrigger`
39+
- Remove the Triggers
40+
41+
#### Az.DataFactory
42+
* Update ADF .Net SDK version to 4.4.0
43+
* Add parameter 'ExpressCustomSetup' for 'Set-AzureRmDataFactoryV2IntegrationRuntime' cmd to enable setup configurations and 3rd party components without custom setup script.
44+
45+
#### Az.DataLakeStore
46+
* Update documentation of Get-AzDataLakeStoreDeletedItem and Restore-AzDataLakeStoreDeletedItem
47+
48+
#### Az.EventHub
49+
* Fix for issue 10301 : Fix the SAS Token date format
50+
51+
#### Az.FrontDoor
52+
* Add MinimumTlsVersion parameter to Enable-AzFrontDoorCustomDomainHttps and New-AzFrontDoorFrontendEndpointObject
53+
* Add HealthProbeMethod and EnabledState parameters to New-AzFrontDoorHealthProbeSettingObject
54+
* Add new cmdlet to create BackendPoolsSettings objec to pass into creation/update of Front Door
55+
- New-AzFrontDoorBackendPoolsSettingObject
56+
57+
#### Az.Network
58+
* Change 'Start-AzVirtualNetworkGatewayConnectionPacketCapture.md' and 'Start-AzVirtualnetworkGatewayPacketCapture.md' FilterData option examples.
59+
60+
#### Az.PrivateDns
61+
* Updated PrivateDns .net sdk to version 1.0.0
62+
63+
#### Az.RecoveryServices
64+
* Azure Site Recovery support to select disk type at enabling protection.
65+
* Azure Site Recovery bug fix for recovery plan action edit.
66+
* Azure Backup SQL Restore support to accept filestream DBs.
67+
68+
#### Az.RedisCache
69+
* Added 'MinimumTlsVersion' parameter in 'New-AzRedisCache' and 'Set-AzRedisCache' cmdlets. Also, added 'MinimumTlsVersion' in the output of 'Get-AzRedisCache' cmdlet.
70+
* Added validation on '-Size' parameter for 'Set-AzRedisCache' and 'New-AzRedisCache' cmdlets
71+
72+
#### Az.Resources
73+
- Updated policy cmdlets to use new api version 2019-06-01 that has new EnforcementMode property in policy assignment.
74+
- Updated create policy definition help example
75+
- Fix bug Remove-AZADServicePrincipal -ServicePrincipalName, throw null reference when service principal name not found.
76+
- Fix bug New-AZADServicePrincipal, throw null reference when tenant doesn't have any subscription.
77+
- Change New-AzAdServicePrincipal to add credentials only to associated application.
78+
79+
#### Az.Sql
80+
* Added support for database ReadReplicaCount.
81+
* Fixed Set-AzSqlDatabase when zone redundancy not set
82+
183
## 3.0.0 - November 2019
284
### General
385
* Az.PrivateDns 1.0.0 released

src/AlertsManagement/AlertsManagement/help/Remove-AzActionRule.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Remove-AzActionRule
99

1010
## SYNOPSIS
11-
Deletes a action group
11+
Deletes a action rule
1212

1313
## SYNTAX
1414

src/Blueprint/Blueprint/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Bug Fix: File/folder names should be platform agnostic for Export/Import cmdlets
2122

2223
## Version 0.2.7
2324
* Bug Fix: Use user assigned identity defined in the assignment file instead of cmdlet parameter during blueprint assignment (Set- cmdlet).

src/Blueprint/Blueprint/Cmdlets/BlueprintCmdletBase.cs

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using Microsoft.Azure.Management.Internal.Resources.Models;
2525
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2626
using Provider = Microsoft.Azure.Management.Internal.ResourceManager.Version2018_05_01.Models.Provider;
27+
using System.Linq;
2728

2829
namespace Microsoft.Azure.Commands.Blueprint.Cmdlets
2930
{
@@ -175,44 +176,37 @@ protected string GetValidatedFilePath(string fileFullName)
175176
}
176177

177178
/// <summary>
178-
/// This overloaded function expects a folder path and a file name and combines them. Checks if resulting full file name exist.
179+
/// Returns the blueprint file path.
179180
/// </summary>
180-
/// <param name="inputPath"></param>
181-
/// <param name="fileName"></param>
181+
/// <param name="path"></param>
182182
/// <returns></returns>
183-
protected string GetValidatedFilePath(string path, string fileName)
183+
protected string GetValidatedFilePathForBlueprint(string path)
184184
{
185-
var resolvedPath = ResolveUserPath(path);
186-
187-
var blueprintPath = Path.Combine(resolvedPath, fileName + ".json");
188-
189-
if (!AzureSession.Instance.DataStore.FileExists(blueprintPath))
185+
var blueprintFileName = AzureSession.Instance.DataStore.GetFiles(path, "*.*", SearchOption.TopDirectoryOnly)
186+
.Select(file => Path.GetFileName(file))
187+
.FirstOrDefault(name => String.Equals(name, "blueprint.json", StringComparison.OrdinalIgnoreCase));
188+
189+
if (blueprintFileName == null)
190190
{
191191
throw new Exception(
192-
$"Cannot locate a file with the name {fileName} in: {resolvedPath}.");
192+
$"Cannot locate Blueprint.json in: {path}.");
193193
}
194194

195-
return blueprintPath;
195+
return Path.Combine(path, blueprintFileName);
196196
}
197197

198198
/// <summary>
199-
/// Combines input folder path and folder name and check if the resulting path exists.
199+
/// Returns the artifacts folder path.
200200
/// </summary>
201-
/// <param name="inputPath"></param>
202-
/// <param name="folderName"></param>
201+
/// <param name="path"></param>
203202
/// <returns></returns>
204-
protected string GetValidatedFolderPath(string path, string folderName)
203+
protected string GetValidatedFolderPathForArtifacts(string path)
205204
{
206-
var resolvedPath = ResolveUserPath(path);
207-
208-
var artifactsPath = Path.Combine(resolvedPath, folderName);
209-
210-
if (!AzureSession.Instance.DataStore.DirectoryExists(artifactsPath))
211-
{
212-
artifactsPath = null;
213-
}
205+
var artifactsFolderName = AzureSession.Instance.DataStore.GetDirectories(path)
206+
.Select(folder => Path.GetFileName(folder))
207+
.FirstOrDefault(name => String.Equals(name, "artifacts", StringComparison.OrdinalIgnoreCase));
214208

215-
return artifactsPath;
209+
return artifactsFolderName == null ? null : Path.Combine(path, artifactsFolderName);
216210
}
217211
}
218212
}

src/Blueprint/Blueprint/Cmdlets/BlueprintDefinition/BlueprintDefinitionCmdletBase.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ private async Task<string> GetManagementGroupAncestorsAsync(string subscriptionI
101101

102102
protected void ImportBlueprint(string blueprintName, string scope, string inputPath, bool force)
103103
{
104-
const string blueprintFileName = "Blueprint";
105-
var blueprintPath = GetValidatedFilePath(inputPath, blueprintFileName);
104+
var blueprintPath = GetValidatedFilePathForBlueprint(ResolveUserPath(inputPath));
106105

107106
BlueprintModel bpObject;
108107
try
@@ -170,9 +169,7 @@ protected string CreateFolderIfNotExist(string path, string folderName)
170169

171170
protected void ImportArtifacts(string blueprintName, string scope, string inputPath)
172171
{
173-
const string artifacts = "Artifacts";
174-
175-
var artifactsPath = GetValidatedFolderPath(inputPath, artifacts);
172+
var artifactsPath = GetValidatedFolderPathForArtifacts(ResolveUserPath(inputPath));
176173

177174
if (artifactsPath == null)
178175
{

src/Compute/Compute.Test/ScenarioTests/StrategiesVmssTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,12 @@ public void TestSimpleNewVmssScaleInPolicy()
123123
{
124124
TestRunner.RunTestScript("Test-SimpleNewVmssScaleInPolicy");
125125
}
126+
127+
[Fact]
128+
[Trait(Category.AcceptanceType, Category.CheckIn)]
129+
public void SimpleNewVmssSkipExtOverprovision()
130+
{
131+
TestRunner.RunTestScript("Test-SimpleNewVmssSkipExtOverprovision");
132+
}
126133
}
127134
}

src/Compute/Compute.Test/ScenarioTests/StrategiesVmssTests.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,32 @@ function Test-SimpleNewVmssScaleInPolicy
470470
Clean-ResourceGroup $vmssname
471471
}
472472
}
473+
474+
<#
475+
.SYNOPSIS
476+
Test Simple Paremeter Set for New Vmss with SkipExtensionsOnOverprovisionedVMs.
477+
#>
478+
function Test-SimpleNewVmssSkipExtOverprovision
479+
{
480+
# Setup
481+
$vmssname = Get-ResourceName
482+
483+
try
484+
{
485+
$username = "admin01"
486+
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force
487+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
488+
[string]$domainNameLabel = "$vmssname$vmssname".tolower();
489+
490+
# Common
491+
New-AzVmss -Name $vmssname -Location "westus2" -Credential $cred -DomainNameLabel $domainNameLabel `
492+
-SkipExtensionsOnOverprovisionedVMs;
493+
$vmss = Get-AzVmss -ResourceGroupName $vmssname -Name $vmssname;
494+
Assert-True { $vmss.DoNotRunExtensionsOnOverprovisionedVMs };
495+
}
496+
finally
497+
{
498+
# Cleanup
499+
Clean-ResourceGroup $vmssname
500+
}
501+
}

src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetProfileTests.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ function Test-VirtualMachineScaleSetProfile
133133
$exttype2 = 'AzureCATExtensionHandler';
134134
$extver2 = '2.2';
135135

136-
$vmss2 = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0' -UpgradePolicyMode 'Automatic' -DisableAutoRollback $false `
136+
$vmss2 = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0' -UpgradePolicyMode 'Automatic' -DisableAutoRollback $false -SkipExtensionsOnOverprovisionedVMs `
137137
| Add-AzVmssExtension -Name $extname -Publisher $publisher -Type $exttype -TypeHandlerVersion $extver -AutoUpgradeMinorVersion $false `
138138
| Add-AzVmssExtension -Name $extname2 -Publisher $publisher2 -Type $exttype2 -TypeHandlerVersion $extver2 -AutoUpgradeMinorVersion $false -ProvisionAfterExtension $extname;
139139

140140
Assert-False { $vmss2.UpgradePolicy.AutomaticOSUpgradePolicy.DisableAutomaticRollback };
141+
Assert-True { $vmss2.DoNotRunExtensionsOnOverprovisionedVMs };
141142

142143
Assert-AreEqual $extname $vmss2.VirtualMachineProfile.ExtensionProfile.Extensions[0].Name;
143144
Assert-False { $vmss2.VirtualMachineProfile.ExtensionProfile.Extensions[0].AutoUpgradeMinorVersion };

0 commit comments

Comments
 (0)