-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Conversation
Common changes merged here: Azure/azure-powershell-common#72 |
There was a problem hiding this 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" })] |
There was a problem hiding this comment.
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")]
There was a problem hiding this comment.
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>, ...)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix is here: Azure/azure-powershell-common#78
1.1.4-preview of the common packages has been pushed to MyGet (includes the changes for this PR and params support). |
Description
Checklist
CONTRIBUTING.md
platyPS
module