Skip to content

Commit 9b5b60a

Browse files
committed
Merge remote-tracking branch 'upstream/release-2018-07-13' into release-2018-07-13
# Conflicts: # src/ResourceManager/Network/Commands.Network/ChangeLog.md
2 parents e29a0eb + 117c200 commit 9b5b60a

File tree

16 files changed

+8257
-1300
lines changed

16 files changed

+8257
-1300
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131

3232
#### AzureRM.Network
3333
* Enable peering across Virtual Networks in multiple Tenants for Set/Add-AzureRmVirtualNetworkPeering
34+
* Updated below cmdlets for Application Gateway
35+
- New-AzureRmApplicationGateway : Added EnableFIPS flag and Zones support
36+
- New-AzureRmApplicationGatewaySku : Added new skus Standard_v2 and WAF_v2
37+
- Set-AzureRmApplicationGatewaySku : Added new skus Standard_v2 and WAF_v2
3438
* Regenerated RouteTable cmdlets with the latest generator version
3539

3640
#### AzureRM.Relay

src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@
385385
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ApplicationGatewayTests\TestApplicationGatewayCRUD.json">
386386
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
387387
</None>
388+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ApplicationGatewayTests\TestApplicationGatewayCRUD3.json">
389+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
390+
</None>
388391
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteRouteFilterCRUD.json">
389392
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
390393
</None>

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ApplicationGatewayTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,13 @@ public void TestApplicationGatewayCRUD2()
6262
{
6363
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-ApplicationGatewayCRUD2 -baseDir '{0}'", AppDomain.CurrentDomain.BaseDirectory));
6464
}
65+
66+
[Fact]
67+
[Trait(Category.AcceptanceType, Category.CheckIn)]
68+
[Trait(Category.Owner, Category.nvadev)]
69+
public void TestApplicationGatewayCRUD3()
70+
{
71+
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-ApplicationGatewayCRUD3 -baseDir '{0}'", AppDomain.CurrentDomain.BaseDirectory));
72+
}
6573
}
6674
}

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

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,100 @@ function Test-ApplicationGatewayCRUD2
485485
}
486486
}
487487

488+
<#
489+
.SYNOPSIS
490+
Application gateway v2 tests
491+
#>
492+
function Test-ApplicationGatewayCRUD3
493+
{
494+
param
495+
(
496+
$basedir = "./"
497+
)
498+
499+
# Setup
500+
$location = "westus2"
501+
502+
$rgname = Get-ResourceGroupName
503+
$appgwName = Get-ResourceName
504+
$vnetName = Get-ResourceName
505+
$gwSubnetName = Get-ResourceName
506+
$publicIpName = Get-ResourceName
507+
$gipconfigname = Get-ResourceName
508+
509+
$frontendPort01Name = Get-ResourceName
510+
$fipconfigName = Get-ResourceName
511+
$listener01Name = Get-ResourceName
512+
513+
$poolName = Get-ResourceName
514+
$poolSetting01Name = Get-ResourceName
515+
516+
$rule01Name = Get-ResourceName
517+
518+
$probeHttpName = Get-ResourceName
519+
520+
try
521+
{
522+
# Create the resource group
523+
$resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "APPGw tag"}
524+
# Create the Virtual Network
525+
$gwSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name $gwSubnetName -AddressPrefix 10.0.0.0/24
526+
$vnet = New-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $gwSubnet
527+
$vnet = Get-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname
528+
$gwSubnet = Get-AzureRmVirtualNetworkSubnetConfig -Name $gwSubnetName -VirtualNetwork $vnet
529+
530+
# Create public ip
531+
$publicip = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -sku Standard
532+
533+
# Create ip configuration
534+
$gipconfig = New-AzureRmApplicationGatewayIPConfiguration -Name $gipconfigname -Subnet $gwSubnet
535+
536+
$fipconfig = New-AzureRmApplicationGatewayFrontendIPConfig -Name $fipconfigName -PublicIPAddress $publicip
537+
$fp01 = New-AzureRmApplicationGatewayFrontendPort -Name $frontendPort01Name  -Port 80
538+
$listener01 = New-AzureRmApplicationGatewayHttpListener -Name $listener01Name -Protocol Http -FrontendIPConfiguration $fipconfig -FrontendPort $fp01
539+
540+
# backend part
541+
$pool = New-AzureRmApplicationGatewayBackendAddressPool -Name $poolName -BackendIPAddresses www.microsoft.com, www.bing.com
542+
$probeHttp = New-AzureRmApplicationGatewayProbeConfig -Name $probeHttpName -Protocol Http -HostName "probe.com" -Path "/path/path.htm" -Interval 89 -Timeout 88 -UnhealthyThreshold 8
543+
$poolSetting01 = New-AzureRmApplicationGatewayBackendHttpSettings -Name $poolSetting01Name -Port 80 -Protocol Http -Probe $probeHttp -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress
544+
545+
#rule
546+
$rule01 = New-AzureRmApplicationGatewayRequestRoutingRule -Name $rule01Name -RuleType basic -BackendHttpSettings $poolSetting01 -HttpListener $listener01 -BackendAddressPool $pool
547+
548+
# sku
549+
$sku = New-AzureRmApplicationGatewaySku -Name Standard_v2 -Tier Standard_v2 -Capacity 2
550+
551+
# security part
552+
$sslPolicy = New-AzureRmApplicationGatewaySslPolicy -PolicyType Custom -MinProtocolVersion TLSv1_1 -CipherSuite "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_128_GCM_SHA256"
553+
554+
# Create Application Gateway
555+
$appgw = New-AzureRmApplicationGateway -Name $appgwName -ResourceGroupName $rgname -Zone 1,2 -Location $location -Probes $probeHttp -BackendAddressPools $pool -BackendHttpSettingsCollection $poolSetting01 -FrontendIpConfigurations $fipconfig -GatewayIpConfigurations $gipconfig -FrontendPorts $fp01 -HttpListeners $listener01 -RequestRoutingRules $rule01 -Sku $sku -SslPolicy $sslPolicy
556+
557+
# Operational State
558+
Assert-AreEqual "Running" $appgw.OperationalState
559+
560+
# Get for zones
561+
Assert-AreEqual $appgw.Zones.Count 2
562+
563+
# Get for SslPolicy
564+
$sslPolicy01 = Get-AzureRmApplicationGatewaySslPolicy -ApplicationGateway $appgw
565+
Assert-AreEqual $sslPolicy.MinProtocolVersion $sslPolicy01.MinProtocolVersion
566+
567+
# Stop Application Gateway
568+
$getgw = Stop-AzureRmApplicationGateway -ApplicationGateway $appgw
569+
570+
Assert-AreEqual "Stopped" $getgw.OperationalState
571+
572+
# Delete Application Gateway
573+
Remove-AzureRmApplicationGateway -Name $appgwName -ResourceGroupName $rgname -Force
574+
}
575+
finally
576+
{
577+
# Cleanup
578+
Clean-ResourceGroup $rgname
579+
}
580+
}
581+
488582
<#
489583
.SYNOPSIS
490584
Compare connectionDraining of backendhttpsettings

0 commit comments

Comments
 (0)