Skip to content

Add ResourceName completer to compute #7471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 16, 2018
Merged

Add ResourceName completer to compute #7471

merged 10 commits into from
Oct 16, 2018

Conversation

maddieclayton
Copy link
Contributor

Description

Checklist

@MiYanni
Copy link
Contributor

MiYanni commented Oct 12, 2018

Common changes merged here: Azure/azure-powershell-common#72

Copy link
Contributor

@MiYanni MiYanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll look over this PR again after addressing my first comment.

@@ -39,6 +39,7 @@ public class GetAzureAvailabilitySetCommand : AvailabilitySetBaseCmdlet
Position = 1,
ValueFromPipelineByPropertyName = true,
HelpMessage = "The availability set name.")]
[ResourceNameCompleter("Microsoft.Compute/availabilitySets", new string[] { "ResourceGroupName" })]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darnit. I didn't look at the common changes in correlation with how it is used. You should change the constructor definition to this instead in common:

public ResourceNameCompleterAttribute(string resourceType, params string[] parentResourceParameterNames)

Then, the usage (in all of these cases) becomes:

[ResourceNameCompleter("Microsoft.Compute/availabilitySets", "ResourceGroupName")]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in this case, you will be able to use

[ResourceNameCompleter(<typename>, <parentresource1>, <[parentResource2>, ...)]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MiYanni
Copy link
Contributor

MiYanni commented Oct 13, 2018

1.1.4-preview of the common packages has been pushed to MyGet (includes the changes for this PR and params support).

@maddieclayton maddieclayton assigned praries880 and unassigned markcowl Oct 15, 2018
@praries880 praries880 merged commit 5c7576f into Azure:preview Oct 16, 2018
@maddieclayton maddieclayton deleted the rncompleter branch November 8, 2018 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants