{AKS} Add az aks operation list - #10286
Conversation
|
Hi Shaoru Hu (@HuShaoRu), |
There was a problem hiding this comment.
🟢 Approval recommended
The new command is fully wired through commands/params/help, includes both unit and scenario coverage, and the implementation matches the documented behavior.
Pull request overview
This PR adds a new AKS-preview CLI surface area for enumerating cluster/nodepool operations, complementing the existing aks operation show / show-latest commands and making it easier to inspect historical vs active operations.
Changes:
- Introduces
az aks operation listwith optional--nodepool-namescope and--active-onlyfiltering (client-side for cluster scope; server-side for nodepool scope). - Wires up command registration, argument plumbing, and help content for the new command.
- Adds unit + scenario coverage (including updated test recording) and extends table formatting to support list output.
File summaries
| File | Description |
|---|---|
| src/aks-preview/HISTORY.rst | Documents the new az aks operation list command and its key parameters. |
| src/aks-preview/azext_aks_preview/custom.py | Implements aks_operation_list, including local filtering for cluster-scope --active-only. |
| src/aks-preview/azext_aks_preview/commands.py | Registers the new aks operation list command and connects its table transformer. |
| src/aks-preview/azext_aks_preview/_params.py | Adds the active_only flag argument for aks operation list and reuses the shared nodepool_name argument. |
| src/aks-preview/azext_aks_preview/_help.py | Adds user-facing help + examples for aks operation list. |
| src/aks-preview/azext_aks_preview/_format.py | Adds list table formatting and refactors show formatting to share a common helper. |
| src/aks-preview/azext_aks_preview/tests/latest/test_custom.py | Adds unit tests for list/show/show-latest behavior across cluster and nodepool scopes. |
| src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py | Adds scenario coverage exercising the new list command variants. |
| src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_operations_cmds.yaml | Updates the recorded HTTP interactions to include the new list calls. |
Review details
- Files reviewed: 8/9 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Thank you for your contribution Shaoru Hu (@HuShaoRu)! We will review the pull request and get back to you soon. |
|
AKS |
|
please resolve the code conflicts. |
|
Shaoru Hu (@HuShaoRu) please resolve merge conflicts |
🤖 PR Validation —⚠️ Review suggested
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az aks operation listGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.