Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/pscloud/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0
+++++
* Stable release.
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release notes for version 1.0.0 are too generic ("Stable release"). Given the significant changes in this PR (removal of identity parameters, removal of wait command, parameter name changes, flattened network parameters), the release notes should document these breaking changes and improvements more explicitly. Users upgrading from 1.0.0b1 need to know what has changed, especially any breaking changes to command syntax.

Suggested change
* Stable release.
* First stable (GA) release.
* Breaking change: Removed identity-related parameters from commands that previously accepted `--identity` or similar options.
* Breaking change: Removed the `wait` command; scripts relying on it must be updated to use alternative polling or waiting mechanisms.
* Breaking change: Renamed several parameters to align with current Azure conventions; existing scripts may need to update parameter names.
* Improvement: Flattened network-related parameters (for example, virtual network and subnet settings) to simplify command syntax and reduce nesting.

Copilot uses AI. Check for mistakes.

1.0.0b1
++++++
* Initial release.
53 changes: 47 additions & 6 deletions src/pscloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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 ###
Expand Down Expand Up @@ -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
```

#### 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 ####
Expand All @@ -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 ####
Expand All @@ -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
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"pscloud",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Pure Storage Block resources
Expand Down
1 change: 0 additions & 1 deletion src/pscloud/azext_pscloud/aaz/latest/pscloud/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud list",
is_preview=True,
)
class List(AAZCommand):
"""List reservations by Azure subscription ID
Expand Down
1 change: 0 additions & 1 deletion src/pscloud/azext_pscloud/aaz/latest/pscloud/_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a reservation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"pscloud pool",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Storage Pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
from ._list import *
from ._show import *
from ._update import *
from ._wait import *
74 changes: 23 additions & 51 deletions src/pscloud/azext_pscloud/aaz/latest/pscloud/pool/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""

_aaz_info = {
Expand Down Expand Up @@ -60,58 +59,25 @@ def _build_arguments_schema(cls, *args, **kwargs):
),
)

# define Arg Group "Identity"

_args_schema = cls._args_schema
_args_schema.mi_system_assigned = AAZStrArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity.",
blank="True",
)
_args_schema.mi_user_assigned = AAZListArg(
options=["--user-assigned", "--mi-user-assigned"],
arg_group="Identity",
help="Set the user managed identities.",
blank=[],
)

mi_user_assigned = cls._args_schema.mi_user_assigned
mi_user_assigned.Element = AAZStrArg()

# define Arg Group "Properties"

_args_schema = cls._args_schema
_args_schema.availability_zone = AAZStrArg(
options=["--availability-zone"],
_args_schema.zone = AAZStrArg(
options=["-z", "--zone"],
arg_group="Properties",
help="Azure Availability Zone the Pool is located in",
required=True,
)
_args_schema.provisioned_bandwidth = AAZIntArg(
options=["--provisioned-bandwidth"],
arg_group="Properties",
help="Total bandwidth provisioned for the pool, in MB/s",
required=True,
)
_args_schema.reservation_id = AAZStrArg(
options=["--reservation-id"],
arg_group="Properties",
help="Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to",
)
_args_schema.vnet_injection = AAZObjectArg(
options=["--vnet-injection"],
arg_group="Properties",
help="Network properties of the storage pool",
)

vnet_injection = cls._args_schema.vnet_injection
vnet_injection.subnet_id = AAZStrArg(
options=["subnet-id"],
help="Azure resource ID of the Virtual Network subnet where the storage pool will be connected",
required=True,
)
vnet_injection.vnet_id = AAZStrArg(
options=["vnet-id"],
help="Azure resource ID of the Virtual Network in which the subnet is located",
required=True,
)

Expand All @@ -134,6 +100,22 @@ def _build_arguments_schema(cls, *args, **kwargs):

tags = cls._args_schema.tags
tags.Element = AAZStrArg()

# define Arg Group "VnetInjection"

_args_schema = cls._args_schema
_args_schema.subnet_id = AAZStrArg(
options=["--subnet-name"],
arg_group="VnetInjection",
help="Azure resource ID of the Virtual Network subnet where the storage pool will be connected",
required=True,
)
_args_schema.vnet_id = AAZStrArg(
options=["--vnet-name"],
arg_group="VnetInjection",
help="Azure resource ID of the Virtual Network in which the subnet is located",
required=True,
)
return cls._args_schema

def _execute_operations(self):
Expand Down Expand Up @@ -242,26 +224,16 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZIdentityObjectType)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")

identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}})
identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}})

user_assigned = _builder.get(".identity.userAssigned")
if user_assigned is not None:
user_assigned.set_elements(AAZStrType, ".")

properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("availabilityZone", AAZStrType, ".availability_zone", typ_kwargs={"flags": {"required": True}})
properties.set_prop("availabilityZone", AAZStrType, ".zone", typ_kwargs={"flags": {"required": True}})
properties.set_prop("provisionedBandwidthMbPerSec", AAZIntType, ".provisioned_bandwidth", typ_kwargs={"flags": {"required": True}})
properties.set_prop("reservationResourceId", AAZStrType, ".reservation_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("vnetInjection", AAZObjectType, ".vnet_injection", typ_kwargs={"flags": {"required": True}})
properties.set_prop("vnetInjection", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})

vnet_injection = _builder.get(".properties.vnetInjection")
if vnet_injection is not None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud pool delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"],
help="Name of the storage pool",
required=True,
id_part="name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud pool get-health-status",
is_preview=True,
)
class GetHealthStatus(AAZCommand):
"""Retrieve health metrics of a storage pool
Expand Down Expand Up @@ -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"],
help="Name of the storage pool",
required=True,
id_part="name",
Expand Down
1 change: 0 additions & 1 deletion src/pscloud/azext_pscloud/aaz/latest/pscloud/pool/_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud pool list",
is_preview=True,
)
class List(AAZCommand):
"""List storage pools by Azure subscription ID
Expand Down
1 change: 0 additions & 1 deletion src/pscloud/azext_pscloud/aaz/latest/pscloud/pool/_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud pool show",
is_preview=True,
)
class Show(AAZCommand):
"""Get a storage pool
Expand Down
30 changes: 0 additions & 30 deletions src/pscloud/azext_pscloud/aaz/latest/pscloud/pool/_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"pscloud pool update",
is_preview=True,
)
class Update(AAZCommand):
"""Update a storage pool
Expand Down Expand Up @@ -61,25 +60,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
),
)

# define Arg Group "Identity"

_args_schema = cls._args_schema
_args_schema.mi_system_assigned = AAZStrArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity.",
blank="True",
)
_args_schema.mi_user_assigned = AAZListArg(
options=["--user-assigned", "--mi-user-assigned"],
arg_group="Identity",
help="Set the user managed identities.",
blank=[],
)

mi_user_assigned = cls._args_schema.mi_user_assigned
mi_user_assigned.Element = AAZStrArg()

# define Arg Group "Properties"

_args_schema = cls._args_schema
Expand Down Expand Up @@ -204,19 +184,9 @@ def content(self):
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZIdentityObjectType)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")

identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}})
identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}})

user_assigned = _builder.get(".identity.userAssigned")
if user_assigned is not None:
user_assigned.set_elements(AAZStrType, ".")

properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("provisionedBandwidthMbPerSec", AAZIntType, ".provisioned_bandwidth")
Expand Down
Loading
Loading