Skip to content

Commit d9bca06

Browse files
authored
Merging: Rel 3.2.0 ==> Master (Azure#3199)
* Need to check for null when creating Tags. * 1. Added new new param:TunnelConnectionStatus in output object:VirtualNetworkGatewayConnection and 2. Added new optional input param:gatewayVip in ResetGateway API. * Fix build error due to error in help file * Fixing bugs and modifying tests for analysis services commands - Added ServerFullName property to powershell type. - Modified tests to validate. * Incorporate review comments * revert back common.ps1 * Updated changeLog as per comments * Fix changeLog file * Bumping module version to 3.2.0 for AzureRm and AzureRm.Network
1 parent 15bb4e1 commit d9bca06

File tree

31 files changed

+21453
-1785
lines changed

31 files changed

+21453
-1785
lines changed

ChangeLog.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
## 2016.11.02 - Version 3.1.0
1+
## 2016.11.14 - Version 3.2.0
2+
* Network
3+
* Get-AzureRmVirtualNetworkGatewayConnection
4+
    - Added new param :- TunnelConnectionStatus in output Connection object to show per tunnel connection health status.
5+
* Reset-AzureRmVirtualNetworkGateway
6+
    - Added optional input param:- gatewayVip to pass gateway vip for ResetGateway API in case of Active-Active feature enabled gateways.
7+
    - Gateway Vip can be retrieved from PublicIPs refered in VirtualNetworkGateway object.
8+
9+
## 2016.11.02 - Version 3.1.0
210
* ApiManagement
311
* Fixed cmdlet Import-AzureRmApiManagementApi when importing Api by SpecificationByUrl parameter
412
* New-AzureRmApiManagement supports creating an ApiManagement service in a VirtualNetwork and with additional regions

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/ScenarioTests/AsTests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function Test-AnalysisServicesServer
2222
Assert-AreEqual $location $serverCreated.Location
2323
Assert-AreEqual "Microsoft.AnalysisServices/servers" $serverCreated.Type
2424
Assert-True {$serverCreated.Id -like "*$resourceGroupName*"}
25+
Assert-True {$serverCreated.ServerFullName -ne $null -and $serverCreated.ServerFullName.Contains("*$serverName*")}
2526

2627
[array]$serverGet = Get-AzureRmAnalysisServicesServer -ResourceGroupName $resourceGroupName -Name $serverName
2728
$serverGetItem = $serverGet[0]

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/SessionRecords/Microsoft.Azure.Commands.AnalysisServices.Test.ScenarioTests.AsTests/TestAnalysisServicesServer.json

Lines changed: 375 additions & 321 deletions
Large diffs are not rendered by default.

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/SessionRecords/Microsoft.Azure.Commands.AnalysisServices.Test.ScenarioTests.AsTests/TestNegativeAnalysisServicesServer.json

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

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Models/AnalysisServicesClient.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public AnalysisServicesServer CreateOrUpdateServer(
8787
var updateParameters = new AnalysisServicesServerUpdateParameters()
8888
{
8989
Sku = existingServer.Sku,
90-
Tags = tags ?? new Dictionary<string, string>(),
90+
Tags = tags,
9191
AsAdministrators = new ServerAdministrators(adminList)
9292
};
9393

@@ -103,7 +103,7 @@ public AnalysisServicesServer CreateOrUpdateServer(
103103
AsAdministrators = new ServerAdministrators(adminList),
104104
Location = location,
105105
Sku = GetResourceSkuFromName(skuName),
106-
Tags = tags ?? new Dictionary<string, string>()
106+
Tags = tags
107107
});
108108
}
109109

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Models/AzureAnalysisServicesServer.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public class AzureAnalysisServicesServer
3939

4040
public string Location { get; set; }
4141

42+
public string ServerFullName { get; private set; }
43+
4244
public ServerSku Sku { get; set; }
4345

