Skip to content

Commit 3b56c93

Browse files
dtuCloudDan Tu
andauthored
Revert "Add mapping rule on VirtualNetworkEncryption (#18731)" (#18847)
This reverts commit 76400a9. Co-authored-by: Dan Tu <[email protected]>
1 parent 76400a9 commit 3b56c93

File tree

5 files changed

+975
-686
lines changed

5 files changed

+975
-686
lines changed

src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void TestVirtualNetworkEdgeZone()
179179
}
180180

181181
[Fact]
182-
[Trait(Category.AcceptanceType, Category.CheckIn)]
182+
[Trait(Category.AcceptanceType, Category.LiveOnly)]
183183
[Trait(Category.Owner, NrpTeamAlias.sdnnrp)]
184184
public void TestVirtualNetworkEncryption()
185185
{

src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,6 @@ function Test-VirtualNetworkEncryption
15731573
Assert-AreEqual "dropUnencrypted" $vnet2.Encryption.Enforcement
15741574

15751575
# Update the encryption policies on both virtual networks
1576-
$vnet1.Encryption.Enabled = "false"
15771576
$vnet1.Encryption.Enforcement = "allowUnencrypted"
15781577
$vnet2.Encryption.Enforcement = "allowUnencrypted"
15791578
$updateVnet1Job = $vnet1 | Set-AzVirtualNetwork -AsJob
@@ -1586,7 +1585,7 @@ function Test-VirtualNetworkEncryption
15861585
# Perform GET operations to retrieve both virtual networks and verify that the encryption property is set to the expected value
15871586
$vnet1 = Get-AzVirtualNetwork -Name $vnet1Name -ResourceGroupName $rgname
15881587
$vnet2 = Get-AzVirtualNetwork -Name $vnet2Name -ResourceGroupName $rgname
1589-
Assert-AreEqual "false" $vnet1.Encryption.Enabled
1588+
Assert-AreEqual "true" $vnet1.Encryption.Enabled
15901589
Assert-AreEqual "true" $vnet2.Encryption.Enabled
15911590
Assert-AreEqual "allowUnencrypted" $vnet1.Encryption.Enforcement
15921591
Assert-AreEqual "allowUnencrypted" $vnet2.Encryption.Enforcement
@@ -1616,15 +1615,15 @@ function Test-VirtualNetworkEncryption
16161615
$vnet1 = Get-AzVirtualNetwork -Name $vnet1Name -ResourceGroupName $rgname
16171616
$vnet2 = Get-AzVirtualNetwork -Name $vnet2Name -ResourceGroupName $rgname
16181617
Assert-AreEqual "true" $vnet1.VirtualNetworkPeerings[0].RemoteVirtualNetworkEncryption.Enabled
1619-
Assert-AreEqual "false" $vnet2.VirtualNetworkPeerings[0].RemoteVirtualNetworkEncryption.Enabled
1618+
Assert-AreEqual "true" $vnet2.VirtualNetworkPeerings[0].RemoteVirtualNetworkEncryption.Enabled
16201619
Assert-AreEqual "allowUnencrypted" $vnet2.VirtualNetworkPeerings[0].RemoteVirtualNetworkEncryption.Enforcement
16211620
Assert-AreEqual "allowUnencrypted" $vnet1.VirtualNetworkPeerings[0].RemoteVirtualNetworkEncryption.Enforcement
16221621

16231622
# Get Peering to confirm the RemoteVirtualNetworkEncryption property
16241623
$peering1 = Get-AzVirtualNetworkPeering -Name $peering1Name -VirtualNetwork $vnet1Name -ResourceGroupName $rgname
16251624
$peering2 = Get-AzVirtualNetworkPeering -Name $peering2Name -VirtualNetwork $vnet2Name -ResourceGroupName $rgname
16261625
Assert-AreEqual "true" $peering1.RemoteVirtualNetworkEncryption.Enabled
1627-
Assert-AreEqual "false" $peering2.RemoteVirtualNetworkEncryption.Enabled
1626+
Assert-AreEqual "true" $peering2.RemoteVirtualNetworkEncryption.Enabled
16281627
Assert-AreEqual "allowUnencrypted" $peering1.RemoteVirtualNetworkEncryption.Enforcement
16291628
Assert-AreEqual "allowUnencrypted" $peering2.RemoteVirtualNetworkEncryption.Enforcement
16301629
}

src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkEncryption.json

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

src/Network/Network/ChangeLog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
- `Update-AzRouteServer`
8282
* Fixed bug that can't parse CustomIpPrefixParent parameter from swagger to powershell.
8383
* Added "Any" operator in New-AzApplicationGatewayFirewallCondition
84-
* Fixed bugs that cannot parse virtual network encryption paramemters when updating exsiting vnet.
8584

8685
## Version 4.16.1
8786
* Fixed `ArgumentNullException` in `Add-AzureRmRouteConfig` when `RouteTable.Routes` is null.

src/Network/Network/Common/NetworkResourceManagerProfile.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,6 @@ private static void Initialize()
264264
cfg.CreateMap<MNM.BgpServiceCommunity, CNM.PSBgpServiceCommunity>();
265265
cfg.CreateMap<MNM.BGPCommunity, CNM.PSBgpCommunity>();
266266

267-
// Virtual Network Encryption
268-
cfg.CreateMap<CNM.PSVirtualNetworkEncryption, MNM.VirtualNetworkEncryption>();
269-
cfg.CreateMap<MNM.VirtualNetworkEncryption, CNM.PSVirtualNetworkEncryption>();
270-
271267
// Subnet
272268
// CNM to MNM
273269
cfg.CreateMap<CNM.PSDhcpOptions, MNM.DhcpOptions>();

0 commit comments

Comments
 (0)