Skip to content

Commit 8f22e14

Browse files
authored
Merge pull request AzureRT#14 from Azure/master
Sync with Azure master
2 parents 776db4a + 3f363be commit 8f22e14

File tree

5 files changed

+18052
-22274
lines changed

5 files changed

+18052
-22274
lines changed

src/Compute/Compute/help/Get-AzVM.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,13 @@ Therefore, the command gets only the instance view properties.
166166

167167
### Example 3: Get properties for all virtual machines in a resource group
168168
```
169-
PS C:\> Get-AzVM -ResourceGroupName "TEST1"
169+
PS C:\> Get-AzVM -ResourceGroupName "ResourceGroup11"
170170
171-
ResourceGroupName Name Location VmSize OsType NIC
172-
----------------- ---- -------- ------ ------ ---
173-
TEST1 test1 eastus Standard_DS1_v2 Windows test1
174-
TEST1 test2 westus Standard_DS1_v2 Windows test2
175-
TEST1 test3 eastus Standard_DS1_v2 Windows test3
171+
ResourceGroupName Name Location VmSize OsType NIC
172+
----------------- ---- -------- ------ ------ ---
173+
ResourceGroup11 test1 eastus Standard_DS1_v2 Windows test1
174+
ResourceGroup11 test2 westus Standard_DS1_v2 Windows test2
175+
ResourceGroup11 test3 eastus Standard_DS1_v2 Windows test3
176176
```
177177

178178
This command gets properties for all the virtual machines in the resource group named ResourceGroup11.
@@ -181,13 +181,13 @@ This command gets properties for all the virtual machines in the resource group
181181
```
182182
PS C:\> Get-AzVM
183183
184-
ResourceGroupName Name Location VmSize OsType NIC
185-
----------------- ---- -------- ------ ------ ---
186-
TEST1 test1 eastus Standard_DS1_v2 Windows test1
187-
TEST1 test2 westus Standard_DS1_v2 Windows test2
188-
TEST1 test3 eastus Standard_DS1_v2 Windows test3
189-
TEST2 test4 westus Standard_DS1_v2 Windows test4
190-
TEST2 test5 eastus Standard_DS1_v2 Windows test5
184+
ResourceGroupName Name Location VmSize OsType NIC
185+
----------------- ---- -------- ------ ------ ---
186+
TEST1 test1 eastus Standard_DS1_v2 Windows test1
187+
TEST1 test2 westus Standard_DS1_v2 Windows test2
188+
TEST1 test3 eastus Standard_DS1_v2 Windows test3
189+
TEST2 test4 westus Standard_DS1_v2 Windows test4
190+
TEST2 test5 eastus Standard_DS1_v2 Windows test5
191191
```
192192

193193
This command gets all the virtual machines in your subscription.
@@ -196,10 +196,10 @@ This command gets all the virtual machines in your subscription.
196196
```
197197
PS C:\> Get-AzVM -Location "westus"
198198
199-
ResourceGroupName Name Location VmSize OsType NIC
200-
----------------- ---- -------- ------ ------ ---
201-
TEST1 test2 westus Standard_DS1_v2 Windows test2
202-
TEST2 test4 westus Standard_DS1_v2 Windows test4
199+
ResourceGroupName Name Location VmSize OsType NIC
200+
----------------- ---- -------- ------ ------ ---
201+
TEST1 test2 westus Standard_DS1_v2 Windows test2
202+
TEST2 test4 westus Standard_DS1_v2 Windows test4
203203
```
204204

205205
This command gets all the virtual machines in West US region.
@@ -208,13 +208,13 @@ This command gets all the virtual machines in West US region.
208208
```
209209
PS C:\> Get-AzVM -Name test*
210210
211-
ResourceGroupName Name Location VmSize OsType NIC
212-
----------------- ---- -------- ------ ------ ---
213-
TEST1 test1 eastus Standard_DS1_v2 Windows test1
214-
TEST1 test2 westus Standard_DS1_v2 Windows test2
215-
TEST1 test3 eastus Standard_DS1_v2 Windows test3
216-
TEST2 test4 westus Standard_DS1_v2 Windows test4
217-
TEST2 test5 eastus Standard_DS1_v2 Windows test5
211+
ResourceGroupName Name Location VmSize OsType NIC
212+
----------------- ---- -------- ------ ------ ---
213+
TEST1 test1 eastus Standard_DS1_v2 Windows test1
214+
TEST1 test2 westus Standard_DS1_v2 Windows test2
215+
TEST1 test3 eastus Standard_DS1_v2 Windows test3
216+
TEST2 test4 westus Standard_DS1_v2 Windows test4
217+
TEST2 test5 eastus Standard_DS1_v2 Windows test5
218218
```
219219

220220
This command gets all the virtual machines in your subscription that start with "test".
@@ -282,7 +282,7 @@ Required: False
282282
Position: 1
283283
Default value: None
284284
Accept pipeline input: True (ByPropertyName)
285-
Accept wildcard characters: False
285+
Accept wildcard characters: True
286286
```
287287
288288
```yaml
@@ -294,7 +294,7 @@ Required: True
294294
Position: 1
295295
Default value: None
296296
Accept pipeline input: True (ByPropertyName)
297-
Accept wildcard characters: False
297+
Accept wildcard characters: True
298298
```
299299
300300
### -NextLink
@@ -324,7 +324,7 @@ Required: False
324324
Position: 0
325325
Default value: None
326326
Accept pipeline input: True (ByPropertyName)
327-
Accept wildcard characters: False
327+
Accept wildcard characters: True
328328
```
329329
330330
```yaml
@@ -336,7 +336,7 @@ Required: True
336336
Position: 0
337337
Default value: None
338338
Accept pipeline input: True (ByPropertyName)
339-
Accept wildcard characters: False
339+
Accept wildcard characters: True
340340
```
341341
342342
### -Status

src/RecoveryServices/RecoveryServices.Backup.Helpers/TrackingHelpers.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,34 @@ public static RestAzureNS.AzureOperationResponse GetOperationResult(
110110
return opStatusResponse;
111111
}
112112

113+
/// <summary>
114+
/// Block to track the operation to completion.
115+
/// Waits till the HTTP status code of the operation becomes something other than Accepted.
116+
/// </summary>
117+
/// <param name="response">Response of the operation returned by the service.</param>
118+
/// <param name="getOpStatus">Delegate method to fetch the operation status of the operation.</param>
119+
/// <returns>Result of the operation once it completes.</returns>
120+
public static RestAzureNS.AzureOperationResponse<T> GetOperationResult<T>(
121+
RestAzureNS.AzureOperationResponse response,
122+
Func<string, RestAzureNS.AzureOperationResponse<T>> getOpStatus)
123+
where T: ServiceClientModel.ProtectionContainerResource
124+
{
125+
var operationId = response.Response.Headers.GetOperationResultId();
126+
127+
var opStatusResponse = getOpStatus(operationId);
128+
129+
while (opStatusResponse.Response.StatusCode == SystemNet.HttpStatusCode.Accepted)
130+
{
131+
TestMockSupport.Delay(_defaultSleepForOperationTracking * 1000);
132+
133+
opStatusResponse = getOpStatus(operationId);
134+
}
135+
136+
opStatusResponse = getOpStatus(operationId);
137+
138+
return opStatusResponse;
139+
}
140+
113141
/// <summary>
114142
/// Block to track the operation to completion.
115143
/// Waits till the HTTP status code of the operation becomes something other than Accepted.

0 commit comments

Comments
 (0)