From 2484f7d3728f4b31727b60e49211cf113d728956 Mon Sep 17 00:00:00 2001 From: Ritvika Reddy Nagula Date: Mon, 2 Nov 2020 11:46:23 -0800 Subject: [PATCH] mark rtv1 and rtv2 as deprecated --- .../Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs | 2 ++ .../Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs | 2 +- .../Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs | 2 +- .../Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs | 3 +++ .../Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs | 2 ++ .../VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs | 2 ++ .../AddAzureRmVirtualHubRouteTableCommand.cs | 2 ++ .../GetAzureRmVirtualHubRouteTableCommand.cs | 2 ++ .../RemoveAzureRmVirtualHubRouteTableCommand.cs | 2 ++ 9 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs index 2ecda462eea1..a03f9de97457 100644 --- a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs +++ b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubCommand.cs @@ -79,6 +79,8 @@ public class NewAzureRmVirtualHubCommand : VirtualHubBaseCmdlet HelpMessage = "The hub virtual network connections associated with this Virtual Hub.")] public PSHubVirtualNetworkConnection[] HubVnetConnection { get; set; } + public const String RTv1ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands."; + [CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv1ChangeDesc)] [Parameter( Mandatory = false, HelpMessage = "The route table associated with this Virtual Hub.")] diff --git a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs index 8f91f7f22043..1e64a6ce94f7 100644 --- a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs +++ b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - [CmdletDeprecation(ReplacementCmdletName = "Add-AzVirtualHubRoute")] + [CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRoute")] [Cmdlet( VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRoute", diff --git a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs index 4f87da4a4a5d..661b6441a811 100644 --- a/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs +++ b/src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteTableCommand.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; - [CmdletDeprecation(ReplacementCmdletName = "Add-AzVirtualHubRouteTable")] + [CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRouteTable")] [Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable", SupportsShouldProcess = false), diff --git a/src/Network/Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs b/src/Network/Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs index a1cc82758ba3..79bc724d2e0d 100644 --- a/src/Network/Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs +++ b/src/Network/Network/Cortex/VirtualHub/SetAzureRmVirtualHubCommand.cs @@ -28,6 +28,7 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using System.Linq; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; [Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHub", @@ -72,6 +73,8 @@ public class SetAzureRmVirtualHubCommand : VirtualHubBaseCmdlet [ValidateNotNullOrEmpty] public PSVirtualHub InputObject { get; set; } + public const String RTv2ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands."; + [CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv2ChangeDesc)] [Parameter( Mandatory = true, HelpMessage = "The route tables associated with this Virtual Hub.")] diff --git a/src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs b/src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs index 84ae6f2e455c..7e85d4aa6c88 100644 --- a/src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs +++ b/src/Network/Network/Cortex/VirtualHub/UpdateAzureRmVirtualHubCommand.cs @@ -85,6 +85,8 @@ public class UpdateAzureRmVirtualHubCommand : VirtualHubBaseCmdlet HelpMessage = "The hub virtual network connections associated with this Virtual Hub.")] public PSHubVirtualNetworkConnection[] HubVnetConnection { get; set; } + public const String RTv1ChangeDesc = "Parameter is being deprecated without being replaced. Use *VHubRouteTable* commands."; + [CmdletParameterBreakingChange("RouteTable", ChangeDescription = RTv1ChangeDesc)] [Parameter( Mandatory = false, HelpMessage = "The route table associated with this Virtual Hub.")] diff --git a/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs b/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs index 3e4ab9aadb01..6d9ab1984868 100644 --- a/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs +++ b/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteCommand.cs @@ -19,7 +19,9 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Commands.Network.Models; using System.Linq; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; + [CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRoute")] [Cmdlet( VerbsCommon.Add, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRoute", diff --git a/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteTableCommand.cs b/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteTableCommand.cs index d965b4a85ee5..3ce5501fd974 100644 --- a/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteTableCommand.cs +++ b/src/Network/Network/Cortex/VirtualHubRouteTable/AddAzureRmVirtualHubRouteTableCommand.cs @@ -19,7 +19,9 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Commands.Network.Models; using System.Linq; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; + [CmdletDeprecation(ReplacementCmdletName = "New-AzVHubRouteTable")] [Cmdlet(VerbsCommon.Add, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable", SupportsShouldProcess = false), diff --git a/src/Network/Network/Cortex/VirtualHubRouteTable/GetAzureRmVirtualHubRouteTableCommand.cs b/src/Network/Network/Cortex/VirtualHubRouteTable/GetAzureRmVirtualHubRouteTableCommand.cs index f69b0a87b674..5b881c5a104c 100644 --- a/src/Network/Network/Cortex/VirtualHubRouteTable/GetAzureRmVirtualHubRouteTableCommand.cs +++ b/src/Network/Network/Cortex/VirtualHubRouteTable/GetAzureRmVirtualHubRouteTableCommand.cs @@ -18,10 +18,12 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; using Microsoft.Azure.Management.Network.Models; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; using System; using System.Collections.Generic; using System.Management.Automation; + [CmdletDeprecation(ReplacementCmdletName = "Get-AzVHubRouteTable")] [Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable", DefaultParameterSetName = CortexParameterSetNames.ByVirtualHubName), diff --git a/src/Network/Network/Cortex/VirtualHubRouteTable/RemoveAzureRmVirtualHubRouteTableCommand.cs b/src/Network/Network/Cortex/VirtualHubRouteTable/RemoveAzureRmVirtualHubRouteTableCommand.cs index 0a640829b0a9..e43d45a45fae 100644 --- a/src/Network/Network/Cortex/VirtualHubRouteTable/RemoveAzureRmVirtualHubRouteTableCommand.cs +++ b/src/Network/Network/Cortex/VirtualHubRouteTable/RemoveAzureRmVirtualHubRouteTableCommand.cs @@ -20,7 +20,9 @@ namespace Microsoft.Azure.Commands.Network using Microsoft.Azure.Commands.Network.Models; using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; using Microsoft.Azure.Management.Internal.Resources.Utilities.Models; + using Microsoft.WindowsAzure.Commands.Common.CustomAttributes; + [CmdletDeprecation(ReplacementCmdletName = "Remove-AzVHubRouteTable")] [Cmdlet(VerbsCommon.Remove, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable", DefaultParameterSetName = CortexParameterSetNames.ByVirtualHubRouteTableName,