Skip to content

Commit 6ec1172

Browse files
authored
Merge pull request Azure#4397 from hyonholee/preview
[AzureRT] Compute August update
2 parents dd1009a + 6af8281 commit 6ec1172

File tree

57 files changed

+280
-95
lines changed

Some content is hidden

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

57 files changed

+280
-95
lines changed

src/ResourceManager/Compute/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
## Current Release
2121
* Set-AzureRmVMAEMExtension: Add support for new Premium Disk sizes
2222
* Set-AzureRmVMAEMExtension: Add support for M series
23+
* Add ForceUpdateTag parameter to Add-AzureRmVmssExtension
24+
* Add Primary parameter to New-AzureRmVmssIpConfig
25+
* Add EnableAcceleratedNetworking parameter to Add-AzureRmVmssNetworkInterfaceConfig
26+
* Add InstanceId to Set-AzureRmVmss
27+
* Expose MaintenanceRedeployStatus to Get-AzureRmVM -Status output
28+
* Expose Restriction and Capability to the table format of Get-AzureRmComputeResourceSku
2329

2430
## Version 3.2.1
2531
- Fix issue with VM DIsk and VM Disk snapshot create and update cmdlets, (link)[https://github.com/azure/azure-powershell/issues/4309]

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6565
</Reference>
6666
<Reference Include="Microsoft.Azure.Management.Compute">
67-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.16.0.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
67+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.16.2.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
6868
</Reference>
6969
<Reference Include="Microsoft.Azure.Management.Network, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7070
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.12.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
@@ -343,12 +343,6 @@
343343
<None Include="SessionRecords\**\*.json">
344344
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
345345
</None>
346-
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineScaleSetTests\TestVirtualMachineScaleSetBootDiagnostics.json">
347-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
348-
</None>
349-
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineScaleSetTests\TestVirtualMachineScaleSetNetworking.json">
350-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
351-
</None>
352346
<None Include="Templates\azuredeploy.json">
353347
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
354348
</None>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function Get-DefaultCRPImage
356356
$defaultPublisher = $result[0];
357357
}
358358

