New extension: servicegroup (Microsoft.Management/serviceGroups preview)#9805
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
|
There was a problem hiding this comment.
Pull request overview
Adds a new servicegroup Azure CLI extension (AAZ-generated, REST-based) to manage tenant-scoped Azure Service Groups (Microsoft.Management/serviceGroups, 2024-02-01-preview) including CRUD operations and an ancestors action.
Changes:
- Introduces AAZ command group
az service-groupwith create/show/update/delete andlist-ancestors. - Adds extension packaging scaffolding (setup, manifest, metadata, readme/history).
- Adds live-only scenario tests covering CRUD and hierarchy behavior.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/servicegroup/setup.py | Adds extension packaging metadata for distribution. |
| src/servicegroup/setup.cfg | Adds packaging config file (currently empty placeholder). |
| src/servicegroup/MANIFEST.in | Ensures README/history/metadata and Python sources are included in the package. |
| src/servicegroup/README.md | Documents extension purpose and basic command usage. |
| src/servicegroup/HISTORY.rst | Adds initial release history entry. |
| src/servicegroup/azext_servicegroup/azext_metadata.json | Declares preview status and minimum CLI core version. |
| src/servicegroup/azext_servicegroup/init.py | Registers the command loader and hooks AAZ command table loading. |
| src/servicegroup/azext_servicegroup/_help.py | Adds CLI help content for the new command group and commands. |
| src/servicegroup/azext_servicegroup/_params.py | Adds argument loading hook (currently no-op). |
| src/servicegroup/azext_servicegroup/commands.py | Adds command table loading hook (currently no-op; AAZ handles commands). |
| src/servicegroup/azext_servicegroup/custom.py | Adds custom module scaffolding (logger). |
| src/servicegroup/azext_servicegroup/aaz/init.py | Exposes AAZ package namespace. |
| src/servicegroup/azext_servicegroup/aaz/latest/init.py | Wires latest AAZ command module import. |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/__cmd_group.py | Registers the service-group command group as preview. |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/init.py | Exports AAZ command implementations for the group. |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/_create.py | Implements az service-group create (PUT LRO). |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/_show.py | Implements az service-group show (GET). |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/_update.py | Implements az service-group update (PATCH LRO). |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/_delete.py | Implements az service-group delete (DELETE LRO + confirmation). |
| src/servicegroup/azext_servicegroup/aaz/latest/service_group/_list_ancestors.py | Implements az service-group list-ancestors (POST action). |
| src/servicegroup/azext_servicegroup/tests/init.py | Adds tests package marker. |
| src/servicegroup/azext_servicegroup/tests/latest/init.py | Adds latest tests package marker. |
| src/servicegroup/azext_servicegroup/tests/latest/test_servicegroup_scenario.py | Adds live-only scenario tests for CRUD and ancestor listing. |
|
Thanks @yonzhan. Could you help run the remaining validation pipeline? |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
c041bdf to
ff748a5
Compare
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9805 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9805 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
843b1cc to
6dc17ba
Compare
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9805 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
…2024-02-01-preview) Register AAZ command models for the new service-group CLI extension: - service-group create (PUT LRO) - service-group show (GET) - service-group update (PATCH LRO) - service-group delete (DELETE LRO) - service-group list-ancestors (POST action) Related CLI extension PR: Azure/azure-cli-extensions#9805 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eview) Add new CLI extension for managing Azure Service Groups, a tenant-scoped resource for organizing resources, resource groups, and subscriptions into hierarchical service groups. Commands: - az service-group create: Create or update a service group (PUT LRO) - az service-group show: Get details of a service group - az service-group update: Update a service group (PATCH LRO) - az service-group delete: Delete a service group (DELETE LRO) - az service-group list-ancestors: List ancestors of a service group (POST) API: Microsoft.Management/serviceGroups 2024-02-01-preview Scope: Tenant-level (no subscription/resource group) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Regenerated aaz/ command files using aaz-dev-tools from TypeSpec-compiled swagger - Updated delete command confirmation message - Fixed test assertions to use flattened property paths (client_flatten=True) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- All creates now include --parent pointing to root SG (tenantId) - Root SG auto-creates when referenced as parent per API contract - Changed @record_only to @live_only for initial development - CRUD test: create/show/update(with tags)/delete + verify 404 after delete - list-ancestors test: 3-level hierarchy, verify child and parent in ancestors - nested-parent test: root -> parent -> child, verify parent references All 3 tests pass live (91s). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- All create examples now include --parent (required by API contract) - Made --parent resource-id required in _create.py arg schema - Removed empty setup.cfg - README, _help.py, and _create.py docstring updated consistently Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change pattern strings from regular strings to raw strings (r'...') to fix SyntaxWarning for invalid escape sequence '\-' in Python 3.12+. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add AAZWaitCommand to satisfy require_wait_command_if_no_wait linter rule since create/update/delete expose --no-wait. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
6dc17ba to
c99fef0
Compare
|
/azp run |
|
Commenter does not have sufficient privileges for PR 9805 in repo Azure/azure-cli-extensions |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
Hi @necusjz, would it be possible to have this extension merged and published by this week's end? |
|
[Release] Update index.json for extension [ servicegroup-1.0.0b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=162029902&view=results |
Description
Add new
servicegroupCLI extension for managing Azure Service Groups (Microsoft.Management/serviceGroups), a tenant-scoped ARM resource in public preview (API version2024-02-01-preview).Commands Added
az service-group createaz service-group showaz service-group updateaz service-group deleteaz service-group list-ancestorsImplementation Details
aaz-dev-toolsfrom TypeSpec (Microsoft.Management/ServiceGroups)2024-02-01-preview0.1.0(isPreview: true)Testing
azdev style servicegroup— Pylint PASSED, Flake8 PASSEDazdev linter --include-whl-extensions servicegroup— All rules PASSEDRelated PRs
Azure/aaz(to be submitted separately)This checklist is used to make sure that common guidelines for an Azure CLI pull request are followed.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)azdev linter --include-whl-extensions <YOUR_EXT>locally?azdev test <YOUR_EXT>(with--live) locally?