Skip to content
Merged
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
8 changes: 8 additions & 0 deletions src/pscloud/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

1.0.0b1
++++++
* Initial release.
89 changes: 89 additions & 0 deletions src/pscloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Azure CLI Pscloud Extension #

This is an extension to Azure CLI to manage PureStorage Cloud resources including reservations and storage pools.

## How to use ##

### Install the extension ###

Install this extension using the below CLI command:
```
az extension add --name pscloud
```

### Check the version ###

```
az extension show --name pscloud --query version
```

### Connect to Azure subscription ###

```
az login
az account set -s {subscription_id}
```

### Create a resource group (or use an existing one) ###

```
az group create -n demoResourceGroup -l eastus
```

## Available Commands ##

#### Show a PureStorage Cloud Resource ####

```
az pscloud show --resource-group {resource_group} --name {reservation_name}
```

#### List PureStorage Cloud Resources ####

```
az pscloud list --resource-group {resource_group}
```

#### Create a Storage Pool ####

```
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}"
```

#### Show a Storage Pool ####

```
az pscloud pool show --resource-group {resource_group} --storage-pool-name {storage_pool_name}
```

#### List Storage Pools ####

```
az pscloud pool list --resource-group {resource_group}
```

#### Update a Storage Pool ####

```
az pscloud pool update --resource-group {resource_group} --name {storage_pool_name} --provisioned-bandwidth {bandwidth_mb_per_sec}
```

#### Delete a Storage Pool ####

```
az pscloud pool delete --resource-group {resource_group} --storage-pool-name {storage_pool_name}
```

#### Get Storage Pool Health Status ####

```
az pscloud pool get-health-status --resource-group {resource_group} --storage-pool-name {storage_pool_name}
```

#### Get Storage Pool AVS Status ####

```
az pscloud pool get-avs-status --resource-group {resource_group} --storage-pool-name {storage_pool_name}
```

If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues.
42 changes: 42 additions & 0 deletions src/pscloud/azext_pscloud/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader
from azext_pscloud._help import helps # pylint: disable=unused-import


class PscloudCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
custom_command_type = CliCommandType(
operations_tmpl='azext_pscloud.custom#{}')
super().__init__(cli_ctx=cli_ctx,
custom_command_type=custom_command_type)

def load_command_table(self, args):
from azext_pscloud.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from azext_pscloud._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = PscloudCommandsLoader
11 changes: 11 additions & 0 deletions src/pscloud/azext_pscloud/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=line-too-long
# pylint: disable=too-many-lines

from knack.help_files import helps # pylint: disable=unused-import
13 changes: 13 additions & 0 deletions src/pscloud/azext_pscloud/_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: disable=too-many-lines
# pylint: disable=too-many-statements


def load_arguments(self, _): # pylint: disable=unused-argument
pass
6 changes: 6 additions & 0 deletions src/pscloud/azext_pscloud/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
10 changes: 10 additions & 0 deletions src/pscloud/azext_pscloud/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

24 changes: 24 additions & 0 deletions src/pscloud/azext_pscloud/aaz/latest/pscloud/__cmd_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"pscloud",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Pure Storage Block resources
"""
pass


__all__ = ["__CMDGroup"]
16 changes: 16 additions & 0 deletions src/pscloud/azext_pscloud/aaz/latest/pscloud/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
Loading
Loading