Skip to content

Commit a9ca39e

Browse files
Maddie Claytonazdevxps
authored andcommitted
Add ResourceCompleter to HDInsight
1 parent 8f562e8 commit a9ca39e

22 files changed

+44
-0
lines changed

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Hyak.Common;
1616
using Microsoft.Azure.Commands.HDInsight.Commands;
1717
using Microsoft.Azure.Commands.HDInsight.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1819
using Microsoft.WindowsAzure.Commands.Common;
1920
using System.Linq;
2021
using System.Management.Automation;
@@ -66,6 +67,7 @@ public PSCredential HttpCredential
6667
public int NumOfJobs { get; set; }
6768

6869
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
70+
[ResourceGroupCompleter]
6971
public string ResourceGroupName { get; set; }
7072

7173
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/GetAzureHDInsightJobOutputCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using Microsoft.Azure.Commands.HDInsight.Commands;
1717
using Microsoft.Azure.Commands.HDInsight.Models;
1818
using Microsoft.Azure.Commands.HDInsight.Models.Job;
19+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1920
using Microsoft.Azure.Management.HDInsight.Job.Models;
2021
using Microsoft.WindowsAzure.Commands.Common;
2122
using System.IO;
@@ -77,6 +78,7 @@ public PSCredential HttpCredential
7778
}
7879

7980
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
81+
[ResourceGroupCompleter]
8082
public string ResourceGroupName { get; set; }
8183

8284
[Parameter(HelpMessage = "The type of job output.")]

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StartAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Hyak.Common;
1616
using Microsoft.Azure.Commands.HDInsight.Commands;
1717
using Microsoft.Azure.Commands.HDInsight.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1819
using Microsoft.Azure.Management.HDInsight.Job.Models;
1920
using Microsoft.WindowsAzure.Commands.Common;
2021
using System;
@@ -66,6 +67,7 @@ public PSCredential HttpCredential
6667
}
6768

6869
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
70+
[ResourceGroupCompleter]
6971
public string ResourceGroupName { get; set; }
7072

7173
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/StopAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Hyak.Common;
1616
using Microsoft.Azure.Commands.HDInsight.Commands;
1717
using Microsoft.Azure.Commands.HDInsight.Models;
18+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1819
using Microsoft.WindowsAzure.Commands.Common;
1920
using System.Management.Automation;
2021

@@ -63,6 +64,7 @@ public PSCredential HttpCredential
6364
}
6465

6566
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
67+
[ResourceGroupCompleter]
6668
public string ResourceGroupName { get; set; }
6769

6870
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/UseAzureHDInsightClusterCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Hyak.Common;
1616
using Microsoft.Azure.Commands.HDInsight.Commands;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using Microsoft.WindowsAzure.Commands.Common;
1819
using System.Management.Automation;
1920

@@ -60,6 +61,7 @@ public PSCredential HttpCredential
6061
}
6162

6263
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
64+
[ResourceGroupCompleter]
6365
public string ResourceGroupName { get; set; }
6466

6567
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/JobCommands/WaitAzureHDInsightJobCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using Microsoft.Azure.Commands.HDInsight.Models;
2121
using Microsoft.Azure.Management.HDInsight.Job.Models;
2222
using Microsoft.WindowsAzure.Commands.Common;
23+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2324

2425
namespace Microsoft.Azure.Commands.HDInsight
2526
{
@@ -66,6 +67,7 @@ public PSCredential HttpCredential
6667
}
6768

6869
[Parameter(HelpMessage = "The name of the resource group.")]
70+
[ResourceGroupCompleter]
6971
public string ResourceGroupName { get; set; }
7072

7173
[Parameter(HelpMessage = "The total time to wait for job completion, in seconds.")]

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/DisableAzureHDInsightOMSCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using System.Management.Automation;
1819

@@ -40,6 +41,7 @@ public class DisableAzureHDInsightOMSCommand : HDInsightCmdletBase
4041
[Parameter(
4142
HelpMessage = "Gets or sets the resource group of the cluster.",
4243
ValueFromPipelineByPropertyName = true)]
44+
[ResourceGroupCompleter]
4345
public string ResourceGroupName { get; set; }
4446

4547
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/EnableAzureHDInsightOMSCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using System.IO;
2020
using System.Reflection;
2121
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
22+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2223