359-
$result = (Get-AzureRmVMImageOffer -Location $loc -PublisherName $defaultPublisher) | select -ExpandProperty Offer | where { $_ -like '*Windows*' -and -not ($_ -like '*HUB') };
359+
$result = (Get-AzureRmVMImageOffer -Location $loc -PublisherName $defaultPublisher) | select -ExpandProperty Offer | where { $_ -like '*WindowsServer*' -and -not ($_ -like '*HUB') };
360360
if ($result.Count -eq 1)
361361
{
362362
$defaultOffer = $result;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Test List Resource Skus
1818
#>
1919
function Test-GetResourceSku
2020
{
21-
$skulist = Get-AzureRmComputeResourceSku | where {$_.Locations -eq "westus"};
21+
$skulist = Get-AzureRmComputeResourceSku | where {$_.Locations -eq "eastus2"};
2222
Assert-True { $skulist.Count -gt 0; }
2323
$output = $skulist | Out-String;
2424
Assert-True { $output.Contains("availabilitySets"); }

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,24 @@ function Test-VirtualMachineScaleSet-Common($IsManaged)
102102
$exttype = 'BGInfo';
103103
$extver = '2.1';
104104

105+
$ipCfg = New-AzureRmVmssIPConfig -Name 'test' -SubnetId $subnetId -Primary;
106+
Assert-True { $ipCfg.Primary };
107+
105108
$ipCfg = New-AzureRmVmssIPConfig -Name 'test' -SubnetId $subnetId;
109+
Assert-False { $ipCfg.Primary };
110+
106111
$vmss = New-AzureRmVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0' -UpgradePolicyMode 'automatic' -NetworkInterfaceConfiguration $netCfg -Overprovision $false `
107112
| Add-AzureRmVmssNetworkInterfaceConfiguration -Name 'test' -Primary $true -IPConfiguration $ipCfg `
108113
| Set-AzureRmVmssOSProfile -ComputerNamePrefix 'test' -AdminUsername $adminUsername -AdminPassword $adminPassword `
109114
| Add-AzureRmVmssExtension -Name $extname -Publisher $publisher -Type $exttype -TypeHandlerVersion $extver -AutoUpgradeMinorVersion $true `
110115
| Remove-AzureRmVmssExtension -Name $extname `
111116
| Add-AzureRmVmssNetworkInterfaceConfiguration -Name 'test2' -IPConfiguration $ipCfg `
112117
| Remove-AzureRmVmssNetworkInterfaceConfiguration -Name 'test2'
118+
119+
$vmss | Add-AzureRmVmssNetworkInterfaceConfiguration -Name 'test3' -IPConfiguration $ipCfg -EnableAcceleratedNetworking;
120+
Assert-True { $vmss.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations[1].EnableAcceleratedNetworking };
121+
$vmss | Remove-AzureRmVmssNetworkInterfaceConfiguration -Name 'test3'
122+
113123
if ($IsManaged -eq $true)
114124
{
115125
$vmss = $vmss | Set-AzureRmVmssStorageProfile -OsDiskCreateOption 'FromImage' -OsDiskCaching 'None' `

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,6 +2830,7 @@ function Test-VirtualMachineGetStatus
28302830
$a = $vms | Out-String;
28312831
Write-Verbose($a);
28322832
Assert-True {$a.Contains("PowerState");}
2833+
Assert-True {$a.Contains("Maintenance");}
28332834

28342835
$vms = Get-AzureRmVM -Status;
28352836
$a = $vms | Out-String;

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.4.0-preview" targetFramework="net452" />
88
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
9-
<package id="Microsoft.Azure.Management.Compute" version="16.0.0" targetFramework="net452" />
9+
<package id="Microsoft.Azure.Management.Compute" version="16.2.0" targetFramework="net452" />
1010
<package id="Microsoft.Azure.Management.Network" version="12.0.0-preview" targetFramework="net452" />
1111
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<Private>True</Private>
6161
</Reference>
6262
<Reference Include="Microsoft.Azure.Management.Compute">
63-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.16.0.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
63+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.16.2.0\lib\net452\Microsoft.Azure.Management.Compute.dll</HintPath>
6464
<Private>True</Private>
6565
</Reference>
6666
<Reference Include="Microsoft.Azure.Management.Network, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/ContainerServiceDeleteMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ protected override void ProcessRecord()
140140

141141
[Parameter(
142142
ParameterSetName = "DefaultParameter",
143-
Position = 3,
144143
Mandatory = false)]
145144
[AllowNull]
146145
public SwitchParameter Force { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/DiskDeleteMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ protected override void ProcessRecord()
144144

145145
[Parameter(
146146
ParameterSetName = "DefaultParameter",
147-
Position = 3,
148147
Mandatory = false)]
149148
[AllowNull]
150149
public SwitchParameter Force { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/Image/ImageDeleteMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ protected override void ProcessRecord()
144144

145145
[Parameter(
146146
ParameterSetName = "DefaultParameter",
147-
Position = 3,
148147
Mandatory = false)]
149148
[AllowNull]
150149
public SwitchParameter Force { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/Microsoft.Azure.Commands.Compute.Automation.format.generated.ps1xml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,19 @@
195195
<Alignment>Right</Alignment>
196196
</TableColumnHeader>
197197
<TableColumnHeader>
198-
<Label>Tier</Label>
198+
<Label>Locations</Label>
199199
<Alignment>Right</Alignment>
200200
</TableColumnHeader>
201201
<TableColumnHeader>
202-
<Label>Size</Label>
202+
<Label>Restriction</Label>
203203
<Alignment>Right</Alignment>
204204
</TableColumnHeader>
205205
<TableColumnHeader>
206-
<Label>Locations</Label>
206+
<Label>Capability</Label>
207+
<Alignment>Right</Alignment>
208+
</TableColumnHeader>
209+
<TableColumnHeader>
210+
<Label>Value</Label>
207211
<Alignment>Right</Alignment>
208212
</TableColumnHeader>
209213
</TableHeaders>
@@ -217,13 +221,16 @@
217221
<ScriptBlock>$_.Name</ScriptBlock>
218222
</TableColumnItem>
219223
<TableColumnItem>
220-
<ScriptBlock>$_.Tier</ScriptBlock>
224+
<ScriptBlock>$_.Locations</ScriptBlock>
221225
</TableColumnItem>
222226
<TableColumnItem>
223-
<ScriptBlock>$_.Size</ScriptBlock>
227+
<ScriptBlock>$_.Restrictions[0].ReasonCode</ScriptBlock>
224228
</TableColumnItem>
225229
<TableColumnItem>
226-
<ScriptBlock>$_.Locations</ScriptBlock>
230+
<ScriptBlock>$_.Capabilities[0].Name</ScriptBlock>
231+
</TableColumnItem>
232+
<TableColumnItem>
233+
<ScriptBlock>$_.Capabilities[0].Value</ScriptBlock>
227234
</TableColumnItem>
228235
</TableColumnItems>
229236
</TableRowEntry>

src/ResourceManager/Compute/Commands.Compute/Generated/Models/ComputeAutoMapperProfile.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ protected override void Configure()
8989
Mapper.CreateMap<FROM.SnapshotUpdate, FROM.Snapshot>();
9090
Mapper.CreateMap<FROM.SnapshotUpdate, TO.PSSnapshotUpdate>();
9191
Mapper.CreateMap<TO.PSSnapshotUpdate, FROM.SnapshotUpdate>();
92+
Mapper.CreateMap<FROM.RunCommandInput, TO.PSRunCommandInput>();
93+
Mapper.CreateMap<TO.PSRunCommandInput, FROM.RunCommandInput>();
9294
Mapper.CreateMap<FROM.AvailabilitySet, TO.PSAvailabilitySet>();
9395
Mapper.CreateMap<TO.PSAvailabilitySet, FROM.AvailabilitySet>();
9496
Mapper.CreateMap<FROM.OperationStatusResponse, TO.PSOperationStatusResponse>();
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
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+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
21+
22+
using Microsoft.Azure.Management.Compute.Models;
23+
24+
namespace Microsoft.Azure.Commands.Compute.Automation.Models
25+
{
26+
public partial class PSRunCommandInput : RunCommandInput
27+
{
28+
}
29+
}

src/ResourceManager/Compute/Commands.Compute/Generated/Snapshot/SnapshotDeleteMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ protected override void ProcessRecord()
144144

145145
[Parameter(
146146
ParameterSetName = "DefaultParameter",
147-
Position = 3,
148147
Mandatory = false)]
149148
[AllowNull]
150149
public SwitchParameter Force { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachine/VirtualMachineRunCommandMethod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected object CreateVirtualMachineRunCommandDynamicParameters()
6060
dynamicParameters.Add("VMName", pVMName);
6161

6262
var pParameters = new RuntimeDefinedParameter();
63-
pParameters.Name = "VirtualMachineRunCommandParameter";
63+
pParameters.Name = "RunCommandInput";
6464
pParameters.ParameterType = typeof(RunCommandInput);
6565
pParameters.Attributes.Add(new ParameterAttribute
6666
{
@@ -69,7 +69,7 @@ protected object CreateVirtualMachineRunCommandDynamicParameters()
6969
Mandatory = true
7070
});
7171
pParameters.Attributes.Add(new AllowNullAttribute());
72-
dynamicParameters.Add("VirtualMachineRunCommandParameter", pParameters);
72+
dynamicParameters.Add("RunCommandInput", pParameters);
7373

7474
var pArgumentList = new RuntimeDefinedParameter();
7575
pArgumentList.Name = "ArgumentList";

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssExtensionCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public partial class AddAzureRmVmssExtensionCommand : Microsoft.Azure.Commands.R
8282
ValueFromPipelineByPropertyName = true)]
8383
public Object ProtectedSetting { get; set; }
8484

85+
[Parameter(
86+
Mandatory = false,
87+
ValueFromPipelineByPropertyName = true)]
88+
public string ForceUpdateTag { get; set; }
89+
8590
protected override void ProcessRecord()
8691
{
8792
if (ShouldProcess("VirtualMachineScaleSet", "Add"))
@@ -113,6 +118,7 @@ private void Run()
113118
var vExtensions = new Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetExtension();
114119

115120
vExtensions.Name = this.Name;
121+
vExtensions.ForceUpdateTag = this.ForceUpdateTag;
116122
vExtensions.Publisher = this.Publisher;
117123
vExtensions.Type = this.Type;
118124
vExtensions.TypeHandlerVersion = this.TypeHandlerVersion;

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/AddAzureRmVmssNetworkInterfaceConfigurationCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ public partial class AddAzureRmVmssNetworkInterfaceConfigurationCommand : Micros
6464
ValueFromPipelineByPropertyName = true)]
6565
public VirtualMachineScaleSetIPConfiguration[] IpConfiguration { get; set; }
6666

67+
[Parameter(
68+
Mandatory = false,
69+
ValueFromPipelineByPropertyName = true)]
70+
public SwitchParameter EnableAcceleratedNetworking { get; set; }
71+
6772
[Parameter(
6873
Mandatory = false,
6974
ValueFromPipelineByPropertyName = true)]
@@ -107,6 +112,7 @@ private void Run()
107112

108113
vNetworkInterfaceConfigurations.Name = this.Name;
109114
vNetworkInterfaceConfigurations.Primary = this.Primary;
115+
vNetworkInterfaceConfigurations.EnableAcceleratedNetworking = this.EnableAcceleratedNetworking;
110116
vNetworkInterfaceConfigurations.Id = this.Id;
111117
if (this.NetworkSecurityGroupId != null)
112118
{

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssIpConfigCommand.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ public partial class NewAzureRmVmssIpConfigCommand : Microsoft.Azure.Commands.Re
6969
ValueFromPipelineByPropertyName = true)]
7070
public string[] LoadBalancerInboundNatPoolsId { get; set; }
7171

72+
[Parameter(
73+
Mandatory = false,
74+
ValueFromPipelineByPropertyName = true)]
75+
public SwitchParameter Primary { get; set; }
76+
7277
[Parameter(
7378
Mandatory = false,
7479
ValueFromPipelineByPropertyName = true)]
@@ -105,6 +110,7 @@ private void Run()
105110
var vIpConfigurations = new Microsoft.Azure.Management.Compute.Models.VirtualMachineScaleSetIPConfiguration();
106111

107112
vIpConfigurations.Name = this.Name;
113+
vIpConfigurations.Primary = this.Primary;
108114
vIpConfigurations.PrivateIPAddressVersion = this.PrivateIPAddressVersion;
109115
vIpConfigurations.Id = this.Id;
110116

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeallocateMethod.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,18 +202,15 @@ protected override void ProcessRecord()
202202

203203
[Parameter(
204204
ParameterSetName = "DefaultParameter",
205-
Position = 4,
206205
Mandatory = false)]
207206
[Parameter(
208207
ParameterSetName = "FriendMethod",
209-
Position = 4,
210208
Mandatory = false)]
211209
[AllowNull]
212210
public SwitchParameter Force { get; set; }
213211

214212
[Parameter(
215213
ParameterSetName = "FriendMethod",
216-
Position = 5,
217214
Mandatory = true)]
218215
[AllowNull]
219216
public SwitchParameter StayProvisioned { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetDeleteInstancesMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ protected override void ProcessRecord()
185185

186186
[Parameter(
187187
ParameterSetName = "DefaultParameter",
188-
Position = 4,
189188
Mandatory = false)]
190189
[AllowNull]
191190
public SwitchParameter Force { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetGetMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ protected override void ProcessRecord()
241241

242242
[Parameter(
243243
ParameterSetName = "FriendMethod",
244-
Position = 3,
245244
Mandatory = true)]
246245
[AllowNull]
247246
public SwitchParameter InstanceView { get; set; }

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetReimageAllMethod.cs

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,25 @@ protected object CreateVirtualMachineScaleSetReimageAllDynamicParameters()
5959
pVMScaleSetName.Attributes.Add(new AllowNullAttribute());
6060
dynamicParameters.Add("VMScaleSetName", pVMScaleSetName);
6161

62+
var pInstanceIds = new RuntimeDefinedParameter();
63+
pInstanceIds.Name = "InstanceId";
64+
pInstanceIds.ParameterType = typeof(string[]);
65+
pInstanceIds.Attributes.Add(new ParameterAttribute
66+
{
67+
ParameterSetName = "InvokeByDynamicParameters",
68+
Position = 3,
69+
Mandatory = false
70+
});
71+
pInstanceIds.Attributes.Add(new AllowNullAttribute());
72+
dynamicParameters.Add("InstanceId", pInstanceIds);
73+
6274
var pArgumentList = new RuntimeDefinedParameter();
6375
pArgumentList.Name = "ArgumentList";
6476
pArgumentList.ParameterType = typeof(object[]);
6577
pArgumentList.Attributes.Add(new ParameterAttribute
6678
{
6779
ParameterSetName = "InvokeByStaticParameters",
68-
Position = 3,
80+
Position = 4,
6981
Mandatory = true
7082
});
7183
pArgumentList.Attributes.Add(new AllowNullAttribute());
@@ -78,8 +90,14 @@ protected void ExecuteVirtualMachineScaleSetReimageAllMethod(object[] invokeMeth
7890
{
7991
string resourceGroupName = (string)ParseParameter(invokeMethodInputParameters[0]);
8092
string vmScaleSetName = (string)ParseParameter(invokeMethodInputParameters[1]);
93+
System.Collections.Generic.IList<string> instanceIds = null;
94+
if (invokeMethodInputParameters[2] != null)
95+
{
96+
var inputArray2 = Array.ConvertAll((object[]) ParseParameter(invokeMethodInputParameters[2]), e => e.ToString());
97+
instanceIds = inputArray2.ToList();
98+
}
8199

82-
var result = VirtualMachineScaleSetsClient.ReimageAll(resourceGroupName, vmScaleSetName);
100+
var result = VirtualMachineScaleSetsClient.ReimageAll(resourceGroupName, vmScaleSetName, instanceIds);
83101
WriteObject(result);
84102
}
85103
}
@@ -90,10 +108,11 @@ protected PSArgument[] CreateVirtualMachineScaleSetReimageAllParameters()
90108
{
91109
string resourceGroupName = string.Empty;
92110
string vmScaleSetName = string.Empty;
111+
var instanceIds = new string[0];
93112

94113
return ConvertFromObjectsToArguments(
95-
new string[] { "ResourceGroupName", "VMScaleSetName" },
96-
new object[] { resourceGroupName, vmScaleSetName });
114+
new string[] { "ResourceGroupName", "VMScaleSetName", "InstanceIds" },
115+
new object[] { resourceGroupName, vmScaleSetName, instanceIds });
97116
}
98117
}
99118
}

0 commit comments

Comments
 (0)