Skip to content

Commit d293c46

Browse files
jaepark08anton-evseev
authored andcommitted
Add PrivateIPAddressVersion in LoadBalancerFrontendIpConfiguration
1 parent bbec27a commit d293c46

11 files changed

+951
-687
lines changed

src/Network/Network.Test/ScenarioTests/LoadBalancerTests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ function Test-LoadBalancerCRUD-InternalDynamic
268268
Assert-AreEqual $frontendName $expectedLb.FrontendIPConfigurations[0].Name
269269
Assert-AreEqual $vnet.Subnets[0].Id $expectedLb.FrontendIPConfigurations[0].Subnet.Id
270270
Assert-NotNull $expectedLb.FrontendIPConfigurations[0].PrivateIpAddress
271+
Assert-AreEqual "IPv4" $expectedLb.FrontendIPConfigurations[0].PrivateIpAddressVersion
271272

272273
Assert-AreEqual $backendAddressPoolName $expectedLb.BackendAddressPools[0].Name
273274

@@ -340,7 +341,7 @@ function Test-LoadBalancerCRUD-InternalStatic
340341
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel
341342

342343
# Create LoadBalancer
343-
$frontend = New-AzLoadBalancerFrontendIpConfig -Name $frontendName -Subnet $vnet.Subnets[0] -PrivateIpAddress "10.0.1.5"
344+
$frontend = New-AzLoadBalancerFrontendIpConfig -Name $frontendName -Subnet $vnet.Subnets[0] -PrivateIpAddress "10.0.1.5" -PrivateIpAddressVersion "IPv4"
344345
$backendAddressPool = New-AzLoadBalancerBackendAddressPoolConfig -Name $backendAddressPoolName
345346
$probe = New-AzLoadBalancerProbeConfig -Name $probeName -RequestPath healthcheck.aspx -Protocol http -Port 80 -IntervalInSeconds 15 -ProbeCount 2
346347
$inboundNatRule = New-AzLoadBalancerInboundNatRuleConfig -Name $inboundNatRuleName -FrontendIPConfiguration $frontend -Protocol Tcp -FrontendPort 3389 -BackendPort 3389 -IdleTimeoutInMinutes 15 -EnableFloatingIP
@@ -359,6 +360,7 @@ function Test-LoadBalancerCRUD-InternalStatic
359360
Assert-AreEqual $frontendName $expectedLb.FrontendIPConfigurations[0].Name
360361
Assert-AreEqual $vnet.Subnets[0].Id $expectedLb.FrontendIPConfigurations[0].Subnet.Id
361362
Assert-AreEqual "10.0.1.5" $expectedLb.FrontendIPConfigurations[0].PrivateIpAddress
363+
Assert-AreEqual "IPv4" $expectedLb.FrontendIPConfigurations[0].PrivateIpAddressVersion
362364

363365
Assert-AreEqual $backendAddressPoolName $expectedLb.BackendAddressPools[0].Name
364366

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.LoadBalancerTests/TestLoadBalancerCRUDInternalDynamic.json

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

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.LoadBalancerTests/TestLoadBalancerCRUDInternalStatic.json

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

src/Network/Network/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@
7272
- Updated New-AzVirtualNetworkGateway: Added optional parameters AadTenantUri,AadAudienceId,AadIssuerUri to set VpnClient AAD authentication options on Gateway.
7373
- Updated Set-AzVirtualNetworkGateway: Added optional parameter AadTenantUri,AadAudienceId,AadIssuerUri to set VpnClient AAD authentication options on Gateway.
7474
- Updated Set-AzVirtualNetworkGateway: Added optional switch parameter RemoveAadAuthentication to remove VpnClient AAD authentication options from Gateway.
75+
* Add PrivateIpAddressVersion in LoadBalancerFrontendIpConfiguration
76+
- Updated cmdlet:
77+
- New-AzLoadBalancerFrontendIpConfig
78+
- Add-AzLoadBalancerFrontendIpConfig
79+
- Set-AzLoadBalancerFrontendIpConfig
7580

