From 83566cdfe17cb6e9fe3f96f25034e3e53740e0c8 Mon Sep 17 00:00:00 2001 From: Ritvika Nagula Date: Wed, 6 May 2020 10:35:06 -0700 Subject: [PATCH 1/2] set default value to true --- src/Network/Network.Test/ScenarioTests/CortexTests.ps1 | 2 +- src/Network/Network/ChangeLog.md | 3 +++ .../Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs | 2 +- .../Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 b/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 index dfdb416c2a6c..675b1fec7668 100644 --- a/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 +++ b/src/Network/Network.Test/ScenarioTests/CortexTests.ps1 @@ -49,7 +49,7 @@ function Test-CortexCRUD $virtualWan = Get-AzVirtualWan -ResourceGroupName $rgName -Name $virtualWanName Assert-AreEqual $rgName $virtualWan.ResourceGroupName Assert-AreEqual $virtualWanName $virtualWan.Name - Assert-AreEqual $false $virtualWan.AllowVnetToVnetTraffic + Assert-AreEqual $true $virtualWan.AllowVnetToVnetTraffic Assert-AreEqual $false $virtualWan.AllowBranchToBranchTraffic $virtualWans = Get-AzureRmVirtualWan -ResourceGroupName $rgName diff --git a/src/Network/Network/ChangeLog.md b/src/Network/Network/ChangeLog.md index 02c649d49d8c..3d2ceab1d825 100644 --- a/src/Network/Network/ChangeLog.md +++ b/src/Network/Network/ChangeLog.md @@ -20,6 +20,9 @@ ## Upcoming Release * Fixed incorrect type of SuccessThresholdRoundTripTimeMs parameter for New-AzNetworkWatcherConnectionMonitorTestConfigurationObject +* Updated VirtualWan cmdlets to set default value of AllowVnetToVnetTraffic argument to True. + - `New-AzVirtualWan` + - `Update-AzVirtualWan` ## Version 2.5.0 * Updated cmdlets to enable connection on private IP for Virtual Network Gateway. diff --git a/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs b/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs index bbb9d02f8094..6a1a7ac17e2a 100644 --- a/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs +++ b/src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs @@ -106,7 +106,7 @@ private PSVirtualWan CreateVirtualWan() virtualWan.ResourceGroupName = this.ResourceGroupName; virtualWan.Location = this.Location; virtualWan.AllowBranchToBranchTraffic = this.AllowBranchToBranchTraffic.IsPresent; - virtualWan.AllowVnetToVnetTraffic = this.AllowVnetToVnetTraffic.IsPresent; + virtualWan.AllowVnetToVnetTraffic = true; if(string.IsNullOrWhiteSpace(this.VirtualWANType)) { diff --git a/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs b/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs index 8d8bfde8f5df..5abac30b173c 100644 --- a/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs +++ b/src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs @@ -150,7 +150,7 @@ private PSVirtualWan UpdateVirtualWan() if (this.AllowVnetToVnetTraffic.HasValue) { - virtualWanToUpdate.AllowVnetToVnetTraffic = this.AllowVnetToVnetTraffic.Value; + virtualWanToUpdate.AllowVnetToVnetTraffic = true; } if (!string.IsNullOrWhiteSpace(this.VirtualWANType)) From 2726c81ea9ce873e693c715f083c3383c16d3093 Mon Sep 17 00:00:00 2001 From: Ritvika Nagula Date: Wed, 6 May 2020 15:43:17 -0700 Subject: [PATCH 2/2] upadate again --- src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs b/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs index d36cf65ca609..6ea85be93b88 100644 --- a/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs +++ b/src/Network/Network/Cortex/VirtualWan/VirtualWanBaseCmdlet.cs @@ -65,6 +65,7 @@ public PSVirtualWan GetVirtualWan(string resourceGroupName, string name) var virtualWan = this.VirtualWanClient.Get(resourceGroupName, name); var psVirtualWan = ToPsVirtualWan(virtualWan); psVirtualWan.ResourceGroupName = resourceGroupName; + psVirtualWan.AllowVnetToVnetTraffic = true; return psVirtualWan; }