File tree Expand file tree Collapse file tree 6 files changed +17
-7
lines changed
src/ResourceManager/Compute
Commands.Compute.Test/ScenarioTests
Generated/VirtualMachineScaleSet/Config Expand file tree Collapse file tree 6 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ function Get-DefaultCRPImage
356
356
$defaultPublisher = $result [0 ];
357
357
}
358
358
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' ) };
360
360
if ($result.Count -eq 1 )
361
361
{
362
362
$defaultOffer = $result ;
Original file line number Diff line number Diff line change @@ -102,14 +102,24 @@ function Test-VirtualMachineScaleSet-Common($IsManaged)
102
102
$exttype = ' BGInfo' ;
103
103
$extver = ' 2.1' ;
104
104
105
+ $ipCfg = New-AzureRmVmssIPConfig - Name ' test' - SubnetId $subnetId - Primary;
106
+ Assert-True { $ipCfg.Primary };
107
+
105
108
$ipCfg = New-AzureRmVmssIPConfig - Name ' test' - SubnetId $subnetId ;
109
+ Assert-False { $ipCfg.Primary };
110
+
106
111
$vmss = New-AzureRmVmssConfig - Location $loc - SkuCapacity 2 - SkuName ' Standard_A0' - UpgradePolicyMode ' automatic' - NetworkInterfaceConfiguration $netCfg - Overprovision $false `
107
112
| Add-AzureRmVmssNetworkInterfaceConfiguration - Name ' test' - Primary $true - IPConfiguration $ipCfg `
108
113
| Set-AzureRmVmssOSProfile - ComputerNamePrefix ' test' - AdminUsername $adminUsername - AdminPassword $adminPassword `
109
114
| Add-AzureRmVmssExtension - Name $extname - Publisher $publisher - Type $exttype - TypeHandlerVersion $extver - AutoUpgradeMinorVersion $true `
110
115
| Remove-AzureRmVmssExtension - Name $extname `
111
116
| Add-AzureRmVmssNetworkInterfaceConfiguration - Name ' test2' - IPConfiguration $ipCfg `
112
117
| 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
+
113
123
if ($IsManaged -eq $true )
114
124
{
115
125
$vmss = $vmss | Set-AzureRmVmssStorageProfile - OsDiskCreateOption ' FromImage' - OsDiskCaching ' None' `
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ public partial class AddAzureRmVmssNetworkInterfaceConfigurationCommand : Micros
67
67
[ Parameter (
68
68
Mandatory = false ,
69
69
ValueFromPipelineByPropertyName = true ) ]
70
- public bool ? EnableAcceleratedNetworking { get ; set ; }
70
+ public SwitchParameter EnableAcceleratedNetworking { get ; set ; }
71
71
72
72
[ Parameter (
73
73
Mandatory = false ,
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public partial class NewAzureRmVmssIpConfigCommand : Microsoft.Azure.Commands.Re
72
72
[ Parameter (
73
73
Mandatory = false ,
74
74
ValueFromPipelineByPropertyName = true ) ]
75
- public bool ? Primary { get ; set ; }
75
+ public SwitchParameter Primary { get ; set ; }
76
76
77
77
[ Parameter (
78
78
Mandatory = false ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Adds a network interface configuration to the VMSS.
15
15
```
16
16
Add-AzureRmVmssNetworkInterfaceConfiguration [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
17
17
[[-Name] <String>] [[-Primary] <Boolean>] [[-Id] <String>]
18
- [[-IpConfiguration] <VirtualMachineScaleSetIPConfiguration[]>] [-EnableAcceleratedNetworking <Boolean> ]
18
+ [[-IpConfiguration] <VirtualMachineScaleSetIPConfiguration[]>] [-EnableAcceleratedNetworking]
19
19
[-NetworkSecurityGroupId <String>] [-DnsSettingsDnsServer <String[]>] [-WhatIf] [-Confirm]
20
20
[<CommonParameters>]
21
21
```
@@ -53,7 +53,7 @@ Accept wildcard characters: False
53
53
Specifies whether the network interface is accelerated networking-enabled.
54
54
55
55
` ` ` yaml
56
- Type : Boolean
56
+ Type : SwitchParameter
57
57
Parameter Sets : (All)
58
58
Aliases :
59
59
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Creates an IP configuration for a network interface of a VMSS.
15
15
```
16
16
New-AzureRmVmssIpConfig [[-Name] <String>] [[-Id] <String>] [[-SubnetId] <String>]
17
17
[[-ApplicationGatewayBackendAddressPoolsId] <String[]>] [[-LoadBalancerBackendAddressPoolsId] <String[]>]
18
- [[-LoadBalancerInboundNatPoolsId] <String[]>] [-Primary <Boolean> ] [-PrivateIPAddressVersion <String>]
18
+ [[-LoadBalancerInboundNatPoolsId] <String[]>] [-Primary] [-PrivateIPAddressVersion <String>]
19
19
[-PublicIPAddressConfigurationName <String>] [-PublicIPAddressConfigurationIdleTimeoutInMinutes <Int32>]
20
20
[-DnsSetting <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
21
21
```
@@ -149,7 +149,7 @@ Accept wildcard characters: False
149
149
Specifies the primary IP Configuration in case the network interface has more than one IP Configuration.
150
150
151
151
` ` ` yaml
152
- Type : Boolean
152
+ Type : SwitchParameter
153
153
Parameter Sets : (All)
154
154
Aliases :
155
155
You can’t perform that action at this time.
0 commit comments