Skip to content

Commit

Permalink
Adding support to enable and disable storagepool types in Azure Conta…
Browse files Browse the repository at this point in the history
…iner Storage
  • Loading branch information
mukhoakash committed Jan 25, 2024
1 parent e3e6dc8 commit c719490
Show file tree
Hide file tree
Showing 8 changed files with 872 additions and 342 deletions.
12 changes: 10 additions & 2 deletions src/aks-preview/azext_aks_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
validate_artifact_streaming,
)
from azext_aks_preview.azurecontainerstorage._consts import (
CONST_STORAGE_POOL_TYPE_ALL,
CONST_STORAGE_POOL_TYPE_AZURE_DISK,
CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK,
CONST_STORAGE_POOL_TYPE_ELASTIC_SAN,
Expand Down Expand Up @@ -307,6 +308,13 @@
CONST_STORAGE_POOL_TYPE_ELASTIC_SAN,
]

disable_storage_pool_options = [
CONST_STORAGE_POOL_TYPE_AZURE_DISK,
CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK,
CONST_STORAGE_POOL_TYPE_ELASTIC_SAN,
CONST_STORAGE_POOL_TYPE_ALL,
]

storage_pool_skus = [
CONST_STORAGE_POOL_SKU_PREMIUM_LRS,
CONST_STORAGE_POOL_SKU_STANDARD_LRS,
Expand Down Expand Up @@ -1135,8 +1143,8 @@ def load_arguments(self, _):
)
c.argument(
"disable_azure_container_storage",
action="store_true",
help="Flag to disable azure container storage",
arg_type=get_enum_type(disable_storage_pool_options),
help="disable azure container storage or any one of the storagepool types",
)
c.argument(
"storage_pool_name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
CONST_STORAGE_POOL_SKU_STANDARDSSD_LRS = "StandardSSD_LRS"
CONST_STORAGE_POOL_SKU_STANDARDSSD_ZRS = "StandardSSD_ZRS"
CONST_STORAGE_POOL_SKU_ULTRASSD_LRS = "UltraSSD_LRS"
CONST_STORAGE_POOL_TYPE_ALL = "all"
CONST_STORAGE_POOL_TYPE_AZURE_DISK = "azureDisk"
CONST_STORAGE_POOL_TYPE_ELASTIC_SAN = "elasticSan"
CONST_STORAGE_POOL_TYPE_EPHEMERAL_DISK = "ephemeralDisk"
Expand Down
Loading

0 comments on commit c719490

Please sign in to comment.