2324
namespace Microsoft.Azure.Commands.HDInsight
2425
{
@@ -56,6 +57,7 @@ public class EnableAzureHDInsightOMSCommand : HDInsightCmdletBase, IModuleAssemb
5657
[Parameter(
5758
HelpMessage = "Gets or sets the resource group of the cluster.",
5859
ValueFromPipelineByPropertyName = true)]
60+
[ResourceGroupCompleter]
5961
public string ResourceGroupName { get; set; }
6062

6163
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightClusterCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using System.Collections.Generic;
1819
using System.Linq;
1920
using System.Management.Automation;
@@ -32,6 +33,7 @@ public class GetAzureHDInsightCommand : HDInsightCmdletBase
3233
[Parameter(
3334
Position = 0,
3435
HelpMessage = "Gets or sets the name of the resource group.")]
36+
[ResourceGroupCompleter]
3537
public string ResourceGroupName { get; set; }
3638

3739
[Parameter(

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightOMSCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models.Management;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using System.Management.Automation;
1819

1920
namespace Microsoft.Azure.Commands.HDInsight
@@ -37,6 +38,7 @@ public class GetAzureHDInsightOMSCommand : HDInsightCmdletBase
3738
[Parameter(
3839
HelpMessage = "Gets or sets the resource group of the cluster.",
3940
ValueFromPipelineByPropertyName = true)]
41+
[ResourceGroupCompleter]
4042
public string ResourceGroupName { get; set; }
4143

4244
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightPersistedScriptActionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models.Management;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using System;
1819
using System.Collections.Generic;
1920
using System.Linq;
@@ -39,6 +40,7 @@ public class GetAzureHDInsightPersistedScriptAction : HDInsightCmdletBase
3940
public string Name { get; set; }
4041

4142
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
43+
[ResourceGroupCompleter]
4244
public string ResourceGroupName { get; set; }
4345

4446
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GetAzureHDInsightScriptActionHistoryCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models.Management;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using System.Collections.Generic;
1819
using System.Linq;
1920
using System.Management.Automation;
@@ -38,6 +39,7 @@ public class GetAzureHDInsightScriptActionHistory : HDInsightCmdletBase
3839
public long? ScriptExecutionId { get; set; }
3940

4041
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
42+
[ResourceGroupCompleter]
4143
public string ResourceGroupName { get; set; }
4244

4345
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightHttpServicesAccessCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using Microsoft.WindowsAzure.Commands.Common;
1819
using System.Management.Automation;
@@ -40,6 +41,7 @@ public class GrantAzureHDInsightHttpServicesAccessCommand : HDInsightCmdletBase
4041
public PSCredential HttpCredential { get; set; }
4142

4243
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
44+
[ResourceGroupCompleter]
4345
public string ResourceGroupName { get; set; }
4446

4547
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/GrantAzureHDInsightRdpServicesAccessCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using Microsoft.WindowsAzure.Commands.Common;
1819
using System;
@@ -46,6 +47,7 @@ public class GrantAzureHDInsightRdpServicesAccessCommand : HDInsightCmdletBase
4647
public DateTime RdpAccessExpiry { get; set; }
4748

4849
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
50+
[ResourceGroupCompleter]
4951
public string ResourceGroupName { get; set; }
5052

5153
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/NewAzureHDInsightClusterCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using Microsoft.Azure.Commands.HDInsight.Commands;
1919
using Microsoft.Azure.Commands.HDInsight.Models;
2020
using Microsoft.Azure.Commands.HDInsight.Models.Management;
21+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
2122
using Microsoft.Azure.Graph.RBAC.Version1_6;
2223
using Microsoft.Azure.Management.HDInsight.Models;
2324
using Microsoft.WindowsAzure.Commands.Common;
@@ -66,6 +67,7 @@ public string Location
6667
Position = 1,
6768
Mandatory = true,
6869
HelpMessage = "Gets or sets the name of the resource group.")]
70+
[ResourceGroupCompleter]
6971
public string ResourceGroupName { get; set; }
7072

7173
[Parameter(

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightClusterCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using System.Management.Automation;
1819

@@ -34,6 +35,7 @@ public class RemoveAzureHDInsightCommand : HDInsightCmdletBase
3435
public string ClusterName { get; set; }
3536

3637
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
38+
[ResourceGroupCompleter]
3739
public string ResourceGroupName { get; set; }
3840

3941
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RemoveAzureHDInsightPersistedScriptActionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.HDInsight
@@ -37,6 +38,7 @@ public class RemoveAzureHDInsightPersistedScriptActionCommand : HDInsightCmdletB
3738
public string Name { get; set; }
3839

3940
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
41+
[ResourceGroupCompleter]
4042
public string ResourceGroupName { get; set; }
4143

4244
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightHttpServicesAccessCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using System.Management.Automation;
1819

@@ -34,6 +35,7 @@ public class RevokeAzureHDInsightHttpServicesAccessCommand : HDInsightCmdletBase
3435
public string ClusterName { get; set; }
3536

3637
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
38+
[ResourceGroupCompleter]
3739
public string ResourceGroupName { get; set; }
3840

3941

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/RevokeAzureHDInsightRdpServicesAccessCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using Microsoft.Azure.Management.HDInsight.Models;
1718
using System.Management.Automation;
1819

@@ -34,6 +35,7 @@ public class RevokeAzureHDInsightRdpServicesAccessCommand : HDInsightCmdletBase
3435
public string ClusterName { get; set; }
3536

3637
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
38+
[ResourceGroupCompleter]
3739
public string ResourceGroupName { get; set; }
3840

3941
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightClusterSizeCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using Microsoft.Azure.Management.HDInsight.Models;
1819
using System.Linq;
1920
using System.Management.Automation;
@@ -47,6 +48,7 @@ public int TargetInstanceCount
4748
}
4849

4950
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
51+
[ResourceGroupCompleter]
5052
public string ResourceGroupName { get; set; }
5153

5254
#endregion

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SetAzureHDInsightPersistedScriptActionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
16+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1617
using System.Management.Automation;
1718

1819
namespace Microsoft.Azure.Commands.HDInsight
@@ -37,6 +38,7 @@ public class SetAzureHDInsightPersistedScriptActionCommand : HDInsightCmdletBase
3738
public long ScriptExecutionId { get; set; }
3839

3940
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
41+
[ResourceGroupCompleter]
4042
public string ResourceGroupName { get; set; }
4143
#endregion
4244

src/ResourceManager/HDInsight/Commands.HDInsight/ManagementCommands/SubmitAzureHDInsightScriptActionCommand.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models.Management;
17+
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1718
using Microsoft.Azure.Management.HDInsight.Models;
1819
using System;
1920
using System.Collections.Generic;
@@ -74,6 +75,7 @@ public class SubmitAzureHDInsightScriptActionCommand : HDInsightCmdletBase
7475
public SwitchParameter PersistOnSuccess { get; set; }
7576

7677
[Parameter(HelpMessage = "Gets or sets the name of the resource group.")]
78+
[ResourceGroupCompleter]
7779
public string ResourceGroupName { get; set; }
7880

7981
#endregion

0 commit comments

Comments
 (0)