Skip to content

Commit 321a7d7

Browse files
committed
Add LocationCompleter to Network cmdlets
1 parent 677ec02 commit 321a7d7

20 files changed

+23
-0
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/applicationGateways")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/ApplicationSecurityGroup/NewAzureRMApplicationSecurityGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public partial class NewAzureRmApplicationSecurityGroup : NetworkBaseCmdlet
5858
Mandatory = true,
5959
HelpMessage = "The location.",
6060
ValueFromPipelineByPropertyName = true)]
61+
[LocationCompleter("Microsoft.Network/applicationSecurityGroups")]
6162
[ValidateNotNullOrEmpty]
6263
public string Location { get; set; }
6364

src/ResourceManager/Network/Commands.Network/EndpointService/GetAzureRMAvailableEndpointServiceCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using System.Management.Automation;
2525
using AutoMapper;
2626
using CNM = Microsoft.Azure.Commands.Network.Models;
27+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2728

2829
namespace Microsoft.Azure.Commands.Network.Automation
2930
{
@@ -34,6 +35,7 @@ public partial class GetAzureRMVirtualNetworkAvailableEndpointServiceCommand : N
3435
Mandatory = true,
3536
HelpMessage = "The location.",
3637
ValueFromPipelineByPropertyName = true)]
38+
[LocationCompleter("Microsoft.Network/locations/virtualNetworkAvailableEndpointServices")]
3739
[ValidateNotNullOrEmpty]
3840
public string Location { get; set; }
3941

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/MoveAzureExpressRouteCircuitCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class MoveAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "The location.")]
51+
[LocationCompleter("Microsoft.Network/expressRouteCircuits")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/ExpressRouteCircuit/NewAzureExpressRouteCircuitCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureExpressRouteCircuitCommand : ExpressRouteCircuitBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/expressRouteCircuits")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/LoadBalancer/NewAzureLoadBalancerCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureLoadBalancerCommand : LoadBalancerBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/loadBalancers")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/LocalNetworkGateway/NewAzureLocalNetworkGatewayCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureLocalNetworkGatewayCommand : LocalNetworkGatewayBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/localNetworkGateways")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/NetworkInterface/NewAzureNetworkInterfaceCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class NewAzureNetworkInterfaceCommand : NetworkInterfaceBaseCmdlet
5050
Mandatory = true,
5151
ValueFromPipelineByPropertyName = true,
5252
HelpMessage = "The public IP address location.")]
53+
[LocationCompleter("Microsoft.Network/networkInterfaces")]
5354
[ValidateNotNullOrEmpty]
5455
public string Location { get; set; }
5556

src/ResourceManager/Network/Commands.Network/NetworkSecurityGroup/NewAzureNetworkSecurityGroupCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureNetworkSecurityGroupCommand : NetworkSecurityGroupBaseCmdle
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/networkSecurityGroups")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/NetworkWatcher/GetAzureNetworkWatcherReachabilityProvidersListCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public class GetAzureRmNetworkWatcherAvailableProviders : NetworkBaseCmdlet
6666
[Parameter(
6767
Mandatory = false,
6868
HelpMessage = "Optional Azure regions to scope the query to.")]
69+
[LocationCompleter("Microsoft.Network/networkWatchers")]
6970
public List<string> Location { get; set; }
7071

