[AKS] az aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version#31966
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @nearora-msft, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| aks create | cmd aks create added parameter container_storage_version |
||
| aks create | cmd aks create update parameter enable_azure_container_storage: added property nargs=? |
||
| aks create | cmd aks create update parameter enable_azure_container_storage: removed property choices=['azureDisk', 'elasticSan', 'ephemeralDisk'] |
||
| aks update | cmd aks update added parameter container_storage_version |
||
| aks update | cmd aks update update parameter disable_azure_container_storage: added property nargs=? |
||
| aks update | cmd aks update update parameter disable_azure_container_storage: removed property choices=['all', 'azureDisk', 'elasticSan', 'ephemeralDisk'] |
||
| aks update | cmd aks update update parameter enable_azure_container_storage: added property nargs=? |
||
| aks update | cmd aks update update parameter enable_azure_container_storage: removed property choices=['azureDisk', 'elasticSan', 'ephemeralDisk'] |
|
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>
|
|
/azp run |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the AKS CLI commands to support both version 1 and the latest version of Azure Container Storage, providing backward compatibility while introducing new functionality. The changes modify the behavior of --enable-azure-container-storage and --disable-azure-container-storage flags and add a new --container-storage-version parameter.
- Adds support for installing the latest version of Azure Container Storage by default when using
--enable-azure-container-storagewithout additional parameters - Introduces
--container-storage-versionparameter to specify version 1 explicitly when needed - Updates validation logic to handle both v1 and v2 extension installations with appropriate error messaging
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test_validators.py | Renames existing test classes and methods to v1-specific variants and adds new test cases for v2 validation |
| test_aks_commands.py | Updates test method names to reflect v1 specificity and adds new integration tests for v2 functionality |
| managed_cluster_decorator.py | Implements version detection logic and routes to appropriate v1 or v2 installation/validation functions |
| custom.py | Adds container_storage_version parameter to both aks_create and aks_update function signatures |
| acstor_ops.py | Renames v1 functions and adds new v2 enable/disable operations with simplified configuration |
| _validators.py | Splits validation into v1 and v2 specific functions with appropriate error handling for version conflicts |
| _helpers.py | Updates constant references for v1 and adds new helper function for checking extension installation status |
| _consts.py | Adds new constants for v2 extension while maintaining v1 constants for backward compatibility |
| _params.py | Implements custom argument types allowing flags to work with or without values |
| parameters.py | Minor formatting cleanup |
| linter_exclusions.yml | Adds exclusions for the new container_storage_version parameter |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_validators.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/_validators.py
Outdated
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/_validators.py
Show resolved
Hide resolved
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Please fix failed CI checks |
az aks create/update': Change '--enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version
az aks create/update': Change '--enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-versionaz aks create/update: Change --enable-azure-container-storage --disable-azure-container-storage behavior and add --container-storage-version
…--disable-azure-container-storage behavior and add --container-storage-version
115efef to
49b2786
Compare
49b2786 to
8ace4f6
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
lgtm
Queued live test to validate the change, test passed!
- test_aks_create_with_azurecontainerstorage_v1
- test_aks_create_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
- test_aks_update_with_azurecontainerstorage_v1
- test_aks_update_with_azurecontainerstorage_v1_with_ephemeral_disk_parameters
- test_aks_create_with_azurecontainerstorage
- test_aks_update_with_azurecontainerstorage
src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/_validators.py
Show resolved
Hide resolved
src/azure-cli/azure/cli/command_modules/acs/azurecontainerstorage/acstor_ops.py
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |


Related command
az aks create
az aks update
Description
Changes to the "az aks create" command:
Changes to the "az aks update command:"
Testing Guide
Create AKS cluster with the latest version of acstor.
az aks create -g test-rg -n test-cluster --enable-azure-container-storage
Create AKS cluster with version 1 of acstor installed with azureDisk as storagepool type.
az aks create -g test-rg -n test-cluster --enable-azure-container-storage azureDisk --container-storage-version 1
Update AKS cluster with the latest version of acstor.
az aks update -g test-rg -n test-cluster --enable-azure-container-storage
Update AKS cluster with version 1 of acstor installed with azureDisk as storagepool type.
az aks update -g test-rg -n test-cluster --enable-azure-container-storage azureDisk --container-storage-version 1
Update AKS cluster and uninstall version of acstor when latest version is installed.
az aks update -g test-rg -n test-cluster --disable-azure-container-storage
Update AKS cluster and uninstall acstor when v1 version is installed and azureDisk storagepool type is given.
az aks update -g test-rg -n test-cluster --disable-azure-container-storage azureDisk
Update AKS cluster and uninstall acstor when v1 version is installed when "all" storagepool type is given.
az aks update -g test-rg -n test-cluster --disable-azure-container-storage all
History Notes
[AKS]
az aks create/update: Support installing latest version of acstor on the cx cluster by--enable-azure-container-storageparameter[AKS]
az aks create/update: Support specifying installation version of acstor by--container-storage-versionwhen setting--enable-azure-container-storage[AKS]
az aks update: Support uninstalling acstor from the cx cluster by--disable-azure-container-storageregardless of the installed versionThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.