Skip to content

{ACS} Migrate _get_vm_sku_details function to aaz-based implementation and removed unused SDK function - #34117

Open
William (william051200) wants to merge 3 commits into
Azure:devfrom
william051200:migrate-acs
Open

William (william051200) wants to merge 3 commits into
Azure:devfrom
william051200:migrate-acs

Conversation

@william051200

@william051200 William (william051200) commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

Description

Migration from mgmt.compute to aaz-based

Testing Guide

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI lite review requested due to automatic review settings September 23, 2026 00:57
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi William (@william051200),
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Add focused mocked unit coverage for VM SKU filtering and capability caching.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Migrates ACS VM SKU retrieval from the Compute SDK to an AAZ-based implementation and removes unused helpers.

Changes:

  • Uses AAZ dictionary responses for SKU and capability handling.
  • Removes the VM-size completer and Compute client factory.
  • Requires focused mocked tests for SKU filtering, pagination, and capability caching.
File Summary
src/​azure-cli/​azure/​cli/​command_modules/​acs/​azurecontainerstorage/​_helpers.py Migrates VM SKU retrieval and cache processing to AAZ.
src/​azure-cli/​azure/​cli/​command_modules/​acs/​_completers.py Removes the unused VM-size completer.
src/​azure-cli/​azure/​cli/​command_modules/​acs/​_client_factory.py Removes the unused Compute client factory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +655 to +659
from azure.cli.command_modules.vm.aaz.latest.vm import ListSkus
result = ListSkus(cli_ctx=cli_ctx)(command_args={})
result = [x for x in result if x['resourceType'].lower() == 'virtualmachines']
if location:
result = [r for r in result if _is_vm_in_required_location(location, r.locations)]
result = [r for r in result if _is_vm_in_required_location(location, r['locations'])]
@yonzhan

Copy link
Copy Markdown
Collaborator

ACS

FumingZhang
FumingZhang previously approved these changes Sep 23, 2026
Comment thread src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/_helpers.py Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-observability-squad AKS az aks/acs/openshift Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants