Skip to content

Comments

{Compute} az vmss set-orchestration-service-state: Migrate command to aaz-based implementation#32839

Open
william051200 wants to merge 3 commits intoAzure:devfrom
william051200:vmss-set-orchestration-migration
Open

{Compute} az vmss set-orchestration-service-state: Migrate command to aaz-based implementation#32839
william051200 wants to merge 3 commits intoAzure:devfrom
william051200:vmss-set-orchestration-migration

Conversation

@william051200
Copy link
Member

Related command

az vmss set-orchestration-service-state

Description

Migration from mgmt.compute to aaz-based

aaz Azure/aaz#949

Testing Guide

History Notes


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

Copilot AI review requested due to automatic review settings February 24, 2026 07:35
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Feb 24, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Feb 24, 2026

⚠️AzureCLI-BreakingChangeTest
⚠️vm
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate vmss set-orchestration-service-state cmd vmss set-orchestration-service-state update parameter service_name: updated property choices from ['AutomaticRepairs', 'DummyOrchestrationServiceName'] to ['AutomaticRepairs']

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 24, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request migrates the az vmss set-orchestration-service-state command from the SDK-based (azure-mgmt-compute) implementation to an AAZ-based (Auto-generated Azure CLI) implementation. This migration aligns with the ongoing effort to modernize Azure CLI commands by replacing SDK dependencies with AAZ-generated commands, which provide better consistency, maintainability, and automated updates from Azure REST API specifications.

Changes:

  • Migrated set-orchestration-service-state command from SDK to AAZ implementation
  • Moved command registration from SDK-specific command group to generic VMSS command group (consistent with deallocate/reimage)
  • Migrated enum definitions from SDK models to local _vm_utils.py module

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/vm/custom.py Replaced SDK client call with AAZ command instantiation pattern using VmssSetOrchestrationServiceState
src/azure-cli/azure/cli/command_modules/vm/commands.py Moved command registration from SDK operation_group to generic vmss command group, consistent with other AAZ-migrated commands
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/_set_orchestration_service_state.py Added AAZ-generated command implementation using API version 2024-11-01
src/azure-cli/azure/cli/command_modules/vm/aaz/latest/vmss/init.py Added import for the new AAZ command in alphabetical order
src/azure-cli/azure/cli/command_modules/vm/_vm_utils.py Defined local enum classes for OrchestrationServiceNames and OrchestrationServiceStateAction
src/azure-cli/azure/cli/command_modules/vm/_params.py Updated imports to use local enums instead of SDK models

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


class OrchestrationServiceNames(Enum):
AUTOMATIC_REPAIRS = 'AutomaticRepairs'
DUMMY_ORCHESTRATION_SERVICE_NAME = 'DummyOrchestrationServiceName'
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The OrchestrationServiceNames enum includes DUMMY_ORCHESTRATION_SERVICE_NAME which is not accepted by the AAZ command. The generated AAZ command at _set_orchestration_service_state.py only allows "AutomaticRepairs" as a valid service_name (line 67). Including DUMMY_ORCHESTRATION_SERVICE_NAME in this enum would allow users to pass it through the CLI argument validation, but it would be rejected when the AAZ command executes. Either remove DUMMY_ORCHESTRATION_SERVICE_NAME from the enum, or verify if it's a legitimate value that should also be added to the AAZ specification.

Suggested change
DUMMY_ORCHESTRATION_SERVICE_NAME = 'DummyOrchestrationServiceName'

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Compute az vm/vmss/image/disk/snapshot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants