Skip to content

Commit ae71a0b

Browse files
Merge pull request #1 from markcowl/acemod
Move ManagementPartner cmdlets into separate module
2 parents 7722405 + b0aacb1 commit ae71a0b

File tree

145 files changed

+15405
-46852
lines changed

Some content is hidden

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

145 files changed

+15405
-46852
lines changed

TestMappings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
".\\src\\ResourceManager\\AnalysisServices\\Commands.AnalysisServices.Test\\bin\\Debug\\Microsoft.Azure.Commands.AnalysisServices.Test.dll"
1616
],
1717
"src/ResourceManager/ApiManagement/": [
18-
".\\src\\ResourceManager\\ApiManagement\\Commands.ApiManagement.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.Test.dll"
18+
".\\src\\ResourceManager\\ApiManagement\\Commands.ApiManagement.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.Test.dll",
19+
".\\src\\ResourceManager\\ApiManagement\\Commands.SMAPI.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Test.dll"
1920
],
2021
"src/ResourceManager/ApplicationInsights/": [
2122
".\\src\\ResourceManager\\ApplicationInsights\\Commands.ApplicationInsights.Test\\bin\\Debug\\Microsoft.Azure.Commands.ApplicationInsights.Test.dll"

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/ScenarioTests/ApiManagementTests.ps1

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function Api-ImportExportWadlTest {
164164

165165
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
166166

167-
$wadlPath = "./Resources/WADLYahoo.xml"
167+
$wadlPath = "$TestOutputRoot/Resources/WADLYahoo.xml"
168168
$path = "wadlapi"
169169
$wadlApiId = getAssetName
170170

@@ -196,7 +196,7 @@ function Api-ImportExportSwaggerTest {
196196

197197
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
198198

199-
$swaggerPath = "./Resources/SwaggerPetStoreV2.json"
199+
$swaggerPath = "$TestOutputRoot/Resources/SwaggerPetStoreV2.json"
200200
$swaggerUrl = "http://petstore.swagger.io/v2/swagger.json"
201201
$path1 = "swaggerapifromFile"
202202
$path2 = "swaggerapifromUrl"
@@ -241,7 +241,7 @@ function Api-ImportExportWsdlTest {
241241

242242
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
243243

244-
$wsdlPath1 = "./Resources/Weather.wsdl"
244+
$wsdlPath1 = "$TestOutputRoot/Resources/Weather.wsdl"
245245
$wsdlUrl = "http://www.webservicex.net/stockquote.asmx?WSDL"
246246
$path1 = "soapapifromFile"
247247
$path2 = "soapapifromUrl"
@@ -295,7 +295,7 @@ function Api-ImportWsdlToCreateSoapToRestApi {
295295

296296
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
297297

298-
$wsdlPath1 = "./Resources/Weather.wsdl"
298+
$wsdlPath1 = "$TestOutputRoot/Resources/Weather.wsdl"
299299
$path1 = "soapToRestApi"
300300
$wsdlApiId1 = getAssetName
301301
$wsdlServiceName1 = "Weather" # from file Weather.wsdl
@@ -1092,10 +1092,10 @@ function Policy-CrudTest {
10921092

10931093
# load from file get to pipeline scenarios
10941094

1095-
$tenantValidPath = "./Resources/TenantValidPolicy.xml"
1096-
$productValidPath = "./Resources/ProductValidPolicy.xml"
1097-
$apiValidPath = "./Resources/ApiValidPolicy.xml"
1098-
$operationValidPath = "./Resources/OperationValidPolicy.xml"
1095+
$tenantValidPath = "$TestOutputRoot/Resources/TenantValidPolicy.xml"
1096+
$productValidPath = "$TestOutputRoot/Resources/ProductValidPolicy.xml"
1097+
$apiValidPath = "$TestOutputRoot/Resources/ApiValidPolicy.xml"
1098+
$operationValidPath = "$TestOutputRoot/Resources/OperationValidPolicy.xml"
10991099

11001100
$context = New-AzureRmApiManagementContext -ResourceGroupName $resourceGroupName -ServiceName $serviceName
11011101

@@ -1180,9 +1180,9 @@ function Policy-CrudTest {
11801180
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $tenantValid -PassThru
11811181
Assert-AreEqual $true $set
11821182

1183-
Get-AzureRmApiManagementPolicy -Context $context -SaveAs 'TenantPolicy.xml' -Force
1184-
$exists = [System.IO.File]::Exists('TenantPolicy.xml')
1185-
$policy = gc 'TenantPolicy.xml'
1183+
Get-AzureRmApiManagementPolicy -Context $context -SaveAs "$TestOutputRoot/TenantPolicy.xml" -Force
1184+
$exists = [System.IO.File]::Exists("$TestOutputRoot/TenantPolicy.xml")
1185+
$policy = gc "$TestOutputRoot/TenantPolicy.xml"
11861186
Assert-True {$policy -like '*<find-and-replace from="aaa" to="BBB" />*'}
11871187
}
11881188
finally {
@@ -1200,9 +1200,9 @@ function Policy-CrudTest {
12001200
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $productValid -ProductId $product.ProductId -PassThru
12011201
Assert-AreEqual $true $set
12021202

1203-
Get-AzureRmApiManagementPolicy -Context $context -ProductId $product.ProductId -SaveAs 'ProductPolicy.xml' -Force
1204-
$exists = [System.IO.File]::Exists('ProductPolicy.xml')
1205-
$policy = gc 'ProductPolicy.xml'
1203+
Get-AzureRmApiManagementPolicy -Context $context -ProductId $product.ProductId -SaveAs "$TestOutputRoot/ProductPolicy.xml" -Force
1204+
$exists = [System.IO.File]::Exists("$TestOutputRoot/ProductPolicy.xml")
1205+
$policy = gc "$TestOutputRoot/ProductPolicy.xml"
12061206
Assert-True {$policy -like '*<rate-limit calls="5" renewal-period="60" />*'}
12071207
}
12081208
finally {
@@ -1213,7 +1213,7 @@ function Policy-CrudTest {
12131213
Assert-Null $policy
12141214

12151215
try {
1216-
rm 'ProductPolicy.xml'
1216+
rm "$TestOutputRoot/ProductPolicy.xml"
12171217
}
12181218
catch {}
12191219
}
@@ -1225,9 +1225,9 @@ function Policy-CrudTest {
12251225
$set = Set-AzureRmApiManagementPolicy -Context $context -Policy $apiValid -ApiId $api.ApiId -PassThru
12261226
Assert-AreEqual $true $set
12271227

1228-
$policy = Get-AzureRmApiManagementPolicy -Context $context -ApiId $api.ApiId -SaveAs 'ApiPolicy.xml' -Force
1229-
$exists = [System.IO.File]::Exists('ApiPolicy.xml')
1230-
$policy = gc 'ApiPolicy.xml'
1228+
$policy = Get-AzureRmApiManagementPolicy -Context $context -ApiId $api.ApiId -SaveAs "$TestOutputRoot/ApiPolicy.xml" -Force
1229+
$exists = [System.IO.File]::Exists("$TestOutputRoot/ApiPolicy.xml")
1230+
$policy = gc "$TestOutputRoot/ApiPolicy.xml"
12311231
Assert-True {$policy -like '*<cache-lookup vary-by-developer="false" vary-by-developer-groups="false" downstream-caching-type="none">*'}
12321232
}
12331233
finally {
@@ -1238,7 +1238,7 @@ function Policy-CrudTest {
12381238
Assert-Null $policy
12391239

12401240
try {
1241-
rm 'ApiPolicy.xml'
1241+
rm "$TestOutputRoot/ApiPolicy.xml"
12421242
}
12431243
catch {}
12441244
}
@@ -1253,9 +1253,9 @@ function Policy-CrudTest {
12531253
Assert-AreEqual $true $set
12541254

12551255
$policy = Get-AzureRmApiManagementPolicy -Context $context -ApiId $api.ApiId -OperationId $operation.OperationId `
1256-
-SaveAs 'OperationPolicy.xml' -Force
1257-
$exists = [System.IO.File]::Exists('OperationPolicy.xml')
1258-
$policy = gc 'OperationPolicy.xml'
1256+
-SaveAs "$TestOutputRoot/OperationPolicy.xml" -Force
1257+
$exists = [System.IO.File]::Exists("$TestOutputRoot/OperationPolicy.xml")
1258+
$policy = gc "$TestOutputRoot/OperationPolicy.xml"
12591259
Assert-True {$policy -like '*<rewrite-uri template="/resource" />*'}
12601260
}
12611261
finally {
@@ -1266,7 +1266,7 @@ function Policy-CrudTest {
12661266
Assert-Null $policy
12671267

12681268
try {
1269-
rm 'OperationPolicy.xml'
1269+
rm "$TestOutputRoot/OperationPolicy.xml"
12701270
}
12711271
catch {}
12721272
}
@@ -2057,7 +2057,7 @@ function Backend-CrudTest {
20572057
Assert-AreEqual 1 $backend.Properties.Count
20582058
Assert-NotNull $backend.Proxy
20592059
Assert-AreEqual $backend.Proxy.Url "http://12.168.1.1:8080"
2060-
Assert-NotNull $backend.Proxy.ProxyCredential
2060+
Assert-NotNull $backend.Proxy.ProxyCredentials
20612061
}
20622062
finally {
20632063
# remove created backend

src/ResourceManager/Automation/AzureRM.Automation.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ CmdletsToExport = 'Get-AzureRMAutomationHybridWorkerGroup',
135135
# VariablesToExport = @()
136136

137137
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
138-
AliasesToExport = @()
138+
AliasesToExport = 'Import-AzureRmAutomationModule'
139139

140140
# DSC resources to export from this module
141141
# DscResourcesToExport = @()

src/ResourceManager/Automation/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+
* Added alias from New-AzureRmAutomationModule to Import-AzureRmAutomationModule
2122

2223
## Version 4.2.0
2324
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

src/ResourceManager/Automation/Commands.Automation/Cmdlet/NewAzureAutomationModule.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2424
/// </summary>
2525
[Cmdlet(VerbsCommon.New, "AzureRmAutomationModule")]
2626
[OutputType(typeof(Module))]
27+
[Alias("Import-AzureRmAutomationModule")]
2728
public class NewAzureAutomationModule : AzureAutomationBaseCmdlet
2829
{
2930
/// <summary>

src/ResourceManager/Automation/Commands.Automation/Commands.Automation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<SubType>Designer</SubType>
204204
</None>
205205
<None Include="StartupScripts\*.ps1">
206-
<!-- <CopyToOutputDirectory>Always</CopyToOutputDirectory> -->
206+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
207207
</None>
208208
</ItemGroup>
209209
<ItemGroup>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
@{
16+
"Import-AzureRmAutomationModule" = "New-AzureRmAutomationModule";
17+
}.GetEnumerator() | Select @{Name='Name'; Expression={$_.Key}}, @{Name='Value'; Expression={$_.Value}} | Set-Alias -Description "AzureAlias" -Scope Global | Out-Null

src/ResourceManager/Automation/Commands.Automation/StartupScripts/sample.ps1

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/ResourceManager/Compute.ManagedService/Commands.Compute.ManagedService/Tools/ConvertTo-AzureRmVhd.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function ExecuteCmdlet($HyperVVMName, $ExportPath, $HyperVServer, $Force)
158158
}
159159
}
160160

161-
if ($PSCmdlet.ShouldProcess($Name, "Converting a Hyper-V VM to Azure supported VHD file(s)..."))
161+
if ($PSCmdlet.ShouldProcess($HyperVVMName, "Converting a Hyper-V VM to Azure supported VHD file(s)..."))
162162
{
163163
$vhdFiles = Export-DiskFiles $HyperVServer $HyperVVMName $ExportPath;
164164

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,28 @@ public void TestAEMExtensionBasicWindowsWAD()
3131
}
3232

3333
[Fact]
34+
[Trait(Category.AcceptanceType, Category.CheckIn)]
3435
public void TestAEMExtensionBasicWindows()
3536
{
3637
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionBasicWindows");
3738
}
3839

3940
[Fact]
41+
[Trait(Category.AcceptanceType, Category.CheckIn)]
4042
public void TestAEMExtensionBasicLinuxWAD()
4143
{
4244
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionBasicLinuxWAD");
4345
}
4446

4547
[Fact]
48+
[Trait(Category.AcceptanceType, Category.CheckIn)]
4649
public void TestAEMExtensionBasicLinux()
4750
{
4851
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionBasicLinux");
4952
}
5053

5154
[Fact]
55+
[Trait(Category.AcceptanceType, Category.CheckIn)]
5256
public void TestAEMExtensionAdvancedWindowsWAD()
5357
{
5458
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedWindowsWAD");
@@ -61,12 +65,14 @@ public void TestAEMExtensionAdvancedWindows()
6165
}
6266

6367
[Fact]
68+
[Trait(Category.AcceptanceType, Category.CheckIn)]
6469
public void TestAEMExtensionAdvancedLinuxWAD()
6570
{
6671
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedLinuxWAD");
6772
}
6873

6974
[Fact]
75+
[Trait(Category.AcceptanceType, Category.CheckIn)]
7076
public void TestAEMExtensionAdvancedLinux()
7177
{
7278
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedLinux");
@@ -79,20 +85,21 @@ public void TestAEMExtensionAdvancedWindowsMD()
7985
}
8086

8187
[Fact]
88+
[Trait(Category.AcceptanceType, Category.CheckIn)]
8289
public void TestAEMExtensionAdvancedLinuxMD()
8390
{
8491
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedLinuxMD");
8592
}
8693

87-
[Trait(Category.AcceptanceType, Category.CheckIn)]
8894
[Fact]
95+
[Trait(Category.AcceptanceType, Category.CheckIn)]
8996
public void TestAEMExtensionAdvancedLinuxMD_ESeries()
9097
{
9198
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedLinuxMD_E");
9299
}
93100

94-
[Trait(Category.AcceptanceType, Category.CheckIn)]
95101
[Fact]
102+
[Trait(Category.AcceptanceType, Category.CheckIn)]
96103
public void TestAEMExtensionAdvancedLinuxMD_DSeries()
97104
{
98105
ComputeTestController.NewInstance.RunPsTest("Test-AEMExtensionAdvancedLinuxMD_D");

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ public DiskRPTests(Xunit.Abstractions.ITestOutputHelper output)
2525
}
2626

2727
[Fact]
28+
[Trait(Category.AcceptanceType, Category.CheckIn)]
2829
public void TestDisk()
2930
{
3031
ComputeTestController.NewInstance.RunPsTest("Test-Disk");
3132
}
3233

3334

3435
[Fact]
36+
[Trait(Category.AcceptanceType, Category.CheckIn)]
3537
public void TestSnapshot()
3638
{
3739
ComputeTestController.NewInstance.RunPsTest("Test-Snapshot");

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using Microsoft.IdentityModel.Clients.ActiveDirectory;
22
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
3+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
34
using System;
45
using System.Collections.Generic;
56
using System.IO;
@@ -15,6 +16,7 @@ public RunnerTests(Xunit.Abstractions.ITestOutputHelper output)
1516
}
1617

1718
[Fact]
19+
[Trait(Category.AcceptanceType, Category.CheckIn)]
1820
public void ExecuteRunnerTests()
1921
{
2022
var mode = Environment.GetEnvironmentVariable("AZURE_TEST_MODE");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public StrategiesVirtualMachineTests(Xunit.Abstractions.ITestOutputHelper output
2626
}
2727

2828
[Fact]
29-
[Trait(Category.RunType, Category.CheckIn)]
29+
[Trait(Category.AcceptanceType, Category.CheckIn)]
3030
public void TestSimpleNewVm()
3131
{
3232
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVm");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public StrategiesVmssTests(Xunit.Abstractions.ITestOutputHelper output)
2626
}
2727

2828
[Fact]
29-
[Trait(Category.RunType, Category.CheckIn)]
29+
[Trait(Category.AcceptanceType, Category.CheckIn)]
3030
public void TestSimpleNewVmss()
3131
{
3232
ComputeTestController.NewInstance.RunPsTest("Test-SimpleNewVmss");

src/ResourceManager/ContainerInstance/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Apply Azure Container Instance SDK 2018-02-01
22+
- Support DNS name label
2123

2224
## Version 0.2.2
2325
* Added Location Completer to -Location parameters allowing tab completion through valid Locations

src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/Commands.ContainerInstance.Test.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
4848
</Reference>
4949
<Reference Include="Microsoft.Azure.Management.ContainerInstance, Version=0.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
50-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ContainerInstance.1.0.1-preview\lib\net452\Microsoft.Azure.Management.ContainerInstance.dll</HintPath>
50+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ContainerInstance.1.0.2-preview\lib\net452\Microsoft.Azure.Management.ContainerInstance.dll</HintPath>
5151
<Private>True</Private>
5252
</Reference>
5353
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -193,6 +193,9 @@
193193
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests\TestCreateContainerGroup.json">
194194
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
195195
</None>
196+
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests\TestCreateContainerGroupWithDnsNameLabel.json" >
197+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
198+
</None>
196199
<None Include="SessionRecords\Microsoft.Azure.Commands.ContainerInstance.Test.ScenarioTests.ContainerInstanceTests\TestCreateContainerGroupWithVolume.json">
197200
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
198201
</None>

src/ResourceManager/ContainerInstance/Commands.ContainerInstance.Test/ScenarioTests/ContainerInstanceTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,12 @@ public void TestCreateContainerGroupWithVolume()
4949
{
5050
TestController.NewInstance.RunPowerShellTest("Test-AzureRmContainerGroupWithVolumeMount");
5151
}
52+
53+
[Fact]
54+
[Trait(Category.AcceptanceType, Category.CheckIn)]
55+
public void TestCreateContainerGroupWithDnsNameLabel()
56+
{
57+
TestController.NewInstance.RunPowerShellTest("Test-AzureRmContainerGroupWithDnsNameLabel");
58+
}
5259
}
5360
}

0 commit comments

Comments
 (0)