Skip to content

Az.ComputeLimit CLI extension for shared-limit and guest-subscription#9718

Open
deepnandu wants to merge 3 commits intoAzure:mainfrom
deepnandu:deep/continue-feature-computelimit
Open

Az.ComputeLimit CLI extension for shared-limit and guest-subscription#9718
deepnandu wants to merge 3 commits intoAzure:mainfrom
deepnandu:deep/continue-feature-computelimit

Conversation

@deepnandu
Copy link
Copy Markdown
Member


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

Related command

Add new computelimit CLI extension for managing Azure Compute Limit resources.

Commands added

shared-limit:

  • az computelimit shared-limit add — Enable sharing a compute limit
  • az computelimit shared-limit remove — Disable sharing a compute limit
  • az computelimit shared-limit show — Get a shared compute limit
  • az computelimit shared-limit list — List all shared compute limits

guest-subscription:

  • az computelimit guest-subscription add — Add a guest subscription
  • az computelimit guest-subscription remove — Remove a guest subscription
  • az computelimit guest-subscription show — Get a guest subscription
  • az computelimit guest-subscription list — List all guest subscriptions

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

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

Validation for Breaking Change Starting...

Thanks for your contribution!

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

Hi @deepnandu,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Mar 24, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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>

@github-actions
Copy link
Copy Markdown
Contributor

CodeGen Tools Feedback Collection

Thank 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

@github-actions
Copy link
Copy Markdown
Contributor

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Mar 26, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@yanzhudd
Copy link
Copy Markdown
Contributor

yanzhudd commented Apr 1, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@deepnandu deepnandu marked this pull request as ready for review April 1, 2026 10:53
Copilot AI review requested due to automatic review settings April 1, 2026 10:53
Copy link
Copy Markdown
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

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 computelimit extension 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.json and 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.

Copy link
Copy Markdown
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

Copilot reviewed 40 out of 40 changed files in this pull request and generated 6 comments.

Comment on lines +117 to +121
{
"Command": "az computelimit",
"AzureServiceName": "Compute Limit",
"URL": ""
},
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +22
```bash
az computelimit guest-subscription add --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
```
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +28
```bash
az computelimit guest-subscription remove --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
```
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The same leading indentation issue appears in other bash examples as well; please remove the leading spaces so each command can be copied directly.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +34
```bash
az computelimit guest-subscription show --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
```
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +46
```bash
az computelimit shared-limit add --location eastus --name StandardDSv3Family
```
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +62 to +64
```bash
az computelimit shared-limit list --location eastus
``` No newline at end of file
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The final list example is indented ( az ...). Please remove the leading spaces so the command starts at column 0 for easier copy/paste.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants