Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b4f0f3c
IPSec Policies for VirtualNetworkGatewayConnection: added object mode…
henry416 Mar 20, 2017
ff8d713
merge conflict avoid
henry416 Mar 21, 2017
1a75de7
merged ipsec policies
henry416 Mar 21, 2017
cf1fe9f
Ipsec Policy VirtualNetworkGatewayConnection models + cmdlets + tests…
henry416 Mar 22, 2017
1d650b2
nuget package update in-progress
henry416 Mar 22, 2017
3318799
partial md files for ipsec policy addition
henry416 Mar 22, 2017
b33895a
Network PS xml for ipsec policy
henry416 Mar 23, 2017
038b4c0
PR feedback: Ipsec policy descriptions for .md and model + test recor…
henry416 Mar 24, 2017
c67eb8e
Changed usepolicybasedTS input type + signatureIssue exception suppre…
henry416 Mar 24, 2017
77f4a3e
added misc auto-generated documentation from platyPS
henry416 Mar 24, 2017
a03392a
removed App.config from Test csproj
henry416 Mar 24, 2017
c0523f9
Added synopsis to network.md file
henry416 Mar 24, 2017
7cd3558
Network package bump to 10.0.0-preview
henry416 Mar 29, 2017
eefad66
comments on policy based TS test
henry416 Mar 29, 2017
2006b5f
Network nuget package 10.0.0.0 version no. fix
henry416 Mar 29, 2017
5dcdad7
app.config removal
henry416 Mar 29, 2017
343a658
modify test session to 2017-03-01 for Network tests
henry416 Mar 30, 2017
4989d75
Compute fix for tests and imports
henry416 Mar 30, 2017
7f82146
fix for appgw test
henry416 Mar 30, 2017
4b2fdd4
Merge remote-tracking branch 'upstream/dev' into dev
henry416 Mar 30, 2017
6447d33
missing test fix
henry416 Mar 30, 2017
8c15ac6
test record fix - build not copying over data
henry416 Mar 30, 2017
5cf89f8
merge into release 3.8.0
henry416 Mar 31, 2017
46492e6
changelog for ipsec policies feature
henry416 Mar 31, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.2.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 this will need to be bumped up to 10.0.0-preview

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cormacpayne Shouldn't the version be 9.2.0? Anyways, the azure-sdk branch hasn't been merged yet so the nuget package to be published isn't available yet - think of the references as a placeholder for now.

@cormacpayne cormacpayne Mar 24, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 it will be 10.0.0-preview after the changes that @jobatzil made, but yes, this is a temporary placeholder until the SDK gets published 😄

<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="9.1.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="9.2.0-preview" targetFramework="net45" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 same comment

<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
Expand Down
1 change: 1 addition & 0 deletions src/ResourceManager/Network/AzureRM.Network.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
'Reset-AzureRmVirtualNetworkGatewayConnectionSharedKey',
'Set-AzureRmVirtualNetworkGatewayConnectionSharedKey',
'Set-AzureRmVirtualNetworkGatewayConnection',
'New-AzureRmIpsecPolicy',
'Get-AzureRmLoadBalancerBackendAddressPoolConfig',
'Add-AzureRmLoadBalancerBackendAddressPoolConfig',
'New-AzureRmLoadBalancerBackendAddressPoolConfig',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<Reference Include="Microsoft.Azure.Management.Authorization">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.2.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 same comment

<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.ResourceManager">
Expand Down Expand Up @@ -497,7 +497,7 @@
<ProjectReference Include="..\..\Resources\Commands.Resources\Commands.Resources.csproj">
<Project>{e1f5201d-6067-430e-b303-4e367652991b}</Project>
<Name>Commands.Resources</Name>
</ProjectReference>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ public void TestVirtualNetworkGatewayConnectionWithBgpCRUD()
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkGatewayConnectionWithBgpCRUD");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualNetworkGatewayConnectionwithIpsecPoliciesCRUD()
{
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkGatewayConnectionWithIpsecPoliciesCRUD");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestVirtualNetworkGatewayConnectionWithActiveAcitveGateway()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,78 @@ function Test-VirtualNetworkGatewayConnectionWithBgpCRUD
}
}

