Skip to content

Commit

Permalink
Gateway LoadBalancer property ParameterSetName requirement removal (#…
Browse files Browse the repository at this point in the history
…15108)

* fix

* fix

Co-authored-by: matyang222 <[email protected]>
  • Loading branch information
matyang22 and matyang222 authored May 28, 2021
1 parent 5f81ef0 commit 1d91532
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Network/Network.Test/ScenarioTests/LoadBalancerTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2366,9 +2366,9 @@ function Test-GatewayLoadBalancer-ConsumerLb
$frontendConsumerName = Get-ResourceName
$domainNameLabel = Get-ResourceName

$rglocation = Get-ProviderLocation ResourceManagement
$rglocation = "eastus2euap"
$resourceTypeParent = "Microsoft.Network/loadBalancers"
$location = Get-ProviderLocation $resourceTypeParent
$location = "eastus2euap"

try
{
Expand All @@ -2388,7 +2388,7 @@ function Test-GatewayLoadBalancer-ConsumerLb

# Create Consumer LoadBalancer
$lbConsumer = New-AzLoadBalancer -Name $lbConsumerName -ResourceGroupName $rgname -Location $location -Sku Standard
Add-AzLoadBalancerFrontendIpConfig -GatewayLoadBalancerId $frontendProvider.Id -LoadBalancer $lbConsumer -Name $frontendConsumerName
Add-AzLoadBalancerFrontendIpConfig -PublicIpAddress $publicipConsumer -GatewayLoadBalancerId $frontendProvider.Id -LoadBalancer $lbConsumer -Name $frontendConsumerName
$lbConsumer = Set-AzLoadBalancer -LoadBalancer $lbConsumer

$expectedLbConsumer = Get-AzLoadBalancer -Name $lbConsumerName -ResourceGroupName $rgname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public partial class AddAzureRmLoadBalancerFrontendIpConfigCommand : NetworkBase

[Parameter(
Mandatory = false,
ParameterSetName = "SetByResource",
HelpMessage = "The reference of Gateway LoadBalancer Provider resource.",
ValueFromPipelineByPropertyName = true)]
public string GatewayLoadBalancerId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public partial class SetAzureRmLoadBalancerFrontendIpConfigCommand : NetworkBase

[Parameter(
Mandatory = false,
ParameterSetName = "SetByResource",
HelpMessage = "The reference of Gateway LoadBalancer Provider resource.",
ValueFromPipelineByPropertyName = true)]
public string GatewayLoadBalancerId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public partial class PSFrontendIPConfiguration : PSChildResource
[JsonProperty(Order = 1)]
public PSResourceId PublicIPPrefix { get; set; }
[JsonProperty(Order = 1)]
public PSFrontendIPConfiguration GatewayLoadBalancer { get; set; }
public PSResourceId GatewayLoadBalancer { get; set; }

[JsonIgnore]
public string ZonesText
Expand Down

0 comments on commit 1d91532

Please sign in to comment.