4446
public System.Collections.Generic.IDictionary<string, string> Tag { get; set; }
@@ -52,16 +54,17 @@ internal static AzureAnalysisServicesServer FromAnalysisServicesServer(AnalysisS
5254

5355
return new AzureAnalysisServicesServer()
5456
{
55-
AsAdministrators = server.AsAdministrators == null
56-
? new List<string>()
57+
AsAdministrators = server.AsAdministrators == null
58+
? new List<string>()
5759
: new List<string>(server.AsAdministrators.Members),
5860
Location = server.Location,
5961
Name = server.Name,
6062
Type = server.Type,
6163
ProvisioningState = server.ProvisioningState,
6264
Id = server.Id,
63-
Sku = ServerSku.FromResourceSku(server.Sku),
64-
Tag = new Dictionary<string, string>(server.Tags)
65+
ServerFullName = server.ServerFullName,
66+
Sku = server.Sku != null ? ServerSku.FromResourceSku(server.Sku) : new ServerSku(),
67+
Tag = server.Tags != null ? new Dictionary<string, string>(server.Tags) : new Dictionary<string, string>()
6568
};
6669
}
6770

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.13.1.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.0.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
70+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.Management.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.2.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Compute" version="13.1.0-prerelease" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.Network" version="8.0.0-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.Network" version="8.1.0-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.Framework" version="1.0.6052.28118-prerelease" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.13.1.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
8181
<Private>True</Private>
8282
</Reference>
83-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.0.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
83+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
8585
<Private>True</Private>
8686
</Reference>
8787
<Reference Include="Microsoft.Azure.Management.Storage">

src/ResourceManager/Compute/Commands.Compute/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Compute" version="13.1.0-prerelease" targetFramework="net45" />
12-
<package id="Microsoft.Azure.Management.Network" version="8.0.0-preview" targetFramework="net45" />
12+
<package id="Microsoft.Azure.Management.Network" version="8.1.0-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1414
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1515
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/Network/AzureRM.Network.psd1

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '3.1.0'
15+
ModuleVersion = '3.2.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -293,13 +293,11 @@ PrivateData = @{
293293
# IconUri = ''
294294

295295
# ReleaseNotes of this module
296-
ReleaseNotes = '* Add-AzureRmVirtualNetworkPeering
297-
- Parameter AlloowGatewayTransit renamed to AllowGatewayTransit (an alias for the old parameter was created)
298-
- Fixed issue where UseRemoteGateway property was not being populated in the request to the server
299-
* Get-AzureRmEffectiveNetworkSecurityGroup
300-
- Add warning if there is no response from GetEffectiveNSG
301-
* Add Source property to EffectiveRoute
302-
'
296+
ReleaseNotes = '* Get-AzureRmVirtualNetworkGatewayConnection
297+
    - Added new param :- TunnelConnectionStatus in output Connection object to show per tunnel connection health status.
298+
* Reset-AzureRmVirtualNetworkGateway
299+
    - Added optional input param:- gatewayVip to pass gateway vip for ResetGateway API in case of Active-Active feature enabled gateways.
300+
    - Gateway Vip can be retrieved from PublicIPs refered in VirtualNetworkGateway object.'
303301

304302
# External dependent modules of this module
305303
# ExternalModuleDependencies = ''

src/ResourceManager/Network/ChangeLog.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@
1717
* Overview of change #1
1818
- Additional information about change #1
1919
-->
20-
## Current Release
20+
## Current Release
21+
22+
## Version 3.2.0
23+
* Get-AzureRmVirtualNetworkGatewayConnection
24+
    - Added new param :- TunnelConnectionStatus in output Connection object to show per tunnel connection health status.
25+
* Reset-AzureRmVirtualNetworkGateway
26+
    - Added optional input param:- gatewayVip to pass gateway vip for ResetGateway API in case of Active-Active feature enabled gateways.
27+
    - Gateway Vip can be retrieved from PublicIPs refered in VirtualNetworkGateway object.
2128

2229
## Version 3.1.0
2330
* Add-AzureRmVirtualNetworkPeering
24-
- Parameter AlloowGatewayTransit renamed to AllowGatewayTransit (an alias for the old parameter was created)
25-
- Fixed issue where UseRemoteGateway property was not being populated in the request to the server
31+
    - Parameter AlloowGatewayTransit renamed to AllowGatewayTransit (an alias for the old parameter was created)
32+
    - Fixed issue where UseRemoteGateway property was not being populated in the request to the server