7681
## Version 1.9.0
7782
* Update ResourceId and InputObject for Nat Gateway

src/Network/Network/Generated/LoadBalancer/FrontendIPConfiguration/AddAzureRmLoadBalancerFrontendIpConfigCommand.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using System.Collections.Generic;
3232
using System.Linq;
3333
using System.Management.Automation;
34+
using MNM = Microsoft.Azure.Management.Network.Models;
3435

3536
namespace Microsoft.Azure.Commands.Network
3637
{
@@ -61,6 +62,22 @@ public partial class AddAzureRmLoadBalancerFrontendIpConfigCommand : NetworkBase
6162
ValueFromPipelineByPropertyName = true)]
6263
public string PrivateIpAddress { get; set; }
6364

65+
[Parameter(
66+
Mandatory = false,
67+
ParameterSetName = "SetByResourceSubnet",
68+
HelpMessage = "The private IP address version of the IP configuration.",
69+
ValueFromPipelineByPropertyName = true)]
70+
[Parameter(
71+
Mandatory = false,
72+
ParameterSetName = "SetByResourceIdSubnet",
73+
HelpMessage = "The private IP address version of the IP configuration.",
74+
ValueFromPipelineByPropertyName = true)]
75+
[ValidateSet(
76+
MNM.IPVersion.IPv4,
77+
MNM.IPVersion.IPv6,
78+
IgnoreCase = true)]
79+
public string PrivateIpAddressVersion { get; set; }
80+
6481
[Parameter(
6582
Mandatory = false,
6683
HelpMessage = "A list of availability zones denoting the IP allocated for the resource needs to come from.",
@@ -130,6 +147,7 @@ public override void Execute()
130147
var vFrontendIpConfigurations = new PSFrontendIPConfiguration();
131148

132149
vFrontendIpConfigurations.PrivateIpAddress = this.PrivateIpAddress;
150+
vFrontendIpConfigurations.PrivateIpAddressVersion = this.PrivateIpAddressVersion;
133151
if(!string.IsNullOrEmpty(vFrontendIpConfigurations.PrivateIpAddress))
134152
{
135153
vFrontendIpConfigurations.PrivateIpAllocationMethod = "Static";

src/Network/Network/Generated/LoadBalancer/FrontendIPConfiguration/NewAzureRmLoadBalancerFrontendIpConfigCommand.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using System.Collections.Generic;
3232
using System.Linq;
3333
using System.Management.Automation;
34+
using MNM = Microsoft.Azure.Management.Network.Models;
3435

3536
namespace Microsoft.Azure.Commands.Network
3637
{
@@ -54,6 +55,22 @@ public partial class NewAzureRmLoadBalancerFrontendIpConfigCommand : NetworkBase
5455
ValueFromPipelineByPropertyName = true)]
5556
public string PrivateIpAddress { get; set; }
5657

58+
[Parameter(
59+
Mandatory = false,
60+
ParameterSetName = "SetByResourceSubnet",
61+
HelpMessage = "The private IP address version of the IP configuration.",
62+
ValueFromPipelineByPropertyName = true)]
63+
[Parameter(
64+
Mandatory = false,
65+
ParameterSetName = "SetByResourceIdSubnet",
66+
HelpMessage = "The private IP address version of the IP configuration.",
67+
ValueFromPipelineByPropertyName = true)]
68+
[ValidateSet(
69+
MNM.IPVersion.IPv4,
70+
MNM.IPVersion.IPv6,
71+
IgnoreCase = true)]
72+
public string PrivateIpAddressVersion { get; set; }
73+
5774
[Parameter(
5875
Mandatory = false,
5976
HelpMessage = "A list of availability zones denoting the IP allocated for the resource needs to come from.",
@@ -110,6 +127,7 @@ public override void Execute()
110127
var vFrontendIpConfigurations = new PSFrontendIPConfiguration();
111128

112129
vFrontendIpConfigurations.PrivateIpAddress = this.PrivateIpAddress;
130+
vFrontendIpConfigurations.PrivateIpAddressVersion = this.PrivateIpAddressVersion;
113131
if(!string.IsNullOrEmpty(vFrontendIpConfigurations.PrivateIpAddress))
114132
{
115133
vFrontendIpConfigurations.PrivateIpAllocationMethod = "Static";

src/Network/Network/Generated/LoadBalancer/FrontendIPConfiguration/SetAzureRmLoadBalancerFrontendIpConfigCommand.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
using System.Collections.Generic;
3232
using System.Linq;
3333
using System.Management.Automation;
34+
using MNM = Microsoft.Azure.Management.Network.Models;
3435

3536
namespace Microsoft.Azure.Commands.Network
3637
{
@@ -61,6 +62,22 @@ public partial class SetAzureRmLoadBalancerFrontendIpConfigCommand : NetworkBase
6162
ValueFromPipelineByPropertyName = true)]
6263
public string PrivateIpAddress { get; set; }
6364

65+
[Parameter(
66+
Mandatory = false,
67+
ParameterSetName = "SetByResourceSubnet",
68+
HelpMessage = "The private IP address version of the IP configuration.",
69+
ValueFromPipelineByPropertyName = true)]
70+
[Parameter(
71+
Mandatory = false,
72+
ParameterSetName = "SetByResourceIdSubnet",
73+
HelpMessage = "The private IP address version of the IP configuration.",
74+
ValueFromPipelineByPropertyName = true)]
75+
[ValidateSet(
76+
MNM.IPVersion.IPv4,
77+
MNM.IPVersion.IPv6,
78+
IgnoreCase = true)]
79+
public string PrivateIpAddressVersion { get; set; }
80+
6481
[Parameter(
6582
Mandatory = false,
6683
HelpMessage = "A list of availability zones denoting the IP allocated for the resource needs to come from.",
@@ -125,6 +142,7 @@ public override void Execute()
125142
var vFrontendIpConfigurations = new PSFrontendIPConfiguration();
126143

127144
vFrontendIpConfigurations.PrivateIpAddress = this.PrivateIpAddress;
145+
vFrontendIpConfigurations.PrivateIpAddressVersion = this.PrivateIpAddressVersion;
128146
if(!string.IsNullOrEmpty(vFrontendIpConfigurations.PrivateIpAddress))
129147
{
130148
vFrontendIpConfigurations.PrivateIpAllocationMethod = "Static";

src/Network/Network/Generated/Models/PSFrontendIPConfiguration.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public partial class PSFrontendIPConfiguration : PSChildResource
4141
public string PrivateIpAllocationMethod { get; set; }
4242
[JsonProperty(Order = 1)]
4343
[Ps1Xml(Target = ViewControl.Table)]
44+
public string PrivateIpAddressVersion { get; set; }
45+
[JsonProperty(Order = 1)]
46+
[Ps1Xml(Target = ViewControl.Table)]
4447
public string ProvisioningState { get; set; }
4548
[JsonProperty(Order = 1)]
4649
public List<string> Zones { get; set; }

src/Network/Network/help/Add-AzLoadBalancerFrontendIpConfig.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Adds a front-end IP configuration to a load balancer.
1616
### SetByResourceSubnet (Default)
1717
```
1818
Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
19-
[-Zone <String[]>] -Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
20-
[<CommonParameters>]
19+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -Subnet <PSSubnet>
20+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2121
```
2222

2323
### SetByResourceIdSubnet
2424
```
2525
Add-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
26-
[-Zone <String[]>] -SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
27-
[<CommonParameters>]
26+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -SubnetId <String>
27+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
### SetByResourceIdPublicIpAddress
@@ -138,6 +138,22 @@ Accept pipeline input: True (ByPropertyName)
138138
Accept wildcard characters: False
139139
```
140140
141+
### -PrivateIpAddressVersion
142+
The private IP address version of the IP configuration.
143+
144+
```yaml
145+
Type: System.String
146+
Parameter Sets: SetByResourceSubnet, SetByResourceIdSubnet
147+
Aliases:
148+
Accepted values: IPv4, IPv6
149+
150+
Required: False
151+
Position: Named
152+
Default value: None
153+
Accept pipeline input: True (ByPropertyName)
154+
Accept wildcard characters: False
155+
```
156+
141157
### -PublicIpAddress
142158
Specifies the public IP address to associate with a front-end IP configuration.
143159
@@ -244,7 +260,7 @@ Accept wildcard characters: False
244260
```
245261
246262
### CommonParameters
247-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
263+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
248264
249265
## INPUTS
250266

src/Network/Network/help/New-AzLoadBalancerFrontendIpConfig.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ Creates a front-end IP configuration for a load balancer.
1515

1616
### SetByResourceSubnet (Default)
1717
```
18-
New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>] [-Zone <String[]>]
19-
-Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>]
19+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -Subnet <PSSubnet>
20+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2021
```
2122

2223
### SetByResourceIdSubnet
2324
```
24-
New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>] [-Zone <String[]>]
25-
-SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
25+
New-AzLoadBalancerFrontendIpConfig -Name <String> [-PrivateIpAddress <String>]
26+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -SubnetId <String>
27+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2628
```
2729

2830
### SetByResourceIdPublicIpAddress
@@ -99,6 +101,22 @@ Accept pipeline input: True (ByPropertyName)
99101
Accept wildcard characters: False
100102
```
101103
104+
### -PrivateIpAddressVersion
105+
The private IP address version of the IP configuration.
106+
107+
```yaml
108+
Type: System.String
109+
Parameter Sets: SetByResourceSubnet, SetByResourceIdSubnet
110+
Aliases:
111+
Accepted values: IPv4, IPv6
112+
113+
Required: False
114+
Position: Named
115+
Default value: None
116+
Accept pipeline input: True (ByPropertyName)
117+
Accept wildcard characters: False
118+
```
119+
102120
### -PublicIpAddress
103121
Specifies the **PublicIpAddress** object to associate with a front-end IP configuration.
104122
@@ -205,7 +223,7 @@ Accept wildcard characters: False
205223
```
206224
207225
### CommonParameters
208-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
226+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
209227
210228
## INPUTS
211229

src/Network/Network/help/Set-AzLoadBalancerFrontendIpConfig.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Updates a front-end IP configuration for a load balancer.
1616
### SetByResourceSubnet (Default)
1717
```
1818
Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
19-
[-Zone <String[]>] -Subnet <PSSubnet> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
20-
[<CommonParameters>]
19+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -Subnet <PSSubnet>
20+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2121
```
2222

2323
### SetByResourceIdSubnet
2424
```
2525
Set-AzLoadBalancerFrontendIpConfig -LoadBalancer <PSLoadBalancer> -Name <String> [-PrivateIpAddress <String>]
26-
[-Zone <String[]>] -SubnetId <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
27-
[<CommonParameters>]
26+
[-PrivateIpAddressVersion <String>] [-Zone <String[]>] -SubnetId <String>
27+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2828
```
2929

3030
### SetByResourceIdPublicIpAddress
@@ -123,6 +123,22 @@ Accept pipeline input: True (ByPropertyName)
123123
Accept wildcard characters: False
124124
```
125125
126+
### -PrivateIpAddressVersion
127+
The private IP address version of the IP configuration.
128+
129+
```yaml
130+
Type: System.String
131+
Parameter Sets: SetByResourceSubnet, SetByResourceIdSubnet
132+
Aliases:
133+
Accepted values: IPv4, IPv6
134+
135+
Required: False
136+
Position: Named
137+
Default value: None
138+
Accept pipeline input: True (ByPropertyName)
139+
Accept wildcard characters: False
140+
```
141+
126142
### -PublicIpAddress
127143
Specifies the **PublicIpAddress** object that is associated with the front-end IP configuration to set.
128144
@@ -229,7 +245,7 @@ Accept wildcard characters: False
229245
```
230246
231247
### CommonParameters
232-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
248+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
233249
234250
## INPUTS
235251

0 commit comments

Comments
 (0)