@@ -21,14 +21,14 @@ function Test-GetComputeNodeById
21
21
param ([string ]$accountName , [string ]$poolId )
22
22
23
23
$context = Get-AzureRMBatchAccountKeys - Name $accountName
24
- $computeNodeId = (Get-AzureRMBatchComputeNode_ST - PoolId $poolId - BatchContext $context )[0 ].Id
24
+ $computeNodeId = (Get-AzureBatchComputeNode_ST - PoolId $poolId - BatchContext $context )[0 ].Id
25
25
26
- $computeNode = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - Id $computeNodeId - BatchContext $context
26
+ $computeNode = Get-AzureBatchComputeNode_ST - PoolId $poolId - Id $computeNodeId - BatchContext $context
27
27
28
28
Assert-AreEqual $computeNodeId $computeNode.Id
29
29
30
30
# Verify positional parameters also work
31
- $computeNode = Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context
31
+ $computeNode = Get-AzureBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context
32
32
33
33
Assert-AreEqual $computeNodeId $computeNode.Id
34
34
}
@@ -44,7 +44,7 @@ function Test-ListComputeNodesByFilter
44
44
$context = Get-AzureRMBatchAccountKeys - Name $accountName
45
45
$filter = " state eq '" + " $state " + " '"
46
46
47
- $computeNodes = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - Filter $filter - BatchContext $context
47
+ $computeNodes = Get-AzureBatchComputeNode_ST - PoolId $poolId - Filter $filter - BatchContext $context
48
48
49
49
Assert-AreEqual $matches $computeNodes.Length
50
50
foreach ($node in $computeNodes )
@@ -53,8 +53,8 @@ function Test-ListComputeNodesByFilter
53
53
}
54
54
55
55
# Verify parent object parameter set also works
56
- $pool = Get-AzureRMBatchPool_ST $poolId - BatchContext $context
57
- $computeNodes = Get-AzureRMBatchComputeNode_ST - Pool $pool - Filter $filter - BatchContext $context
56
+ $pool = Get-AzureBatchPool_ST $poolId - BatchContext $context
57
+ $computeNodes = Get-AzureBatchComputeNode_ST - Pool $pool - Filter $filter - BatchContext $context
58
58
59
59
Assert-AreEqual $matches $computeNodes.Length
60
60
foreach ($node in $computeNodes )
@@ -72,13 +72,13 @@ function Test-ListComputeNodesWithMaxCount
72
72
param ([string ]$accountName , [string ]$poolId , [string ]$maxCount )
73
73
74
74
$context = Get-AzureRMBatchAccountKeys - Name $accountName
75
- $computeNodes = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - MaxCount $maxCount - BatchContext $context
75
+ $computeNodes = Get-AzureBatchComputeNode_ST - PoolId $poolId - MaxCount $maxCount - BatchContext $context
76
76
77
77
Assert-AreEqual $maxCount $computeNodes.Length
78
78
79
79
# Verify parent object parameter set also works
80
- $pool = Get-AzureRMBatchPool_ST $poolId - BatchContext $context
81
- $computeNodes = Get-AzureRMBatchComputeNode_ST - Pool $pool - MaxCount $maxCount - BatchContext $context
80
+ $pool = Get-AzureBatchPool_ST $poolId - BatchContext $context
81
+ $computeNodes = Get-AzureBatchComputeNode_ST - Pool $pool - MaxCount $maxCount - BatchContext $context
82
82
83
83
Assert-AreEqual $maxCount $computeNodes.Length
84
84
}
@@ -92,27 +92,27 @@ function Test-ListAllComputeNodes
92
92
param ([string ]$accountName , [string ]$poolId , [string ]$count )
93
93
94
94
$context = Get-AzureRMBatchAccountKeys - Name $accountName
95
- $computeNodes = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - BatchContext $context
95
+ $computeNodes = Get-AzureBatchComputeNode_ST - PoolId $poolId - BatchContext $context
96
96
97
97
Assert-AreEqual $count $computeNodes.Length
98
98
99
99
# Verify parent object parameter set also works
100
- $pool = Get-AzureRMBatchPool_ST $poolId - BatchContext $context
101
- $computeNodes = Get-AzureRMBatchComputeNode_ST - Pool $pool - BatchContext $context
100
+ $pool = Get-AzureBatchPool_ST $poolId - BatchContext $context
101
+ $computeNodes = Get-AzureBatchComputeNode_ST - Pool $pool - BatchContext $context
102
102
103
103
Assert-AreEqual $count $computeNodes.Length
104
104
}
105
105
106
106
<#
107
107
. SYNOPSIS
108
- Tests piping Get-AzureRMBatchPool into Get-AzureRMBatchComputeNode
108
+ Tests piping Get-AzureBatchPool into Get-AzureBatchComputeNode
109
109
#>
110
110
function Test-ListComputeNodePipeline
111
111
{
112
112
param ([string ]$accountName , [string ]$poolId , [string ]$count )
113
113
114
114
$context = Get-AzureRMBatchAccountKeys - Name $accountName
115
- $computeNodes = Get-AzureRMBatchPool_ST - Id $poolId - BatchContext $context | Get-AzureRMBatchComputeNode_ST - BatchContext $context
115
+ $computeNodes = Get-AzureBatchPool_ST - Id $poolId - BatchContext $context | Get-AzureBatchComputeNode_ST - BatchContext $context
116
116
117
117
Assert-AreEqual $count $computeNodes.Count
118
118
}
@@ -131,14 +131,14 @@ function Test-RebootComputeNode
131
131
132
132
if ($usePipeline -eq ' 1' )
133
133
{
134
- Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context | Restart-AzureRMBatchComputeNode_ST - RebootOption $rebootOption - BatchContext $context
134
+ Get-AzureBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context | Restart-AzureBatchComputeNode_ST - RebootOption $rebootOption - BatchContext $context
135
135
}
136
136
else
137
137
{
138
- Restart-AzureRMBatchComputeNode_ST $poolId $computeNodeId - RebootOption $rebootOption - BatchContext $context
138
+ Restart-AzureBatchComputeNode_ST $poolId $computeNodeId - RebootOption $rebootOption - BatchContext $context
139
139
}
140
140
141
- $computeNode = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - Filter " id eq '$computeNodeId '" - BatchContext $context
141
+ $computeNode = Get-AzureBatchComputeNode_ST - PoolId $poolId - Filter " id eq '$computeNodeId '" - BatchContext $context
142
142
143
143
Assert-AreEqual ' Rebooting' $computeNode.State
144
144
}
@@ -157,14 +157,14 @@ function Test-ReimageComputeNode
157
157
158
158
if ($usePipeline -eq ' 1' )
159
159
{
160
- Get-AzureRMBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context | Reset-AzureRMBatchComputeNode_ST - ReimageOption $reimageOption - BatchContext $context
160
+ Get-AzureBatchComputeNode_ST $poolId $computeNodeId - BatchContext $context | Reset-AzureBatchComputeNode_ST - ReimageOption $reimageOption - BatchContext $context
161
161
}
162
162
else
163
163
{
164
- Reset-AzureRMBatchComputeNode_ST $poolId $computeNodeId - ReimageOption $reimageOption - BatchContext $context
164
+ Reset-AzureBatchComputeNode_ST $poolId $computeNodeId - ReimageOption $reimageOption - BatchContext $context
165
165
}
166
166
167
- $computeNode = Get-AzureRMBatchComputeNode_ST - PoolId $poolId - Filter " id eq '$computeNodeId '" - BatchContext $context
167
+ $computeNode = Get-AzureBatchComputeNode_ST - PoolId $poolId - Filter " id eq '$computeNodeId '" - BatchContext $context
168
168
169
169
Assert-AreEqual ' Reimaging' $computeNode.State
170
170
}
0 commit comments