Skip to content

Commit 52e89b4

Browse files
Merge branch 'master' into network-june
2 parents 87ff4f8 + 00bc26d commit 52e89b4

File tree

202 files changed

+179825
-216200
lines changed

Some content is hidden

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

202 files changed

+179825
-216200
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.6.1 - August 2020
2+
#### Az.Compute
3+
* Patched '-EncryptionAtHost' parameter in 'New-AzVm' to remove default value of false [#12776]
4+
15
## 4.6.0 - August 2020
26
#### Az.Accounts
37
* Loaded all public cloud environments when discovery endpoint doesn't return default AzureCloud or other public environments [#12633]

documentation/development-docs/examples/remove-cmdlet-example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace Microsoft.Azure.Commands.Service
168168
if (this.ShouldProcess(this.Name, string.Format("Deleting ChildResource '{0}' in resource group '{1}' under parent TopLevelResource '{2}'.", this.Name, this.ResourceGroupName, this.TopLevelResourceName)))
169169
{
170170
this.MySDKClient.ChildResource.Delete(this.ResourceGroupName, this.TopLevelResourceName, this.Name);
171-
if (this.IsPassThru.IsPresent)
171+
if (this.PassThru.IsPresent)
172172
{
173173
WriteObject(true);
174174
}

src/Accounts/Accounts/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+
* Formatted the breaking change messages
2122
* Updated Azure.Core to 1.4.1
2223

2324
## Version 1.9.3

src/AlertsManagement/AlertsManagement/help/Get-AzAlert.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ PS C:\> Get-AzAlert -AlertId "afbf1b3a-0a6c-4f19-9c9b-644ccd7b1529" | Format-Lis
5555

5656
Get Alert details by Id (GUID) or Resource Id (Complete ARM Id)
5757

58+
### Example 3
59+
60+
Get Alerts Information. (autogenerated)
61+
62+
<!-- Aladdin Generated Example -->
63+
```powershell
64+
Get-AzAlert -IncludeContext $true -TimeRange '1h'
65+
```
66+
5867
## PARAMETERS
5968

6069
### -AlertId

src/Attestation/Attestation/help/Reset-AzAttestationPolicy.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ PS C:\> Reset-AzAttestationPolicy -Name pshtest -ResourceGroupName psh-test-rg -
3636

3737
Reset the policy to the default for the Attestation Provider *pshtest* for Tee type *SgxEnclave*.
3838

39+
### Example 2
40+
```powershell
41+
PS C:\> $resetJwt = Get-Content -Path .\reset.policy.txt.signed.txt
42+
PS C:\> Reset-AzAttestationPolicy -Name pshtest -ResourceGroupName psh-test-rg -Tee SgxEnclave -Policy $resetJwt
43+
```
44+
45+
If the Attestation Provider *pshtest* is configured to use the isolated trust model, reset the policy to the default for Tee type *SgxEnclave* by including a signed policy.
46+
3947
## PARAMETERS
4048

4149
### -DefaultProfile

src/CognitiveServices/CognitiveServices/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+
* Show additional legal terms for certain APIs.
2122

2223
## Version 1.5.1
2324
* Used `Deny` specifically as NetworkRules default action.

src/CognitiveServices/CognitiveServices/CognitiveServices.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,10 @@
1414
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="7.3.0-preview" />
1515
</ItemGroup>
1616

17+
<ItemGroup>
18+
<Compile Update="Properties\Resources.Designer.cs">
19+
<DesignTime>True</DesignTime>
20+
</Compile>
21+
</ItemGroup>
22+
1723
</Project>

src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/NewAzureCognitiveServicesAccount.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,24 @@ public override void ExecuteCmdlet()
245245
}
246246
}
247247
}
248+
249+
if (Type.Equals("Face", StringComparison.InvariantCultureIgnoreCase) || Type.Equals("CognitiveServices", StringComparison.InvariantCultureIgnoreCase))
250+
{
251+
if (Force.IsPresent)
252+
{
253+
WriteWarning(Resources.NewAccount_LegalTerm_NotPolice);
254+
}
255+
else
256+
{
257+
bool yesToAll = false, noToAll = false;
258+
if (!ShouldContinue(Resources.NewAccount_LegalTerm_NotPolice, "Notice", true, ref yesToAll, ref noToAll))
259+
{
260+
return;
261+
}
262+
}
263+
}
264+
265+
248266
try
249267
{
250268
CognitiveServicesAccount createAccountResponse = CognitiveServicesClient.Accounts.Create(

src/CognitiveServices/CognitiveServices/Properties/Resources.Designer.cs

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CognitiveServices/CognitiveServices/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@
120120
<data name="NewAccountKey_ProcessMessage" xml:space="preserve">
121121
<value>Regenerating Key {0} for account {1}.</value>
122122
</data>
123+
<data name="NewAccount_LegalTerm_NotPolice" xml:space="preserve">
124+
<value>I certify that use of this service is not by or for a police department in the United States.</value>
125+
</data>
123126
<data name="NewAccount_Notice" xml:space="preserve">
124127
<value>Microsoft will use data you send to Bing Search Services to improve Microsoft products and services. Where you send personal data to these Cognitive Services, you are responsible for obtaining sufficient consent from the data subjects. The General Privacy and Security Terms in the Online Services Terms do not apply to these Cognitive Services. Please refer to the Microsoft Cognitive Services section in the Online Services Terms (https://www.microsoft.com/en-us/Licensing/product-licensing/products.aspx) for details. Microsoft offers policy controls that may be used to disable new Cognitive Services deployments (https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account).</value>
125128
</data>

src/Compute/Compute.Test/Compute.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<PsModuleName>Compute</PsModuleName>
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="38.0.0" />
15+
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="38.1.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.0.0" />
1717
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
1818
</ItemGroup>

src/Compute/Compute.Test/ScenarioTests/DedicatedHostTests.ps1

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ function Test-DedicatedHost
2424
try
2525
{
2626
# Common
27-
[string]$loc = Get-ComputeVMLocation;
27+
[string]$loc = Get-Location "Microsoft.Resources" "resourceGroups" "East US 2 EUAP";
2828
$loc = $loc.Replace(' ', '');
2929

3030
New-AzResourceGroup -Name $rgname -Location $loc -Force;
3131

3232
# Create a VM first
3333
$hostGroupName = $rgname + 'hostgroup'
34-
New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 1 -Zone "1" -Tag @{key1 = "val1"};
34+
New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 1 -Zone "2" -Tag @{key1 = "val1"};
3535

3636
$hostGroup = Get-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName;
3737

@@ -40,15 +40,13 @@ function Test-DedicatedHost
4040
Assert-AreEqual $loc $hostGroup.Location;
4141
Assert-True { $hostGroup.Tags.Keys.Contains("key1") };
4242
Assert-AreEqual "val1" $hostGroup.Tags["key1"];
43-
Assert-True { $hostGroup.Zones.Contains("1") };
43+
Assert-True { $hostGroup.Zones.Contains("2") };
4444
Assert-AreEqual 0 $hostGroup.Hosts.Count;
45+
Assert-AreEqual $true $hostGroup.SupportAutomaticPlacement;
4546

4647
$hostGroups = Get-AzHostGroup -ResourceGroupName $rgname;
4748
Assert-AreEqual 1 $hostGroups.Count;
4849

49-
$hostGroups = Get-AzHostGroup;
50-
Assert-True { $hostGroups.Count -ge 1 };
51-
5250
$hostName = $rgname + 'host'
5351
New-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Location $loc -Sku "ESv3-Type1" -Tag @{key1 = "val2"};
5452

@@ -81,7 +79,7 @@ function Test-DedicatedHost
8179

8280
$hostGroupInstanceViewResult = Get-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -InstanceView;
8381
Assert-NotNull $hostGroupInstanceViewResult.Hosts;
84-
foreach ($hostInstanceViewWithName in $hostGroupInstanceViewResult.Hosts) {
82+
foreach ($hostInstanceViewWithName in $hostGroupInstanceViewResult.InstanceView.Hosts) {
8583
Assert-NotNull $hostInstanceViewWithName.Name;
8684
}
8785

@@ -129,15 +127,18 @@ function Test-DedicatedHostVirtualMachine
129127
try
130128
{
131129
# Common
132-
[string]$loc = Get-ComputeVMLocation;
130+
[string]$loc = Get-Location "Microsoft.Resources" "resourceGroups" "East US 2 EUAP";
133131
$loc = $loc.Replace(' ', '');
134132

135133
New-AzResourceGroup -Name $rgname -Location $loc -Force;
136134

137135
# Create a VM first
138136
$hostGroupName = $rgname + 'hostgroup'
139-
New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 2 -Zone "1" -Tag @{key1 = "val1"};
140-
137+
New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 2 -Zone "2" -SupportAutomaticPlacement $false -Tag @{key1 = "val1"};
138+
$hostGroup = Get-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName;
139+
140+
Assert-AreEqual $false $hostGroup.SupportAutomaticPlacement;
141+
141142
$hostName = $rgname + 'host'
142143
New-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Location $loc -Sku "ESv3-Type1" -PlatformFaultDomain 1 -Tag @{key1 = "val2"};
143144

@@ -154,7 +155,7 @@ function Test-DedicatedHostVirtualMachine
154155
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
155156
[string]$domainNameLabel = "$vmname0-$vmname0".tolower();
156157

157-
New-AzVM -ResourceGroupName $rgname -Name $vmname0 -Credential $cred -Zone "1" -Size $vmsize -HostId $dedicatedHostId -DomainNameLabel $domainNameLabel;
158+
New-AzVM -ResourceGroupName $rgname -Name $vmname0 -Credential $cred -Zone "2" -Size $vmsize -HostId $dedicatedHostId -DomainNameLabel $domainNameLabel;
158159
$vm0 = Get-AzVM -ResourceGroupName $rgname -Name $vmname0;
159160
Assert-AreEqual $dedicatedHostId $vm0.Host.Id;
160161

@@ -164,7 +165,7 @@ function Test-DedicatedHostVirtualMachine
164165
$subnet = New-AzVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24";
165166
$vnet = New-AzVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -Subnet $subnet;
166167
$subnetId = $vnet.Subnets[0].Id;
167-
$pubip = New-AzPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -Zone "1" -Sku "Standard" -AllocationMethod "Static" -DomainNameLabel ('pubip' + $rgname);
168+
$pubip = New-AzPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -Zone "2" -Sku "Standard" -AllocationMethod "Static" -DomainNameLabel ('pubip' + $rgname);
168169
$pubipId = $pubip.Id;
169170
$nic = New-AzNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id;
170171
$nicId = $nic.Id;
@@ -176,7 +177,7 @@ function Test-DedicatedHostVirtualMachine
176177
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
177178
$computerName = 'test';
178179

179-
$p = New-AzVMConfig -VMName $vmname1 -VMSize $vmsize -Zone "1" -HostId $dedicatedHostId `
180+
$p = New-AzVMConfig -VMName $vmname1 -VMSize $vmsize -Zone "2" -HostId $dedicatedHostId `
180181
| Add-AzVMNetworkInterface -Id $nicId -Primary `
181182
| Set-AzVMOperatingSystem -Windows -ComputerName $computerName -Credential $cred;
182183

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,13 @@ public void TestSimpleNewVmssPpg()
110110
TestRunner.RunTestScript("Test-SimpleNewVmssPpg");
111111
}
112112

113+
[Fact]
114+
[Trait(Category.AcceptanceType, Category.CheckIn)]
115+
public void TestSimpleNewVmssHostGroup()
116+
{
117+
TestRunner.RunTestScript("Test-SimpleNewVmssHostGroup");
118+
}
119+
113120
[Fact]
114121
[Trait(Category.AcceptanceType, Category.CheckIn)]
115122
public void TestSimpleNewVmssBilling()

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,50 @@ function Test-SimpleNewVmssPpg
405405
}
406406
}
407407

408+
<#
409+
.SYNOPSIS
410+
Test Simple Paremeter Set With HostGroup (automatic placement)
411+
#>
412+
function Test-SimpleNewVmssHostGroup
413+
{
414+
# Setup
415+
$rgname = Get-ResourceName
416+
417+
try
418+
{
419+
# Common
420+
[string]$loc = Get-Location "Microsoft.Resources" "resourceGroups" "East US 2 EUAP";
421+
$loc = $loc.Replace(' ', '');
422+
$zone = "2"
423+
424+
# Creating the resource group
425+
New-AzResourceGroup -Name $rgname -Location $loc -Force;
426+
427+
# Hostgroup and Host
428+
$hostGroupName = $rgname + "HostGroup"
429+
$hostGroup = New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 2 -Zone $zone -SupportAutomaticPlacement $true -Tag @{key1 = "val1"};
430+
431+
$Sku = "Dsv3-Type1"
432+
$hostName = $rgname + "Host"
433+
New-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Location $loc -Sku $Sku -PlatformFaultDomain 1 -Tag @{test = "true"}
434+
435+
# Creating a new vmss
436+
$VmSku = "Standard_D2s_v3"
437+
$vmssname = "MyVmss"
438+
$username = "admin01"
439+
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force
440+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
441+
$vmss = New-AzVmss -Name $vmssname -ResourceGroup $rgname -Credential $cred -HostGroupId $hostGroup.Id -Zone $zone -VmSize $VmSku -DomainNameLabel "myvmss-48e3cf"
442+
443+
Assert-AreEqual $vmss.HostGroup.Id $hostGroup.Id
444+
}
445+
finally
446+
{
447+
# Cleanup
448+
Clean-ResourceGroup $rgname
449+
}
450+
}
451+
408452
<#
409453
.SYNOPSIS
410454
Test Simple Paremeter Set for New Vmss with eviction policy, priority, and max price.

src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,5 +178,12 @@ public void TestVirtualMachineScaleSetNewEncryptionAtHost()
178178
{
179179
TestRunner.RunTestScript("Test-VirtualMachineScaleSetEncryptionAtHost");
180180
}
181+
182+
[Fact]
183+
[Trait(Category.AcceptanceType, Category.CheckIn)]
184+
public void TestVirtualMachineScaleSetAssignedHost()
185+
{
186+
TestRunner.RunTestScript("Test-VirtualMachineScaleSetAssignedHost");
187+
}
181188
}
182189
}

src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,3 +2536,50 @@ function Test-VirtualMachineScaleSetEncryptionAtHost
25362536
Clean-ResourceGroup $rgname
25372537
}
25382538
}
2539+
2540+
<#
2541+
.SYNOPSIS
2542+
testing encryptionAtHost cmdlet for
2543+
new-azvmss - create vmss using simple parameter set and hostencryption tag.
2544+
update-azvmss test boolean parameter
2545+
new-azvmssconfig
2546+
#>
2547+
function Test-VirtualMachineScaleSetAssignedHost
2548+
{
2549+
# Setup
2550+
$rgname = Get-ComputeTestResourceName
2551+
2552+
try
2553+
{
2554+
# Common
2555+
$zone = "2"
2556+
[string]$loc = Get-Location "Microsoft.Resources" "resourceGroups" "East US 2 EUAP";
2557+
New-AzResourceGroup -Name $rgname -Location $loc -Force;
2558+
2559+
# Hostgroup and Host
2560+
$hostGroupName = $rgname + "HostGroup"
2561+
$hostGroup = New-AzHostGroup -ResourceGroupName $rgname -Name $hostGroupName -Location $loc -PlatformFaultDomain 2 -Zone $zone -SupportAutomaticPlacement $true -Tag @{key1 = "val1"};
2562+
2563+
$Sku = "Esv3-Type1"
2564+
$hostName = $rgname + "Host"
2565+
$host_ = New-AzHost -ResourceGroupName $rgname -HostGroupName $hostGroupName -Name $hostName -Location $loc -Sku $Sku -PlatformFaultDomain 1 -Tag @{test = "true"}
2566+
2567+
# Creating a new vmss
2568+
$VmSku = "Standard_E2s_v3"
2569+
$domainNameLabel = "domainlabel"
2570+
$vmssname = "MyVmss"
2571+
$username = "admin01"
2572+
$password = Get-PasswordForVM | ConvertTo-SecureString -AsPlainText -Force
2573+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
2574+
$vmss = New-AzVmss -Name $vmssname -ResourceGroup $rgname -Credential $cred -HostGroupId $hostGroup.Id -Zone $zone -VmSize $VmSku -DomainNameLabel $domainNameLabel
2575+
2576+
$vmssResult = Get-AzVmssVM -InstanceView -ResourceGroupName $rgname -VMScaleSetName $vmssname;
2577+
2578+
Assert-AreEqual $host_.Id $vmssResult[0].InstanceView.AssignedHost;
2579+
}
2580+
finally
2581+
{
2582+
# Cleanup
2583+
Clean-ResourceGroup $rgname
2584+
}
2585+
}

0 commit comments

Comments
 (0)