Skip to content

Commit 677ec02

Browse files
committed
Add LocationCompleter to Compute cmdlets
1 parent 99de7c9 commit 677ec02

20 files changed

+20
-5
lines changed

src/ResourceManager/Compute/Commands.Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs

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

src/ResourceManager/Compute/Commands.Compute/Extension/DSC/SetAzureVMDscExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public class SetAzureVMDscExtensionCommand : VirtualMachineExtensionBaseCmdlet
173173
Mandatory = false,
174174
ValueFromPipelineByPropertyName = true,
175175
HelpMessage = "Location of the resource.")]
176+
[LocationCompleter("Microsoft.Storage/storageAccounts")]
176177
[ValidateNotNullOrEmpty]
177178
public string Location { get; set; }
178179

src/ResourceManager/Compute/Commands.Compute/Extension/Diagnostics/SetAzureRmVMDiagnosticsExtension.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public string DiagnosticsConfigurationPath
107107
Position = 7,
108108
ValueFromPipelineByPropertyName = true,
109109
HelpMessage = "The location.")]
110+
[LocationCompleter("Microsoft.Storage/storageAccounts")]
110111
public string Location
111112
{
112113
get

src/ResourceManager/Compute/Commands.Compute/Extension/SetAzureVMExtensionBaseCmdlet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class SetAzureVMExtensionBaseCmdlet : VirtualMachineExtensionBaseCmdlet
5757
Mandatory = false,
5858
ValueFromPipelineByPropertyName = true,
5959
HelpMessage = "The location.")]
60+
[LocationCompleter("Microsoft.Compute/virtualMachines")]
6061
[ValidateNotNullOrEmpty]
6162
public string Location { get; set; }
6263

src/ResourceManager/Compute/Commands.Compute/Extension/SqlServer/SetAzureVMSqlServerExtensionCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public class SetAzureSqlServerExtensionCommand : VirtualMachineExtensionBaseCmdl
9696
Position = 8,
9797
ValueFromPipelineByPropertyName = true,
9898
HelpMessage = "Location of the resource.")]
99+
[LocationCompleter("Microsoft.Compute/virtualMachines")]
99100
[ValidateNotNullOrEmpty]
100101
public string Location { get; set; }
101102

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.Compute
2727
[OutputType(typeof(PSVirtualMachineExtensionImageDetails))]
2828
public class GetAzureVMExtensionImageCommand : VirtualMachineExtensionImageBaseCmdlet
2929
{
30-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
30+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
3131
public string Location { get; set; }
3232

3333
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/ExtensionImages/GetAzureVMExtensionImageTypeCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineExtensionImageType))]
2525
public class GetAzureVMExtensionImageTypeCommand : VirtualMachineExtensionImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Generated/ContainerService/Config/NewAzureRmContainerServiceConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class NewAzureRmContainerServiceConfigCommand : Microsoft.Azure.C
3737
Mandatory = false,
3838
Position = 0,
3939
ValueFromPipelineByPropertyName = true)]
40+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.ContainerService/containerServices")]
4041
public string Location { get; set; }
4142

4243
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso
5656
Mandatory = false,
5757
Position = 3,
5858
ValueFromPipelineByPropertyName = true)]
59+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/disks")]
5960
public string Location { get; set; }
6061

6162
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Image/Config/NewAzureRmImageConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class NewAzureRmImageConfigCommand : Microsoft.Azure.Commands.Res
3737
Mandatory = false,
3838
Position = 0,
3939
ValueFromPipelineByPropertyName = true)]
40+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/images")]
4041
public string Location { get; set; }
4142

4243
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public partial class NewAzureRmSnapshotConfigCommand : Microsoft.Azure.Commands.
5656
Mandatory = false,
5757
Position = 3,
5858
ValueFromPipelineByPropertyName = true)]
59+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/snapshots")]
5960
public string Location { get; set; }
6061

6162
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineRunCommand/VirtualMachineRunCommandGetMethod.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ protected override void ProcessRecord()
166166
ValueFromPipelineByPropertyName = true,
167167
ValueFromPipeline = false)]
168168
[AllowNull]
169+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/locations/runCommands")]
169170
public string Location { get; set; }
170171

171172
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public partial class NewAzureRmVmssConfigCommand : Microsoft.Azure.Commands.Reso
4343
Mandatory = false,
4444
Position = 1,
4545
ValueFromPipelineByPropertyName = true)]
46+
[ResourceManager.Common.ArgumentCompleters.LocationCompleter("Microsoft.Compute/virtualMachineScaleSets")]
4647
public string Location { get; set; }
4748

4849
[Parameter(

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class GetAzureVMImageCommand : VirtualMachineImageBaseCmdlet
3939
[Parameter(ParameterSetName = GetVMImageDetailParamSetName,
4040
Mandatory = true,
4141
ValueFromPipelineByPropertyName = true)]
42+
[LocationCompleter("Microsoft.Compute/locations/publishers")]
4243
[ValidateNotNullOrEmpty]
4344
public string Location { get; set; }
4445

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageOfferCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImageOffer))]
2525
public class GetAzureVMImageOfferCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImagePublisherCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImagePublisher))]
2525
public class GetAzureVMImagePublisherCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
public override void ExecuteCmdlet()

src/ResourceManager/Compute/Commands.Compute/Images/GetAzureVMImageSkuCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Azure.Commands.Compute
2424
[OutputType(typeof(PSVirtualMachineImageSku))]
2525
public class GetAzureVMImageSkuCommand : VirtualMachineImageBaseCmdlet
2626
{
27-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]
27+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty, LocationCompleter("Microsoft.Compute/locations/publishers")]
2828
public string Location { get; set; }
2929

3030
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true), ValidateNotNullOrEmpty]

src/ResourceManager/Compute/Commands.Compute/Usage/GetAzureVMUsageCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class GetAzureVMUsageCommand : VirtualMachineUsageBaseCmdlet
3232
Position = 0,
3333
ValueFromPipelineByPropertyName = true,
3434
HelpMessage = "The location name.")]
35+
[LocationCompleter("Microsoft.Compute/locations/usages")]
3536
[ValidateNotNullOrEmpty]
3637
public string Location { get; set; }
3738

src/ResourceManager/Compute/Commands.Compute/VirtualMachine/Operation/NewAzureVMCommand.cs

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

src/ResourceManager/Compute/Commands.Compute/VirtualMachineSizes/GetAzureVMSizeCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class GetAzureVMSizeCommand : VirtualMachineSizeBaseCmdlet
3737
ParameterSetName = ListVirtualMachineSizeParamSet,
3838
ValueFromPipelineByPropertyName = true,
3939
HelpMessage = "The location name.")]
40+
[LocationCompleter("Microsoft.Compute/locations/vmSizes")]
4041
[ValidateNotNullOrEmpty]
4142
public string Location { get; set; }
4243

0 commit comments

Comments
 (0)