Skip to content

Commit

Permalink
remove files trailing dot preivew as it is also GA in main repo,
Browse files Browse the repository at this point in the history
remove tests for both account migration and file trailing dot, rerun failed tests
  • Loading branch information
calvinhzy committed Jun 27, 2024
1 parent 06a764a commit 8414a6e
Show file tree
Hide file tree
Showing 16 changed files with 786 additions and 3,302 deletions.
1 change: 1 addition & 0 deletions src/storage-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release History
1.0.0b2(2024-06-21)
++++++++++++++++++
* `az storage account migration start/show`: Remove as it has been GA in main repo
* `az storage file/directory`: Remove as it has been GA in main repo

1.0.0b1(2023-08-11)
++++++++++++++++++
Expand Down
297 changes: 0 additions & 297 deletions src/storage-preview/azext_storage_preview/_params.py

Large diffs are not rendered by default.

85 changes: 0 additions & 85 deletions src/storage-preview/azext_storage_preview/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,88 +128,3 @@ def _adls_deprecate_message(self):
deprecate_info=self.deprecate(redirect="az storage fs directory", hide=True,
message_func=_adls_deprecate_message)) as g:
pass

share_client_sdk = CliCommandType(
operations_tmpl='azure.multiapi.storagev2.fileshare._share_client#ShareClient.{}',
client_factory=cf_share_client,
resource_type=CUSTOM_DATA_STORAGE_FILESHARE)

directory_client_sdk = CliCommandType(
operations_tmpl='azext_storage_preview.vendored_sdks.azure_storagev2.fileshare._directory_client#ShareDirectoryClient.{}',
client_factory=cf_share_directory_client,
resource_type=CUSTOM_DATA_STORAGE_FILESHARE)

file_client_sdk = CliCommandType(
operations_tmpl='azext_storage_preview.vendored_sdks.azure_storagev2.fileshare._file_client#ShareFileClient.{}',
client_factory=cf_share_file_client,
resource_type=CUSTOM_DATA_STORAGE_FILESHARE)

with self.command_group('storage share', command_type=share_client_sdk,
custom_command_type=get_custom_sdk('fileshare', cf_share_client,
CUSTOM_DATA_STORAGE_FILESHARE),
resource_type=CUSTOM_DATA_STORAGE_FILESHARE, min_api='2022-11-02') as g:
from ._transformers import transform_share_list_handle
g.storage_custom_command_oauth('list-handle', 'list_handle', transform=transform_share_list_handle)
g.storage_custom_command_oauth('close-handle', 'close_handle')

with self.command_group('storage directory', command_type=directory_client_sdk,
resource_type=CUSTOM_DATA_STORAGE_FILESHARE,
custom_command_type=get_custom_sdk('directory', cf_share_directory_client)) as g:
from ._transformers import transform_share_directory_json_output
from ._format import transform_file_directory_result, transform_file_output, transform_boolean_for_table
g.storage_custom_command_oauth('create', 'create_directory',
transform=create_boolean_result_output_transformer('created'),
table_transformer=transform_boolean_for_table)
g.storage_custom_command_oauth('delete', 'delete_directory',
transform=create_boolean_result_output_transformer('deleted'),
table_transformer=transform_boolean_for_table)
g.storage_custom_command_oauth('show', 'get_directory_properties',
transform=transform_share_directory_json_output,
table_transformer=transform_file_output,
exception_handler=show_exception_handler)
g.storage_command_oauth('exists', 'exists',
transform=create_boolean_result_output_transformer('exists'))
g.storage_command_oauth('metadata show', 'get_directory_properties',
exception_handler=show_exception_handler,
transform=lambda x: getattr(x, 'metadata', x))
g.storage_command_oauth('metadata update', 'set_directory_metadata')
g.storage_custom_command_oauth('list', 'list_share_directories',
transform=transform_file_directory_result,
table_transformer=transform_file_output)

with self.command_group('storage file', command_type=file_client_sdk,
resource_type=CUSTOM_DATA_STORAGE_FILESHARE,
custom_command_type=get_custom_sdk('file', cf_share_file_client)) as g:
from ._transformers import transform_file_show_result, transform_url_without_encode
from ._format import transform_metadata_show, transform_boolean_for_table, transform_file_output
from ._exception_handler import file_related_exception_handler
g.storage_custom_command_oauth('list', 'list_share_files', client_factory=cf_share_client,
transform=transform_file_directory_result,
table_transformer=transform_file_output)
g.storage_command_oauth('delete', 'delete_file', transform=create_boolean_result_output_transformer('deleted'),
table_transformer=transform_boolean_for_table)
g.storage_custom_command_oauth('delete-batch', 'storage_file_delete_batch', client_factory=cf_share_client)
g.storage_command_oauth('resize', 'resize_file')
g.storage_custom_command_oauth('url', 'create_file_url', transform=transform_url_without_encode,
client_factory=cf_share_client)
g.storage_custom_command('generate-sas', 'generate_sas_file', client_factory=cf_share_client)
g.storage_command_oauth('show', 'get_file_properties', transform=transform_file_show_result,
table_transformer=transform_file_output,
exception_handler=show_exception_handler)
g.storage_custom_command_oauth('update', 'file_updates')
g.storage_custom_command_oauth('exists', 'file_exists',
transform=create_boolean_result_output_transformer('exists'))
g.storage_command_oauth('metadata show', 'get_file_properties', exception_handler=show_exception_handler,
transform=transform_metadata_show)
g.storage_command_oauth('metadata update', 'set_file_metadata')
g.storage_custom_command_oauth('copy start', 'storage_file_copy')
g.storage_command_oauth('copy cancel', 'abort_copy')
g.storage_custom_command('copy start-batch', 'storage_file_copy_batch', client_factory=cf_share_client)
g.storage_custom_command_oauth('upload', 'storage_file_upload',
exception_handler=file_related_exception_handler)
g.storage_custom_command('upload-batch', 'storage_file_upload_batch',
custom_command_type=get_custom_sdk('file', client_factory=cf_share_client))
g.storage_custom_command_oauth('download', 'download_file',
exception_handler=file_related_exception_handler,
transform=transform_file_show_result)
g.storage_custom_command('download-batch', 'storage_file_download_batch', client_factory=cf_share_client)
Loading

0 comments on commit 8414a6e

Please sign in to comment.