7172
[Parameter(

src/ResourceManager/Network/Commands.Network/NetworkWatcher/GetAzureRMNetworkWatcherReachabilityReportCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public partial class GetAzureRMNetworkWatcherReachabilityReport : NetworkBaseCmd
7777
[Parameter(
7878
Mandatory = false,
7979
HelpMessage = "Optional Azure regions to scope the query to.")]
80+
[LocationCompleter("Microsoft.Network/networkWatchers")]
8081
public List<string> Location { get; set; }
8182

8283
[Parameter(

src/ResourceManager/Network/Commands.Network/NetworkWatcher/NewAzureNetworkWatcherCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureNetworkWatcherCommand : NetworkWatcherBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "Location.")]
51+
[LocationCompleter("Microsoft.Network/networkWatchers")]
5152
[ValidateNotNullOrEmpty]
5253
public string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/ProviderWideCmdlets/TestAzureDnsAvailabilityCmdlet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1516
using Microsoft.Azure.Management.Network;
1617
using System.Management.Automation;
1718

@@ -30,6 +31,7 @@ public class TestAzureDnsAvailabilityCmdlet : NetworkBaseCmdlet
3031
[Parameter(
3132
Mandatory = true,
3233
HelpMessage = "Location.")]
34+
[LocationCompleter("Microsoft.Network/locations/CheckDnsNameAvailability")]
3335
[ValidateNotNullOrEmpty]
3436
public string Location { get; set; }
3537

src/ResourceManager/Network/Commands.Network/PublicIpAddress/NewAzurePublicIpAddressCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class NewAzurePublicIpAddressCommand : PublicIpAddressBaseCmdlet
5050
Mandatory = false,
5151
ValueFromPipelineByPropertyName = true,
5252
HelpMessage = "The public IP address location.")]
53+
[LocationCompleter("Microsoft.Network/publicIPAddresses")]
5354
[ValidateNotNullOrEmpty]
5455
public string Location { get; set; }
5556

src/ResourceManager/Network/Commands.Network/RouteFilter/NewAzureRouteFilterCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class NewAzureRouteFilterCommand : RouteFilterBaseCmdlet
5050
Mandatory = true,
5151
ValueFromPipelineByPropertyName = true,
5252
HelpMessage = "location.")]
53+
[LocationCompleter("Microsoft.Network/routeFilters")]
5354
[ValidateNotNullOrEmpty]
5455
public string Location { get; set; }
5556

src/ResourceManager/Network/Commands.Network/RouteTable/NewAzureRMRouteTableCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public partial class NewAzureRmRouteTable : NetworkBaseCmdlet
5858
Mandatory = true,
5959
HelpMessage = "The location.",
6060
ValueFromPipelineByPropertyName = true)]
61+
[LocationCompleter("Microsoft.Network/routeTables")]
6162
public string Location { get; set; }
6263

6364
[Parameter(

src/ResourceManager/Network/Commands.Network/Usage/GetAzureNetworkUsageCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
using System.Management.Automation;
3030
using AutoMapper;
3131
using CNM = Microsoft.Azure.Commands.Network.Models;
32+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
3233

3334
namespace Microsoft.Azure.Commands.Network.Automation
3435
{
@@ -39,6 +40,7 @@ public partial class GetAzureRmNetworkUsage : NetworkBaseCmdlet
3940
Mandatory = true,
4041
ValueFromPipelineByPropertyName = true,
4142
HelpMessage = "Location.")]
43+
[LocationCompleter("Microsoft.Network/locations/usages")]
4244
[ValidateNotNullOrEmpty]
4345
public string Location { get; set; }
4446

src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class NewAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet
4848
Mandatory = true,
4949
ValueFromPipelineByPropertyName = true,
5050
HelpMessage = "location.")]
51+
[LocationCompleter("Microsoft.Network/virtualNetworks")]
5152
[ValidateNotNullOrEmpty]
5253
public virtual string Location { get; set; }
5354

src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/NewAzureVirtualNetworkGatewayCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class NewAzureVirtualNetworkGatewayCommand : VirtualNetworkGatewayBaseCmd
7373
ValueFromPipelineByPropertyName = true,
7474
ParameterSetName = VirtualNetworkGatewayParameterSets.Default,
7575
HelpMessage = "location.")]
76+
[LocationCompleter("Microsoft.Network/virtualNetworkGateways")]
7677
[ValidateNotNullOrEmpty]
7778
public string Location { get; set; }
7879

src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/NewAzureVirtualNetworkGatewayConnectionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public class NewAzureVirtualNetworkGatewayConnectionCommand : VirtualNetworkGate
4949
Mandatory = true,
5050
ValueFromPipelineByPropertyName = true,
5151
HelpMessage = "location.")]
52+
[LocationCompleter("Microsoft.Network/connections")]
5253
[ValidateNotNullOrEmpty]
5354
public string Location { get; set; }
5455

0 commit comments

Comments
 (0)