Skip to content

Commit f71f12b

Browse files
committed
Merge branch 'network-september' of https://github.com/venkatsvpr/azure-powershell into network-october
2 parents eb96a51 + b1ea0ae commit f71f12b

File tree

395 files changed

+309066
-234610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+309066
-234610
lines changed

src/CognitiveServices/CognitiveServices.Test/CognitiveServices.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="6.0.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/Compute/Compute.Test/Compute.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
1515
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="29.1.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/DataLakeStore/DataLakeStore.Test/DataLakeStore.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/Dns/Dns.Test/Dns.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrud.json

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

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudByVirtualNetworkIds.json

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

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudByVirtualNetworkObjects.json

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

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudRegistrationVirtualNetwork.json

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

src/Dns/Dns.Test/SessionRecords/Microsoft.Azure.Commands.ScenarioTest.DnsTests.ZoneTests/TestPrivateZoneCrudResolutionVirtualNetwork.json

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

src/KeyVault/KeyVault.Test/KeyVault.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.1" />
1515
<PackageReference Include="Microsoft.Azure.KeyVault.WebKey" Version="3.0.1" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/NetAppFiles/NetAppFiles.Test/NetAppFiles.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.1.0" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/NetAppFiles/NetAppFiles.Test/ScenarioTests/VolumeTests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function Test-VolumeCrud
8383
# create the list of protocol types
8484
$protocolTypes = New-Object string[] 2
8585
$protocolTypes[0] = "NFSv3"
86-
$protocolTypes[1] = "NFSv4"
86+
$protocolTypes[1] = "NFSv4.1"
8787

8888
try
8989
{
@@ -112,8 +112,8 @@ function Test-VolumeCrud
112112
Assert-NotNull $retrievedVolume.ExportPolicy
113113
Assert-AreEqual $retrievedVolume.ExportPolicy.Rules[0].AllowedClients '0.0.0.0/0'
114114
Assert-AreEqual $retrievedVolume.ExportPolicy.Rules[1].AllowedClients '1.2.3.0/24'
115-
Assert-AreEqual $retrievedVolume.ProtocolTypes[0] 'NFSv3'
116-
Assert-AreEqual $retrievedVolume.ProtocolTypes[1] 'NFSv4.1'
115+
Assert-AreEqual $retrievedVolume.ProtocolTypes[0] $protocolTypes[0]
116+
Assert-AreEqual $retrievedVolume.ProtocolTypes[1] $protocolTypes[1]
117117
Assert-NotNull $retrievedVolume.MountTargets
118118

119119
# create second volume and check using the confirm flag
@@ -298,4 +298,4 @@ function Test-VolumePipelines
298298
# Cleanup
299299
Clean-ResourceGroup $resourceGroup
300300
}
301-
}
301+
}

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.SnapshotTests/TestSnapshotCrud.json

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

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.SnapshotTests/TestSnapshotPipelines.json

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

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.VolumeTests/TestVolumeCrud.json

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

src/NetAppFiles/NetAppFiles.Test/SessionRecords/Microsoft.Azure.Commands.NetAppFiles.Test.ScenarioTests.ScenarioTest.VolumeTests/TestVolumePipelines.json

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

src/Network/Network.Test/Network.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<ItemGroup>
1616
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.16.1-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1818
<PackageReference Include="Microsoft.Azure.Insights" Version="0.16.0-preview" />
1919
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="29.1.0" />
2020
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance" Version="2.0.0" />

src/Network/Network.Test/NrpTeamAlias.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ class NrpTeamAlias
3434
// Split into subsets due to tests' long running time
3535
// Cortex and LocalNetworkGateway tests
3636
public const string brooklynft = "brooklynft";
37-
// VirtualNetworkGatewayConnection tests
37+
// First part of VirtualNetworkGatewayConnection tests
3838
public const string brooklynft_subset1 = "brooklynft_subset1";
3939
// First half of VirtualNetworkGateway tests
4040
public const string brooklynft_subset2 = "brooklynft_subset2";
4141
// Second half of VirtualNetworkGateway tests
4242
public const string brooklynft_subset3 = "brooklynft_subset3";
43+
// Second part of VirtualNetworkGatewayConnection tests
44+
public const string brooklynft_subset4 = "brooklynft_subset4";
4345

4446
// Azure Network Analytics Dev Team
4547
public const string netanalyticsdev = "netanalyticsdev";
@@ -49,5 +51,8 @@ class NrpTeamAlias
4951

5052
//Azure NRP Firewall dev team
5153
public const string azurefirewall = "azurefirewall";
54+
55+
// Azure NRP bastion dev team
56+
public const string bastion = "bastion";
5257
}
5358
}

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

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,33 +2016,35 @@ function Test-ApplicationGatewayTopLevelFirewallPolicy
20162016
$listener01 = Get-AzApplicationGatewayHttpListener -ApplicationGateway $appgw -Name $listener01Name
20172017
Set-AzApplicationGatewayAutoscaleConfiguration -ApplicationGateway $appgw -MinCapacity 2
20182018
Set-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus403 -CustomErrorPageUrl $customError403Url02
2019-
Set-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway $appgw -Enabled $true -FirewallMode Prevention -RuleSetType "OWASP" -RuleSetVersion "3.0" -RequestBodyCheck $true -MaxRequestBodySizeInKb 70 -FileUploadLimitInMb 80
2019+
Set-AzApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway $appgw -Enabled $true -FirewallMode Prevention -RuleSetType "OWASP" -RuleSetVersion "3.0" -RequestBodyCheck $true -MaxRequestBodySizeInKb 70 -FileUploadLimitInMb 70
20202020
Set-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $appgw -Name $trustedRootCertName -CertificateFile $certFilePath2
20212021
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
20222022

20232023
# WAF Policy and Custom Rule
20242024
$variable = New-AzApplicationGatewayFirewallMatchVariable -VariableName RequestHeaders -Selector Content-Length
20252025
$condition = New-AzApplicationGatewayFirewallCondition -MatchVariable $variable -Operator GreaterThan -MatchValue 1000 -Transform Lowercase -NegationCondition $False
20262026
$rule = New-AzApplicationGatewayFirewallCustomRule -Name example -Priority 2 -RuleType MatchRule -MatchCondition $condition -Action Block
2027-
$policySettings = New-AzApplicationGatewayFirewallPolicySetting -Mode Prevention -State Enabled -FileUploadLimitInMb 80 -MaxRequestBodySizeInKb 70
2027+
$policySettings = New-AzApplicationGatewayFirewallPolicySetting -Mode Prevention -State Enabled -MaxFileUploadInMb 70 -MaxRequestBodySizeInKb 70
20282028
$managedRuleSet = New-AzApplicationGatewayFirewallPolicyManagedRuleSet -RuleSetType "OWASP" -RuleSetVersion "3.0"
20292029
$managedRule = New-AzApplicationGatewayFirewallPolicyManagedRule -ManagedRuleSet $managedRuleSet
2030-
New-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname -Location $location -ManagedRule $managedRule
2030+
$wafPolicyName = "wafPolicy1"
2031+
New-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname -Location $location -ManagedRule $managedRule -PolicySetting $policySettings
20312032

20322033
# Get Application Gateway
20332034
$appgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname
2035+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname
20342036
$appgw.FirewallPolicy = $policy
20352037
$appgw = Set-AzApplicationGateway -ApplicationGateway $appgw
20362038

2037-
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
2039+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname
20382040
$policy.CustomRules = $rule
20392041
Set-AzApplicationGatewayFirewallPolicy -InputObject $policy
20402042

20412043
$appgw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname
2042-
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
2044+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname
20432045

20442046
# Second check firewll policy
2045-
# Assert-AreEqual $policy.Id $appgw.FirewallPolicy.Id
2047+
Assert-AreEqual $policy.Id $appgw.FirewallPolicy.Id
20462048
Assert-AreEqual $policy.CustomRules[0].Name $rule.Name
20472049
Assert-AreEqual $policy.CustomRules[0].RuleType $rule.RuleType
20482050
Assert-AreEqual $policy.CustomRules[0].Action $rule.Action
@@ -2070,17 +2072,17 @@ function Test-ApplicationGatewayTopLevelFirewallPolicy
20702072

20712073
$managedRuleSet = New-AzApplicationGatewayFirewallPolicyManagedRuleSet -RuleSetType "OWASP" -RuleSetVersion "3.0" -RuleGroupOverride $sqlRuleGroupOverrideEntry,$xssRuleGroupOverrideEntry
20722074
$managedRules = New-AzApplicationGatewayFirewallPolicyManagedRule -ManagedRuleSet $managedRuleSet -Exclusion $exclusionEntry
2073-
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
2074-
$policySettings = New-ApplicationGatewayFirewallPolicySetting -Mode Prevention -State Enabled -FileUploadLimitInMb 750 -MaxRequestBodySizeInKb 128
2075+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname
2076+
$policySettings = New-AzApplicationGatewayFirewallPolicySetting -Mode Prevention -State Enabled -MaxFileUploadInMb 750 -MaxRequestBodySizeInKb 128
20752077
$policy.managedRules = $managedRules
20762078
$policy.PolicySettings = $policySettings
20772079
Set-AzApplicationGatewayFirewallPolicy -InputObject $policy
20782080

20792081
# Get firewall policy
2080-
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicy -ResourceGroupName $rgname
2082+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $wafPolicyName -ResourceGroupName $rgname
20812083
Assert-AreEqual $policy.ManagedRules.ManagedRuleSets.Count 1
20822084
Assert-AreEqual $policy.ManagedRules.ManagedRuleSets[0].RuleGroupOverrides.Count 2
2083-
Assert-AreEqual $policy.ManagedRules.Exclusions.Count 2
2085+
Assert-AreEqual $policy.ManagedRules.Exclusions.Count 1
20842086
Assert-AreEqual $policy.PolicySettings.FileUploadLimitInMb $policySettings.FileUploadLimitInMb
20852087
Assert-AreEqual $policy.PolicySettings.MaxRequestBodySizeInKb $policySettings.MaxRequestBodySizeInKb
20862088
Assert-AreEqual $policy.PolicySettings.RequestBodyCheck $policySettings.RequestBodyCheck
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,37 @@
1-
// <auto-generated>
2-
// Copyright (c) Microsoft and contributors. All rights reserved.
3-
//
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
66
// You may obtain a copy of the License at
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
98
// Unless required by applicable law or agreed to in writing, software
109
// distributed under the License is distributed on an "AS IS" BASIS,
1110
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
//
1311
// See the License for the specific language governing permissions and
1412
// limitations under the License.
15-
//
16-
//
17-
// Warning: This code was generated by a tool.
18-
//
19-
// Changes to this file may cause incorrect behavior and will be lost if the
20-
// code is regenerated.
21-
//
22-
// For documentation on code generator please visit
23-
// https://aka.ms/nrp-code-generation
24-
// Please contact [email protected] if you need to make changes to this file.
25-
// </auto-generated>
13+
// ----------------------------------------------------------------------------------
2614

2715
using Microsoft.Azure.Commands.Network.Test.ScenarioTests;
2816
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2917
using Xunit;
18+
using Xunit.Abstractions;
3019

3120
namespace Commands.Network.Test.ScenarioTests
3221
{
33-
public class UsageTestsGenerated : NetworkTestRunner
22+
public class AzureFirewallPolicyTests : NetworkTestRunner
3423
{
35-
public UsageTestsGenerated(Xunit.Abstractions.ITestOutputHelper output)
24+
public AzureFirewallPolicyTests(ITestOutputHelper output)
3625
: base(output)
3726
{
3827
}
3928

4029
[Fact]
4130
[Trait(Category.AcceptanceType, Category.CheckIn)]
42-
[Trait(Category.Owner, NrpTeamAlias.wanrpdev)]
43-
public void TestUsageCRUDMinimalParameters()
31+
[Trait(Category.Owner, NrpTeamAlias.azurefirewall)]
32+
public void TestAzureFirewallPolicyCRUD()
4433
{
45-
TestRunner.RunTestScript("Test-UsageCRUDMinimalParameters");
34+
TestRunner.RunTestScript("Test-AzureFirewallPolicyCRUD");
4635
}
4736
}
4837
}

0 commit comments

Comments
 (0)