Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network #12857

Closed
wants to merge 25 commits into from
Closed

Network #12857

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8e9d5f4
Ignore API version in Network tests (#12217)
anton-evseev Jun 22, 2020
7479c2b
Network tests: change RunType to AcceptanceType for LiveOnly tests (#…
anton-evseev Jun 22, 2020
e4edf11
[Network] Add Cmdlets for Network Virtual Appliance (NVA) and NVA si…
3vilbuff3r Jun 22, 2020
a1473c1
Onboard application gateway to PrivateLink Cmdlets (#12223)
jaishals Jun 22, 2020
d604afe
Merge remote-tracking branch 'remotes/upstream/master' into merge-fro…
anton-evseev Jun 22, 2020
976635f
Merge remote-tracking branch 'remotes/upstream/master' into merge-fro…
anton-evseev Jun 29, 2020
80e1ea3
Merge pull request #12235 from number213/merge-from-master
VeryEarly Jun 30, 2020
fb16075
Update recording mocking in HPCCache.Test.csproj (#12294)
anton-evseev Jun 30, 2020
5d8291a
Update Network owners (#12305)
anton-evseev Jul 2, 2020
6cecf64
Add RemoteBgpCommunities property to the VirtualNetworkPeering resour…
jarango Jul 13, 2020
3aa7d78
Add the new switch parameter AllowActiveFTP to Firewall Command (#12430)
tejasshah7 Jul 19, 2020
13eab56
Add HubIpConfiguration and HubBgpConnections (#12565)
litchiyangMSFT Aug 6, 2020
5d830ac
Change test name of virtual router peer (#12711)
litchiyangMSFT Aug 20, 2020
2f1b6b2
Fixed build version (#12750)
MikhailTryakhov Aug 24, 2020
4416b0e
Merge branch 'master' into network-june
MikhailTryakhov Aug 24, 2020
2db6556
Fixed az nw sdk version (#12763)
MikhailTryakhov Aug 25, 2020
891996d
Enable internet security feature for VirtualWan P2SVpnGateway client …
Nilambari Aug 28, 2020
d747cc0
[Network] Add Cmdlets for BYOIP Feature (#12704)
dexiang-ms Aug 28, 2020
7bf263d
New packet capture Cmdlet for Network Module: VpnConnection and VpnGa…
jiaczh Aug 31, 2020
b4ac9f5
Expose IP Configurations for Microsoft.Network\VpnGateways (#12315)
henry416 Sep 1, 2020
87ff4f8
Remote/network june fix (#12839)
MikhailTryakhov Sep 2, 2020
52e89b4
Merge branch 'master' into network-june
MikhailTryakhov Sep 2, 2020
c1de68b
Remote/network june fix (#12853)
MikhailTryakhov Sep 4, 2020
2559453
Remote/network june fix (#12855)
MikhailTryakhov Sep 4, 2020
22499d0
Merge branch 'master' into network
msJinLei Sep 4, 2020
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
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# To make sure Network PRs go to the right branch, e.g. network-april
/src/Network/ @number213

/src/Network/ @MikhailTryakhov
/src/Compute/ @bilaakpan-ms @sandido @dkulkarni-ms @haagha @madewithsmiles @MS-syh2qs @grizzlytheodore
2 changes: 1 addition & 1 deletion src/Batch/Batch.Test/Batch.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.Azure.Batch" Version="13.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Batch" Version="11.0.0" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="7.3.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Compute/Compute.Test/Compute.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="38.1.0" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/CosmosDB/CosmosDB.Test/CosmosDB.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<Import Project="$(MSBuildThisFileDirectory)..\..\Az.Test.props" />
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.CosmosDB" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Dns/Dns.Test/Dns.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/HDInsight/HDInsight.Test/HDInsight.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PsModuleName>HDInsight</PsModuleName>
Expand All @@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.Azure.Management.HDInsight.Job" Version="2.0.7" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.Management.ManagedServiceIdentity" Version="0.11.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />
</ItemGroup>

Expand Down
4 changes: 4 additions & 0 deletions src/HPCCache/HPCCache.Test/Fixtures/HpcCacheTestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace Microsoft.Azure.Commands.HPCCache.Test.Fixtures
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.Commands.HPCCache.Test.ScenarioTests;
using Microsoft.Azure.Commands.HPCCache.Test.Utilities;
using Microsoft.Azure.Management.Authorization;
using Microsoft.Azure.Management.Authorization.Models;
Expand All @@ -26,6 +27,7 @@ namespace Microsoft.Azure.Commands.HPCCache.Test.Fixtures
using Microsoft.Azure.Management.Network.Models;
using Microsoft.Azure.Management.StorageCache;
using Microsoft.Azure.Management.StorageCache.Models;
using Microsoft.Azure.Test.HttpRecorder;
using Microsoft.Rest.Azure;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;

Expand Down Expand Up @@ -59,6 +61,7 @@ public HpcCacheTestContext(
[System.Runtime.CompilerServices.CallerMemberName]
string methodName = ".ctor")
{
HttpMockServer.Matcher = HpcCacheController.GetRecordMatcher();
this.mockContext = MockContext.Start(suiteObject, methodName);
this.RegisterSubscriptionForResource("Microsoft.StorageCache");
}
Expand All @@ -73,6 +76,7 @@ public HpcCacheTestContext(
[System.Runtime.CompilerServices.CallerMemberName]
string methodName = ".ctor")
{
HttpMockServer.Matcher = HpcCacheController.GetRecordMatcher();
this.mockContext = MockContext.Start(type.Name, methodName);
this.RegisterSubscriptionForResource("Microsoft.StorageCache");
}
Expand Down
2 changes: 1 addition & 1 deletion src/HPCCache/HPCCache.Test/HPCCache.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.11.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="14.5.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.18.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.0" />
</ItemGroup>

Expand Down
33 changes: 21 additions & 12 deletions src/HPCCache/HPCCache.Test/ScenarioTests/HPCCacheController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,26 @@ public void RunPsTest(XunitTracingInterceptor logger, params string[] scripts)
logger.Information(string.Format("Test method finished: {0}.{1}", callingClassType, mockName));
}

/// <summary>
/// Gets storage management client.
/// </summary>
static public IRecordMatcher GetRecordMatcher()
{
var d = new Dictionary<string, string>
{
{ "Microsoft.Resources", null },
{ "Microsoft.Features", null },
{ "Microsoft.Authorization", null },
{ "Microsoft.Network", null },
};
var providersToIgnore = new Dictionary<string, string>
{
{ "Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01" },
{ "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient", "2017-05-10" },
};
return new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
}

/// <summary>
/// RunPsTestWorkflow.
/// </summary>
Expand All @@ -103,18 +123,7 @@ protected void RunPsTestWorkflow(
Action initialize = null)
{
this.helper.TracingInterceptor = logger;
var d = new Dictionary<string, string>
{
{ "Microsoft.Resources", null },
{ "Microsoft.Features", null },
{ "Microsoft.Authorization", null },
};
var providersToIgnore = new Dictionary<string, string>
{
{ "Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01" },
{ "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient", "2017-05-10" },
};
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(true, d, providersToIgnore);
HttpMockServer.Matcher = GetRecordMatcher();
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
using (var context = new HpcCacheTestContext(callingClassType, mockName))
{
Expand Down
2 changes: 1 addition & 1 deletion src/KeyVault/KeyVault.Test/KeyVault.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.0.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Monitor/Monitor.Test/Monitor.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.Monitor" Version="0.25.1-preview" />
<PackageReference Include="Microsoft.Azure.Management.ApplicationInsights" Version="0.3.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.21.0-preview" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles.Test/NetAppFiles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.4.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Network/Network.Test/Network.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.0.2-preview" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.1.1" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.5" />
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="3.0.1" />
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
Expand Down
3 changes: 3 additions & 0 deletions src/Network/Network.Test/NrpTeamAlias.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ class NrpTeamAlias

// Azure Network IPAM dev team
public const string ipam = "ipamdev";

// Azure Network Billing and Telemetry team
public const string billingandtelemetry = "azurenetworkbilling";
}
}
8 changes: 8 additions & 0 deletions src/Network/Network.Test/ScenarioTests/AzureFirewallTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,13 @@ public void TestAzureFirewallVirtualHubMultiPublicIPCRUD()
{
TestRunner.RunTestScript("Test-AzureFirewallVirtualHubMultiPublicIPCRUD");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
public void TestAzureFirewallCRUDWithAllowActiveFTP()
{
TestRunner.RunTestScript("Test-AzureFirewallCRUDAllowActiveFTP");
}
}
}
45 changes: 45 additions & 0 deletions src/Network/Network.Test/ScenarioTests/AzureFirewallTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1515,4 +1515,49 @@ function Test-AzureFirewallVirtualHubMultiPublicIPCRUD {
# Cleanup
Clean-ResourceGroup $rgname
}
}

<#
.SYNOPSIS
Tests AzureFirewall AllowActiveFTP
#>
function Test-AzureFirewallCRUDAllowActiveFTP {
$rgname = Get-ResourceGroupName
$azureFirewallName = Get-ResourceName
$resourceTypeParent = "Microsoft.Network/AzureFirewalls"
$location = Get-ProviderLocation $resourceTypeParent "eastus"

$vnetName = Get-ResourceName
$subnetName = "AzureFirewallSubnet"
$publicIpName = Get-ResourceName

try {
# Create the resource group
$resourceGroup = New-AzResourceGroup -Name $rgname -Location $location

# Create the Virtual Network
$subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.0.0/24
$vnet = New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet

# Create public ip
$publicip = New-AzPublicIpAddress -ResourceGroupName $rgname -name $publicIpName -location $location -AllocationMethod Static -Sku Standard

# Create AzureFirewall
$azureFirewall = New-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname -Location $location -AllowActiveFTP

# Verify
$azFirewall = Get-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname
Assert-AreEqual true $azFirewall.AllowActiveFTP

# Reset the AllowActiveFTP flag
$azFirewall.AllowActiveFTP = $false
Set-AzFirewall -AzureFirewall $azFirewall
$azfw = Get-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname

Assert-AreEqual false $azfw.AllowActiveFTP
}
finally {
# Cleanup
Clean-ResourceGroup $rgname
}
}
18 changes: 17 additions & 1 deletion src/Network/Network.Test/ScenarioTests/CortexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void TestCortexExpressRouteCRUD()
}

[Fact]
[Trait(Category.RunType, Category.LiveOnly)]
[Trait(Category.AcceptanceType, Category.LiveOnly)]
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
public void TestCortexDownloadConfig()
{
Expand Down Expand Up @@ -90,5 +90,21 @@ public void TestVHubRouteTableCRUD()
{
TestRunner.RunTestScript("Test-VHubRouteTableCRUD");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
public void TestVpnGatewayPacketCapture()
{
TestRunner.RunTestScript("Test-VpnGatewayPacketCapture");
}

[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
[Trait(Category.Owner, NrpTeamAlias.brooklynft)]
public void TestVpnConnectionPacketCapture()
{
TestRunner.RunTestScript("Test-VpnConnectionPacketCapture");
}
}
}
Loading