<#
.SYNOPSIS
Virtual network gateway connection tests with Ipsec Policies
#>
function Test-VirtualNetworkGatewayConnectionWithIpsecPoliciesCRUD
{
# Setup
$rgname = Get-ResourceGroupName
$rname = Get-ResourceName
$domainNameLabel = Get-ResourceName
$vnetName = Get-ResourceName
$localnetName = Get-ResourceName
$vnetConnectionName = Get-ResourceName
$publicIpName = Get-ResourceName
$vnetGatewayConfigName = Get-ResourceName
$rglocation = Get-ProviderLocation ResourceManagement
$resourceTypeParent = "Microsoft.Network/connections"
$location = Get-ProviderLocation $resourceTypeParent

try
{
# Create the resource group
$resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" }

# Create the Virtual Network
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -AddressPrefix 10.0.0.0/24
$vnet = New-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet
$vnet = Get-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname
$subnet = Get-AzureRmVirtualNetworkSubnetConfig -Name "GatewaySubnet" -VirtualNetwork $vnet

# Create the publicip
$publicip = New-AzureRmPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Dynamic -DomainNameLabel $domainNameLabel

# Create VirtualNetworkGateway
$vnetIpConfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet
$actual = New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -GatewaySku Standard
$vnetGateway = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname

# Create LocalNetworkGateway
$actual = New-AzureRmLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName -location $location -AddressPrefix 192.168.0.0/16 -GatewayIpAddress 192.168.3.10
$localnetGateway = Get-AzureRmLocalNetworkGateway -ResourceGroupName $rgname -name $localnetName

# Create IpsecPolicies
$ipsecPolicy = New-AzureRmIpsecPolicy -SALifeTimeSeconds 300 -SADataSizeKilobytes 1024 -IpsecEncryption "GCMAES256" -IpsecIntegrity "GCMAES256" -IkeEncryption "AES256" -IkeIntegrity "SHA256" -DhGroup "DHGroup14" -PfsGroup "PFS2048"

# Create & Get VirtualNetworkGatewayConnection
$actual = New-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $vnetGateway -LocalNetworkGateway2 $localnetGateway -ConnectionType IPsec -RoutingWeight 3 -SharedKey abc -EnableBgp false -UsePolicyBasedTrafficSelectors -IpsecPolicies $ipsecPolicy
$connection = Get-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName

# Verify IpsecPolicies
Assert-AreEqual $connection.UsePolicyBasedTrafficSelectors $actual.UsePolicyBasedTrafficSelectors
Assert-AreEqual $connection.IpsecPolicies.Count $actual.IpsecPolicies.Count
Assert-AreEqual $connection.IpsecPolicies[0].SALifeTimeSeconds $actual.IpsecPolicies[0].SALifeTimeSeconds
Assert-AreEqual $connection.IpsecPolicies[0].SADataSizeKilobytes $actual.IpsecPolicies[0].SADataSizeKilobytes
Assert-AreEqual $connection.IpsecPolicies[0].IpsecEncryption $actual.IpsecPolicies[0].IpsecEncryption
Assert-AreEqual $connection.IpsecPolicies[0].IpsecIntegrity $actual.IpsecPolicies[0].IpsecIntegrity
Assert-AreEqual $connection.IpsecPolicies[0].IkeEncryption $actual.IpsecPolicies[0].IkeEncryption
Assert-AreEqual $connection.IpsecPolicies[0].IkeIntegrity $actual.IpsecPolicies[0].IkeIntegrity
Assert-AreEqual $connection.IpsecPolicies[0].DhGroup $actual.IpsecPolicies[0].DhGroup
Assert-AreEqual $connection.IpsecPolicies[0].PfsGroup $actual.IpsecPolicies[0].PfsGroup

# Delete VirtualNetworkGatewayConnection
$delete = Remove-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force
Assert-AreEqual true $delete
}
finally
{
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Virtual network gateway connection test with Active-Active feature enabled virtual network gateway
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<package id="Microsoft.Azure.Insights" version="0.13.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="9.1.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Network" version="9.2.0-preview" targetFramework="net45" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 same comment

<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.ResourceManager" version="1.2.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.Network, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.9.2.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@henry416 same comment

<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Data.Edm">
Expand Down Expand Up @@ -321,6 +321,7 @@
<Compile Include="Models\PSExpressRouteServiveProvider.cs" />
<Compile Include="Models\PSExpressRouteServiceProviderBandwidthsOffered.cs" />
<Compile Include="Models\PSExpressRouteServiceProvider.cs" />
<Compile Include="Models\PSIpsecPolicy.cs" />
<Compile Include="Models\PSIpFlowVerify.cs" />
<Compile Include="Models\PSIPFlowVerifyResult.cs" />
<Compile Include="Models\PSNetworkInterfaceAssociation.cs" />
Expand Down Expand Up @@ -392,6 +393,7 @@
<Compile Include="NetworkWatcher\PacketCapture\StopAzureNetworkWatcherPacketCaptureCommand.cs" />
<Compile Include="NetworkWatcher\RemoveAzureNetworkWatcherCommand.cs" />
<Compile Include="ProviderWideCmdlets\GetAzureExpressRouteServiceProviderCommand.cs" />
<Compile Include="VirtualNetworkGatewayConnection\NewAzureRmIpsecPolicyCommand.cs" />
<Compile Include="RouteFilter\GetAzureRouteFilterCommand.cs" />
<Compile Include="RouteFilter\NewAzureRouteFilterCommand.cs" />
<Compile Include="RouteFilter\RemoveAzureRouteFilterCommand.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ protected override void Configure()
Mapper.CreateMap<CNM.PSConnectionSharedKey, MNM.ConnectionSharedKey>();
Mapper.CreateMap<CNM.PSLocalNetworkGateway, MNM.LocalNetworkGateway>();
Mapper.CreateMap<CNM.PSVirtualNetworkGatewayConnection, MNM.VirtualNetworkGatewayConnection>();
Mapper.CreateMap<CNM.PSIpsecPolicy, MNM.IpsecPolicy>();
Mapper.CreateMap<CNM.PSVirtualNetworkGatewayIpConfiguration, MNM.VirtualNetworkGatewayIPConfiguration>();
Mapper.CreateMap<CNM.PSTunnelConnectionHealth, MNM.TunnelConnectionHealth>();
Mapper.CreateMap<CNM.PSVirtualNetworkGatewaySku, MNM.VirtualNetworkGatewaySku>();
Expand All @@ -385,6 +386,7 @@ protected override void Configure()
Mapper.CreateMap<MNM.ConnectionSharedKey, CNM.PSConnectionSharedKey>();
Mapper.CreateMap<MNM.LocalNetworkGateway, CNM.PSLocalNetworkGateway>();
Mapper.CreateMap<MNM.VirtualNetworkGatewayConnection, CNM.PSVirtualNetworkGatewayConnection>();
Mapper.CreateMap<MNM.IpsecPolicy, CNM.PSIpsecPolicy>();
Mapper.CreateMap<MNM.VirtualNetworkGatewayIPConfiguration, CNM.PSVirtualNetworkGatewayIpConfiguration>();
Mapper.CreateMap<MNM.TunnelConnectionHealth, CNM.PSTunnelConnectionHealth>();
Mapper.CreateMap<MNM.VirtualNetworkGatewaySku, CNM.PSVirtualNetworkGatewaySku>();
Expand Down
Loading