Skip to content

Commit da4b65f

Browse files
author
Jianghao Lu
committed
[#102958732] Renamed ARM cmdlets to start with AzureRM
1 parent e352211 commit da4b65f

File tree

236 files changed

+3318
-3318
lines changed

Some content is hidden

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

236 files changed

+3318
-3318
lines changed

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ExportAzureApiManagementApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands
2222
using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models;
2323
using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Properties;
2424

25-
[Cmdlet(VerbsData.Export, "AzureApiManagementApi", DefaultParameterSetName = ExportContentToPipeline)]
25+
[Cmdlet(VerbsData.Export, "AzureRMApiManagementApi", DefaultParameterSetName = ExportContentToPipeline)]
2626
[OutputType(typeof(string))]
2727
public class ExportAzureApiManagementApi : AzureApiManagementCmdletBase
2828
{

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Commands/ImportAzureApiManagementApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Commands
1818
using System.Management.Automation;
1919
using Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models;
2020

21-
[Cmdlet(VerbsData.Import, "AzureApiManagementApi", DefaultParameterSetName = FromLocalFile)]
21+
[Cmdlet(VerbsData.Import, "AzureRMApiManagementApi", DefaultParameterSetName = FromLocalFile)]
2222
[OutputType(typeof(PsApiManagementApi))]
2323
public class ImportAzureApiManagementApi : AzureApiManagementCmdletBase
2424
{

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

Lines changed: 50 additions & 50 deletions
Large diffs are not rendered by default.

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/ScenarioTests/Common.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ Gets all locations for a provider
5050
#>
5151
function Get-ProviderLocations($provider)
5252
{
53-
$location = Get-AzureLocation | where {$_.Name -eq $provider}
53+
$location = Get-AzureRMLocation | where {$_.Name -eq $provider}
5454
$location.Locations
5555
}

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/BackupAzureApiManagement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
2020
using Microsoft.WindowsAzure.Commands.Common.Storage;
2121

2222

23-
[Cmdlet(VerbsData.Backup, "AzureApiManagement"), OutputType(typeof(PsApiManagement))]
23+
[Cmdlet(VerbsData.Backup, "AzureRMApiManagement"), OutputType(typeof(PsApiManagement))]
2424
public class BackupAzureApiManagement : AzureApiManagementCmdletBase
2525
{
2626
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/ImportAzureApiManagementHostnameCertificate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1818
using System.Management.Automation;
1919
using Microsoft.Azure.Commands.ApiManagement.Models;
2020

21-
[Cmdlet(VerbsData.Import, "AzureApiManagementHostnameCertificate"), OutputType(typeof(PsApiManagementHostnameCertificate))]
21+
[Cmdlet(VerbsData.Import, "AzureRMApiManagementHostnameCertificate"), OutputType(typeof(PsApiManagementHostnameCertificate))]
2222
public class ImportAzureApiManagementHostnameCertificate : AzureApiManagementCmdletBase
2323
{
2424
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/RestoreAzureApiManagement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1818
using Microsoft.Azure.Commands.ApiManagement.Models;
1919
using Microsoft.WindowsAzure.Commands.Common.Storage;
2020

21-
[Cmdlet(VerbsData.Restore, "AzureApiManagement"), OutputType(typeof (PsApiManagement))]
21+
[Cmdlet(VerbsData.Restore, "AzureRMApiManagement"), OutputType(typeof (PsApiManagement))]
2222
public class RestoreAzureApiManagement : AzureApiManagementCmdletBase
2323
{
2424
[Parameter(

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementDeployment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
2020
using System.Management.Automation;
2121
using Microsoft.Azure.Commands.ApiManagement.Models;
2222

23-
[Cmdlet(VerbsData.Update, "AzureApiManagementDeployment", DefaultParameterSetName = DefaultParameterSetName), OutputType(typeof(PsApiManagement))]
23+
[Cmdlet(VerbsData.Update, "AzureRMApiManagementDeployment", DefaultParameterSetName = DefaultParameterSetName), OutputType(typeof(PsApiManagement))]
2424
public class UpdateAzureApiManagementDeployment : AzureApiManagementCmdletBase
2525
{
2626
internal const string FromPsApiManagementInstanceSetName = "Update from PsApiManagement instance";

src/ResourceManager/ApiManagement/Commands.ApiManagement/Commands/UpdateAzureApiManagementRegion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.Azure.Commands.ApiManagement.Commands
1818
using System.Management.Automation;
1919
using Microsoft.Azure.Commands.ApiManagement.Models;
2020

21-
[Cmdlet(VerbsData.Update, "AzureApiManagementRegion"), OutputType(typeof(PsApiManagement))]
21+
[Cmdlet(VerbsData.Update, "AzureRMApiManagementRegion"), OutputType(typeof(PsApiManagement))]
2222
public class UpdateAzureApiManagementRegion : AzureApiManagementCmdletBase
2323
{
2424
[Parameter(

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

Lines changed: 124 additions & 124 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ Gets all locations for a provider
5050
#>
5151
function Get-ProviderLocations($provider)
5252
{
53-
$location = Get-AzureLocation | where {$_.Name -eq $provider}
53+
$location = Get-AzureRMLocation | where {$_.Name -eq $provider}
5454
$location.Locations
5555
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2626
/// <summary>
2727
/// Gets configuration script for given configuration name and account name.
2828
/// </summary>
29-
[Cmdlet(VerbsData.Export, "AzureAutomationDscConfiguration", DefaultParameterSetName = AutomationCmdletParameterSets.ByAll)]
29+
[Cmdlet(VerbsData.Export, "AzureRMAutomationDscConfiguration", DefaultParameterSetName = AutomationCmdletParameterSets.ByAll)]
3030
[OutputType(typeof(DirectoryInfo))]
3131
public class ExportAzureAutomationDscConfiguration : AzureAutomationBaseCmdlet
3232
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2727
/// <summary>
2828
/// Gets node report for a given node and report id
2929
/// </summary>
30-
[Cmdlet(VerbsData.Export, "AzureAutomationDscNodeReportContent", DefaultParameterSetName = AutomationCmdletParameterSets.ByAll)]
30+
[Cmdlet(VerbsData.Export, "AzureRMAutomationDscNodeReportContent", DefaultParameterSetName = AutomationCmdletParameterSets.ByAll)]
3131
[OutputType(typeof(DirectoryInfo))]
3232
public class ExportAzureAutomationDscNodeReportContent : AzureAutomationBaseCmdlet
3333
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2626
/// <summary>
2727
/// Gets azure automation runbook definitions for a given account.
2828
/// </summary>
29-
[Cmdlet(VerbsData.Export, "AzureAutomationRunbook")]
29+
[Cmdlet(VerbsData.Export, "AzureRMAutomationRunbook")]
3030
[OutputType(typeof(DirectoryInfo))]
3131
public class ExportAzureAutomationRunbook : AzureAutomationBaseCmdlet
3232
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2626
/// <summary>
2727
/// Imports dsc configuration script
2828
/// </summary>
29-
[Cmdlet(VerbsData.Import, "AzureAutomationDscConfiguration")]
29+
[Cmdlet(VerbsData.Import, "AzureRMAutomationDscConfiguration")]
3030
[OutputType(typeof(DscConfiguration))]
3131
public class ImportAzureAutomationDscConfiguration : AzureAutomationBaseCmdlet
3232
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2424
/// <summary>
2525
/// Sets an azure automation runbook definition.
2626
/// </summary>
27-
[Cmdlet(VerbsData.Import, "AzureAutomationRunbook")]
27+
[Cmdlet(VerbsData.Import, "AzureRMAutomationRunbook")]
2828
[OutputType(typeof(Runbook))]
2929
public class ImportAzureAutomationRunbook : AzureAutomationBaseCmdlet
3030
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2323
/// <summary>
2424
/// Publishes an azure automation runbook.
2525
/// </summary>
26-
[Cmdlet(VerbsData.Publish, "AzureAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
26+
[Cmdlet(VerbsData.Publish, "AzureRMAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
2727
[OutputType(typeof(Runbook))]
2828
public class PublishAzureAutomationRunbook : AzureAutomationBaseCmdlet
2929
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2828
/// <summary>
2929
/// Registers the dsc node.
3030
/// </summary>
31-
[Cmdlet(VerbsLifecycle.Register, "AzureAutomationDscNode")]
31+
[Cmdlet(VerbsLifecycle.Register, "AzureRMAutomationDscNode")]
3232
// [OutputType(typeof(DscNode))]
3333
public class RegisterAzureAutomationDscNode : AzureAutomationBaseCmdlet
3434
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2323
/// <summary>
2424
/// Registers an azure automation scheduled runbook.
2525
/// </summary>
26-
[Cmdlet(VerbsLifecycle.Register, "AzureAutomationScheduledRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
26+
[Cmdlet(VerbsLifecycle.Register, "AzureRMAutomationScheduledRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
2727
[OutputType(typeof(JobSchedule))]
2828
public class RegisterAzureAutomationScheduledRunbook : AzureAutomationBaseCmdlet
2929
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2424
/// <summary>
2525
/// Gets a Credential for automation.
2626
/// </summary>
27-
[Cmdlet(VerbsLifecycle.Resume, "AzureAutomationJob")]
27+
[Cmdlet(VerbsLifecycle.Resume, "AzureRMAutomationJob")]
2828
public class ResumeAzureAutomationJob : AzureAutomationBaseCmdlet
2929
{
3030
/// <summary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2525
/// <summary>
2626
/// starts azure automation compilation job
2727
/// </summary>
28-
[Cmdlet(VerbsLifecycle.Start, "AzureAutomationDscCompilationJob")]
28+
[Cmdlet(VerbsLifecycle.Start, "AzureRMAutomationDscCompilationJob")]
2929
[OutputType(typeof(CompilationJob))]
3030
public class StartAzureAutomationDscCompilationJob : AzureAutomationBaseCmdlet
3131
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2525
/// <summary>
2626
/// Starts an Azure automation runbook.
2727
/// </summary>
28-
[Cmdlet(VerbsLifecycle.Start, "AzureAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
28+
[Cmdlet(VerbsLifecycle.Start, "AzureRMAutomationRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByRunbookName)]
2929
[OutputType(typeof(Job))]
3030
public class StartAzureAutomationRunbook : AzureAutomationBaseCmdlet
3131
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2424
/// <summary>
2525
/// Gets a Credential for automation.
2626
/// </summary>
27-
[Cmdlet(VerbsLifecycle.Stop, "AzureAutomationJob")]
27+
[Cmdlet(VerbsLifecycle.Stop, "AzureRMAutomationJob")]
2828
public class StopAzureAutomationJob : AzureAutomationBaseCmdlet
2929
{
3030
/// <summary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2424
/// <summary>
2525
/// Gets a Credential for automation.
2626
/// </summary>
27-
[Cmdlet(VerbsLifecycle.Suspend, "AzureAutomationJob")]
27+
[Cmdlet(VerbsLifecycle.Suspend, "AzureRMAutomationJob")]
2828
public class SuspendAzureAutomationJob : AzureAutomationBaseCmdlet
2929
{
3030
/// <summary>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2828
/// <summary>
2929
/// Removes the dsc node.
3030
/// </summary>
31-
[Cmdlet(VerbsLifecycle.Unregister, "AzureAutomationDscNode")]
31+
[Cmdlet(VerbsLifecycle.Unregister, "AzureRMAutomationDscNode")]
3232
[OutputType(typeof(DscNode))]
3333
public class UnregisterAzureAutomationDscNode : AzureAutomationBaseCmdlet
3434
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.Azure.Commands.Automation.Cmdlet
2525
/// <summary>
2626
/// Unregisters an azure automation scheduled runbook.
2727
/// </summary>
28-
[Cmdlet(VerbsLifecycle.Unregister, "AzureAutomationScheduledRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByJobScheduleId)]
28+
[Cmdlet(VerbsLifecycle.Unregister, "AzureRMAutomationScheduledRunbook", DefaultParameterSetName = AutomationCmdletParameterSets.ByJobScheduleId)]
2929
public class UnregisterAzureAutomationScheduledRunbook : AzureAutomationBaseCmdlet
3030
{
3131
/// <summary>

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.ps1

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Tests querying for a Batch account that does not exist throws
1818
#>
1919
function Test-GetNonExistingBatchAccount
2020
{
21-
Assert-Throws { Get-AzureBatchAccount -Name "accountthatdoesnotexist" }
21+
Assert-Throws { Get-AzureRMBatchAccount -Name "accountthatdoesnotexist" }
2222
}
2323

2424
<#
@@ -34,11 +34,11 @@ function Test-CreatesNewBatchAccount
3434

3535
try
3636
{
37-
New-AzureResourceGroup -Name $resourceGroup -Location $location
37+
New-AzureRMResourceGroup -Name $resourceGroup -Location $location
3838

3939
# Test
40-
$actual = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
41-
$expected = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup
40+
$actual = New-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
41+
$expected = Get-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup
4242

4343
# Assert
4444
Assert-AreEqual $expected.AccountName $actual.AccountName
@@ -67,12 +67,12 @@ function Test-CreateExistingBatchAccount
6767

6868
try
6969
{
70-
New-AzureResourceGroup -Name $resourceGroup -Location $location
70+
New-AzureRMResourceGroup -Name $resourceGroup -Location $location
7171

7272
# Test
73-
New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
73+
New-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
7474

75-
Assert-Throws { New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location }
75+
Assert-Throws { New-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location }
7676
}
7777
finally
7878
{
@@ -99,15 +99,15 @@ function Test-UpdatesExistingBatchAccount
9999

100100
try
101101
{
102-
New-AzureResourceGroup -Name $resourceGroup -Location $location
102+
New-AzureRMResourceGroup -Name $resourceGroup -Location $location
103103

104104
#Test
105-
$new = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = $tagName1; Value = $tagValue1}
105+
$new = New-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = $tagName1; Value = $tagValue1}
106106
Assert-AreEqual 1 $new.Tags.Count
107107

108108
# Update Tag
109-
$actual = Set-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Tag @{Name = $tagName2; Value = $tagValue2}
110-
$expected = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup
109+
$actual = Set-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Tag @{Name = $tagName2; Value = $tagValue2}
110+
$expected = Get-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup
111111

112112
# Assert
113113
Assert-AreEqual $expected.AccountName $actual.AccountName
@@ -144,15 +144,15 @@ function Test-GetBatchAccountsUnderResourceGroups
144144

145145
try
146146
{
147-
New-AzureResourceGroup -Name $resourceGroup1 -Location $location1
148-
New-AzureResourceGroup -Name $resourceGroup2 -Location $location1
149-
New-AzureBatchAccount -Name $account11 -ResourceGroupName $resourceGroup1 -Location $location1
150-
New-AzureBatchAccount -Name $account12 -ResourceGroupName $resourceGroup1 -Location $location2
151-
New-AzureBatchAccount -Name $account21 -ResourceGroupName $resourceGroup2 -Location $location3
147+
New-AzureRMResourceGroup -Name $resourceGroup1 -Location $location1
148+
New-AzureRMResourceGroup -Name $resourceGroup2 -Location $location1
149+
New-AzureRMBatchAccount -Name $account11 -ResourceGroupName $resourceGroup1 -Location $location1
150+
New-AzureRMBatchAccount -Name $account12 -ResourceGroupName $resourceGroup1 -Location $location2
151+
New-AzureRMBatchAccount -Name $account21 -ResourceGroupName $resourceGroup2 -Location $location3
152152

153153
# Test
154-
$allAccounts = Get-AzureBatchAccount | Where-Object {$_.ResourceGroupName -eq $resourceGroup1 -or $_.ResourceGroupName -eq $resourceGroup2}
155-
$resourceGroup1Accounts = Get-AzureBatchAccount -ResourceGroupName $resourceGroup1
154+
$allAccounts = Get-AzureRMBatchAccount | Where-Object {$_.ResourceGroupName -eq $resourceGroup1 -or $_.ResourceGroupName -eq $resourceGroup2}
155+
$resourceGroup1Accounts = Get-AzureRMBatchAccount -ResourceGroupName $resourceGroup1
156156

157157
# Assert
158158
Assert-AreEqual 3 $allAccounts.Count
@@ -184,16 +184,16 @@ function Test-CreateAndRemoveBatchAccountViaPiping
184184

185185
try
186186
{
187-
New-AzureResourceGroup -Name $resourceGroup -Location $location1
187+
New-AzureRMResourceGroup -Name $resourceGroup -Location $location1
188188

189189
# Test
190-
New-AzureBatchAccount -Name $account1 -ResourceGroupName $resourceGroup -Location $location1
191-
New-AzureBatchAccount -Name $account2 -ResourceGroupName $resourceGroup -Location $location2
192-
Get-AzureBatchAccount | where {$_.AccountName -eq $account1 -or $_.AccountName -eq $account2} | Remove-AzureBatchAccount -Force
190+
New-AzureRMBatchAccount -Name $account1 -ResourceGroupName $resourceGroup -Location $location1
191+
New-AzureRMBatchAccount -Name $account2 -ResourceGroupName $resourceGroup -Location $location2
192+
Get-AzureRMBatchAccount | where {$_.AccountName -eq $account1 -or $_.AccountName -eq $account2} | Remove-AzureRMBatchAccount -Force
193193

194194
# Assert
195-
Assert-Throws { Get-AzureBatchAccount -Name $account1 }
196-
Assert-Throws { Get-AzureBatchAccount -Name $account2 }
195+
Assert-Throws { Get-AzureRMBatchAccount -Name $account1 }
196+
Assert-Throws { Get-AzureRMBatchAccount -Name $account2 }
197197
}
198198
finally
199199
{
@@ -214,17 +214,17 @@ function Test-BatchAccountKeys
214214

215215
try
216216
{
217-
New-AzureResourceGroup -Name $resourceGroup -Location $location
217+
New-AzureRMResourceGroup -Name $resourceGroup -Location $location
218218

219219
# Test
220-
$new = New-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
221-
$originalKeys = Get-AzureBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup
220+
$new = New-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
221+
$originalKeys = Get-AzureRMBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup
222222
$originalPrimaryKey = $originalKeys.PrimaryAccountKey
223223
$originalSecondaryKey = $originalKeys.SecondaryAccountKey
224-
$newPrimary = New-AzureBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Primary
225-
$newSecondary = New-AzureBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Secondary
226-
$finalKeys = Get-AzureBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup
227-
$getAccountResult = Get-AzureBatchAccount -Name $account -ResourceGroupName $resourceGroup
224+
$newPrimary = New-AzureRMBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Primary
225+
$newSecondary = New-AzureRMBatchAccountKey -Name $account -ResourceGroupName $resourceGroup -KeyType Secondary
226+
$finalKeys = Get-AzureRMBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup
227+
$getAccountResult = Get-AzureRMBatchAccount -Name $account -ResourceGroupName $resourceGroup
228228

229229
# Assert
230230
Assert-AreEqual $null $new.PrimaryAccountKey

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/Common.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Gets the location for the Batch account provider. Default to West US if none fou
3636
#>
3737
function Get-BatchAccountProviderLocation($index)
3838
{
39-
$location = Get-AzureLocation | where {$_.Name -eq "Microsoft.Batch/batchAccounts"}
39+
$location = Get-AzureRMLocation | where {$_.Name -eq "Microsoft.Batch/batchAccounts"}
4040
if ($location -eq $null)
4141
{
4242
"West US"
@@ -72,7 +72,7 @@ function Clean-BatchAccount($accountName,$resourceGroup)
7272
{
7373
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
7474
{
75-
Remove-AzureBatchAccount -Name $accountName -ResourceGroupName $resourceGroup -Force
75+
Remove-AzureRMBatchAccount -Name $accountName -ResourceGroupName $resourceGroup -Force
7676
}
7777
}
7878

@@ -84,6 +84,6 @@ function Clean-ResourceGroup($resourceGroup)
8484
{
8585
if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
8686
{
87-
Remove-AzureResourceGroup -Name $resourceGroup -Force
87+
Remove-AzureRMResourceGroup -Name $resourceGroup -Force
8888
}
8989
}

0 commit comments

Comments
 (0)