Skip to content

Commit c187fa4

Browse files
authored
High Bandwidth VPNGW changes (#27322)
1 parent 94c5ed6 commit c187fa4

File tree

10 files changed

+17740
-2
lines changed

10 files changed

+17740
-2
lines changed

src/Network/Network.Test/ScenarioTests/VirtualNetworkGatewayTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ public void TestVirtualNetworkExpressRouteGatewayCRUDwithResiliencyModel()
206206

207207
[Fact]
208208
[Trait(Category.AcceptanceType, Category.CheckIn)]
209+
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
210+
public void TestHighBandwidthVpnGatewayCreation()
211+
{
212+
TestRunner.RunTestScript("Test-HighBandwidthVpnGatewayCreation");
213+
}
214+
215+
[Fact]
209216
[Trait(Category.Owner, NrpTeamAlias.brooklynft_subset3)]
210217
public void TestVirtualNetworkGatewayMigrationFromBasicIPToSatndardIP()
211218
{

src/Network/Network.Test/ScenarioTests/VirtualNetworkGatewayTests.ps1

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,81 @@ function Test-VirtualNetworkExpressRouteGatewayCRUDwithResiliencyModel
18011801
}
18021802
}
18031803

1804+
<#
1805+
.SYNOPSIS
1806+
High Bandwidth Vpn gateway creation test
1807+
#>
1808+
function Test-HighBandwidthVpnGatewayCreation
1809+
{
1810+
# Setup
1811+
$rgname = Get-ResourceGroupName
1812+
$ergwName = Get-ResourceName
1813+
$vnetName = Get-ResourceName
1814+
$publicIpName = Get-ResourceName
1815+
$erIpConfigName = Get-ResourceName
1816+
$resourceTypeParent = "Microsoft.Network/virtualNetworkGateways"
1817+
$location = "West Central US"
1818+
$erConnName = Get-ResourceName
1819+
$publicIpName3 = Get-ResourceName
1820+
$publicIpName4 = Get-ResourceName
1821+
$vpnGatewayName = Get-ResourceName
1822+
$sku = "VpnGw5"
1823+
$vpngwConfigName1 = Get-ResourceName
1824+
$vpngwConfigName2 = Get-ResourceName
1825+
1826+
try
1827+
{
1828+
# Create the resource group
1829+
$resourceGroup = New-AzResourceGroup -Name $rgname -Location $location -Tags @{ testtag = "PS testing" }
1830+
1831+
# Create the Virtual Network
1832+
$subnet = New-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24
1833+
$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet
1834+
$vnet = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname
1835+
$subnet = Get-AzVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet
1836+
1837+
# Create the publicip
1838+
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -Sku Standard
1839+
1840+
# Create ipconfig
1841+
$vnetIpConfig = New-AzVirtualNetworkGatewayIpConfig -Name $erIpConfigName -PublicIpAddress $publicip -Subnet $subnet
1842+
1843+
# Create ExpressRoute gateway
1844+
$expected = New-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $ergwName -location $location -IpConfigurations $vnetIpConfig -GatewayType ExpressRoute -GatewaySku UltraPerformance
1845+
$erGateway = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name $ergwName
1846+
Assert-NotNull $erGateway
1847+
1848+
# Get Circuit
1849+
$circuit = Get-AzExpressRouteCircuit -Name "er-ckt-231"
1850+
Assert-AreEqual 1 @($circuit).Count
1851+
1852+
# Create & Get VirtualNetworkGatewayConnection
1853+
$conn = New-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $erConnName -location $location -VirtualNetworkGateway1 $erGateway -ConnectionType ExpressRoute -RoutingWeight 3 -PeerId $circuit.Id -ExpressRouteGatewayBypass -EnablePrivateLinkFastPath
1854+
$erConn = Get-AzVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $erConnName
1855+
Assert-NotNull $erConn
1856+
1857+
$publicIP1 = New-AzPublicIpAddress -ResourceGroupName $rgname -Location $location -Name $publicIpName3 -AllocationMethod Static -Sku Standard
1858+
$publicIP2 = New-AzPublicIpAddress -ResourceGroupName $rgname -Location $location -Name $publicIpName4 -AllocationMethod Static -Sku Standard
1859+
1860+
# Create Gateway IP Configurations
1861+
$gwIpConfig1 = New-AzVirtualNetworkGatewayIpConfig -Name $vpngwConfigName1 -Subnet $subnet -PublicIpAddress $publicIP1
1862+
$gwIpConfig2 = New-AzVirtualNetworkGatewayIpConfig -Name $vpngwConfigName2 -Subnet $subnet -PublicIpAddress $publicIP2
1863+
1864+
# Create high bandwidth VPN Gateway
1865+
$vpnGateway = New-AzVirtualNetworkGateway -Name $vpnGatewayName -ResourceGroupName $rgname -Location $location -IpConfigurations $gwIpConfig1, $gwIpConfig2 -GatewayType Vpn -VpnType RouteBased -EnableActiveActiveFeature -EnableAdvancedConnectivity -GatewaySku $sku
1866+
1867+
$gateway = Get-AzVirtualNetworkGateway -Name $vpnGatewayName -ResourceGroupName $rgname
1868+
Assert-NotNull $vpnGateway
1869+
Assert-NotNull $vpnGateway.EnableAdvancedConnectivity
1870+
Assert-AreEqual $vpnGateway.EnableAdvancedConnectivity true
1871+
}
1872+
finally
1873+
{
1874+
# Cleanup
1875+
Remove-AzResourceGroup $rgname
1876+
}
1877+
}
1878+
18041879
<#
18051880
.SYNOPSIS
18061881
Virtual network gateway migration from basic ip to standard ip tesr

0 commit comments

Comments
 (0)