Az.ComputeLimit CLI extension for shared-limit and guest-subscription#9718
Az.ComputeLimit CLI extension for shared-limit and guest-subscription#9718deepnandu wants to merge 3 commits intoAzure:mainfrom
Conversation
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @deepnandu, |
|
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 |
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds a new computelimit Azure CLI extension (AAZ-generated) to manage Azure Compute Limit “shared-limit” and “guest-subscription” resources, including scenario tests and VCR recordings.
Changes:
- Introduce the new
computelimitextension package with AAZ command groups and commands for shared limits and guest subscriptions. - Add scenario tests plus recordings for the new commands.
- Register the new top-level command in
src/service_name.jsonand add extension packaging metadata/docs (README/HISTORY/setup).
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/service_name.json | Registers az computelimit in the service-to-command mapping list. |
| src/computelimit/setup.py | Adds extension packaging configuration (version, metadata, packages). |
| src/computelimit/setup.cfg | Adds placeholder setup.cfg file (repo-consistent). |
| src/computelimit/README.md | Documents extension purpose and example commands for both command groups. |
| src/computelimit/HISTORY.rst | Adds initial release notes for 1.0.0b1. |
| src/computelimit/azext_computelimit/init.py | Adds the extension command loader and wires AAZ command loading. |
| src/computelimit/azext_computelimit/_help.py | Adds extension help import stub (AAZ-generated pattern). |
| src/computelimit/azext_computelimit/_params.py | Adds argument loading stub (AAZ-generated pattern). |
| src/computelimit/azext_computelimit/commands.py | Adds command table loader stub (AAZ-only extension pattern). |
| src/computelimit/azext_computelimit/custom.py | Adds custom module scaffold with logger (no custom commands currently). |
| src/computelimit/azext_computelimit/azext_metadata.json | Declares preview status and minimum CLI core version. |
| src/computelimit/azext_computelimit/aaz/init.py | Adds AAZ package init scaffold. |
| src/computelimit/azext_computelimit/aaz/latest/init.py | Adds AAZ “latest” init scaffold. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/init.py | Exposes the top-level computelimit AAZ command group. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/__cmd_group.py | Defines the computelimit command group. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/init.py | Exposes shared-limit commands. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/__cmd_group.py | Defines the computelimit shared-limit command group. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/_add.py | Implements az computelimit shared-limit add (PUT). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/_list.py | Implements az computelimit shared-limit list (GET, paging). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/_remove.py | Implements az computelimit shared-limit remove (DELETE, confirmation). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/shared_limit/_show.py | Implements az computelimit shared-limit show (GET). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/init.py | Exposes guest-subscription commands. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/__cmd_group.py | Defines the computelimit guest-subscription command group. |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/_add.py | Implements az computelimit guest-subscription add (PUT). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/_list.py | Implements az computelimit guest-subscription list (GET, paging). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/_remove.py | Implements az computelimit guest-subscription remove (DELETE, confirmation). |
| src/computelimit/azext_computelimit/aaz/latest/computelimit/guest_subscription/_show.py | Implements az computelimit guest-subscription show (GET). |
| src/computelimit/azext_computelimit/tests/init.py | Adds tests package init scaffold. |
| src/computelimit/azext_computelimit/tests/latest/init.py | Adds tests/latest package init scaffold. |
| src/computelimit/azext_computelimit/tests/latest/test_computelimit.py | Adds scenario + validation tests for shared-limit and guest-subscription. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_shared_limit_add.yaml | Recording for shared-limit add. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_shared_limit_list.yaml | Recording for shared-limit list. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_shared_limit_show.yaml | Recording for shared-limit show. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_shared_limit_remove.yaml | Recording for shared-limit remove. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_shared_limit_crud.yaml | Recording for shared-limit CRUD flow. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_guest_subscription_add.yaml | Recording for guest-subscription add. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_guest_subscription_list.yaml | Recording for guest-subscription list. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_guest_subscription_show.yaml | Recording for guest-subscription show. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_guest_subscription_remove.yaml | Recording for guest-subscription remove. |
| src/computelimit/azext_computelimit/tests/latest/recordings/test_computelimit_guest_subscription_crud.yaml | Recording for guest-subscription CRUD flow. |
| { | ||
| "Command": "az computelimit", | ||
| "AzureServiceName": "Compute Limit", | ||
| "URL": "" | ||
| }, |
There was a problem hiding this comment.
The URL field for the new az computelimit service entry is an empty string. service_name.json entries consistently include a valid Learn/docs URL; please populate this with the correct documentation link for Compute Limit (or remove the entry until a stable URL exists).
| ```bash | ||
| az computelimit guest-subscription add --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111 | ||
| ``` |
There was a problem hiding this comment.
The example commands in the bash code blocks have leading spaces before az ..., which can break copy/paste in some shells and looks inconsistent with typical extension READMEs. Remove the extra indentation so the commands start at the beginning of the line.
| ```bash | ||
| az computelimit guest-subscription remove --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111 | ||
| ``` |
There was a problem hiding this comment.
The same leading indentation issue appears in other bash examples as well; please remove the leading spaces so each command can be copied directly.
| ```bash | ||
| az computelimit guest-subscription show --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111 | ||
| ``` |
There was a problem hiding this comment.
The bash examples are indented with leading spaces (e.g., az computelimit guest-subscription show ...). Please remove the indentation across the README so users can copy/paste reliably.
| ```bash | ||
| az computelimit shared-limit add --location eastus --name StandardDSv3Family | ||
| ``` |
There was a problem hiding this comment.
The shared-limit examples are also indented inside the bash code blocks. Please remove the leading spaces before az so these commands are directly usable when copied.
| ```bash | ||
| az computelimit shared-limit list --location eastus | ||
| ``` No newline at end of file |
There was a problem hiding this comment.
The final list example is indented ( az ...). Please remove the leading spaces so the command starts at column 0 for easier copy/paste.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
Add new
computelimitCLI extension for managing Azure Compute Limit resources.Commands added
shared-limit:
az computelimit shared-limit add— Enable sharing a compute limitaz computelimit shared-limit remove— Disable sharing a compute limitaz computelimit shared-limit show— Get a shared compute limitaz computelimit shared-limit list— List all shared compute limitsguest-subscription:
az computelimit guest-subscription add— Add a guest subscriptionaz computelimit guest-subscription remove— Remove a guest subscriptionaz computelimit guest-subscription show— Get a guest subscriptionaz computelimit guest-subscription list— List all guest subscriptionsGeneral Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.