Skip to content

Commit 1184100

Browse files
committed
Merge branch 'preview' of https://github.com/Azure/azure-powershell into preview
2 parents 77b77d6 + 4824df2 commit 1184100

File tree

23 files changed

+14109
-444
lines changed

23 files changed

+14109
-444
lines changed

src/ResourceManager/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
## Current Release
21+
* Update notice.txt and notice message.
2122

2223
## Version 0.9.1
2324
* Integrate with Cognitive Services Management SDK version 3.0.0.

src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Properties/Resources.Designer.cs

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

src/ResourceManager/CognitiveServices/Commands.Management.CognitiveServices/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
<value>Regenerating Key {0} for account {1}.</value>
122122
</data>
123123
<data name="NewAccount_Notice" xml:space="preserve">
124-
<value>Microsoft will use data you send to the Cognitive Services to improve Microsoft products and services. Where you send personal data to the 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 the 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>
124+
<value>Microsoft will use data you send to Bing Search Services or the Translator Speech API 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>
125125
</data>
126126
<data name="NewAccount_ProcessMessage" xml:space="preserve">
127127
<value>Creating new Cognitive Services account {0} of type {1}, Sku {2} at location {3}.</value>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Notice
2-
Microsoft will use data you send to the Cognitive Services to improve Microsoft products and services. Where you send personal data to the 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 the 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).
2+
Microsoft will use data you send to Bing Search Services or the Translator Speech API 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).

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/StrategiesVirtualMachineTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,19 @@ public void TestSimpleNewVmWithAvailabilitySet2()
3737
{
3838
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmWithAvailabilitySet2");
3939
}
40+
41+
[Fact]
42+
[Trait(Category.AcceptanceType, Category.CheckIn)]
43+
public void TestSimpleNewVmImageName()
44+
{
45+
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmImageName");
46+
}
47+
48+
[Fact]
49+
[Trait(Category.AcceptanceType, Category.CheckIn)]
50+
public void TestSimpleNewVmImageNameMicrosoftSqlUbuntu()
51+
{
52+
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmImageNameMicrosoftSqlUbuntu");
53+
}
4054
}
4155
}

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/StrategiesVirtualMachineTests.ps1

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,69 @@ function Test-SimpleNewVmWithAvailabilitySet2
8989
Clean-ResourceGroup $rgname
9090
}
9191
}
92+
93+
94+
<#
95+
.SYNOPSIS
96+
Test Simple Paremeter Set for New Vm
97+
#>
98+
function Test-SimpleNewVmImageName
99+
{
100+
# Setup
101+
$vmname = Get-ResourceName
102+
103+
try
104+
{
105+
$username = "admin01"
106+
$password = "werWER345#%^" | ConvertTo-SecureString -AsPlainText -Force
107+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
108+
[string]$domainNameLabel = "$vmname-$vmname".tolower()
109+
110+
# Common
111+
$x = New-AzureRmVM `
112+
-Name $vmname `
113+
-Credential $cred `
114+
-DomainNameLabel $domainNameLabel `
115+
-ImageName "MicrosoftWindowsServer:WindowsServer:2016-Datacenter:2016.127.20170406"
116+
117+
Assert-AreEqual $vmname $x.Name
118+
}
119+
finally
120+
{
121+
# Cleanup
122+
Clean-ResourceGroup $vmname
123+
}
124+
}
125+
126+
127+
<#
128+
.SYNOPSIS
129+
Test Simple Paremeter Set for New Vm
130+
#>
131+
function Test-SimpleNewVmImageNameMicrosoftSqlUbuntu
132+
{
133+
# Setup
134+
$vmname = Get-ResourceName
135+
136+
try
137+
{
138+
$username = "admin01"
139+
$password = "werWER345#%^" | ConvertTo-SecureString -AsPlainText -Force
140+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
141+
[string]$domainNameLabel = "xsd3490285".tolower()
142+
143+
# Common
144+
$x = New-AzureRmVM `
145+
-Name $vmname `
146+
-Credential $cred `
147+
-DomainNameLabel $domainNameLabel `
148+
-ImageName "MicrosoftSQLServer:SQL2017-Ubuntu1604:Enterprise:latest"
149+
150+
Assert-AreEqual $vmname $x.Name
151+
}
152+
finally
153+
{
154+
# Cleanup
155+
Clean-ResourceGroup $vmname
156+
}
157+
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,12 @@ public void TestSimpleNewVmss()
3131
{
3232
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmss");
3333
}
34+
35+
[Fact]
36+
[Trait(Category.AcceptanceType, Category.CheckIn)]
37+
public void TestSimpleNewVmssImageName()
38+
{
39+
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmssImageName");
40+
}
3441
}
3542
}

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

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,43 @@ function Test-SimpleNewVmss
4747
Clean-ResourceGroup $vmssname
4848
}
4949
}
50+
51+
<#
52+
.SYNOPSIS
53+
Test Simple Paremeter Set for New Vm
54+
#>
55+
function Test-SimpleNewVmssImageName
56+
{
57+
# Setup
58+
$vmssname = Get-ResourceName
59+
60+
try
61+
{
62+
$username = "admin01"
63+
$password = "werWER345#%^" | ConvertTo-SecureString -AsPlainText -Force
64+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
65+
[string]$domainNameLabel = "$vmssname$vmssname".tolower();
66+
67+
# Common
68+
$x = New-AzureRmVmss `
69+
-Name $vmssname `
70+
-Credential $cred `
71+
-DomainNameLabel $domainNameLabel `
72+
-ImageName "MicrosoftWindowsServer:WindowsServer:2016-Datacenter:latest"
73+
74+
Assert-AreEqual $vmssname $x.Name;
75+
Assert-AreEqual $vmssname $x.ResourceGroupName;
76+
Assert-AreEqual $vmssname $x.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].Name;
77+
Assert-AreEqual $vmssname $x.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].IpConfigurations[0].Name;
78+
Assert-AreEqual "Standard_DS1_v2" $x.Sku.Name
79+
Assert-AreEqual $username $x.VirtualMachineProfile.OsProfile.AdminUsername
80+
Assert-AreEqual "2016-Datacenter" $x.VirtualMachineProfile.StorageProfile.ImageReference.Sku
81+
Assert-NotNull $x.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].IpConfigurations[0].LoadBalancerBackendAddressPools;
82+
Assert-NotNull $x.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[0].IpConfigurations[0].Subnet
83+
}
84+
finally
85+
{
86+
# Cleanup
87+
Clean-ResourceGroup $vmssname
88+
}
89+
}

0 commit comments

Comments
 (0)