Azure / Azure/azure-powershell

Add generic Sku completer

Open
#8,004 3 comments 0 reactions 1 assignee Assigned to @isra-fel View on GitHub
customer-reported feature-request
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
4d 4h
Merged PRs (30d)
52

Description

### Description
Using a style similar to the other generic resource completers [here](https://github.com/Azure/azure-powershell-common/tree/master/src/ResourceManager/Version2016_09_01/ArgumentCompleters). Add support for a generic SKU completer.

In this case, SKUs are listed using calls from individual RPs, s, in each case, there should be two parts to the completer attribute

- Common code that creates the list of SKU Names based on an 'unimplemented' list skus method
- Code in the specific module to use the management client for that module to list the SKUs.

Note that some services (for example, Compute) provide SDK calls that list all resource SKUs, and calls that list available skus for updating an existing resource (like a virtual machien scaleset), you will likely need to provide separate concrete attributes for each of these. It would be appropriate to sue the 'list all resource skus' api when creating a 'New' resource, and the sku list for a specific resource when updating an existing resource.

We will do this for the following cmdlets
- [x] Create underlying (abstract) completer attribute
- [x] Add unit tests
- [x] Extend attribute in each module
- [ ] Add unit tests in the appropriate module tests project for concrete completer classes
- [ ] Compute
- [x] [New-AzVmssConfig](https://github.com/Azure/azure-powershell/blob/c9222ead6858d125b4150c2f832a7b3359bfcfda/src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/NewAzureRmVmssConfigCommand.cs)
- [x] [Update-AzVmss](https://github.com/Azure/azure-powershell/blob/c9222ead6858d125b4150c2f832a7b3359bfcfda/src/Compute/Compute/Generated/VirtualMachineScaleSet/VirtualMachineScaleSetUpdateMethod.cs)
- [ ] [New-AzAvailabilitySet](https://github.com/Azure/azure-powershell/blob/c9222ead6858d125b4150c2f832a7b3359bfcfda/src/Compute/Compute/AvailabilitySets/NewAzureAvailabilitySetCommand.cs)
- [ ] [Update-AzAvailabilitySet](https://github.com/Azure/azure-powershell/blob/c9222ead6858d125b4150c2f832a7b3359bfcfda/src/Compute/Compute/AvailabilitySets/UpdateAzureAvailabilitySetCommand.cs)
- [ ] [New-AzSnapshoptUpdateConfig](https://github.com/Azure/azure-powershell/blob/c9222ead6858d125b4150c2f832a7b3359bfcfda/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs)
- [x] Storage
- [x] [New-AzStorageAccount](https://github.com/Azure/azure-powershell/blob/bbb97ea9829d1e6ab645b36f45de8b71e13cbf81/src/Storage/Storage.Management/StorageAccount/NewAzureStorageAccount.cs)
- [x] [Set-AzStorageAccount](https://github.com/Azure/azure-powershell/blob/bbb97ea9829d1e6ab645b36f45de8b71e13cbf81/src/Storage/Storage.Management/StorageAccount/SetAzureStorageAccount.cs)
- [ ] MachineLearning
- [ ] [Update-AzMlCommitmentPlan](https://github.com/Azure/azure-powershell/blob/1bcbe7b1f7a3323ac98f7754ba03eeb6b45e79f2/src/MachineLearning/MachineLearning/Cmdlets/CommitmentPlans/UpdateAzureMLCommitmentPlan.cs)
- [x] CognitiveServices
- [x] [Set-AzCognitiveServicesAccount](https://github.com/Azure/azure-powershell/blob/f0c250fcb2c2ed0e6b1b6f38e5edc58b9aeb354c/src/CognitiveServices/CognitiveServices/CognitiveServicesAccount/SetAzureCognitiveServicesAccount.cs)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.