Skip to content

Commit 38149a1

Browse files
Merge branch 'master' into vmHealthFieldInVMInstanceView
2 parents 8f0c34d + 61d1aaa commit 38149a1

File tree

49 files changed

+19341
-1828
lines changed

Some content is hidden

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

49 files changed

+19341
-1828
lines changed

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/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/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()

0 commit comments

Comments
 (0)