Skip to content

Commit eee1ae2

Browse files
authored
Fix remove autoscale command (Azure#22028)
* Fix remove autoscale * Update changelog for remove autoscale fix * Update broken powershell tests
1 parent 73f38d7 commit eee1ae2

File tree

6 files changed

+12030
-34143
lines changed

6 files changed

+12030
-34143
lines changed

src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSet
643643
$gwSubnet = Get-AzVirtualNetworkSubnetConfig -Name $gwSubnetName -VirtualNetwork $vnet
644644

645645
# Create public ip
646-
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -sku Standard
646+
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -Zone 1,2 -location $location -AllocationMethod Static -sku Standard
647647

648648
# Create ip configuration
649649
$gipconfig = New-AzApplicationGatewayIPConfiguration -Name $gipconfigname -Subnet $gwSubnet
@@ -844,7 +844,7 @@ function Test-ApplicationGatewayCRUDRewriteRuleSetWithConditions
844844
$gwSubnet = Get-AzVirtualNetworkSubnetConfig -Name $gwSubnetName -VirtualNetwork $vnet
845845

846846
# Create public ip
847-
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -sku Standard
847+
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -sku Standard -Zone 1,2
848848

849849
# Create ip configuration
850850
$gipconfig = New-AzApplicationGatewayIPConfiguration -Name $gipconfigname -Subnet $gwSubnet
@@ -1700,7 +1700,8 @@ function Test-ApplicationGatewayCRUDSubItems
17001700
)
17011701

17021702
# Setup
1703-
$location = Get-ProviderLocation "Microsoft.Network/applicationGateways" "West US 2"
1703+
# Setting location to East US 2 EUAP because FIPS are enabled in the slice subscription
1704+
$location = Get-ProviderLocation "Microsoft.Network/applicationGateways" "East US 2 EUAP"
17041705

17051706
$rgname = Get-ResourceGroupName
17061707
$appgwName = Get-ResourceName
@@ -1730,7 +1731,7 @@ function Test-ApplicationGatewayCRUDSubItems
17301731
$probeName = Get-ResourceName
17311732

17321733
$customError403Url01 = "https://mycustomerrorpages.blob.core.windows.net/errorpages/403-another.htm"
1733-
$customError403Url02 = "http://mycustomerrorpages.blob.core.windows.net/errorpages/403-another.htm"
1734+
$customError403Url02 = "https://mycustomerrorpages.blob.core.windows.net/errorpages/403-another2.htm"
17341735

17351736
$redirectName = Get-ResourceName
17361737
$urlPathMapName = Get-ResourceName
@@ -1767,7 +1768,7 @@ function Test-ApplicationGatewayCRUDSubItems
17671768
$sslPolicy = New-AzApplicationGatewaySslPolicy -DisabledSslProtocols TLSv1_0, TLSv1_1
17681769

17691770
#rule
1770-
$rule01 = New-AzApplicationGatewayRequestRoutingRule -Name $rule01Name -RuleType basic -Priority 100 -BackendHttpSettings $poolSetting01 -HttpListener $listener01 -BackendAddressPool $pool
1771+
$rule01 = New-AzApplicationGatewayRequestRoutingRule -Name $rule01Name -RuleType basic -BackendHttpSettings $poolSetting01 -HttpListener $listener01 -BackendAddressPool $pool
17711772

17721773
# sku
17731774
$sku = New-AzApplicationGatewaySku -Name Standard_Medium -Tier Standard -Capacity 2

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSet.json

Lines changed: 4321 additions & 1224 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDRewriteRuleSetWithConditions.json

Lines changed: 3943 additions & 1309 deletions
Large diffs are not rendered by default.

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.ApplicationGatewayTests/TestApplicationGatewayCRUDSubItems.json

Lines changed: 3758 additions & 31604 deletions
Large diffs are not rendered by default.

src/Network/Network/ApplicationGateway/AutoscaleConfiguration/RemoveAzureApplicationGatewayAutoscaleConfigurationCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public override void ExecuteCmdlet()
4343
Force.IsPresent,
4444
"Are you sure you want to remove Autoscale Configuration",
4545
"Removing Autoscale Configuration..",
46-
ApplicationGateway.SslPolicy.ToString(),
46+
ApplicationGateway.AutoscaleConfiguration.ToString(),
4747
() => RemoveAutoscaleConfiguration());
4848
}
4949

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
-`Network Virtual Appliance`
5757
* Allowed not to provide `Rules` in `PSApplicationGatewayFirewallPolicyManagedRuleGroupOverride`, which would return an empty `RuleID` to be passed to NRP.
5858
* Add optional parameter 'AdminState' to Express Route Virtual Network Gateway
59+
* Fixed bug that caused `Remove-AzApplicationGatewayAutoscaleConfiguration` to always fails
5960
* Added read-only property `DefaultPredefinedSslPolicy` in PSApplicationGateway
6061

6162
## Version 5.7.0

0 commit comments

Comments
 (0)