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
5 changes: 5 additions & 0 deletions src/storage-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.0.0b5
+++++++
* `az storage blob access/directory/move`: Remove deprecated command groups since `az storage fs` command group has been GA since 2021
* `az storage account local-user` only mark some params in `create/update` as preview as the rest have been GA in main rep

1.0.0b4
+++++++
* `az storage account create/update`: Support `--enable-extended-groups`
Expand Down
3 changes: 1 addition & 2 deletions src/storage-preview/azext_storage_preview/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from azure.cli.core.commands import AzCommandGroup, AzArgumentContext

import azext_storage_preview._help # pylint: disable=unused-import
from .profiles import CUSTOM_DATA_STORAGE, CUSTOM_MGMT_STORAGE, CUSTOM_DATA_STORAGE_ADLS, \
from .profiles import CUSTOM_DATA_STORAGE, CUSTOM_MGMT_STORAGE, \
CUSTOM_DATA_STORAGE_FILESHARE, CUSTOM_DATA_STORAGE_FILEDATALAKE, CUSTOM_DATA_STORAGE_BLOB


Expand All @@ -17,7 +17,6 @@ def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType

register_resource_type('latest', CUSTOM_DATA_STORAGE, '2018-03-28')
register_resource_type('latest', CUSTOM_DATA_STORAGE_ADLS, '2019-02-02-preview')
register_resource_type('latest', CUSTOM_MGMT_STORAGE, '2023-05-01')
register_resource_type('latest', CUSTOM_DATA_STORAGE_FILESHARE, '2022-11-02')
register_resource_type('latest', CUSTOM_DATA_STORAGE_BLOB, '2022-11-02')
Expand Down
13 changes: 0 additions & 13 deletions src/storage-preview/azext_storage_preview/_client_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,6 @@ def blob_data_service_factory(cli_ctx, kwargs):
token_credential=kwargs.pop('token_credential', None))


def adls_blob_data_service_factory(cli_ctx, kwargs):
from .sdkutil import get_adls_blob_service_by_type
blob_type = kwargs.get('blob_type')
blob_service = get_adls_blob_service_by_type(cli_ctx, blob_type) or get_adls_blob_service_by_type(cli_ctx, 'block')

return generic_data_service_factory(cli_ctx, blob_service, kwargs.pop('account_name', None),
kwargs.pop('account_key', None),
connection_string=kwargs.pop('connection_string', None),
sas_token=kwargs.pop('sas_token', None),
socket_timeout=kwargs.pop('socket_timeout', None),
token_credential=kwargs.pop('token_credential', None))


