Skip to content

Commit 9e2b654

Browse files
{VirtualWan} Mark older routeTable cmdlets as deprecating (#13427)
Force merge due to time out of windows test cases. * mark rtv1 and rtv2 as deprecated * update change log
1 parent d028cb5 commit 9e2b654

10 files changed

+28
-2
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@
1919
--->
2020

2121
## Upcoming Release
22+
* Updated planning to deprecate warnings for the following cmdlets
23+
-`New-AzVirtualHubRoute`
24+
-`New-AzVirtualHubRouteTable`
25+
-`Add-AzVirtualHubRoute`
26+
-`Add-AzVirtualHubRouteTable`
27+
-`Get-AzVirtualHubRouteTable`
28+
-`Remove-AzVirtualHubRouteTable`
29+
* Added planning to deprecate warnings on the argument `RouteTable` for the following cmdlets
30+
-`New-AzVirtualHub`
31+
-`Set-AzVirtualHub`
32+
-`Update-AzVirtualHub`
2233

2334
## Version 4.1.0
2435
* [Breaking Change] Removed parameter `HostedSubnet` and added `Subnet` instead

src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ public class NewAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
7979
HelpMessage = "The hub virtual network connections associated with this Virtual Hub.")]
8080
public PSHubVirtualNetworkConnection[] HubVnetConnection { get; set; }
8181

82+
public const String RTv1ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands.";
83+
[CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv1ChangeDesc)]
8284
[Parameter(
8385
Mandatory = false,
8486
HelpMessage = "The route table associated with this Virtual Hub.")]

src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Network
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2222
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2323

24-
[CmdletDeprecation(ReplacementCmdletName = "Add-AzVirtualHubRoute")]
24+
[CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRoute")]
2525
[Cmdlet(
2626
VerbsCommon.New,
2727
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRoute",

src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Network
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2222
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2323

24-
[CmdletDeprecation(ReplacementCmdletName = "Add-AzVirtualHubRouteTable")]
24+
[CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRouteTable")]
2525
[Cmdlet(VerbsCommon.New,
2626
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable",
2727
SupportsShouldProcess = false),

src/Network/Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace Microsoft.Azure.Commands.Network
2828
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2929
using System.Linq;
3030
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
31+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
3132

3233
[Cmdlet("Set",
3334
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHub",
@@ -72,6 +73,8 @@ public class SetAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
7273
[ValidateNotNullOrEmpty]
7374
public PSVirtualHub InputObject { get; set; }
7475

76+
public const String RTv2ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands.";
77+
[CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv2ChangeDesc)]
7578
[Parameter(
7679
Mandatory = true,
7780
HelpMessage = "The route tables associated with this Virtual Hub.")]

src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public class UpdateAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
8585
HelpMessage = "The hub virtual network connections associated with this Virtual Hub.")]
8686
public PSHubVirtualNetworkConnection[] HubVnetConnection { get; set; }
8787

88+
public const String RTv1ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands.";
89+
[CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv1ChangeDesc)]
8890
[Parameter(
8991
Mandatory = false,
9092
HelpMessage = "The route table associated with this Virtual Hub.")]

src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ namespace Microsoft.Azure.Commands.Network
1919
using Microsoft.Azure.Commands.Network.Models;
2020
using System.Linq;
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
22+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2223

24+
[CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRoute")]
2325
[Cmdlet(
2426
VerbsCommon.Add,
2527
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRoute",

src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteTableCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ namespace Microsoft.Azure.Commands.Network
1919
using Microsoft.Azure.Commands.Network.Models;
2020
using System.Linq;
2121
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
22+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2223

24+
[CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRouteTable")]
2325
[Cmdlet(VerbsCommon.Add,
2426
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable",
2527
SupportsShouldProcess = false),

src/Network/Network/Cortex/VirtualHubRouteTable/GetAzureRmVirtualHubRouteTableCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ namespace Microsoft.Azure.Commands.Network
1818
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1919
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
2020
using Microsoft.Azure.Management.Network.Models;
21+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2122
using System;
2223
using System.Collections.Generic;
2324
using System.Management.Automation;
2425

26+
[CmdletDeprecation(ReplacementCmdletName = "Get-AzVHubRouteTable")]
2527
[Cmdlet(VerbsCommon.Get,
2628
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable",
2729
DefaultParameterSetName = CortexParameterSetNames.ByVirtualHubName),

src/Network/Network/Cortex/VirtualHubRouteTable/RemoveAzureRmVirtualHubRouteTableCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ namespace Microsoft.Azure.Commands.Network
2020
using Microsoft.Azure.Commands.Network.Models;
2121
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2222
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
23+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2324

25+
[CmdletDeprecation(ReplacementCmdletName = "Remove-AzVHubRouteTable")]
2426
[Cmdlet(VerbsCommon.Remove,
2527
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable",
2628
DefaultParameterSetName = CortexParameterSetNames.ByVirtualHubRouteTableName,

0 commit comments

Comments
 (0)