-
Notifications
You must be signed in to change notification settings - Fork 1.6k
pscloud: Release stable version 1.0.0 with CLI improvements #9488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2416285
52e36c7
eb168dc
933c624
aba11ba
bf0f502
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,10 @@ | |
| Release History | ||
| =============== | ||
|
|
||
| 1.0.0 | ||
| +++++ | ||
| * Stable release. | ||
|
|
||
| 1.0.0b1 | ||
| ++++++ | ||
| * Initial release. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,23 @@ | |
|
|
||
| This is an extension to Azure CLI to manage Pure Storage Cloud Azure Native resources. | ||
|
|
||
| ## Recent Improvements ## | ||
|
|
||
| The pscloud CLI has been recently improved for better usability and consistency: | ||
|
|
||
| ### Enhanced Parameter Usability ### | ||
| - **Simplified zone specification**: Use `--zone` or `-z` instead of `--availability-zone` | ||
| - **Flattened network parameters**: Use `--subnet-name` and `--vnet-name` directly instead of complex `--vnet-injection` JSON objects | ||
| - **Improved parameter names**: Consistent use of `--name` or `-n` across all commands | ||
|
|
||
| ### Removed Unsupported Features ### | ||
| - **Identity parameters removed**: `--system-assigned`, `--user-assigned`, and related identity options have been removed as they are not supported by the Pure Storage Cloud service | ||
| - **Wait command removed**: `az pscloud pool wait` has been removed for consistency with other Azure CLI extensions | ||
|
|
||
| ### Enhanced Validation ### | ||
| - **Required parameters**: Key parameters like `--zone`, `--provisioned-bandwidth`, `--reservation-id`, `--subnet-name`, and `--vnet-name` are now properly validated as required | ||
| - **Better examples**: All command examples now show realistic Azure resource IDs and cleaner syntax | ||
|
|
||
| ## How to use ## | ||
|
|
||
| For more details about the Pure Storage Cloud resources please visit [documentation on Pure Support](https://support.purestorage.com/bundle/m_azure_native_pure_storage_cloud/page/Pure_Cloud_Block_Store/Azure_Native_Pure_Storage_Cloud/design/c_resources_in_psc.html). | ||
|
|
@@ -10,7 +27,7 @@ For more details about the Pure Storage Cloud resources please visit [documentat | |
|
|
||
| Install this extension using the below CLI command: | ||
| ``` | ||
| az extension add --name pscloud --allow-preview | ||
| az extension add --name pscloud | ||
| ``` | ||
|
|
||
| ### Check the version ### | ||
|
|
@@ -65,13 +82,33 @@ This resource represents a block storage array instance, delivered as a service, | |
| To create a Storage Pool, you need to have a virtual network with a delegated subnet to `PureStorage.Block` service. | ||
|
|
||
| ```bash | ||
| az pscloud pool create --resource-group {resource_group} --storage-pool-name {storage_pool_name} --location {location} --availability-zone {availability_zone} --vnet-injection '{{"subnet-id": "{subnet_id}", "vnet-id": "{vnet_id}"}}' --provisioned-bandwidth {bandwidth_mb_per_sec} --reservation-id {reservation_resource_id} --system-assigned --user-assigned {user_assigned_identity_ids} --tags "{key:value}" | ||
| az pscloud pool create --resource-group {resource_group} --storage-pool-name {storage_pool_name} --location {location} --zone {availability_zone} --subnet-name {subnet_resource_id} --vnet-name {vnet_resource_id} --provisioned-bandwidth {bandwidth_mb_per_sec} --reservation-id {reservation_resource_id} --tags "{key:value}" | ||
| ``` | ||
|
|
||
| **Required Parameters:** | ||
| - `--zone` or `-z`: Azure Availability Zone (1, 2, or 3) | ||
| - `--subnet-name`: Full Azure resource ID of the delegated subnet | ||
| - `--vnet-name`: Full Azure resource ID of the virtual network | ||
| - `--provisioned-bandwidth`: Bandwidth in MB/s | ||
| - `--reservation-id`: Azure resource ID of the Pure Storage Cloud reservation | ||
|
|
||
| **Example with realistic values:** | ||
| ```bash | ||
| az pscloud pool create \ | ||
| --resource-group myResourceGroup \ | ||
| --storage-pool-name myStoragePool \ | ||
| --location eastus \ | ||
| --zone 1 \ | ||
| --subnet-name /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet \ | ||
| --vnet-name /subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVnet \ | ||
| --provisioned-bandwidth 100 \ | ||
| --reservation-id /subscriptions/12345678-1234-1234-1234-123456789abc/providers/PureStorage.Block/reservations/myReservation | ||
| ``` | ||
|
Comment on lines
+88
to
106
|
||
|
|
||
| #### Show a Storage Pool #### | ||
|
|
||
| ```bash | ||
| az pscloud pool show --resource-group {resource_group} --storage-pool-name {storage_pool_name} | ||
| az pscloud pool show --resource-group {resource_group} --name {storage_pool_name} | ||
| ``` | ||
|
|
||
| #### List Storage Pools #### | ||
|
|
@@ -86,10 +123,12 @@ az pscloud pool list --resource-group {resource_group} | |
| az pscloud pool update --resource-group {resource_group} --name {storage_pool_name} --provisioned-bandwidth {bandwidth_mb_per_sec} | ||
| ``` | ||
|
|
||
| **Note:** Identity-related parameters (`--system-assigned`, `--user-assigned`) have been removed as they are not supported by the Pure Storage Cloud service. | ||
|
|
||
| #### Delete a Storage Pool #### | ||
|
|
||
| ```bash | ||
| az pscloud pool delete --resource-group {resource_group} --storage-pool-name {storage_pool_name} | ||
| az pscloud pool delete --resource-group {resource_group} --name {storage_pool_name} | ||
| ``` | ||
|
|
||
| #### Connect a Storage Pool to AVS #### | ||
|
|
@@ -101,15 +140,17 @@ Currently, establishing a connection between a Storage Pool and an Azure VMware | |
| This command provides the health status about the Storage Pool. | ||
|
|
||
| ```bash | ||
| az pscloud pool get-health-status --resource-group {resource_group} --storage-pool-name {storage_pool_name} | ||
| az pscloud pool get-health-status --resource-group {resource_group} --name {storage_pool_name} | ||
| ``` | ||
|
|
||
| #### Get Storage Pool AVS Status #### | ||
|
|
||
| This command provides the current connection status between the Storage Pool and Azure VMware Solution (AVS) resource. | ||
|
|
||
| ```bash | ||
| az pscloud pool get-avs-status --resource-group {resource_group} --storage-pool-name {storage_pool_name} | ||
| az pscloud pool get-avs-status --resource-group {resource_group} --name {storage_pool_name} | ||
| ``` | ||
|
|
||
| **Note:** You can use either `--name` or `-n` for the storage pool name parameter. | ||
|
|
||
| If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |
|
|
||
| @register_command( | ||
| "pscloud show", | ||
| is_preview=True, | ||
| ) | ||
| class Show(AAZCommand): | ||
| """Get a reservation | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,4 +16,3 @@ | |
| from ._list import * | ||
| from ._show import * | ||
| from ._update import * | ||
| from ._wait import * | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,13 +13,12 @@ | |||||
|
|
||||||
| @register_command( | ||||||
| "pscloud pool create", | ||||||
| is_preview=True, | ||||||
| ) | ||||||
| class Create(AAZCommand): | ||||||
| """Create a storage pool | ||||||
|
|
||||||
| :example: StoragePools_Create | ||||||
| az pscloud pool create --resource-group rgpurestorage --storage-pool-name storagePoolname --availability-zone vknyl --vnet-injection "{subnet-id:tnlctolrxdvnkjiphlrdxq,vnet-id:zbumtytyqwewjcyckwqchiypshv}" --provisioned-bandwidth 17 --reservation-id xiowoxnbtcotutcmmrofvgdi --type None --user-assigned-identities "{key4211:{}}" --tags "{key7593:vsyiygyurvwlfaezpuqu}" --location lonlc | ||||||
| az pscloud pool create --resource-group rgpurestorage --storage-pool-name storagePoolname --zone 1 --subnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --vnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName} --provisioned-bandwidth 100 --reservation-id /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations/{reservationName} --location eastus | ||||||
|
||||||
| az pscloud pool create --resource-group rgpurestorage --storage-pool-name storagePoolname --zone 1 --subnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --vnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName} --provisioned-bandwidth 100 --reservation-id /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations/{reservationName} --location eastus | |
| az pscloud pool create --resource-group rgpurestorage --name storagePoolname --zone 1 --subnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --vnet-name /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName} --provisioned-bandwidth 100 --reservation-id /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations/{reservationName} --location eastus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes made in create, changes regarding storage pool name have only been made in get-avs-status and get-health status.
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter option names are misleading and inconsistent with the help text and actual values expected. The parameter options are named --subnet-name and --vnet-name, but the help text describes them as accepting "Azure resource ID" values, and the internal variable names are subnet_id and vnet_id.
The documentation in lines 90-91 and 102-103 of README.md also shows conflicting information - they suggest these should be simple names like "mySubnet" and "myVnet", but line 11 and 19 mention --subnet-id and --vnet-id, and the help text says these should be full Azure resource IDs.
Either:
- Change the option names to
--subnet-idand--vnet-idto match the help text and internal variable names, OR - Change the help text and documentation to clarify these are names (not IDs) and update the internal variable names accordingly
Based on the PR description mentioning "Network parameter simplification: Use --subnet-name and --vnet-name instead of complex JSON objects", it appears the intention is to use names, but the help text needs to be corrected.
Copilot
AI
Dec 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second parameter "." in the vnetInjection set_prop call is likely incorrect. Following the pattern used elsewhere in the codebase (e.g., line 228 for "properties", and similar patterns in other files), when setting an object type that is composed of multiple sub-fields rather than mapping to a single argument, the second parameter should be omitted entirely.
The vnetInjection object is built from subnet_id and vnet_id fields (lines 240-241), so this should probably be:
properties.set_prop("vnetInjection", AAZObjectType, typ_kwargs={"flags": {"required": True}})
Using "." as the second parameter would attempt to use the entire args context as the value, which doesn't make sense given that the actual values are set on lines 240-241.
| properties.set_prop("vnetInjection", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}}) | |
| properties.set_prop("vnetInjection", AAZObjectType, typ_kwargs={"flags": {"required": True}}) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |||||
|
|
||||||
| @register_command( | ||||||
| "pscloud pool get-avs-status", | ||||||
| is_preview=True, | ||||||
| ) | ||||||
| class GetAvsStatus(AAZCommand): | ||||||
| """Returns the status of the storage pool connection to AVS | ||||||
|
|
@@ -49,7 +48,7 @@ def _build_arguments_schema(cls, *args, **kwargs): | |||||
| required=True, | ||||||
| ) | ||||||
| _args_schema.storage_pool_name = AAZStrArg( | ||||||
| options=["--storage-pool-name"], | ||||||
| options=["-n", "--name"], | ||||||
|
||||||
| options=["-n", "--name"], | |
| options=["-n", "--name", "--storage-pool-name"], |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |||||
|
|
||||||
| @register_command( | ||||||
| "pscloud pool get-health-status", | ||||||
| is_preview=True, | ||||||
| ) | ||||||
| class GetHealthStatus(AAZCommand): | ||||||
| """Retrieve health metrics of a storage pool | ||||||
|
|
@@ -49,7 +48,7 @@ def _build_arguments_schema(cls, *args, **kwargs): | |||||
| required=True, | ||||||
| ) | ||||||
| _args_schema.storage_pool_name = AAZStrArg( | ||||||
| options=["--storage-pool-name"], | ||||||
| options=["-n", "--name"], | ||||||
|
||||||
| options=["-n", "--name"], | |
| options=["-n", "--name", "--storage-pool-name"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example uses the old parameter name
--storage-pool-nameinstead of the standardized--nameparameter. For consistency with the PR's goal of parameter standardization and the documented improvements on lines 12 and 154, this should be changed to use--nameor-n.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes made in create, changes regarding storage pool name have only been made in get-avs-status and get-health status.