Skip to content

Commit d210729

Browse files
deprecation warning for old cmds and add possible hubsku/wantype
1 parent 86de768 commit d210729

File tree

7 files changed

+14
-2
lines changed

7 files changed

+14
-2
lines changed

src/Network/Network.Test/ScenarioTests/CortexTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Test-CortexCRUD
3535
$vpnConnection2Name = Get-ResourceName
3636
$vpnLink1ConnectionName = Get-ResourceName
3737
$vpnLink2ConnectionName = Get-ResourceName
38-
38+
3939
$storeName = 'blob' + $rgName
4040

4141
try

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public class NewAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
9696
[Parameter(
9797
Mandatory = false,
9898
HelpMessage = "The sku of the Virtual Hub.")]
99+
[PSArgumentCompleter("Basic", "Standard")]
99100
public string Sku { get; set; }
100101

101102
[Parameter(

src/Network/Network/Cortex/VirtualHub/NewAzureRmVirtualHubRouteCommand.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 = "Add-AzVirtualHubRoute")]
2325
[Cmdlet(
2426
VerbsCommon.New,
2527
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRoute",

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

Lines changed: 5 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 = "Add-AzVirtualHubRouteTable")]
2325
[Cmdlet(VerbsCommon.New,
2426
ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualHubRouteTable",
2527
SupportsShouldProcess = false),
@@ -35,6 +37,9 @@ public override void Execute()
3537
{
3638
base.Execute();
3739

40+
// Since this cmdlet and the VirtualHubRouteTable property of
41+
// hub will be deprecated, we will rename this route table to
42+
// called defaultRouteTable and it will be attached to All_Branches
3843
var virtualHubRouteTable = new PSVirtualHubRouteTable {
3944
Routes = this.Route == null ? new List<PSVirtualHubRoute>() : this.Route?.ToList(),
4045
Name = "defaultRouteTable",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public class UpdateAzureRmVirtualHubCommand : VirtualHubBaseCmdlet
9595
[Parameter(
9696
Mandatory = false,
9797
HelpMessage = "The sku of the Virtual Hub.")]
98+
[PSArgumentCompleter("Basic", "Standard")]
9899
public string Sku { get; set; }
99100

100101
[Parameter(

src/Network/Network/Cortex/VirtualWan/NewAzureRmVirtualWanCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public class NewAzureRmVirtualWanCommand : VirtualWanBaseCmdlet
7272
[Parameter(
7373
Mandatory = false,
7474
HelpMessage = "The type of the Virtual Wan.")]
75+
[PSArgumentCompleter("Basic", "Standard")]
7576
public string VirtualWANType { get; set; }
7677

7778
[Parameter(

src/Network/Network/Cortex/VirtualWan/UpdateAzureRmVirtualWanCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ public class UpdateAzureRmVirtualWanCommand : VirtualWanBaseCmdlet
8989
[Parameter(
9090
Mandatory = false,
9191
HelpMessage = "The type of the Virtual Wan.")]
92-
public string VirtualWANType { get; set; }
92+
[PSArgumentCompleter("Basic", "Standard")]
93+
public string VirtualWANType
94+
{ get; set; }
9395

9496
[Parameter(
9597
Mandatory = false,

0 commit comments

Comments
 (0)