[Compute] Create new extension interconnect-block - #10158
Closed
william051200 wants to merge 6 commits into
Closed
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Compute-focused Azure CLI extension, interconnect-block, implemented primarily via AAZ-generated command modules to manage Interconnect Block resources.
Changes:
- Introduces the new
interconnect-blockextension packaging scaffold (setup, metadata, history). - Adds AAZ command implementations for
create/delete/list/show/update/waitunderazext_interconnect_block/aaz/latest/interconnect_block. - Adds initial user documentation in
README.mdand initializes the extension’s loader/help/params wiring.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/interconnect-block/setup.py | Extension packaging metadata (name/version/classifiers, long description, package discovery). |
| src/interconnect-block/setup.cfg | Setup configuration placeholder file. |
| src/interconnect-block/README.md | User-facing command examples and extension usage notes. |
| src/interconnect-block/HISTORY.rst | Changelog entry for initial beta release. |
| src/interconnect-block/azext_interconnect_block/init.py | Commands loader wiring to load AAZ command table and arguments. |
| src/interconnect-block/azext_interconnect_block/_help.py | Help registration module stub/import. |
| src/interconnect-block/azext_interconnect_block/_params.py | Arguments registration stub (non-AAZ path). |
| src/interconnect-block/azext_interconnect_block/commands.py | Non-AAZ command table loader stub. |
| src/interconnect-block/azext_interconnect_block/custom.py | Custom command module stub/logger. |
| src/interconnect-block/azext_interconnect_block/azext_metadata.json | Extension metadata (preview flag, min CLI core version). |
| src/interconnect-block/azext_interconnect_block/aaz/init.py | AAZ package marker/init. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/init.py | AAZ “latest” package marker/init. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/__cmd_group.py | Registers the interconnect-block command group. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/init.py | Aggregates exported commands for the command group. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_create.py | AAZ implementation for az interconnect-block create. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_delete.py | AAZ implementation for az interconnect-block delete. |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_list.py | AAZ implementation for az interconnect-block list (paging, RG/sub scope). |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_show.py | AAZ implementation for az interconnect-block show (supports expand). |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_update.py | AAZ implementation for az interconnect-block update (LRO + generic update). |
| src/interconnect-block/azext_interconnect_block/aaz/latest/interconnect_block/_wait.py | AAZ implementation for az interconnect-block wait. |
| src/interconnect-block/azext_interconnect_block/tests/init.py | Test package init stub. |
| src/interconnect-block/azext_interconnect_block/tests/latest/init.py | Latest tests package init stub. |
Comments suppressed due to low confidence (3)
src/interconnect-block/README.md:57
- The show example has a trailing space after the line-continuation
\(--expand \). In most shells this breaks the line continuation, so the command won’t run when copy/pasted.
az interconnect-block show --name training-icb-001 --resource-group ai-training-rg --expand \
instanceView
src/interconnect-block/README.md:63
- The update example splits the option name as
--sku-\followed bycapacity, which is not a valid CLI option when copy/pasted. It should be--sku-capacity.
az interconnect-block update --name training-icb-001 --resource-group ai-training-rg --sku-\
capacity 54
src/interconnect-block/README.md:75
- The no-wait update example splits
--sku-capacityacross lines (--sku-\thencapacity). This will fail when copy/pasted and should be a single--sku-capacityoption.
az interconnect-block update --name training-icb-001 --resource-group ai-training-rg --sku-\
capacity 72 --no-wait
| "interconnect-block create", | ||
| ) | ||
| class Create(AAZCommand): | ||
| """Create an Interconnect Block. When updating an Interconnect Block, only tags and sku-capacity may be modified. |
Comment on lines
+60
to
+64
| _args_schema.interconnect_group_id = AAZStrArg( | ||
| options=["--group-id", "--interconnect-group-id"], | ||
| arg_group="InterconnectGroup", | ||
| help="The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...", | ||
| ) |
Comment on lines
+123
to
+137
| _args_schema.sku_capacity = AAZIntArg( | ||
| options=["--sku-capacity"], | ||
| arg_group="Sku", | ||
| help="Specifies the number of virtual machines in the scale set.", | ||
| ) | ||
| _args_schema.sku_name = AAZStrArg( | ||
| options=["--sku-name"], | ||
| arg_group="Sku", | ||
| help="The sku name.", | ||
| ) | ||
| _args_schema.sku_tier = AAZStrArg( | ||
| options=["--sku-tier"], | ||
| arg_group="Sku", | ||
| help="Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**", | ||
| ) |
| "interconnect-block update", | ||
| ) | ||
| class Update(AAZCommand): | ||
| """Update an Interconnect Block. When updating an Interconnect Block, only tags and sku-capacity may be modified. |
| ##### Creates a new InterconnectBlock resource. | ||
| ``` | ||
| az interconnect-block create --name training-icb-001 --resource-group ai-training-rg \ | ||
| --location eastus --zone 1 --sku-name Standard_ND128isr_GB300_v6 --sku-capacity 36 \ |
Comment on lines
+14
to
+17
| @register_command( | ||
| "interconnect-block create", | ||
| ) | ||
| class Create(AAZCommand): |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature request: Azure/azure-cli#33707
aaz: Azure/aaz#1049
New command:
az interconnect-block create/delete/list/show/update/waitThis checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)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.