def cloud_storage_account_service_factory(cli_ctx, kwargs):
t_cloud_storage_account = get_sdk(cli_ctx, CUSTOM_DATA_STORAGE, 'common#CloudStorageAccount')
account_name = kwargs.pop('account_name', None)
Expand Down
187 changes: 0 additions & 187 deletions src/storage-preview/azext_storage_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,193 +210,6 @@
short-summary: Run a command directly using the AzCopy CLI. Please use SAS tokens for authentication.
"""

helps['storage blob access'] = """
type: group
short-summary: Manage the access control properties of a blob when Hierarchical Namespace is enabled
"""

helps['storage blob access set'] = """
type: command
short-summary: Set the access control properties of a blob.
examples:
- name: Set the access control properties of a blob.
text: az storage blob access set -a "user::rwx,group::r--,other::---" -b MyBlob -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob access show'] = """
type: command
short-summary: Show the access control properties of a blob.
examples:
- name: Show the access control properties of a blob.
text: az storage blob access show -b MyBlob -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob access update'] = """
type: command
short-summary: Update the access control properties of a blob.
examples:
- name: Update the access permissions of a blob.
text: az storage blob access update --permissions "rwxrwxrwx" -b MyBlob -c MyContainer --account-name MyStorageAccount
- name: Update the owning user of a blob.
text: az storage blob access update --owner [entityId/UPN] -b MyBlob -c MyContainer --account-name MyStorageAccount
- name: Update the owning group of a blob.
text: az storage blob access update --group [entityId/UPN] -b MyBlob -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob move'] = """
type: command
short-summary: Move a blob in a storage container.
examples:
- name: Move a blob in a storage container.
text: az storage blob move -c MyContainer -d DestinationBlobPath -s SourceBlobPath --account-name MyStorageAccount
"""

helps['storage blob directory'] = """
type: group
short-summary: Manage blob directories in storage account container.
long-summary: To use the directory commands, please make sure your storage account type is StorageV2.
"""

helps['storage blob directory access'] = """
type: group
short-summary: Manage the access control properties of a directory when Hierarchical Namespace is enabled
"""

helps['storage blob directory access set'] = """
type: command
short-summary: Set the access control properties of a directory.
examples:
- name: Set the access control properties of a directory.
text: az storage blob directory access set -a "user::rwx,group::r--,other::---" -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob directory access show'] = """
type: command
short-summary: Show the access control properties of a directory.
examples:
- name: Show the access control properties of a directory.
text: az storage blob directory access show -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob directory access update'] = """
type: command
short-summary: Update the access control properties of a directory.
examples:
- name: Update the access permissions of a directory.
text: az storage blob directory access update --permissions "rwxrwxrwx" -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
- name: Update the owning user of a directory.
text: az storage blob directory access update --owner [entityId/UPN] -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
- name: Update the owning group of a directory.
text: az storage blob directory access update --group [entityId/UPN] -d MyDirectoryPath -c MyContainer --account-name MyStorageAccount
"""

helps['storage blob directory create'] = """
type: command
short-summary: Create a storage blob directory in a storage container.
long-summary: Create a storage blob directory which can contain other directories or blobs in a storage container.
examples:
- name: Create a storage blob directory in a storage container.
text: az storage blob directory create -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
- name: Create a storage blob directory with permissions and umask.
text: az storage blob directory create -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount --permissions rwxrwxrwx --umask 0000
"""

helps['storage blob directory delete'] = """
type: command
short-summary: Delete a storage blob directory in a storage container.
long-summary: >
This operation's behavior is different depending on whether Hierarchical Namespace
is enabled; if yes, then the delete operation can be atomic and instantaneous;
if not, the operation is performed in batches and a continuation token could be returned.
examples:
- name: Delete a storage blob directory in a storage container.
text: az storage blob directory delete -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory download'] = """
type: command
short-summary: Download blobs to a local file path.
examples:
- name: Download a single blob in a storage blob directory.
text: az storage blob directory download -c MyContainer --account-name MyStorageAccount -s "path/to/blob" -d "<local-path>"
- name: Download the entire directory in a storage container.
text: az storage blob directory download -c MyContainer --account-name MyStorageAccount -s SourceDirectoryPath -d "<local-path>" --recursive
- name: Download an entire subdirectory of a storage blob directory.
text: az storage blob directory download -c MyContainer --account-name MyStorageAccount -s "path/to/subdirectory" -d "<local-path>" --recursive
"""

helps['storage blob directory exists'] = """
type: command
short-summary: Check for the existence of a blob directory in a storage container.
examples:
- name: Check for the existence of a blob directory in a storage container.
text: az storage blob directory exists -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory list'] = """
type: command
short-summary: List blobs and blob subdirectories in a storage directory.
examples:
- name: List blobs and blob subdirectories in a storage directory.
text: az storage blob directory list -c MyContainer -d DestinationDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory metadata'] = """
type: group
short-summary: Manage directory metadata.
"""

helps['storage blob directory metadata show'] = """
type: command
short-summary: Show all user-defined metadata for the specified blob directory.
examples:
- name: Show all user-defined metadata for the specified blob directory.
text: az storage blob directory metadata show -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory metadata update'] = """
type: command
short-summary: Set user-defined metadata for the specified blob directory as one or more name-value pairs.
examples:
- name: Set user-defined metadata for the specified blob directory as one or more name-value pairs.
text: az storage blob directory metadata update --metadata tag1=value1 -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory move'] = """
type: command
short-summary: Move a storage directory to another storage blob directory in a storage container.
long-summary: >
Move a storage directory and all its content (which can contain other directories or blobs) to another storage
blob directory in a storage container. This operation's behavior is different depending on whether Hierarchical
Namespace is enabled; if yes, the move operation is atomic and no marker is returned; if not, the operation is
performed in batches and a continuation token could be returned.
examples:
- name: Move a storage directory to another storage blob directory in a storage container.
text: az storage blob directory move -c MyContainer -d my-new-directory -s dir --account-name MyStorageAccount
- name: Move a storage subdirectory to another storage blob directory in a storage container.
text: az storage blob directory move -c MyContainer -d my-new-directory -s dir/subdirectory --account-name MyStorageAccount
"""

helps['storage blob directory show'] = """
type: command
short-summary: Show a storage blob directory properties in a storage container.
examples:
- name: Show a storage blob directory properties in a storage container.
text: az storage blob directory show -c MyContainer -d MyDirectoryPath --account-name MyStorageAccount
"""

helps['storage blob directory upload'] = """
type: command
short-summary: Upload blobs or subdirectories to a storage blob directory.
examples:
- name: Upload a single blob to a storage blob directory.
text: az storage blob directory upload -c MyContainer --account-name MyStorageAccount -s "path/to/file" -d directory
- name: Upload a local directory to a storage blob directory.
text: az storage blob directory upload -c MyContainer --account-name MyStorageAccount -s "path/to/directory" -d directory --recursive
- name: Upload a set of files in a local directory to a storage blob directory.
text: az storage blob directory upload -c MyContainer --account-name MyStorageAccount -s "path/to/file*" -d directory --recursive
"""

helps['storage file'] = """
type: group
short-summary: Manage file shares that use the SMB 3.0 protocol.
Expand Down
Loading
Loading