Skip to content

Add fileshares extension for 2025-09-01-preview api version#9697

Open
ankushbindlish2 wants to merge 1 commit intoAzure:mainfrom
ankushbindlish2:fileshares-preview-cli
Open

Add fileshares extension for 2025-09-01-preview api version#9697
ankushbindlish2 wants to merge 1 commit intoAzure:mainfrom
ankushbindlish2:fileshares-preview-cli

Conversation

@ankushbindlish2
Copy link
Copy Markdown
Member

  • Add Microsoft.FileShares CLI extension (2025-09-01-preview API)
  • 21 commands across 4 command groups (all Preview stage)
  • Command groups: file-shares, file-share, file-share-snapshot, private-endpoint-connection, private-link-resource
  • Generated from AAZ command models

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

Related command

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.

- Add Microsoft.FileShares CLI extension (2025-09-01-preview API)
- 21 commands across 4 command groups (all Preview stage)
- Command groups: file-shares, file-share, file-share-snapshot, private-endpoint-connection, private-link-resource
- Generated from AAZ command models
Copilot AI review requested due to automatic review settings March 18, 2026 01:09
@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 @ankushbindlish2,
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 18, 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>

@ankushbindlish2 ankushbindlish2 changed the title Add fileshares extension Add fileshares extension for 2025-09-01-preview api version Mar 18, 2026
@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

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 Azure CLI extension (fileshares) for managing Microsoft.FileShares resources, with command implementations generated from AAZ models.

Changes:

  • Introduces the fileshares extension packaging scaffold (setup, metadata, README/HISTORY).
  • Adds AAZ-generated command groups and commands for file shares, snapshots, private endpoint connections, and private link resources, plus utility commands (name availability, limits, usage, recommendations).
  • Adds initial test scaffolding under azext_fileshares/tests.

Reviewed changes

Copilot reviewed 48 out of 48 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/fileshares/setup.py Extension packaging metadata and wheel build configuration.
src/fileshares/setup.cfg Setup config placeholder file (repository convention).
src/fileshares/README.md Extension readme scaffold.
src/fileshares/HISTORY.rst Changelog scaffold for initial beta version.
src/fileshares/azext_fileshares/init.py Command loader wiring (loads AAZ command table + legacy hooks).
src/fileshares/azext_fileshares/azext_metadata.json Extension metadata (preview flag, min CLI core version).
src/fileshares/azext_fileshares/_help.py Help module scaffold (imports helps).
src/fileshares/azext_fileshares/_params.py Argument loading hook scaffold.
src/fileshares/azext_fileshares/commands.py Legacy command table hook scaffold.
src/fileshares/azext_fileshares/custom.py Custom command module scaffold (logger).
src/fileshares/azext_fileshares/aaz/init.py AAZ package root for generated commands.
src/fileshares/azext_fileshares/aaz/latest/init.py AAZ “latest” namespace marker.
src/fileshares/azext_fileshares/aaz/latest/file_shares/__cmd_group.py Registers top-level file-shares command group.
src/fileshares/azext_fileshares/aaz/latest/file_shares/init.py Exposes file_shares command group + utility commands.
src/fileshares/azext_fileshares/aaz/latest/file_shares/_check_name_availability.py Implements file-shares check-name-availability.
src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_limit.py Implements file-shares get-limit.
src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_provisioning_recommendation.py Implements file-shares get-provisioning-recommendation.
src/fileshares/azext_fileshares/aaz/latest/file_shares/_get_usage_datum.py Implements file-shares get-usage-datum.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/__cmd_group.py Registers file-shares file-share command group.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/init.py Exposes file share CRUD + wait/list commands.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_create.py Implements file-shares file-share create.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_delete.py Implements file-shares file-share delete.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_list.py Implements file-shares file-share list.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_show.py Implements file-shares file-share show.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_update.py Implements file-shares file-share update (generic update enabled).
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/_wait.py Implements file-shares file-share wait.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/__cmd_group.py Registers file-shares file-share file-share-snapshot group.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/init.py Exposes snapshot CRUD/list/update commands.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_create.py Implements file-share-snapshot create.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_delete.py Implements file-share-snapshot delete.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_list.py Implements file-share-snapshot list.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_show.py Implements file-share-snapshot show.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/file_share_snapshot/_update.py Implements file-share-snapshot update.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/__cmd_group.py Registers private-endpoint-connection subgroup.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/init.py Exposes private endpoint connection commands.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_create.py Implements private-endpoint-connection create.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_delete.py Implements private-endpoint-connection delete.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_list.py Implements private-endpoint-connection list.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_show.py Implements private-endpoint-connection show.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_update.py Implements private-endpoint-connection update (generic update enabled).
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_endpoint_connection/_wait.py Implements private-endpoint-connection wait.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/__cmd_group.py Registers private-link-resource subgroup.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/init.py Exposes private link resource commands.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/_list.py Implements private-link-resource list.
src/fileshares/azext_fileshares/aaz/latest/file_shares/file_share/private_link_resource/_show.py Implements private-link-resource show.
src/fileshares/azext_fileshares/tests/init.py Test package marker.
src/fileshares/azext_fileshares/tests/latest/init.py Test version namespace marker.
src/fileshares/azext_fileshares/tests/latest/test_fileshares.py Scenario test scaffold for the extension.

Comment on lines +27 to +33
_aaz_info = {
"version": "2026-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.fileshares/locations/{}/checknameavailability", "2026-06-01"],
]
}

az file-shares file-share file-share-snapshot list --resource-group rgfileshares --resource-name fileshare

:example: FileShareSnapshot_List_MinimumSet
az file-shares file-share file-share-snapshot list --resource-group rgfileshares --resource-name fileshare --resource-group rgfileshares --resource-name testfileshare
az file-shares file-share list --resource-group rgfileshares

:example: FileShares_ListByParent_MinimumSet
az file-shares file-share list --resource-group rgfileshares --resource-group rgfileshares
az file-shares get-usage-datum --location westus

:example: FileShare_GetUsageData_MinimumSet
az file-shares get-usage-datum --location westus --location westus
Comment on lines +8 to +13
from azure.cli.testsdk import *


class FilesharesScenario(ScenarioTest):
# TODO: add tests here
pass
Comment on lines +1 to +5
# Azure CLI Fileshares Extension #
This is an extension to Azure CLI to manage Fileshares resources.

## How to use ##
Please add commands usage here. No newline at end of file
az file-shares get-provisioning-recommendation --location westus --provisioned-storage-gi-b 7

:example: FileShare_GetProvisioningRecommendation_MinimumSet
az file-shares get-provisioning-recommendation --location westus --provisioned-storage-gi-b 7 --location westus --provisioned-storage-gi-b 7
az file-shares check-name-availability --location westus --name fvykqbgmd --type Microsoft.FileShares/fileShares

:example: FileShares_CheckNameAvailability_MinimumSet
az file-shares check-name-availability --location westus --name fvykqbgmd --type Microsoft.FileShares/fileShares --location westus
@yonzhan yonzhan requested a review from necusjz March 18, 2026 08:01
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Mar 27, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

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.

4 participants