2633
* Get-AzureRmEffectiveNetworkSecurityGroup
27-
- Add warning if there is no response from GetEffectiveNSG
28-
* Add Source property to EffectiveRoute
34+
    - Add warning if there is no response from GetEffectiveNSG
35+
* Add Source property to EffectiveRoute

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.13.1-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.0.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
70+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.Management.Redis">
@@ -410,6 +410,9 @@
410410
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayConnectionTests\TestVirtualNetworkGatewayConnectionSharedKeyCRUD.json">
411411
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
412412
</None>
413+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayConnectionTests\TestVirtualNetworkGatewayConnectionWithActiveAcitveGateway.json">
414+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
415+
</None>
413416
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestResourceNavigationLinksOnSubnetCRUD.json" >
414417
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
415418
</None>

src/ResourceManager/Network/Commands.Network.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232

3333
[assembly: Guid("d1e9969e-7b83-4dfc-a7a2-523d4f7e6cc9")]
3434

35-
[assembly: AssemblyVersion("3.1.0")]
36-
[assembly: AssemblyFileVersion("3.1.0")]
35+
[assembly: AssemblyVersion("3.2.0")]
36+
[assembly: AssemblyFileVersion("3.2.0")]
3737
[assembly: CollectionBehavior(DisableTestParallelization = true)]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function Get-ProviderLocation($provider)
5151
{
5252
if($location.Locations[0] -eq "West US")
5353
{
54-
return $location.Locations[1]
54+
return $location.Locations[1]
5555
}
5656
else
5757
{

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,12 @@ public void TestVirtualNetworkGatewayConnectionWithBgpCRUD()
4646
{
4747
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkGatewayConnectionWithBgpCRUD");
4848
}
49+
50+
[Fact]
51+
[Trait(Category.AcceptanceType, Category.CheckIn)]
52+
public void TestVirtualNetworkGatewayConnectionWithActiveAcitveGateway()
53+
{
54+
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkGatewayConnectionWithActiveActiveGateway");
55+
}
4956
}
5057
}

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

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,89 @@ function Test-VirtualNetworkGatewayConnectionWithBgpCRUD
125125
}
126126
}
127127

128+
<#
129+
.SYNOPSIS
130+
Virtual network gateway connection test with Active-Active feature enabled virtual network gateway
131+
#>
132+
function Test-VirtualNetworkGatewayConnectionWithActiveActiveGateway
133+
{
134+
# Setup
135+
$rgname = Get-ResourceGroupName
136+
$rname1 = Get-ResourceName
137+
$rname2 = Get-ResourceName
138+
$domainNameLabel11 = Get-ResourceName
139+
$domainNameLabel12 = Get-ResourceName
140+
$domainNameLabel2 = Get-ResourceName
141+
$vnetName1 = Get-ResourceName
142+
$vnetName2 = Get-ResourceName
143+
$vnetConnectionName1 = Get-ResourceName
144+
$vnetConnectionName2 = Get-ResourceName
145+
$publicIpName11 = Get-ResourceName
146+
$publicIpName12 = Get-ResourceName
147+
$publicIpName2 = Get-ResourceName
148+
$vnetGatewayConfigName11 = Get-ResourceName
149+
$vnetGatewayConfigName12 = Get-ResourceName
150+
$vnetGatewayConfigName2 = Get-ResourceName
151+
$rglocation = Get-ProviderLocation ResourceManagement
152+
$resourceTypeParent = "Microsoft.Network/connections"
153+
$location = Get-ProviderLocation $resourceTypeParent
154+
155+
try
156+
{
157+
# Create the resource group
158+
$resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" }
159+
160+
# Create the Virtual Network1
161+
$subnet1 = New-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24
162+
$vnet1 = New-AzureRmvirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet1
163+
$vnet1 = Get-AzureRmvirtualNetwork -Name $vnetName1 -ResourceGroupName $rgname
164+
$subnet1 = Get-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet1
165+
166+
# Create Active-Active feature enabled virtualnetworkgateway1 & Get virtualnetworkgateway1
167+
$publicip11 = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -name $publicIpName11 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel11
168+
$vnetIpConfig11 = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName11 -PublicIpAddress $publicip11 -Subnet $subnet1
169+
170+
$publicip12 = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -name $publicIpName12 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel12
171+
$vnetIpConfig12 = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName12 -PublicIpAddress $publicip12 -Subnet $subnet1
172+
173+
$actual = New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1 -Location $location -IpConfigurations $vnetIpConfig11,$vnetIpConfig12 -GatewayType Vpn -VpnType RouteBased -EnableBgp $false -GatewaySku HighPerformance -EnableActiveActiveFeature
174+
$vnetGateway1 = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname1
175+
176+
# Create the Virtual Network2
177+
$subnet2 = New-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 192.168.200.0/26
178+
$vnet2 = New-AzureRmvirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname -Location $location -AddressPrefix 192.168.0.0/16 -Subnet $subnet2
179+
$vnet2 = Get-AzureRmvirtualNetwork -Name $vnetName2 -ResourceGroupName $rgname
180+
$subnet2 = Get-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet2
181+
182+
# Create the publicip2
183+
$publicip2 = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -name $publicIpName2 -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel2
184+
185+
# Create VirtualNetworkGateway2
186+
$vnetIpConfig2 = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName2 -PublicIpAddress $publicip2 -Subnet $subnet2
187+
188+
$actual = New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2 -location $location -IpConfigurations $vnetIpConfig2 -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard
189+
$vnetGateway2 = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname2
190+
191+
# Create & Get VirtualNetworkGatewayConnection1, VirtualNetworkGatewayConnection2
192+
$actual1 = New-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1 -location $location -VirtualNetworkGateway1 $vnetGateway1 -VirtualNetworkGateway2 $vnetGateway2 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc
193+
$actual2 = New-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName2 -location $location -VirtualNetworkGateway1 $vnetGateway2 -VirtualNetworkGateway2 $vnetGateway1 -ConnectionType Vnet2Vnet -RoutingWeight 3 -SharedKey abc
194+
195+
$connection1 = Get-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName1
196+
Assert-NotNull $connection1.TunnelConnectionStatus
197+
198+
# Delete VirtualNetworkGatewayConnections
199+
$delete = Remove-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName1 -PassThru -Force
200+
Assert-AreEqual true $delete
201+
$delete = Remove-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName2 -PassThru -Force
202+
Assert-AreEqual true $delete
203+
}
204+
finally
205+
{
206+
# Cleanup
207+
Clean-ResourceGroup $rgname
208+
}
209+
}
210+
128211
function Test-VirtualNetworkGatewayConnectionCRUD
129212
{
130213
# Setup

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ function Test-VirtualNetworkGatewayCRUD
108108

109109
# Create & Get virtualnetworkgateway
110110
$vnetIpConfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet
111-
112111
$actual = New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -EnableBgp $false
113112
$expected = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
114113
Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
@@ -128,6 +127,12 @@ function Test-VirtualNetworkGatewayCRUD
128127
$list = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname
129128
Assert-AreEqual 1 @($list).Count
130129

130+
# Reset/Reboot virtualNetworkGateway by passing gateway vip
131+
$publicipAddress = Get-AzureRmPublicIpAddress -Name $publicip.Name -ResourceGroupName $publicip.ResourceGroupName
132+
$actual = Reset-AzureRmVirtualNetworkGateway -VirtualNetworkGateway $expected -GatewayVip $publicipAddress.IpAddress
133+
$list = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname
134+
Assert-AreEqual 1 @($list).Count
135+
131136
# Delete virtualNetworkGateway
132137
$delete = Remove-AzureRmVirtualNetworkGateway -ResourceGroupName $actual.ResourceGroupName -name $rname -PassThru -Force
133138
Assert-AreEqual true $delete

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayConnectionTests/TestVirtualNetworkGatewayConnectionWithActiveAcitveGateway.json

Lines changed: 17003 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayTests/TestVirtualNetworkGatewayCRUD.json

Lines changed: 3330 additions & 1146 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.2.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Insights" version="0.13.1-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.Network" version="8.0.0-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.Network" version="8.1.0-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Test.Framework" version="1.0.6052.28118-prerelease" targetFramework="net45" />

0 commit comments

Comments
 (0)