From a02050980926f633780d3201e0ccd701b74762ab Mon Sep 17 00:00:00 2001 From: annatisch Date: Fri, 25 Oct 2019 15:13:04 -0700 Subject: [PATCH] [Storage] File SDK rename (#8164) * Renamed package dir * Renamed namespace dir * Some packaging updates * Renamed ShareServiceClient * Renamed _share_service_client * Renamed ShareDirectoryClient * Renamed ShareFileClient * Updated namespace references * Some fixes * Other repo components * Synced shared models * More repo components * Pylint fix * Updated user agent * Unique share names * Revert "Unique share names" This reverts commit 5702cb1eb960f7f2127bd1967575332fdb269f6b. * Classmethod return types * Updated release notes * Merge fix * Updated namespace references * Updated readme * Manual sample merge * Updated samples * Merge fix --- .docsettings.yml | 2 +- .gitignore | 2 +- README.md | 2 +- doc/sphinx/package_service_mapping.json | 2 +- eng/tox/import_all.py | 2 +- packages.md | 2 +- scripts/pylint_custom_plugin/README.md | 2 +- .../azure/storage/blob/_blob_client.py | 7 +- .../storage/blob/_blob_service_client.py | 2 + .../azure/storage/blob/_container_client.py | 4 + .../azure/storage/blob/_shared/base_client.py | 8 +- .../azure/storage/blob/_shared/models.py | 12 +- .../HISTORY.md | 26 +++-- .../LICENSE.txt | 0 .../MANIFEST.in | 0 .../README.md | 82 ++++++------- .../azure/__init__.py | 0 .../azure/storage/__init__.py | 0 .../azure/storage/fileshare}/__init__.py | 12 +- .../azure/storage/fileshare}/_deserialize.py | 0 .../storage/fileshare}/_directory_client.py | 54 +++++---- .../azure/storage/fileshare}/_download.py | 2 +- .../azure/storage/fileshare}/_file_client.py | 34 +++--- .../storage/fileshare}/_generated/__init__.py | 0 .../_generated/_azure_file_storage.py | 8 +- .../fileshare}/_generated/_configuration.py | 0 .../fileshare}/_generated/aio/__init__.py | 0 .../aio/_azure_file_storage_async.py | 8 +- .../_generated/aio/_configuration_async.py | 0 .../aio/operations_async/__init__.py | 0 .../_directory_operations_async.py | 20 ++-- .../_file_operations_async.py | 38 +++--- .../_service_operations_async.py | 14 +-- .../_share_operations_async.py | 34 +++--- .../fileshare}/_generated/models/__init__.py | 0 .../models/_azure_file_storage_enums.py | 0 .../fileshare}/_generated/models/_models.py | 24 ++-- .../_generated/models/_models_py3.py | 24 ++-- .../_generated/operations/__init__.py | 0 .../operations/_directory_operations.py | 20 ++-- .../_generated/operations/_file_operations.py | 38 +++--- .../operations/_service_operations.py | 14 +-- .../operations/_share_operations.py | 34 +++--- .../storage/fileshare}/_generated/version.py | 0 .../azure/storage/fileshare}/_models.py | 22 ++-- .../azure/storage/fileshare}/_parser.py | 0 .../azure/storage/fileshare}/_share_client.py | 32 +++--- .../fileshare/_share_service_client.py} | 60 +++++----- .../storage/fileshare}/_shared/__init__.py | 0 .../fileshare}/_shared/authentication.py | 0 .../storage/fileshare}/_shared/base_client.py | 8 +- .../fileshare}/_shared/base_client_async.py | 0 .../storage/fileshare}/_shared/constants.py | 0 .../storage/fileshare}/_shared/encryption.py | 0 .../storage/fileshare}/_shared/models.py | 16 +-- .../storage/fileshare}/_shared/parser.py | 0 .../storage/fileshare}/_shared/policies.py | 0 .../fileshare}/_shared/policies_async.py | 0 .../fileshare}/_shared/request_handlers.py | 0 .../fileshare}/_shared/response_handlers.py | 0 .../_shared/shared_access_signature.py | 0 .../storage/fileshare}/_shared/uploads.py | 0 .../fileshare}/_shared/uploads_async.py | 0 .../fileshare}/_shared_access_signature.py | 28 ++--- .../azure/storage/fileshare}/_version.py | 0 .../azure/storage/fileshare}/aio/__init__.py | 12 +- .../fileshare}/aio/_directory_client_async.py | 44 +++---- .../storage/fileshare}/aio/_download_async.py | 2 +- .../fileshare}/aio/_file_client_async.py | 26 ++--- .../azure/storage/fileshare}/aio/_models.py | 4 +- .../fileshare}/aio/_share_client_async.py | 26 ++--- .../aio/_share_service_client_async.py} | 48 ++++---- .../conftest.py | 0 .../dev_requirements.txt | 0 .../mypy.ini | 2 +- .../samples/SampleDestination.txt | 0 .../samples/SampleSource.txt | 0 .../samples/file_samples_authentication.py | 36 +++--- .../file_samples_authentication_async.py | 36 +++--- .../samples/file_samples_client.py | 4 +- .../samples/file_samples_client_async.py | 4 +- .../samples/file_samples_directory.py | 6 +- .../samples/file_samples_directory_async.py | 6 +- .../samples/file_samples_hello_world.py | 16 +-- .../samples/file_samples_hello_world_async.py | 16 +-- .../samples/file_samples_service.py | 22 ++-- .../samples/file_samples_service_async.py | 22 ++-- .../samples/file_samples_share.py | 8 +- .../samples/file_samples_share_async.py | 8 +- .../sdk_packaging.toml | 0 .../setup.cfg | 0 .../setup.py | 13 +-- .../swagger/README.md | 4 +- .../tests/encryption_test_helper.py | 0 .../tests/file_settings_fake.py | 0 .../tests/filetestcase.py | 0 ...est_directory.test_create_directories.yaml | 0 ...test_create_directories_fail_on_exist.yaml | 0 ...test_create_directories_with_metadata.yaml | 0 ...rectory.test_create_file_in_directory.yaml | 0 ..._directory.test_create_subdirectories.yaml | 0 ...t_create_subdirectories_with_metadata.yaml | 0 ..._delete_directory_with_existing_share.yaml | 0 ...directory_with_non_existing_directory.yaml | 0 ...rectory.test_delete_file_in_directory.yaml | 0 ..._directory.test_delete_subdirectories.yaml | 0 .../test_directory.test_directory_exists.yaml | 0 ...y.test_directory_exists_with_snapshot.yaml | 0 ...t_directory.test_directory_not_exists.yaml | 0 ...st_directory_not_exists_with_snapshot.yaml | 0 ...tory.test_directory_parent_not_exists.yaml | 0 ..._get_directory_metadata_with_snapshot.yaml | 0 ...rectory.test_get_directory_properties.yaml | 0 ...irectory_properties_server_encryption.yaml | 0 ...roperties_with_non_existing_directory.yaml | 0 ...et_directory_properties_with_snapshot.yaml | 0 ...ctory.test_get_set_directory_metadata.yaml | 0 ..._list_nested_subdirectories_and_files.yaml | 0 ...ry.test_list_subdirectories_and_files.yaml | 0 ..._subdirectories_and_files_with_prefix.yaml | 0 ...ubdirectories_and_files_with_snapshot.yaml | 0 ..._properties_with_empty_smb_properties.yaml | 0 ...y_properties_with_file_permission_key.yaml | 0 ...y_async.test_create_directories_async.yaml | 0 ...reate_directories_fail_on_exist_async.yaml | 0 ...reate_directories_with_metadata_async.yaml | 0 ...sync.test_create_subdirectories_async.yaml | 0 ...te_subdirectories_with_metadata_async.yaml | 0 ...e_directory_with_existing_share_async.yaml | 0 ...ory_with_non_existing_directory_async.yaml | 0 ...c.test_delete_file_in_directory_async.yaml | 0 ...sync.test_delete_subdirectories_async.yaml | 0 ...ory_async.test_directory_exists_async.yaml | 0 ..._directory_exists_with_snapshot_async.yaml | 0 ...async.test_directory_not_exists_async.yaml | 0 ...ectory_not_exists_with_snapshot_async.yaml | 0 ...est_directory_parent_not_exists_async.yaml | 0 ...irectory_metadata_with_snapshot_async.yaml | 0 ...c.test_get_directory_properties_async.yaml | 0 ...ry_properties_server_encryption_async.yaml | 0 ...ies_with_non_existing_directory_async.yaml | 0 ...ectory_properties_with_snapshot_async.yaml | 0 ...test_get_set_directory_metadata_async.yaml | 0 ...nested_subdirectories_and_files_async.yaml | 0 ...t_list_subdirectories_and_files_async.yaml | 0 ...rectories_and_files_with_prefix_async.yaml | 0 ...ctories_and_files_with_snapshot_async.yaml | 0 ...rties_with_empty_smb_properties_async.yaml | 0 ...erties_with_file_permission_key_async.yaml | 0 .../test_file.test_abort_copy_file.yaml | 0 ...copy_file_with_synchronous_copy_fails.yaml | 0 ...ile.test_copy_file_async_private_file.yaml | 0 ...copy_file_async_private_file_with_sas.yaml | 0 ...ile.test_copy_file_with_existing_file.yaml | 0 .../test_file.test_create_file.yaml | 0 .../test_file.test_create_file_from_text.yaml | 0 ...t_create_file_from_text_with_encoding.yaml | 0 ...eate_file_will_set_all_smb_properties.yaml | 0 ...ate_file_with_invalid_file_permission.yaml | 0 ..._file.test_create_file_with_md5_small.yaml | 0 ...t_file.test_create_file_with_metadata.yaml | 0 ...e.test_delete_file_with_existing_file.yaml | 0 ...st_delete_file_with_non_existing_file.yaml | 0 .../test_file.test_file_exists.yaml | 0 ...t_file.test_file_exists_with_snapshot.yaml | 0 .../test_file.test_file_not_exists.yaml | 0 ...le.test_file_not_exists_with_snapshot.yaml | 0 .../test_file.test_file_unicode_data.yaml | 0 ...file_unicode_data_and_file_attributes.yaml | 0 .../test_file.test_get_file_metadata.yaml | 0 ....test_get_file_metadata_with_snapshot.yaml | 0 .../test_file.test_get_file_properties.yaml | 0 ...ile_properties_with_non_existing_file.yaml | 0 ...est_get_file_properties_with_snapshot.yaml | 0 .../test_file.test_list_ranges_2.yaml | 0 ...file.test_list_ranges_2_from_snapshot.yaml | 0 .../test_file.test_list_ranges_none.yaml | 0 ...e.test_list_ranges_none_from_snapshot.yaml | 0 .../test_file.test_resize_file.yaml | 0 ...est_set_file_metadata_with_upper_case.yaml | 0 .../test_file.test_set_file_properties.yaml | 0 ..._file_properties_with_file_permission.yaml | 0 ...ile.test_unicode_get_file_binary_data.yaml | 0 ...le.test_unicode_get_file_unicode_name.yaml | 0 ...e.test_update_big_range_from_file_url.yaml | 0 .../test_file.test_update_file_unicode.yaml | 0 .../test_file.test_update_range.yaml | 0 ..._file.test_update_range_from_file_url.yaml | 0 ...ource_file_does_not_have_enough_bytes.yaml | 0 .../test_file.test_update_range_with_md5.yaml | 0 ...file_async.test_abort_copy_file_async.yaml | 0 ...ile_with_synchronous_copy_fails_async.yaml | 0 ...st_copy_file_async_private_file_async.yaml | 0 ...ile_async_private_file_with_sas_async.yaml | 0 ...st_copy_file_with_existing_file_async.yaml | 0 ...est_file_async.test_create_file_async.yaml | 0 ...sync.test_create_file_from_text_async.yaml | 0 ...te_file_from_text_with_encoding_async.yaml | 0 ...ile_will_set_all_smb_properties_async.yaml | 0 ...le_with_invalid_file_permission_async.yaml | 0 ...test_create_file_with_md5_small_async.yaml | 0 ....test_create_file_with_metadata_async.yaml | 0 ..._delete_file_with_existing_file_async.yaml | 0 ...ete_file_with_non_existing_file_async.yaml | 0 ...est_file_async.test_file_exists_async.yaml | 0 ....test_file_exists_with_snapshot_async.yaml | 0 ...file_async.test_file_not_exists_async.yaml | 0 ...t_file_not_exists_with_snapshot_async.yaml | 0 ...nicode_data_and_file_attributes_async.yaml | 0 ...le_async.test_file_unicode_data_async.yaml | 0 ...le_async.test_get_file_metadata_async.yaml | 0 ...get_file_metadata_with_snapshot_async.yaml | 0 ..._async.test_get_file_properties_async.yaml | 0 ...operties_with_non_existing_file_async.yaml | 0 ...t_file_properties_with_snapshot_async.yaml | 0 ...t_file_async.test_list_ranges_2_async.yaml | 0 ...est_list_ranges_2_from_snapshot_async.yaml | 0 ...ile_async.test_list_ranges_none_async.yaml | 0 ..._list_ranges_none_from_snapshot_async.yaml | 0 ...est_file_async.test_resize_file_async.yaml | 0 ...t_file_metadata_with_upper_case_async.yaml | 0 ..._async.test_set_file_properties_async.yaml | 0 ...properties_with_file_permission_async.yaml | 0 ...st_unicode_get_file_binary_data_async.yaml | 0 ...t_unicode_get_file_unicode_name_async.yaml | 0 ..._update_big_range_from_file_url_async.yaml | 0 ..._async.test_update_file_unicode_async.yaml | 0 ...st_file_async.test_update_range_async.yaml | 0 ...test_update_range_from_file_url_async.yaml | 0 ...file_does_not_have_enough_bytes_async.yaml | 0 ...sync.test_update_range_with_md5_async.yaml | 0 ...st_file_client.test_user_agent_append.yaml | 0 ...st_file_client.test_user_agent_custom.yaml | 0 ...t_file_client.test_user_agent_default.yaml | 0 ...nt_async.test_user_agent_append_async.yaml | 0 ...nt_async.test_user_agent_custom_async.yaml | 0 ...t_async.test_user_agent_default_async.yaml | 0 ...operties.test_file_service_properties.yaml | 0 ...file_service_properties.test_set_cors.yaml | 0 ...vice_properties.test_set_hour_metrics.yaml | 0 ...ce_properties.test_set_minute_metrics.yaml | 0 ...e_properties.test_too_many_cors_rules.yaml | 0 ...nc.test_file_service_properties_async.yaml | 0 ..._properties_async.test_set_cors_async.yaml | 0 ...ies_async.test_set_hour_metrics_async.yaml | 0 ...s_async.test_set_minute_metrics_async.yaml | 0 ..._async.test_too_many_cors_rules_async.yaml | 0 ...get_file.test_get_file_exact_get_size.yaml | 0 ...est_get_file.test_get_file_no_content.yaml | 0 ...t_get_file.test_get_file_non_seekable.yaml | 0 ...t_get_file_non_seekable_from_snapshot.yaml | 0 ...get_file_properties_server_encryption.yaml | 0 ..._file.test_get_file_server_encryption.yaml | 0 ...e.test_get_file_to_bytes_non_parallel.yaml | 0 ...get_file.test_get_file_to_bytes_small.yaml | 0 ....test_get_file_to_stream_non_parallel.yaml | 0 ..._to_stream_non_parallel_from_snapshot.yaml | 0 ...et_file.test_get_file_to_stream_small.yaml | 0 ...et_file_to_stream_small_from_snapshot.yaml | 0 ...le.test_get_file_to_text_non_parallel.yaml | 0 ..._get_file.test_get_file_to_text_small.yaml | 0 ...e.test_get_file_to_text_with_encoding.yaml | 0 ...le_to_text_with_encoding_and_progress.yaml | 0 ...nged_get_file_to_bytes_with_zero_byte.yaml | 0 ...le_to_path_invalid_range_non_parallel.yaml | 0 ..._ranged_get_file_to_path_non_parallel.yaml | 0 ...le.test_ranged_get_file_to_path_small.yaml | 0 ...ile.test_unicode_get_file_binary_data.yaml | 0 ...le.test_unicode_get_file_unicode_data.yaml | 0 ...nc.test_get_file_exact_get_size_async.yaml | 0 ..._async.test_get_file_no_content_async.yaml | 0 ...sync.test_get_file_non_seekable_async.yaml | 0 ...file_non_seekable_from_snapshot_async.yaml | 0 ...le_properties_server_encryption_async.yaml | 0 ...test_get_file_server_encryption_async.yaml | 0 ..._get_file_to_bytes_non_parallel_async.yaml | 0 ...nc.test_get_file_to_bytes_small_async.yaml | 0 ...get_file_to_stream_non_parallel_async.yaml | 0 ...ream_non_parallel_from_snapshot_async.yaml | 0 ...c.test_get_file_to_stream_small_async.yaml | 0 ...e_to_stream_small_from_snapshot_async.yaml | 0 ...t_get_file_to_text_non_parallel_async.yaml | 0 ...ync.test_get_file_to_text_small_async.yaml | 0 ...text_with_encoding_and_progress_async.yaml | 0 ..._get_file_to_text_with_encoding_async.yaml | 0 ...et_file_to_bytes_with_zero_byte_async.yaml | 0 ...path_invalid_range_non_parallel_async.yaml | 0 ...d_get_file_to_path_non_parallel_async.yaml | 0 ...t_ranged_get_file_to_path_small_async.yaml | 0 ...st_unicode_get_file_binary_data_async.yaml | 0 ...t_unicode_get_file_unicode_data_async.yaml | 0 .../test_handle.test_close_all_handle.yaml | 0 .../test_handle.test_close_single_handle.yaml | 0 ...handle.test_list_handles_on_directory.yaml | 0 ...test_handle.test_list_handles_on_file.yaml | 0 ...est_handle.test_list_handles_on_share.yaml | 0 ...e.test_list_handles_on_share_snapshot.yaml | 0 ..._handle.test_list_handles_with_marker.yaml | 0 ...hare.test_create_permission_for_share.yaml | 0 .../test_share.test_create_share.yaml | 0 ...share.test_create_share_fail_on_exist.yaml | 0 ...test_share.test_create_share_snapshot.yaml | 0 ..._already_existing_share_fail_on_exist.yaml | 0 ...share.test_create_share_with_metadata.yaml | 0 ...st_share.test_create_share_with_quota.yaml | 0 ...re.test_create_snapshot_with_metadata.yaml | 0 ...test_delete_share_with_existing_share.yaml | 0 ...re_with_existing_share_fail_not_exist.yaml | 0 ..._delete_share_with_non_existing_share.yaml | 0 ...ith_non_existing_share_fail_not_exist.yaml | 0 ...hare.test_delete_share_with_snapshots.yaml | 0 .../test_share.test_delete_snapshot.yaml | 0 .../test_share.test_get_share_metadata.yaml | 0 ...test_get_share_metadata_with_snapshot.yaml | 0 .../test_share.test_get_share_stats.yaml | 0 ...share.test_list_directories_and_files.yaml | 0 ...irectories_and_files_with_num_results.yaml | 0 ...and_files_with_num_results_and_marker.yaml | 0 ...ist_directories_and_files_with_prefix.yaml | 0 ...t_directories_and_files_with_snapshot.yaml | 0 ...est_share.test_list_shares_no_options.yaml | 0 ...est_list_shares_with_include_metadata.yaml | 0 ...st_shares_with_num_results_and_marker.yaml | 0 ...st_share.test_list_shares_with_prefix.yaml | 0 ..._share.test_list_shares_with_snapshot.yaml | 0 .../test_share.test_set_share_acl.yaml | 0 ...share.test_set_share_acl_too_many_ids.yaml | 0 ...are_acl_with_empty_signed_identifiers.yaml | 0 ...set_share_acl_with_signed_identifiers.yaml | 0 .../test_share.test_set_share_metadata.yaml | 0 .../test_share.test_set_share_properties.yaml | 0 .../test_share.test_share_exists.yaml | 0 .../test_share.test_share_not_exists.yaml | 0 ...test_share.test_share_snapshot_exists.yaml | 0 ..._share.test_share_snapshot_not_exists.yaml | 0 ...est_unicode_create_share_unicode_name.yaml | 0 ...est_create_permission_for_share_async.yaml | 0 ...t_share_async.test_create_share_async.yaml | 0 ...async.test_create_share_fail_on_exist.yaml | 0 ...sync.test_create_share_snapshot_async.yaml | 0 ...dy_existing_share_fail_on_exist_async.yaml | 0 ...test_create_share_with_metadata_async.yaml | 0 ...nc.test_create_share_with_quota_async.yaml | 0 ...t_create_snapshot_with_metadata_async.yaml | 0 ...elete_share_with_existing_share_async.yaml | 0 ...h_existing_share_fail_not_exist_async.yaml | 0 ...e_share_with_non_existing_share_async.yaml | 0 ...n_existing_share_fail_not_exist_async.yaml | 0 ...est_delete_share_with_snapshots_async.yaml | 0 ...hare_async.test_delete_snapshot_async.yaml | 0 ...e_async.test_get_share_metadata_async.yaml | 0 ...et_share_metadata_with_snapshot_async.yaml | 0 ...hare_async.test_get_share_stats_async.yaml | 0 ...test_list_directories_and_files_async.yaml | 0 ...les_with_num_results_and_marker_async.yaml | 0 ...ries_and_files_with_num_results_async.yaml | 0 ...rectories_and_files_with_prefix_async.yaml | 0 ...ctories_and_files_with_snapshot_async.yaml | 0 ...ync.test_list_shares_no_options_async.yaml | 0 ...st_shares_with_include_metadata_async.yaml | 0 ...res_with_num_results_and_marker_async.yaml | 0 ...nc.test_list_shares_with_prefix_async.yaml | 0 ....test_list_shares_with_snapshot_async.yaml | 0 ..._share_async.test_set_share_acl_async.yaml | 0 ...test_set_share_acl_too_many_ids_async.yaml | 0 ...l_with_empty_signed_identifiers_async.yaml | 0 ...are_acl_with_signed_identifiers_async.yaml | 0 ...e_async.test_set_share_metadata_async.yaml | 0 ...async.test_set_share_properties_async.yaml | 0 ...t_share_async.test_share_exists_async.yaml | 0 ...are_async.test_share_not_exists_async.yaml | 0 ...sync.test_share_snapshot_exists_async.yaml | 0 ....test_share_snapshot_not_exists_async.yaml | 0 ...icode_create_share_unicode_name_async.yaml | 0 .../tests/test_directory.py | 6 +- .../tests/test_directory_async.py | 6 +- .../tests/test_file.py | 104 ++++++++--------- .../tests/test_file_async.py | 108 +++++++++--------- .../tests/test_file_client.py | 40 +++---- .../tests/test_file_client_async.py | 40 +++---- .../tests/test_file_service_properties.py | 6 +- .../test_file_service_properties_async.py | 6 +- .../tests/test_get_file.py | 102 ++++++++--------- .../tests/test_get_file_async.py | 104 ++++++++--------- .../tests/test_handle.py | 10 +- .../tests/test_share.py | 16 +-- .../tests/test_share_async.py | 18 +-- .../azure/storage/queue/_queue_client.py | 4 + .../storage/queue/_queue_service_client.py | 2 + .../storage/queue/_shared/base_client.py | 8 +- .../azure/storage/queue/_shared/models.py | 11 +- sdk/storage/ci.yml | 4 +- shared_requirements.txt | 2 +- 393 files changed, 850 insertions(+), 811 deletions(-) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/HISTORY.md (88%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/LICENSE.txt (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/MANIFEST.in (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/README.md (62%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/azure/__init__.py (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/azure/storage/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/__init__.py (87%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_deserialize.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_directory_client.py (94%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_download.py (99%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_file_client.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/_azure_file_storage.py (87%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/_configuration.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/_azure_file_storage_async.py (86%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/_configuration_async.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/operations_async/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/operations_async/_directory_operations_async.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/operations_async/_file_operations_async.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/operations_async/_service_operations_async.py (94%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/aio/operations_async/_share_operations_async.py (95%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/models/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/models/_azure_file_storage_enums.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/models/_models.py (96%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/models/_models_py3.py (96%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/operations/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/operations/_directory_operations.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/operations/_file_operations.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/operations/_service_operations.py (94%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/operations/_share_operations.py (95%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_generated/version.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_models.py (98%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_parser.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_share_client.py (96%) rename sdk/storage/{azure-storage-file/azure/storage/file/_file_service_client.py => azure-storage-file-share/azure/storage/fileshare/_share_service_client.py} (86%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/__init__.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/authentication.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/base_client.py (98%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/base_client_async.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/constants.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/encryption.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/models.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/parser.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/policies.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/policies_async.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/request_handlers.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/response_handlers.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/shared_access_signature.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/uploads.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared/uploads_async.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_shared_access_signature.py (96%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/_version.py (100%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/__init__.py (61%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/_directory_client_async.py (95%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/_download_async.py (99%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/_file_client_async.py (98%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/_models.py (98%) rename sdk/storage/{azure-storage-file/azure/storage/file => azure-storage-file-share/azure/storage/fileshare}/aio/_share_client_async.py (97%) rename sdk/storage/{azure-storage-file/azure/storage/file/aio/_file_service_client_async.py => azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py} (88%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/conftest.py (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/dev_requirements.txt (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/mypy.ini (81%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/SampleDestination.txt (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/SampleSource.txt (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_authentication.py (60%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_authentication_async.py (62%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_client.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_client_async.py (97%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_directory.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_directory_async.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_hello_world.py (80%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_hello_world_async.py (82%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_service.py (81%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_service_async.py (82%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_share.py (94%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/samples/file_samples_share_async.py (94%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/sdk_packaging.toml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/setup.cfg (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/setup.py (91%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/swagger/README.md (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/encryption_test_helper.py (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/file_settings_fake.py (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/filetestcase.py (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_directories.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_directories_fail_on_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_directories_with_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_file_in_directory.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_subdirectories.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_create_subdirectories_with_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_delete_directory_with_existing_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_delete_directory_with_non_existing_directory.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_delete_file_in_directory.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_delete_subdirectories.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_directory_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_directory_exists_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_directory_not_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_directory_not_exists_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_directory_parent_not_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_directory_metadata_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_directory_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_directory_properties_server_encryption.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_directory_properties_with_non_existing_directory.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_directory_properties_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_get_set_directory_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_list_nested_subdirectories_and_files.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_list_subdirectories_and_files.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_list_subdirectories_and_files_with_prefix.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_list_subdirectories_and_files_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_set_directory_properties_with_empty_smb_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory.test_set_directory_properties_with_file_permission_key.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_create_directories_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_create_directories_fail_on_exist_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_create_directories_with_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_create_subdirectories_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_create_subdirectories_with_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_delete_directory_with_existing_share_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_delete_directory_with_non_existing_directory_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_delete_file_in_directory_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_delete_subdirectories_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_directory_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_directory_exists_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_directory_not_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_directory_not_exists_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_directory_parent_not_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_directory_metadata_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_directory_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_directory_properties_server_encryption_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_directory_properties_with_non_existing_directory_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_directory_properties_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_get_set_directory_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_list_nested_subdirectories_and_files_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_list_subdirectories_and_files_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_prefix_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_set_directory_properties_with_empty_smb_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_directory_async.test_set_directory_properties_with_file_permission_key_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_abort_copy_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_abort_copy_file_with_synchronous_copy_fails.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_copy_file_async_private_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_copy_file_async_private_file_with_sas.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_copy_file_with_existing_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_from_text.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_from_text_with_encoding.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_will_set_all_smb_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_with_invalid_file_permission.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_with_md5_small.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_create_file_with_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_delete_file_with_existing_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_delete_file_with_non_existing_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_exists_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_not_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_not_exists_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_unicode_data.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_file_unicode_data_and_file_attributes.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_get_file_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_get_file_metadata_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_get_file_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_get_file_properties_with_non_existing_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_get_file_properties_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_list_ranges_2.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_list_ranges_2_from_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_list_ranges_none.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_list_ranges_none_from_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_resize_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_set_file_metadata_with_upper_case.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_set_file_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_set_file_properties_with_file_permission.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_unicode_get_file_binary_data.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_unicode_get_file_unicode_name.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_big_range_from_file_url.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_file_unicode.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_range.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_range_from_file_url.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file.test_update_range_with_md5.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_abort_copy_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_abort_copy_file_with_synchronous_copy_fails_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_copy_file_async_private_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_copy_file_async_private_file_with_sas_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_copy_file_with_existing_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_from_text_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_from_text_with_encoding_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_will_set_all_smb_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_with_invalid_file_permission_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_with_md5_small_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_create_file_with_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_delete_file_with_existing_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_delete_file_with_non_existing_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_exists_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_not_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_not_exists_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_unicode_data_and_file_attributes_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_file_unicode_data_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_get_file_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_get_file_metadata_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_get_file_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_get_file_properties_with_non_existing_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_get_file_properties_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_list_ranges_2_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_list_ranges_2_from_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_list_ranges_none_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_list_ranges_none_from_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_resize_file_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_set_file_metadata_with_upper_case_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_set_file_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_set_file_properties_with_file_permission_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_unicode_get_file_binary_data_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_unicode_get_file_unicode_name_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_big_range_from_file_url_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_file_unicode_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_range_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_range_from_file_url_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_async.test_update_range_with_md5_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client.test_user_agent_append.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client.test_user_agent_custom.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client.test_user_agent_default.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties.test_file_service_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties.test_set_cors.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_exact_get_size.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_no_content.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_non_seekable.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_non_seekable_from_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_properties_server_encryption.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_server_encryption.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_bytes_non_parallel.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_bytes_small.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel_from_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_stream_small.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_stream_small_from_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_text_non_parallel.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_text_small.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_text_with_encoding.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_get_file_to_text_with_encoding_and_progress.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_ranged_get_file_to_bytes_with_zero_byte.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_ranged_get_file_to_path_invalid_range_non_parallel.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_ranged_get_file_to_path_non_parallel.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_ranged_get_file_to_path_small.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_unicode_get_file_binary_data.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file.test_unicode_get_file_unicode_data.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_exact_get_size_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_no_content_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_non_seekable_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_non_seekable_from_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_properties_server_encryption_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_server_encryption_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_bytes_non_parallel_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_bytes_small_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_from_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_stream_small_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_stream_small_from_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_text_non_parallel_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_text_small_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_and_progress_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_ranged_get_file_to_bytes_with_zero_byte_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_invalid_range_non_parallel_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_non_parallel_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_small_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_unicode_get_file_binary_data_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_get_file_async.test_unicode_get_file_unicode_data_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_close_all_handle.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_close_single_handle.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_list_handles_on_directory.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_list_handles_on_file.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_list_handles_on_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_list_handles_on_share_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_handle.test_list_handles_with_marker.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_permission_for_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share_fail_on_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share_with_already_existing_share_fail_on_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share_with_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_share_with_quota.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_create_snapshot_with_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_share_with_existing_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_share_with_existing_share_fail_not_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_share_with_non_existing_share.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_share_with_non_existing_share_fail_not_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_share_with_snapshots.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_delete_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_get_share_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_get_share_metadata_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_get_share_stats.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_directories_and_files.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_directories_and_files_with_num_results.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_directories_and_files_with_num_results_and_marker.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_directories_and_files_with_prefix.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_directories_and_files_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_shares_no_options.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_shares_with_include_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_shares_with_num_results_and_marker.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_shares_with_prefix.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_list_shares_with_snapshot.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_acl.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_acl_too_many_ids.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_acl_with_empty_signed_identifiers.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_acl_with_signed_identifiers.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_metadata.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_set_share_properties.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_share_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_share_not_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_share_snapshot_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_share_snapshot_not_exists.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share.test_unicode_create_share_unicode_name.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_permission_for_share_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_fail_on_exist.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_with_already_existing_share_fail_on_exist_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_with_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_share_with_quota_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_create_snapshot_with_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_share_with_existing_share_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_share_with_existing_share_fail_not_exist_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_fail_not_exist_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_share_with_snapshots_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_delete_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_get_share_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_get_share_metadata_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_get_share_stats_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_directories_and_files_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_and_marker_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_directories_and_files_with_prefix_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_directories_and_files_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_shares_no_options_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_shares_with_include_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_shares_with_num_results_and_marker_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_shares_with_prefix_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_list_shares_with_snapshot_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_acl_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_acl_too_many_ids_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_acl_with_empty_signed_identifiers_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_acl_with_signed_identifiers_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_metadata_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_set_share_properties_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_share_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_share_not_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_share_snapshot_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_share_snapshot_not_exists_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/recordings/test_share_async.test_unicode_create_share_unicode_name_async.yaml (100%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_directory.py (99%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_directory_async.py (99%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file_async.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file_client.py (92%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file_client_async.py (92%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file_service_properties.py (97%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_file_service_properties_async.py (97%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_get_file.py (95%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_get_file_async.py (96%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_handle.py (97%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_share.py (98%) rename sdk/storage/{azure-storage-file => azure-storage-file-share}/tests/test_share_async.py (98%) diff --git a/.docsettings.yml b/.docsettings.yml index 23d773d44fdf..709c95423664 100644 --- a/.docsettings.yml +++ b/.docsettings.yml @@ -48,7 +48,7 @@ known_content_issues: - ['sdk/loganalytics/azure-loganalytics/README.rst', '#4554'] - ['sdk/servicefabric/azure-servicefabric/README.rst', '#4554'] - ['sdk/core/azure-servicemanagement-legacy/README.rst', '#4554'] - - ['sdk/storage/azure-storage-file/swagger/README.md', '#4554'] + - ['sdk/storage/azure-storage-file-share/swagger/README.md', '#4554'] - ['sdk/storage/azure-storage-queue/swagger/README.md', '#4554'] - ['sdk/storage/azure-storage-blob/swagger/README.md', '#4554'] diff --git a/.gitignore b/.gitignore index 9d76bdc7b75b..4e831937dcb3 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,6 @@ code_reports # Azure Storage test credentials sdk/storage/azure-storage-blob/tests/settings_real.py sdk/storage/azure-storage-queue/tests/settings_real.py -sdk/storage/azure-storage-file/tests/settings_real.py +sdk/storage/azure-storage-file-share/tests/settings_real.py *.code-workspace sdk/cosmos/azure-cosmos/test/test_config.py diff --git a/README.md b/README.md index 69618060842e..5c0a400d7cd3 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The libraries released in July preview: - [azure-keyvault-secrets](./sdk/keyvault/azure-keyvault-secrets) - [azure-identity](./sdk/identity/azure-identity) - [azure-storage-blob](./sdk/storage/azure-storage-blob) -- [azure-storage-file](./sdk/storage/azure-storage-file) +- [azure-storage-file](./sdk/storage/azure-storage-file-share) - [azure-storage-queue](./sdk/storage/azure-storage-queue) >NOTE: If you need to ensure your code is ready for production use one of the stable libraries. diff --git a/doc/sphinx/package_service_mapping.json b/doc/sphinx/package_service_mapping.json index 5cdf5232dc0a..25f11ae1a909 100644 --- a/doc/sphinx/package_service_mapping.json +++ b/doc/sphinx/package_service_mapping.json @@ -850,7 +850,7 @@ "service_name": "Storage", "manually_generated": true }, - "azure-storage-file": { + "azure-storage-file-share": { "category": "Client", "service_name": "Storage", "manually_generated": true diff --git a/eng/tox/import_all.py b/eng/tox/import_all.py index 7d08752bddf4..f828e934bfe9 100644 --- a/eng/tox/import_all.py +++ b/eng/tox/import_all.py @@ -24,7 +24,7 @@ "azure.keyvault.secrets", # Github issue 7879 "azure.appconfiguration", # Github issue 7879. revisit and close after azure-core POST b4 is released. "azure.storage.blob", # Github issue 7879. - "azure.storage.file", # Github issue 7879. + "azure.storage.fileshare", # Github issue 7879. "azure.storage.queue", # Github issue 7879. "azure", "azure-mgmt"] diff --git a/packages.md b/packages.md index 56f6fc642447..d9ad6d86fa8f 100644 --- a/packages.md +++ b/packages.md @@ -135,5 +135,5 @@ | [`azure-servicefabric`]( sdk/servicefabric/azure-servicefabric/setup.py )| [Readme](sdk/servicefabric/azure-servicefabric/README.rst) | [Changelog](sdk/servicefabric/azure-servicefabric/HISTORY.rst) | [PyPI]( https://pypi.org/project/azure-servicefabric ) | | [`azure-servicemanagement-legacy`]( sdk/core/azure-servicemanagement-legacy/setup.py )| [Readme](sdk/core/azure-servicemanagement-legacy/README.rst) | [Changelog](sdk/core/azure-servicemanagement-legacy/HISTORY.rst) | [PyPI]( https://pypi.org/project/azure-servicemanagement-legacy ) | | [`azure-storage-blob`]( sdk/storage/azure-storage-blob/setup.py )| [Readme](sdk/storage/azure-storage-blob/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-blob ) | -| [`azure-storage-file`]( sdk/storage/azure-storage-file/setup.py )| [Readme](sdk/storage/azure-storage-file/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-file ) | +| [`azure-storage-file-share`]( sdk/storage/azure-storage-file-share/setup.py )| [Readme](sdk/storage/azure-storage-file-share/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-file-share ) | | [`azure-storage-queue`]( sdk/storage/azure-storage-queue/setup.py )| [Readme](sdk/storage/azure-storage-queue/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-queue ) | diff --git a/scripts/pylint_custom_plugin/README.md b/scripts/pylint_custom_plugin/README.md index 6799ae900b0b..7e2b912c62bf 100644 --- a/scripts/pylint_custom_plugin/README.md +++ b/scripts/pylint_custom_plugin/README.md @@ -56,5 +56,5 @@ In the case of a false positive, use the disable command to remove the pylint er | client-method-name-no-double-underscore | Don't use method names prefixed with "__". | # pylint:disable=client-method-name-no-double-underscore | [link](https://azure.github.io/azure-sdk/python_introduction.html#public-vs-private) | | specify-parameter-names-in-call | Specify the parameter names when calling methods with more than 2 required positional parameters. e.g. self.get_foo(one, two, three=three, four=four, five=five) | # pylint:disable=specify-parameter-names-in-call | [link](https://azure.github.io/azure-sdk/python_introduction.html#method-signatures) | | connection-string-should-not-be-constructor-param | Remove connection string parameter from client constructor. Create a method that creates the client using a connection string. | # pylint:disable=connection-string-should-not-be-constructor-param | [link](https://azure.github.io/azure-sdk/python_design.html#constructors-and-factory-methods) | -| package-name-incorrect | Change your distribution package name to only include dashes, e.g. azure-storage-file | # pylint:disable=package-name-incorrect | [link](https://azure.github.io/azure-sdk/python_implementation.html#packaging) | +| package-name-incorrect | Change your distribution package name to only include dashes, e.g. azure-storage-file-share | # pylint:disable=package-name-incorrect | [link](https://azure.github.io/azure-sdk/python_implementation.html#packaging) | | client-suffix-needed | Service client types should use a "Client" suffix, e.g. BlobClient. | # pylint:disable=client-suffix-needed | [link](https://azure.github.io/azure-sdk/python_design.html#clients) | \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py index 1f237df9e994..2caa9b92ac4d 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py @@ -170,6 +170,8 @@ def from_blob_url(cls, blob_url, credential=None, snapshot=None, **kwargs): The optional blob snapshot on which to operate. This can be the snapshot ID string or the response returned from :func:`create_snapshot`. If specified, this will override the snapshot in the url. + :returns: A Blob client. + :rtype: ~azure.storage.blob.BlobClient """ try: if not blob_url.lower().startswith('http'): @@ -218,8 +220,7 @@ def from_connection_string( credential=None, # type: Optional[Any] **kwargs # type: Any ): # type: (...) -> BlobClient - """ - Create BlobClient from a Connection String. + """Create BlobClient from a Connection String. :param str conn_str: A connection string to an Azure Storage account. @@ -236,6 +237,8 @@ def from_connection_string( access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. + :returns: A Blob client. + :rtype: ~azure.storage.blob.BlobClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py index 4e15b82506f2..f9fd4c723f23 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py @@ -131,6 +131,8 @@ def from_connection_string( access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. + :returns: A Blob service client. + :rtype: ~azure.storage.blob.BlobServiceClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py index ced5aadd589f..8d11cd498b5c 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py @@ -143,6 +143,8 @@ def from_container_url(cls, container_url, credential=None, **kwargs): access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. + :returns: A container client. + :rtype: ~azure.storage.blob.ContainerClient """ try: if not container_url.lower().startswith('http'): @@ -187,6 +189,8 @@ def from_connection_string( access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. + :returns: A container client. + :rtype: ~azure.storage.blob.ContainerClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py index cef1079db4b8..9ad754b92b14 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/base_client.py @@ -78,9 +78,10 @@ def __init__( self._hosts = kwargs.get("_hosts") self.scheme = parsed_url.scheme - if service not in ["blob", "queue", "file"]: + if service not in ["blob", "queue", "file-share"]: raise ValueError("Invalid service: {}".format(service)) - account = parsed_url.netloc.split(".{}.core.".format(service)) + service_name = service.split('-')[0] + account = parsed_url.netloc.split(".{}.core.".format(service_name)) self.account_name = account[0] if len(account) > 1 else None secondary_hostname = None @@ -89,7 +90,8 @@ def __init__( raise ValueError("Token credential is only supported with HTTPS.") if hasattr(self.credential, "account_name"): self.account_name = self.credential.account_name - secondary_hostname = "{}-secondary.{}.{}".format(self.credential.account_name, service, SERVICE_HOST_BASE) + secondary_hostname = "{}-secondary.{}.{}".format( + self.credential.account_name, service_name, SERVICE_HOST_BASE) if not self._hosts: if len(account) > 1: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py index 1cddbfbb47fa..6a8cfaf84745 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py @@ -348,7 +348,6 @@ def from_string(cls, permission): parsed._str = permission # pylint: disable = protected-access return parsed - class Services(object): """Specifies the services accessible with the account SAS. @@ -356,17 +355,17 @@ class Services(object): Access for the `~azure.storage.blob.BlobServiceClient` :param bool queue: Access for the `~azure.storage.queue.QueueServiceClient` - :param bool file: - Access for the `~azure.storage.file.FileServiceClient` + :param bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient` """ - def __init__(self, blob=False, queue=False, file=False): + def __init__(self, blob=False, queue=False, fileshare=False): self.blob = blob self.queue = queue - self.file = file + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + - ('f' if self.file else '')) + ('f' if self.fileshare else '')) def __str__(self): return self._str @@ -392,6 +391,7 @@ def from_string(cls, string): parsed._str = string # pylint: disable = protected-access return parsed + class UserDelegationKey(object): """ Represents a user delegation key, provided to the user by Azure Storage diff --git a/sdk/storage/azure-storage-file/HISTORY.md b/sdk/storage/azure-storage-file-share/HISTORY.md similarity index 88% rename from sdk/storage/azure-storage-file/HISTORY.md rename to sdk/storage/azure-storage-file-share/HISTORY.md index 384f50c739d9..c434bc8a08b7 100644 --- a/sdk/storage/azure-storage-file/HISTORY.md +++ b/sdk/storage/azure-storage-file-share/HISTORY.md @@ -2,25 +2,34 @@ ## Version 12.0.0b5: -**Breaking changes** +**Important: This package was previously named azure-storage-file** + +Going forward, to use this SDK, please install `azure-storage-file-share`. +Additionally: +- The namespace within the package has also been renamed to `azure.storage.fileshare`. +- `FileServiceClient` has been renamed to `ShareServiceClient`. +- `DirectoryClient` has been renamed to `ShareDirectoryClient`. +- `FileClient` has been renamed to `ShareFileClient`. + +**Additional Breaking changes** - `ShareClient` now accepts only `account_url` with mandatory a string param `share_name`. To use a share_url, the method `from_share_url` must be used. -- `DirectoryClient` now accepts only `account_url` with mandatory string params `share_name` and `directory_path`. +- `ShareDirectoryClient` now accepts only `account_url` with mandatory string params `share_name` and `directory_path`. To use a directory_url, the method `from_directory_url` must be used. -- `FileClient` now accepts only `account_url` with mandatory string params `share_name` and +- `ShareFileClient` now accepts only `account_url` with mandatory string params `share_name` and `file_path`. To use a file_url, the method `from_file_url` must be used. - `file_permission_key` parameter has been renamed to `permission_key` - `set_share_access_policy` has required parameter `signed_identifiers`. -- NoRetry policy has been removed. Use keyword argument `retry_total=0` for no retries. -- Removed types that were accidentally exposed from two modules. Only `FileServiceClient`, `ShareClient`, `DirectoryClient` and `FileClient` should be imported from azure.storage.file.aio +- `NoRetry` policy has been removed. Use keyword argument `retry_total=0` for no retries. +- Removed types that were accidentally exposed from two modules. Only `ShareServiceClient`, `ShareClient`, `ShareDirectoryClient` and `ShareFileClient` should be imported from azure.storage.fileshare.aio - Some parameters have become keyword only, rather than positional. Some examples include: - `loop` - `max_concurrency` - `validate_content` - `timeout` etc. -- Client and model files have been made internal. Users should import from the top level modules `azure.storage.file` and `azure.storage.file.aio` only. -- The `generate_shared_access_signature` methods on each of `FileServiceClient`, `ShareClient` and `FileClient` have been replaced by module level functions `generate_account_sas`, `generate_share_sas` and `generate_file_sas`. +- Client and model files have been made internal. Users should import from the top level modules `azure.storage.fileshare` and `azure.storage.fileshare.aio` only. +- The `generate_shared_access_signature` methods on each of `ShareServiceClient`, `ShareClient` and `ShareFileClient` have been replaced by module level functions `generate_account_sas`, `generate_share_sas` and `generate_file_sas`. - `start_range` and `end_range` params are now renamed to and behave like`offset` and `length` in the following APIs: - download_file @@ -38,10 +47,9 @@ the following APIs: - `StorageStreamDownloader` now has new functions: - `readall()`: Reads the complete download stream, returning bytes. This replaces the functions `content_as_bytes` and `content_as_text` which have been deprecated. - `readinto(stream)`: Download the complete stream into the supplied writable stream, returning the number of bytes written. This replaces the function `download_to_stream` which has been deprecated. -- `FileClient.close_handles` and `DirectoryClient.close_handles` have both been replaced by two functions each; `close_handle(handle)` and `close_all_handles()`. These functions are blocking and return integer (the number of closed handles) rather than polling objects. +- `ShareFileClient.close_handles` and `ShareDirectoryClient.close_handles` have both been replaced by two functions each; `close_handle(handle)` and `close_all_handles()`. These functions are blocking and return integers (the number of closed handles) rather than polling objects. - `get_service_properties` now returns a dict with keys consistent to `set_service_properties` - **New features** - `ResourceTypes`, `NTFSAttributes`, and `Services` now have method `from_string` which takes parameters as a string. diff --git a/sdk/storage/azure-storage-file/LICENSE.txt b/sdk/storage/azure-storage-file-share/LICENSE.txt similarity index 100% rename from sdk/storage/azure-storage-file/LICENSE.txt rename to sdk/storage/azure-storage-file-share/LICENSE.txt diff --git a/sdk/storage/azure-storage-file/MANIFEST.in b/sdk/storage/azure-storage-file-share/MANIFEST.in similarity index 100% rename from sdk/storage/azure-storage-file/MANIFEST.in rename to sdk/storage/azure-storage-file-share/MANIFEST.in diff --git a/sdk/storage/azure-storage-file/README.md b/sdk/storage/azure-storage-file-share/README.md similarity index 62% rename from sdk/storage/azure-storage-file/README.md rename to sdk/storage/azure-storage-file-share/README.md index d4e72f4aebb9..551b77126c51 100644 --- a/sdk/storage/azure-storage-file/README.md +++ b/sdk/storage/azure-storage-file-share/README.md @@ -1,5 +1,5 @@ -# Azure Storage Files client library for Python -Azure File storage offers fully managed file shares in the cloud that are accessible via the industry standard [Server Message Block (SMB) protocol](https://docs.microsoft.com/windows/desktop/FileIO/microsoft-smb-protocol-and-cifs-protocol-overview). Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. Additionally, Azure file shares can be cached on Windows Servers with Azure File Sync for fast access near where the data is being used. +# Azure Storage File Share client library for Python +Azure File Share storage offers fully managed file shares in the cloud that are accessible via the industry standard [Server Message Block (SMB) protocol](https://docs.microsoft.com/windows/desktop/FileIO/microsoft-smb-protocol-and-cifs-protocol-overview). Azure file shares can be mounted concurrently by cloud or on-premises deployments of Windows, Linux, and macOS. Additionally, Azure file shares can be cached on Windows Servers with Azure File Sync for fast access near where the data is being used. Azure file shares can be used to: @@ -7,7 +7,7 @@ Azure file shares can be used to: * "Lift and shift" applications * Simplify cloud development with shared application settings, diagnostic share, and Dev/Test/Debug tools -[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/azure/storage/file) | [Package (PyPI)](https://pypi.org/project/azure-storage-file/) | [API reference documentation](https://docs.microsoft.com/en-us/python/api/azure-storage-file/azure.storage.file) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples) +[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/azure/storage/fileshare) | [Package (PyPI)](https://pypi.org/project/azure-storage-file-share/) | [API reference documentation](https://docs.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples) ## Getting started @@ -17,10 +17,10 @@ Azure file shares can be used to: [Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package. ### Install the package -Install the Azure Storage Files client library for Python with [pip](https://pypi.org/project/pip/): +Install the Azure Storage File Share client library for Python with [pip](https://pypi.org/project/pip/): ```bash -pip install azure-storage-file --pre +pip install azure-storage-file-share --pre ``` ### Create a storage account @@ -39,15 +39,15 @@ az storage account create -n my-storage-account-name -g my-resource-group ``` ### Create the client -The Azure Storage Files client library for Python allows you to interact with four types of resources: the storage +The Azure Storage File Share client library for Python allows you to interact with four types of resources: the storage account itself, file shares, directories, and files. Interaction with these resources starts with an instance of a [client](#clients). To create a client object, you will need the storage account's file service endpoint URL and a credential that allows you to access the storage account: ```python -from azure.storage.file import FileServiceClient +from azure.storage.fileshare import ShareServiceClient -service = FileServiceClient(account_url="https://.file.core.windows.net/", credential=credential) +service = ShareServiceClient(account_url="https://.file.core.windows.net/", credential=credential) ``` #### Looking up the endpoint URL @@ -75,47 +75,47 @@ connection string instead of providing the account URL and credential separately connection string to the client's `from_connection_string` class method: ```python -from azure.storage.file import FileServiceClient +from azure.storage.fileshare import ShareServiceClient -service = FileServiceClient.from_connection_string(conn_str="my_connection_string") +service = ShareServiceClient.from_connection_string(conn_str="my_connection_string") ``` ## Key concepts -The following components make up the Azure File Service: +The following components make up the Azure File Share Service: * The storage account itself * A file share within the storage account * An optional hierarchy of directories within the file share * A file within the file share, which may be up to 1 TiB in size -The Azure Storage Files client library for Python allows you to interact with each of these components through the +The Azure Storage File Share client library for Python allows you to interact with each of these components through the use of a dedicated client object. ### Clients -Four different clients are provided to to interact with the various components of the File Service: -1. **[FileServiceClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file/azure.storage.file.fileserviceclient)** - +Four different clients are provided to to interact with the various components of the File Share Service: +1. **[ShareServiceClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.shareserviceclient)** - this client represents interaction with the Azure storage account itself, and allows you to acquire preconfigured client instances to access the file shares within. It provides operations to retrieve and configure the service properties as well as list, create, and delete shares within the account. To perform operations on a specific share, retrieve a client using the `get_share_client` method. -2. **[ShareClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file/azure.storage.file.shareclient)** - +2. **[ShareClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.shareclient)** - this client represents interaction with a specific file share (which need not exist yet), and allows you to acquire preconfigured client instances to access the directories and files within. It provides operations to create, delete, configure, or create snapshots of a share and includes operations to create and enumerate the contents of directories within it. To perform operations on a specific directory or file, retrieve a client using the `get_directory_client` or `get_file_client` methods. -3. **[DirectoryClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file/azure.storage.file.directoryclient)** - +3. **[ShareDirectoryClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.sharedirectoryclient)** - this client represents interaction with a specific directory (which need not exist yet). It provides operations to create, delete, or enumerate the contents of an immediate or nested subdirectory, and includes operations to create and delete files within it. For operations relating to a specific subdirectory or file, a client for that entity can also be retrieved using the `get_subdirectory_client` and `get_file_client` functions. -4. **[FileClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file/azure.storage.file.fileclient)** - +4. **[ShareFileClient](https://docs.microsoft.com/en-us/python/api/azure-storage-file-share/azure.storage.fileshare.sharefileclient)** - this client represents interaction with a specific file (which need not exist yet). It provides operations to upload, download, create, delete, and copy a file. For details on path naming restrictions, see [Naming and Referencing Shares, Directories, Files, and Metadata](https://docs.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata). ## Examples -The following sections provide several code snippets covering some of the most common Storage File tasks, including: +The following sections provide several code snippets covering some of the most common Storage File Share tasks, including: * [Creating a file share](#creating-a-file-share) * [Uploading a file](#uploading-a-file) @@ -126,7 +126,7 @@ The following sections provide several code snippets covering some of the most c Create a file share to store your files ```python -from azure.storage.file import ShareClient +from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(conn_str="my_connection_string", share_name="my_share") share.create_share() @@ -135,7 +135,7 @@ share.create_share() Use the async client to create a file share ```python -from azure.storage.file.aio import ShareClient +from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(conn_str="my_connection_string", share_name="my_share") await share.create_share() @@ -145,9 +145,9 @@ await share.create_share() Upload a file to the share ```python -from azure.storage.file import FileClient +from azure.storage.fileshare import ShareFileClient -file_client = FileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") +file_client = ShareFileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") with open("./SampleSource.txt", "rb") as source_file: file_client.upload_file(source_file) @@ -156,9 +156,9 @@ with open("./SampleSource.txt", "rb") as source_file: Upload a file asynchronously ```python -from azure.storage.file.aio import FileClient +from azure.storage.fileshare.aio import ShareFileClient -file_client = FileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") +file_client = ShareFileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") with open("./SampleSource.txt", "rb") as source_file: await file_client.upload_file(source_file) @@ -168,9 +168,9 @@ with open("./SampleSource.txt", "rb") as source_file: Download a file from the share ```python -from azure.storage.file import FileClient +from azure.storage.fileshare import ShareFileClient -file_client = FileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") +file_client = ShareFileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") with open("DEST_FILE", "wb") as file_handle: data = file_client.download_file() @@ -180,9 +180,9 @@ with open("DEST_FILE", "wb") as file_handle: Download a file asynchronously ```python -from azure.storage.file.aio import FileClient +from azure.storage.fileshare.aio import ShareFileClient -file_client = FileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") +file_client = ShareFileClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", file_path="my_file") with open("DEST_FILE", "wb") as file_handle: data = await file_client.download_file() @@ -193,9 +193,9 @@ with open("DEST_FILE", "wb") as file_handle: List all directories and files under a parent directory ```python -from azure.storage.file import DirectoryClient +from azure.storage.fileshare import ShareDirectoryClient -parent_dir = DirectoryClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", directory_path="parent_dir") +parent_dir = ShareDirectoryClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", directory_path="parent_dir") my_list = list(parent_dir.list_directories_and_files()) print(my_list) @@ -204,9 +204,9 @@ print(my_list) List contents of a directory asynchronously ```python -from azure.storage.file.aio import DirectoryClient +from azure.storage.fileshare.aio import ShareDirectoryClient -parent_dir = DirectoryClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", directory_path="parent_dir") +parent_dir = ShareDirectoryClient.from_connection_string(conn_str="my_connection_string", share_name="my_share", directory_path="parent_dir") my_files = [] async for item in parent_dir.list_directories_and_files(): @@ -222,42 +222,42 @@ All File service operations will throw a `StorageErrorException` on failure with ### More sample code -Get started with our [File samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples). +Get started with our [File Share samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples). -Several Storage File Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage File: +Several Storage File Share Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage File Share: -* [`file_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_hello_world.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_hello_world_async.py)) - Examples found in this article: +* [`file_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world_async.py)) - Examples found in this article: * Client creation * Create a file share * Upload a file -* [`file_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_authentication.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_authentication_async.py)) - Examples for authenticating and creating the client: +* [`file_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_authentication.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_authentication_async.py)) - Examples for authenticating and creating the client: * From a connection string * From a shared access key * From a shared access signature token -* [`file_samples_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_service.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_service_async.py)) - Examples for interacting with the file service: +* [`file_samples_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_service.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_service_async.py)) - Examples for interacting with the file service: * Get and set service properties * Create, list, and delete shares * Get a share client -* [`file_samples_share.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_share.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_share_async.py)) - Examples for interacting with file shares: +* [`file_samples_share.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_share.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_share_async.py)) - Examples for interacting with file shares: * Create a share snapshot * Set share quota and metadata * List directories and files * Get the directory or file client to interact with a specific entity -* [`file_samples_directory.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_directory.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_directory_async.py)) - Examples for interacting with directories: +* [`file_samples_directory.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_directory.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_directory_async.py)) - Examples for interacting with directories: * Create a directory and add files * Create and delete subdirectories * Get the subdirectory client -* [`file_samples_client.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_client.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file/samples/file_samples_client_async.py)) - Examples for interacting with files: +* [`file_samples_client.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_client.py)([async version](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-share/samples/file_samples_client_async.py)) - Examples for interacting with files: * Create, upload, download, and delete files * Copy a file from a URL ### Additional documentation -For more extensive documentation on Azure File storage, see the [Azure File storage documentation](https://docs.microsoft.com/en-us/azure/storage/files/) on docs.microsoft.com. +For more extensive documentation on Azure File Share storage, see the [Azure File Share storage documentation](https://docs.microsoft.com/en-us/azure/storage/files/) on docs.microsoft.com. ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. diff --git a/sdk/storage/azure-storage-file/azure/__init__.py b/sdk/storage/azure-storage-file-share/azure/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/__init__.py rename to sdk/storage/azure-storage-file-share/azure/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py similarity index 87% rename from sdk/storage/azure-storage-file/azure/storage/file/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py index 5dcc7e6555ef..706b8a81b305 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/__init__.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/__init__.py @@ -5,10 +5,10 @@ # -------------------------------------------------------------------------- from ._version import VERSION -from ._file_client import FileClient -from ._directory_client import DirectoryClient +from ._file_client import ShareFileClient +from ._directory_client import ShareDirectoryClient from ._share_client import ShareClient -from ._file_service_client import FileServiceClient +from ._share_service_client import ShareServiceClient from ._shared_access_signature import generate_account_sas, generate_share_sas, generate_file_sas from ._shared.policies import ExponentialRetry, LinearRetry from ._shared.models import ( @@ -37,10 +37,10 @@ __all__ = [ - 'FileClient', - 'DirectoryClient', + 'ShareFileClient', + 'ShareDirectoryClient', 'ShareClient', - 'FileServiceClient', + 'ShareServiceClient', 'ExponentialRetry', 'LinearRetry', 'LocationMode', diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_deserialize.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_deserialize.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_deserialize.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_deserialize.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_directory_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py similarity index 94% rename from sdk/storage/azure-storage-file/azure/storage/file/_directory_client.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py index 0a9d785f2dce..20e7dec99677 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_directory_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py @@ -30,7 +30,7 @@ from ._shared.parser import _str from ._parser import _get_file_permission, _datetime_to_str from ._deserialize import deserialize_directory_properties -from ._file_client import FileClient +from ._file_client import ShareFileClient from ._models import DirectoryPropertiesPaged, HandlesPaged, NTFSAttributes # pylint: disable=unused-import if TYPE_CHECKING: @@ -39,7 +39,7 @@ from ._generated.models import HandleItem -class DirectoryClient(StorageAccountHostsMixin): +class ShareDirectoryClient(StorageAccountHostsMixin): """A client to interact with a specific directory, although it may not yet exist. For operations relating to a specific subdirectory or file in this share, the clients for those @@ -103,7 +103,7 @@ def __init__( # type: ignore self._query_str, credential = self._format_query_string( sas_token, credential, share_snapshot=self.snapshot) - super(DirectoryClient, self).__init__(parsed_url, service='file', credential=credential, **kwargs) + super(ShareDirectoryClient, self).__init__(parsed_url, service='file-share', credential=credential, **kwargs) self._client = AzureFileStorage(version=VERSION, url=self.url, pipeline=self._pipeline) @classmethod @@ -112,8 +112,8 @@ def from_directory_url(cls, directory_url, # type: str credential=None, # type: Optional[Any] **kwargs # type: Optional[Any] ): - # type: (...) -> DirectoryClient - """Create a DirectoryClient from a directory url. + # type: (...) -> ShareDirectoryClient + """Create a ShareDirectoryClient from a directory url. :param str directory_url: The full URI to the directory. @@ -124,6 +124,8 @@ def from_directory_url(cls, directory_url, # type: str The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A directory client. + :rtype: ~azure.storage.fileshare.ShareDirectoryClient """ try: if not directory_url.lower().startswith('http'): @@ -171,8 +173,8 @@ def from_connection_string( credential=None, # type: Optional[Any] **kwargs # type: Any ): - # type: (...) -> DirectoryClient - """Create DirectoryClient from a Connection String. + # type: (...) -> ShareDirectoryClient + """Create ShareDirectoryClient from a Connection String. :param str conn_str: A connection string to an Azure Storage account. @@ -184,6 +186,8 @@ def from_connection_string( The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A directory client. + :rtype: ~azure.storage.fileshare.ShareDirectoryClient """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'file') if 'secondary_hostname' not in kwargs: @@ -192,7 +196,7 @@ def from_connection_string( account_url, share_name=share_name, directory_path=directory_path, credential=credential, **kwargs) def get_file_client(self, file_name, **kwargs): - # type: (str, Any) -> FileClient + # type: (str, Any) -> ShareFileClient """Get a client to interact with a specific file. The file need not already exist. @@ -200,7 +204,7 @@ def get_file_client(self, file_name, **kwargs): :param file_name: The name of the file. :returns: A File Client. - :rtype: ~azure.storage.file.FileClient + :rtype: ~azure.storage.fileshare.ShareFileClient """ if self.directory_path: file_name = self.directory_path.rstrip('/') + "/" + file_name @@ -209,13 +213,13 @@ def get_file_client(self, file_name, **kwargs): transport=TransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return FileClient( + return ShareFileClient( self.url, file_path=file_name, share_name=self.share_name, napshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, **kwargs) def get_subdirectory_client(self, directory_name, **kwargs): - # type: (str, Any) -> DirectoryClient + # type: (str, Any) -> ShareDirectoryClient """Get a client to interact with a specific subdirectory. The subdirectory need not already exist. @@ -223,7 +227,7 @@ def get_subdirectory_client(self, directory_name, **kwargs): :param str directory_name: The name of the subdirectory. :returns: A Directory Client. - :rtype: ~azure.storage.file.DirectoryClient + :rtype: ~azure.storage.fileshare.ShareDirectoryClient .. admonition:: Example: @@ -240,7 +244,7 @@ def get_subdirectory_client(self, directory_name, **kwargs): transport=TransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return DirectoryClient( + return ShareDirectoryClient( self.url, share_name=self.share_name, directory_path=directory_path, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, **kwargs) @@ -348,7 +352,7 @@ def list_handles(self, recursive=False, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItem - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.HandleItem] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.fileshare.HandleItem] """ timeout = kwargs.pop('timeout', None) results_per_page = kwargs.pop('results_per_page', None) @@ -369,7 +373,7 @@ def close_handle(self, handle, **kwargs): :param handle: A specific handle to close. - :type handle: str or ~azure.storage.file.Handle + :type handle: str or ~azure.storage.fileshare.Handle :keyword int timeout: The timeout parameter is expressed in seconds. :returns: @@ -447,7 +451,7 @@ def get_directory_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: DirectoryProperties - :rtype: ~azure.storage.file.DirectoryProperties + :rtype: ~azure.storage.fileshare.DirectoryProperties """ timeout = kwargs.pop('timeout', None) try: @@ -503,7 +507,7 @@ def set_http_headers(self, file_attributes="none", # type: Union[str, NTFSAttri The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Preserve. :type file_creation_time: str or datetime @@ -545,7 +549,7 @@ def set_http_headers(self, file_attributes="none", # type: Union[str, NTFSAttri def create_subdirectory( self, directory_name, # type: str **kwargs): - # type: (...) -> DirectoryClient + # type: (...) -> ShareDirectoryClient """Creates a new subdirectory and returns a client to interact with the subdirectory. @@ -555,8 +559,8 @@ def create_subdirectory( Name-value pairs associated with the subdirectory as metadata. :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: DirectoryClient - :rtype: ~azure.storage.file.DirectoryClient + :returns: ShareDirectoryClient + :rtype: ~azure.storage.fileshare.ShareDirectoryClient .. admonition:: Example: @@ -607,8 +611,8 @@ def upload_file( length=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> FileClient - """Creates a new file in the directory and returns a FileClient + # type: (...) -> ShareFileClient + """Creates a new file in the directory and returns a ShareFileClient to interact with the file. :param str file_name: @@ -619,7 +623,7 @@ def upload_file( Length of the file in bytes. Specify its maximum size, up to 1 TiB. :keyword dict(str,str) metadata: Name-value pairs associated with the file as metadata. - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword bool validate_content: @@ -635,8 +639,8 @@ def upload_file( The timeout parameter is expressed in seconds. :keyword str encoding: Defaults to UTF-8. - :returns: FileClient - :rtype: ~azure.storage.file.FileClient + :returns: ShareFileClient + :rtype: ~azure.storage.fileshare.ShareFileClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_download.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py similarity index 99% rename from sdk/storage/azure-storage-file/azure/storage/file/_download.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py index 6313cf617c7e..8a86027ea4cb 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_download.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py @@ -214,7 +214,7 @@ class StorageStreamDownloader(object): # pylint: disable=too-many-instance-attr The full path of the file. :ivar str share: The name of the share where the file is. - :ivar ~azure.storage.file.FileProperties properties: + :ivar ~azure.storage.fileshare.FileProperties properties: The properties of the file being downloaded. If only a range of the data is being downloaded, this will be reflected in the properties. :ivar int size: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_file_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_file_client.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py index 2257a1c0332f..670e2caa341c 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_file_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py @@ -91,7 +91,7 @@ def _upload_file_helper( process_storage_error(error) -class FileClient(StorageAccountHostsMixin): +class ShareFileClient(StorageAccountHostsMixin): """A client to interact with a specific file, although that file may not yet exist. :param str account_url: @@ -155,7 +155,7 @@ def __init__( # type: ignore self._query_str, credential = self._format_query_string( sas_token, credential, share_snapshot=self.snapshot) - super(FileClient, self).__init__(parsed_url, service='file', credential=credential, **kwargs) + super(ShareFileClient, self).__init__(parsed_url, service='file-share', credential=credential, **kwargs) self._client = AzureFileStorage(version=VERSION, url=self.url, pipeline=self._pipeline) @classmethod @@ -165,7 +165,7 @@ def from_file_url( credential=None, # type: Optional[Any] **kwargs # type: Any ): - # type: (...) -> FileClient + # type: (...) -> ShareFileClient """A client to interact with a specific file, although that file may not yet exist. :param str file_url: The full URI to the file. @@ -176,6 +176,8 @@ def from_file_url( The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A File client. + :rtype: ~azure.storage.fileshare.ShareFileClient """ try: if not file_url.lower().startswith('http'): @@ -218,8 +220,8 @@ def from_connection_string( credential=None, # type: Optional[Any] **kwargs # type: Any ): - # type: (...) -> FileClient - """Create FileClient from a Connection String. + # type: (...) -> ShareFileClient + """Create ShareFileClient from a Connection String. :param str conn_str: A connection string to an Azure Storage account. @@ -234,6 +236,8 @@ def from_connection_string( The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A File client. + :rtype: ~azure.storage.fileshare.ShareFileClient .. admonition:: Example: @@ -272,7 +276,7 @@ def create_file( # type: ignore If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or ~datetime.datetime @@ -290,7 +294,7 @@ def create_file( # type: ignore directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. :type permission_key: str - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword dict(str,str) metadata: @@ -368,7 +372,7 @@ def upload_file( If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or ~azure.storage.file.NTFSAttributes + :type file_attributes: str or ~azure.storage.fileshare.NTFSAttributes :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or ~datetime.datetime @@ -388,7 +392,7 @@ def upload_file( :type permission_key: str :keyword dict(str,str) metadata: Name-value pairs associated with the file as metadata. - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword bool validate_content: @@ -513,7 +517,7 @@ def abort_copy(self, copy_id, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of FileProperties. - :type copy_id: str or ~azure.storage.file.FileProperties + :type copy_id: str or ~azure.storage.fileshare.FileProperties :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -624,7 +628,7 @@ def get_file_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: FileProperties - :rtype: ~azure.storage.file.FileProperties + :rtype: ~azure.storage.fileshare.FileProperties """ timeout = kwargs.pop('timeout', None) try: @@ -653,14 +657,14 @@ def set_http_headers(self, content_settings, # type: ContentSettings # type: (...) -> Dict[str, Any] """Sets HTTP headers on the file. - :param ~azure.storage.file.ContentSettings content_settings: + :param ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :param file_attributes: The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Preserve. :type file_creation_time: str or ~datetime.datetime @@ -984,7 +988,7 @@ def list_handles(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItem - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.HandleItem] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.fileshare.HandleItem] """ timeout = kwargs.pop('timeout', None) results_per_page = kwargs.pop('results_per_page', None) @@ -1004,7 +1008,7 @@ def close_handle(self, handle, **kwargs): :param handle: A specific handle to close. - :type handle: str or ~azure.storage.file.Handle + :type handle: str or ~azure.storage.fileshare.Handle :keyword int timeout: The timeout parameter is expressed in seconds. :returns: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/_azure_file_storage.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py similarity index 87% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/_azure_file_storage.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py index 64364407a06b..b61c326b69bd 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/_azure_file_storage.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_azure_file_storage.py @@ -26,13 +26,13 @@ class AzureFileStorage(object): :ivar service: Service operations - :vartype service: azure.storage.file.operations.ServiceOperations + :vartype service: azure.storage.fileshare._generated.operations.ServiceOperations :ivar share: Share operations - :vartype share: azure.storage.file.operations.ShareOperations + :vartype share: azure.storage.fileshare._generated.operations.ShareOperations :ivar directory: Directory operations - :vartype directory: azure.storage.file.operations.DirectoryOperations + :vartype directory: azure.storage.fileshare._generated.operations.DirectoryOperations :ivar file: File operations - :vartype file: azure.storage.file.operations.FileOperations + :vartype file: azure.storage.fileshare._generated.operations.FileOperations :param version: Specifies the version of the operation to use for this request. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/_configuration.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_configuration.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/_configuration.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/_configuration.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/_azure_file_storage_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py similarity index 86% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/_azure_file_storage_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py index 436bf74ad244..0709ffa308a1 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/_azure_file_storage_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_azure_file_storage_async.py @@ -26,13 +26,13 @@ class AzureFileStorage(object): :ivar service: Service operations - :vartype service: azure.storage.file.aio.operations_async.ServiceOperations + :vartype service: azure.storage.fileshare._generated.aio.operations_async.ServiceOperations :ivar share: Share operations - :vartype share: azure.storage.file.aio.operations_async.ShareOperations + :vartype share: azure.storage.fileshare._generated.aio.operations_async.ShareOperations :ivar directory: Directory operations - :vartype directory: azure.storage.file.aio.operations_async.DirectoryOperations + :vartype directory: azure.storage.fileshare._generated.aio.operations_async.DirectoryOperations :ivar file: File operations - :vartype file: azure.storage.file.aio.operations_async.FileOperations + :vartype file: azure.storage.fileshare._generated.aio.operations_async.FileOperations :param version: Specifies the version of the operation to use for this request. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/_configuration_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_configuration_async.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/_configuration_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/_configuration_async.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_directory_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_directory_operations_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py index ba9dad7c9405..1d63f546880c 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_directory_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_directory_operations_async.py @@ -74,7 +74,7 @@ async def create(self, file_attributes="none", file_creation_time="now", file_la :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -150,7 +150,7 @@ async def get_properties(self, sharesnapshot=None, timeout=None, *, cls=None, ** :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -216,7 +216,7 @@ async def delete(self, timeout=None, *, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -289,7 +289,7 @@ async def set_properties(self, file_attributes="none", file_creation_time="now", :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -364,7 +364,7 @@ async def set_metadata(self, timeout=None, metadata=None, *, cls=None, **kwargs) :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -442,9 +442,9 @@ async def list_files_and_directories_segment(self, prefix=None, sharesnapshot=No :return: ListFilesAndDirectoriesSegmentResponse or the result of cls(response) :rtype: - ~azure.storage.file.models.ListFilesAndDirectoriesSegmentResponse + ~azure.storage.fileshare._generated.models.ListFilesAndDirectoriesSegmentResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "list" @@ -531,9 +531,9 @@ async def list_handles(self, marker=None, maxresults=None, timeout=None, sharesn :param callable cls: A custom type or function that will be passed the direct response :return: ListHandlesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListHandlesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListHandlesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "listhandles" @@ -620,7 +620,7 @@ async def force_close_handles(self, handle_id, timeout=None, marker=None, shares :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "forceclosehandles" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_file_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_file_operations_async.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_file_operations_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_file_operations_async.py index 87b76b55326a..c0d19b9711fd 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_file_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_file_operations_async.py @@ -78,13 +78,13 @@ async def create(self, file_content_length, file_attributes="none", file_creatio x-ms-file-permission-key should be specified. :type file_permission_key: str :param file_http_headers: Additional parameters for the operation - :type file_http_headers: ~azure.storage.file.models.FileHTTPHeaders + :type file_http_headers: ~azure.storage.fileshare._generated.models.FileHTTPHeaders :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) file_content_type = None @@ -195,7 +195,7 @@ async def download(self, timeout=None, range=None, range_get_content_md5=None, * :return: object or the result of cls(response) :rtype: Generator :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -325,7 +325,7 @@ async def get_properties(self, sharesnapshot=None, timeout=None, *, cls=None, ** :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -403,7 +403,7 @@ async def delete(self, timeout=None, *, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -475,13 +475,13 @@ async def set_http_headers(self, file_attributes="none", file_creation_time="now x-ms-file-permission-key should be specified. :type file_permission_key: str :param file_http_headers: Additional parameters for the operation - :type file_http_headers: ~azure.storage.file.models.FileHTTPHeaders + :type file_http_headers: ~azure.storage.fileshare._generated.models.FileHTTPHeaders :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) file_content_type = None @@ -588,7 +588,7 @@ async def set_metadata(self, timeout=None, metadata=None, *, cls=None, **kwargs) :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -653,7 +653,7 @@ async def upload_range(self, range, content_length, file_range_write="update", o that indicates the range to clear, up to maximum file size. Possible values include: 'update', 'clear' :type file_range_write: str or - ~azure.storage.file.models.FileRangeWriteType + ~azure.storage.fileshare._generated.models.FileRangeWriteType :param content_length: Specifies the number of bytes being transmitted in the request body. When the x-ms-write header is set to clear, the value of this header must be set to zero. @@ -677,7 +677,7 @@ async def upload_range(self, range, content_length, file_range_write="update", o :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "range" @@ -763,13 +763,13 @@ async def upload_range_from_url(self, range, copy_source, content_length, timeou :param source_modified_access_conditions: Additional parameters for the operation :type source_modified_access_conditions: - ~azure.storage.file.models.SourceModifiedAccessConditions + ~azure.storage.fileshare._generated.models.SourceModifiedAccessConditions :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) source_if_match_crc64 = None @@ -850,9 +850,9 @@ async def get_range_list(self, sharesnapshot=None, timeout=None, range=None, *, :param callable cls: A custom type or function that will be passed the direct response :return: list or the result of cls(response) - :rtype: list[~azure.storage.file.models.Range] + :rtype: list[~azure.storage.fileshare._generated.models.Range] :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "rangelist" @@ -934,7 +934,7 @@ async def start_copy(self, copy_source, timeout=None, metadata=None, *, cls=None :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -996,7 +996,7 @@ async def abort_copy(self, copy_id, timeout=None, *, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "copy" @@ -1064,9 +1064,9 @@ async def list_handles(self, marker=None, maxresults=None, timeout=None, sharesn :param callable cls: A custom type or function that will be passed the direct response :return: ListHandlesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListHandlesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListHandlesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "listhandles" @@ -1148,7 +1148,7 @@ async def force_close_handles(self, handle_id, timeout=None, marker=None, shares :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "forceclosehandles" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_service_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_service_operations_async.py similarity index 94% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_service_operations_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_service_operations_async.py index 4274db7ffb80..74d3f084ea9a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_service_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_service_operations_async.py @@ -44,7 +44,7 @@ async def set_properties(self, storage_service_properties, timeout=None, *, cls= :param storage_service_properties: The StorageService properties. :type storage_service_properties: - ~azure.storage.file.models.StorageServiceProperties + ~azure.storage.fileshare._generated.models.StorageServiceProperties :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -55,7 +55,7 @@ async def set_properties(self, storage_service_properties, timeout=None, *, cls= :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -113,9 +113,9 @@ async def get_properties(self, timeout=None, *, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: StorageServiceProperties or the result of cls(response) - :rtype: ~azure.storage.file.models.StorageServiceProperties + :rtype: ~azure.storage.fileshare._generated.models.StorageServiceProperties :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -185,7 +185,7 @@ async def list_shares_segment(self, prefix=None, marker=None, maxresults=None, i :param include: Include this parameter to specify one or more datasets to include in the response. :type include: list[str or - ~azure.storage.file.models.ListSharesIncludeType] + ~azure.storage.fileshare._generated.models.ListSharesIncludeType] :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -194,9 +194,9 @@ async def list_shares_segment(self, prefix=None, marker=None, maxresults=None, i :param callable cls: A custom type or function that will be passed the direct response :return: ListSharesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListSharesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListSharesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "list" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_share_operations_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py similarity index 95% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_share_operations_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py index 4cf289146a67..daa5ee8b117a 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/aio/operations_async/_share_operations_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/aio/operations_async/_share_operations_async.py @@ -56,7 +56,7 @@ async def create(self, timeout=None, metadata=None, quota=None, *, cls=None, **k :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -119,7 +119,7 @@ async def get_properties(self, sharesnapshot=None, timeout=None, *, cls=None, ** :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -181,13 +181,13 @@ async def delete(self, sharesnapshot=None, timeout=None, delete_snapshots=None, base share and all of its snapshots. Possible values include: 'include' :type delete_snapshots: str or - ~azure.storage.file.models.DeleteSnapshotsOptionType + ~azure.storage.fileshare._generated.models.DeleteSnapshotsOptionType :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -246,7 +246,7 @@ async def create_snapshot(self, timeout=None, metadata=None, *, cls=None, **kwar :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "snapshot" @@ -298,7 +298,7 @@ async def create_permission(self, share_permission, timeout=None, *, cls=None, * :param share_permission: A permission (a security descriptor) at the share level. - :type share_permission: ~azure.storage.file.models.SharePermission + :type share_permission: ~azure.storage.fileshare._generated.models.SharePermission :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -309,7 +309,7 @@ async def create_permission(self, share_permission, timeout=None, *, cls=None, * :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "filepermission" @@ -371,9 +371,9 @@ async def get_permission(self, file_permission_key=None, timeout=None, *, cls=No :param callable cls: A custom type or function that will be passed the direct response :return: SharePermission or the result of cls(response) - :rtype: ~azure.storage.file.models.SharePermission + :rtype: ~azure.storage.fileshare._generated.models.SharePermission :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "filepermission" @@ -440,7 +440,7 @@ async def set_quota(self, timeout=None, quota=None, *, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -502,7 +502,7 @@ async def set_metadata(self, timeout=None, metadata=None, *, cls=None, **kwargs) :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -560,9 +560,9 @@ async def get_access_policy(self, timeout=None, *, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: list or the result of cls(response) - :rtype: list[~azure.storage.file.models.SignedIdentifier] + :rtype: list[~azure.storage.fileshare._generated.models.SignedIdentifier] :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "acl" @@ -618,7 +618,7 @@ async def set_access_policy(self, share_acl=None, timeout=None, *, cls=None, **k """Sets a stored access policy for use with shared access signatures. :param share_acl: The ACL for the share. - :type share_acl: list[~azure.storage.file.models.SignedIdentifier] + :type share_acl: list[~azure.storage.fileshare._generated.models.SignedIdentifier] :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -629,7 +629,7 @@ async def set_access_policy(self, share_acl=None, timeout=None, *, cls=None, **k :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "acl" @@ -692,9 +692,9 @@ async def get_statistics(self, timeout=None, *, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: ShareStats or the result of cls(response) - :rtype: ~azure.storage.file.models.ShareStats + :rtype: ~azure.storage.fileshare._generated.models.ShareStats :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "stats" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/models/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_azure_file_storage_enums.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_azure_file_storage_enums.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_azure_file_storage_enums.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py similarity index 96% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py index 28e435d96382..1ea3eb3458e8 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models.py @@ -174,7 +174,7 @@ class FileItem(Model): :param name: Required. :type name: str :param properties: Required. - :type properties: ~azure.storage.file.models.FileProperty + :type properties: ~azure.storage.fileshare._generated.models.FileProperty """ _validation = { @@ -230,9 +230,9 @@ class FilesAndDirectoriesListSegment(Model): All required parameters must be populated in order to send to Azure. :param directory_items: Required. - :type directory_items: list[~azure.storage.file.models.DirectoryItem] + :type directory_items: list[~azure.storage.fileshare._generated.models.DirectoryItem] :param file_items: Required. - :type file_items: list[~azure.storage.file.models.FileItem] + :type file_items: list[~azure.storage.fileshare._generated.models.FileItem] """ _validation = { @@ -337,7 +337,7 @@ class ListFilesAndDirectoriesSegmentResponse(Model): :param max_results: :type max_results: int :param segment: Required. - :type segment: ~azure.storage.file.models.FilesAndDirectoriesListSegment + :type segment: ~azure.storage.fileshare._generated.models.FilesAndDirectoriesListSegment :param next_marker: Required. :type next_marker: str """ @@ -385,7 +385,7 @@ class ListHandlesResponse(Model): All required parameters must be populated in order to send to Azure. :param handle_list: - :type handle_list: list[~azure.storage.file.models.HandleItem] + :type handle_list: list[~azure.storage.fileshare._generated.models.HandleItem] :param next_marker: Required. :type next_marker: str """ @@ -422,7 +422,7 @@ class ListSharesResponse(Model): :param max_results: :type max_results: int :param share_items: - :type share_items: list[~azure.storage.file.models.ShareItem] + :type share_items: list[~azure.storage.fileshare._generated.models.ShareItem] :param next_marker: Required. :type next_marker: str """ @@ -468,7 +468,7 @@ class Metrics(Model): statistics for called API operations. :type include_apis: bool :param retention_policy: - :type retention_policy: ~azure.storage.file.models.RetentionPolicy + :type retention_policy: ~azure.storage.fileshare._generated.models.RetentionPolicy """ _validation = { @@ -566,7 +566,7 @@ class ShareItem(Model): :param snapshot: :type snapshot: str :param properties: Required. - :type properties: ~azure.storage.file.models.ShareProperties + :type properties: ~azure.storage.fileshare._generated.models.ShareProperties :param metadata: :type metadata: dict[str, str] """ @@ -687,7 +687,7 @@ class SignedIdentifier(Model): :param id: Required. A unique id. :type id: str :param access_policy: The access policy. - :type access_policy: ~azure.storage.file.models.AccessPolicy + :type access_policy: ~azure.storage.fileshare._generated.models.AccessPolicy """ _validation = { @@ -770,12 +770,12 @@ class StorageServiceProperties(Model): :param hour_metrics: A summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.models.Metrics + :type hour_metrics: ~azure.storage.fileshare._generated.models.Metrics :param minute_metrics: A summary of request statistics grouped by API in minute aggregates for files. - :type minute_metrics: ~azure.storage.file.models.Metrics + :type minute_metrics: ~azure.storage.fileshare._generated.models.Metrics :param cors: The set of CORS rules. - :type cors: list[~azure.storage.file.models.CorsRule] + :type cors: list[~azure.storage.fileshare._generated.models.CorsRule] """ _attribute_map = { diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models_py3.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py similarity index 96% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models_py3.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py index 4b682a6eec32..235622bf87ee 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/models/_models_py3.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/models/_models_py3.py @@ -174,7 +174,7 @@ class FileItem(Model): :param name: Required. :type name: str :param properties: Required. - :type properties: ~azure.storage.file.models.FileProperty + :type properties: ~azure.storage.fileshare._generated.models.FileProperty """ _validation = { @@ -230,9 +230,9 @@ class FilesAndDirectoriesListSegment(Model): All required parameters must be populated in order to send to Azure. :param directory_items: Required. - :type directory_items: list[~azure.storage.file.models.DirectoryItem] + :type directory_items: list[~azure.storage.fileshare._generated.models.DirectoryItem] :param file_items: Required. - :type file_items: list[~azure.storage.file.models.FileItem] + :type file_items: list[~azure.storage.fileshare._generated.models.FileItem] """ _validation = { @@ -337,7 +337,7 @@ class ListFilesAndDirectoriesSegmentResponse(Model): :param max_results: :type max_results: int :param segment: Required. - :type segment: ~azure.storage.file.models.FilesAndDirectoriesListSegment + :type segment: ~azure.storage.fileshare._generated.models.FilesAndDirectoriesListSegment :param next_marker: Required. :type next_marker: str """ @@ -385,7 +385,7 @@ class ListHandlesResponse(Model): All required parameters must be populated in order to send to Azure. :param handle_list: - :type handle_list: list[~azure.storage.file.models.HandleItem] + :type handle_list: list[~azure.storage.fileshare._generated.models.HandleItem] :param next_marker: Required. :type next_marker: str """ @@ -422,7 +422,7 @@ class ListSharesResponse(Model): :param max_results: :type max_results: int :param share_items: - :type share_items: list[~azure.storage.file.models.ShareItem] + :type share_items: list[~azure.storage.fileshare._generated.models.ShareItem] :param next_marker: Required. :type next_marker: str """ @@ -468,7 +468,7 @@ class Metrics(Model): statistics for called API operations. :type include_apis: bool :param retention_policy: - :type retention_policy: ~azure.storage.file.models.RetentionPolicy + :type retention_policy: ~azure.storage.fileshare._generated.models.RetentionPolicy """ _validation = { @@ -566,7 +566,7 @@ class ShareItem(Model): :param snapshot: :type snapshot: str :param properties: Required. - :type properties: ~azure.storage.file.models.ShareProperties + :type properties: ~azure.storage.fileshare._generated.models.ShareProperties :param metadata: :type metadata: dict[str, str] """ @@ -687,7 +687,7 @@ class SignedIdentifier(Model): :param id: Required. A unique id. :type id: str :param access_policy: The access policy. - :type access_policy: ~azure.storage.file.models.AccessPolicy + :type access_policy: ~azure.storage.fileshare._generated.models.AccessPolicy """ _validation = { @@ -770,12 +770,12 @@ class StorageServiceProperties(Model): :param hour_metrics: A summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.models.Metrics + :type hour_metrics: ~azure.storage.fileshare._generated.models.Metrics :param minute_metrics: A summary of request statistics grouped by API in minute aggregates for files. - :type minute_metrics: ~azure.storage.file.models.Metrics + :type minute_metrics: ~azure.storage.fileshare._generated.models.Metrics :param cors: The set of CORS rules. - :type cors: list[~azure.storage.file.models.CorsRule] + :type cors: list[~azure.storage.fileshare._generated.models.CorsRule] """ _attribute_map = { diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_directory_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_directory_operations.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py index aa3610436576..83aad9a1d601 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_directory_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_directory_operations.py @@ -74,7 +74,7 @@ def create(self, file_attributes="none", file_creation_time="now", file_last_wri :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -150,7 +150,7 @@ def get_properties(self, sharesnapshot=None, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -216,7 +216,7 @@ def delete(self, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -289,7 +289,7 @@ def set_properties(self, file_attributes="none", file_creation_time="now", file_ :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -364,7 +364,7 @@ def set_metadata(self, timeout=None, metadata=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -442,9 +442,9 @@ def list_files_and_directories_segment(self, prefix=None, sharesnapshot=None, ma :return: ListFilesAndDirectoriesSegmentResponse or the result of cls(response) :rtype: - ~azure.storage.file.models.ListFilesAndDirectoriesSegmentResponse + ~azure.storage.fileshare._generated.models.ListFilesAndDirectoriesSegmentResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "list" @@ -531,9 +531,9 @@ def list_handles(self, marker=None, maxresults=None, timeout=None, sharesnapshot :param callable cls: A custom type or function that will be passed the direct response :return: ListHandlesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListHandlesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListHandlesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "listhandles" @@ -620,7 +620,7 @@ def force_close_handles(self, handle_id, timeout=None, marker=None, sharesnapsho :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "forceclosehandles" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_file_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_file_operations.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_file_operations.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_file_operations.py index 1877b26ac9a6..4a9f07db4d28 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_file_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_file_operations.py @@ -78,13 +78,13 @@ def create(self, file_content_length, file_attributes="none", file_creation_time x-ms-file-permission-key should be specified. :type file_permission_key: str :param file_http_headers: Additional parameters for the operation - :type file_http_headers: ~azure.storage.file.models.FileHTTPHeaders + :type file_http_headers: ~azure.storage.fileshare._generated.models.FileHTTPHeaders :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) file_content_type = None @@ -195,7 +195,7 @@ def download(self, timeout=None, range=None, range_get_content_md5=None, cls=Non :return: object or the result of cls(response) :rtype: Generator :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -324,7 +324,7 @@ def get_properties(self, sharesnapshot=None, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -402,7 +402,7 @@ def delete(self, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -474,13 +474,13 @@ def set_http_headers(self, file_attributes="none", file_creation_time="now", fil x-ms-file-permission-key should be specified. :type file_permission_key: str :param file_http_headers: Additional parameters for the operation - :type file_http_headers: ~azure.storage.file.models.FileHTTPHeaders + :type file_http_headers: ~azure.storage.fileshare._generated.models.FileHTTPHeaders :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) file_content_type = None @@ -587,7 +587,7 @@ def set_metadata(self, timeout=None, metadata=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -652,7 +652,7 @@ def upload_range(self, range, content_length, file_range_write="update", optiona that indicates the range to clear, up to maximum file size. Possible values include: 'update', 'clear' :type file_range_write: str or - ~azure.storage.file.models.FileRangeWriteType + ~azure.storage.fileshare._generated.models.FileRangeWriteType :param content_length: Specifies the number of bytes being transmitted in the request body. When the x-ms-write header is set to clear, the value of this header must be set to zero. @@ -676,7 +676,7 @@ def upload_range(self, range, content_length, file_range_write="update", optiona :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "range" @@ -762,13 +762,13 @@ def upload_range_from_url(self, range, copy_source, content_length, timeout=None :param source_modified_access_conditions: Additional parameters for the operation :type source_modified_access_conditions: - ~azure.storage.file.models.SourceModifiedAccessConditions + ~azure.storage.fileshare._generated.models.SourceModifiedAccessConditions :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) source_if_match_crc64 = None @@ -849,9 +849,9 @@ def get_range_list(self, sharesnapshot=None, timeout=None, range=None, cls=None, :param callable cls: A custom type or function that will be passed the direct response :return: list or the result of cls(response) - :rtype: list[~azure.storage.file.models.Range] + :rtype: list[~azure.storage.fileshare._generated.models.Range] :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "rangelist" @@ -933,7 +933,7 @@ def start_copy(self, copy_source, timeout=None, metadata=None, cls=None, **kwarg :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -995,7 +995,7 @@ def abort_copy(self, copy_id, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "copy" @@ -1063,9 +1063,9 @@ def list_handles(self, marker=None, maxresults=None, timeout=None, sharesnapshot :param callable cls: A custom type or function that will be passed the direct response :return: ListHandlesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListHandlesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListHandlesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "listhandles" @@ -1147,7 +1147,7 @@ def force_close_handles(self, handle_id, timeout=None, marker=None, sharesnapsho :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "forceclosehandles" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_service_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_service_operations.py similarity index 94% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_service_operations.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_service_operations.py index 8283028768ce..66f20e145452 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_service_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_service_operations.py @@ -44,7 +44,7 @@ def set_properties(self, storage_service_properties, timeout=None, cls=None, **k :param storage_service_properties: The StorageService properties. :type storage_service_properties: - ~azure.storage.file.models.StorageServiceProperties + ~azure.storage.fileshare._generated.models.StorageServiceProperties :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -55,7 +55,7 @@ def set_properties(self, storage_service_properties, timeout=None, cls=None, **k :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -113,9 +113,9 @@ def get_properties(self, timeout=None, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: StorageServiceProperties or the result of cls(response) - :rtype: ~azure.storage.file.models.StorageServiceProperties + :rtype: ~azure.storage.fileshare._generated.models.StorageServiceProperties :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -185,7 +185,7 @@ def list_shares_segment(self, prefix=None, marker=None, maxresults=None, include :param include: Include this parameter to specify one or more datasets to include in the response. :type include: list[str or - ~azure.storage.file.models.ListSharesIncludeType] + ~azure.storage.fileshare._generated.models.ListSharesIncludeType] :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -194,9 +194,9 @@ def list_shares_segment(self, prefix=None, marker=None, maxresults=None, include :param callable cls: A custom type or function that will be passed the direct response :return: ListSharesResponse or the result of cls(response) - :rtype: ~azure.storage.file.models.ListSharesResponse + :rtype: ~azure.storage.fileshare._generated.models.ListSharesResponse :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "list" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_share_operations.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py similarity index 95% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_share_operations.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py index bcffde16ecd6..0e4175c8ce68 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_generated/operations/_share_operations.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/operations/_share_operations.py @@ -56,7 +56,7 @@ def create(self, timeout=None, metadata=None, quota=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -119,7 +119,7 @@ def get_properties(self, sharesnapshot=None, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -181,13 +181,13 @@ def delete(self, sharesnapshot=None, timeout=None, delete_snapshots=None, cls=No base share and all of its snapshots. Possible values include: 'include' :type delete_snapshots: str or - ~azure.storage.file.models.DeleteSnapshotsOptionType + ~azure.storage.fileshare._generated.models.DeleteSnapshotsOptionType :param callable cls: A custom type or function that will be passed the direct response :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) # Construct URL @@ -246,7 +246,7 @@ def create_snapshot(self, timeout=None, metadata=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "snapshot" @@ -298,7 +298,7 @@ def create_permission(self, share_permission, timeout=None, cls=None, **kwargs): :param share_permission: A permission (a security descriptor) at the share level. - :type share_permission: ~azure.storage.file.models.SharePermission + :type share_permission: ~azure.storage.fileshare._generated.models.SharePermission :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -309,7 +309,7 @@ def create_permission(self, share_permission, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "filepermission" @@ -371,9 +371,9 @@ def get_permission(self, file_permission_key=None, timeout=None, cls=None, **kwa :param callable cls: A custom type or function that will be passed the direct response :return: SharePermission or the result of cls(response) - :rtype: ~azure.storage.file.models.SharePermission + :rtype: ~azure.storage.fileshare._generated.models.SharePermission :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "filepermission" @@ -440,7 +440,7 @@ def set_quota(self, timeout=None, quota=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "properties" @@ -502,7 +502,7 @@ def set_metadata(self, timeout=None, metadata=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "metadata" @@ -560,9 +560,9 @@ def get_access_policy(self, timeout=None, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: list or the result of cls(response) - :rtype: list[~azure.storage.file.models.SignedIdentifier] + :rtype: list[~azure.storage.fileshare._generated.models.SignedIdentifier] :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "acl" @@ -618,7 +618,7 @@ def set_access_policy(self, share_acl=None, timeout=None, cls=None, **kwargs): """Sets a stored access policy for use with shared access signatures. :param share_acl: The ACL for the share. - :type share_acl: list[~azure.storage.file.models.SignedIdentifier] + :type share_acl: list[~azure.storage.fileshare._generated.models.SignedIdentifier] :param timeout: The timeout parameter is expressed in seconds. For more information, see Setting @@ -629,7 +629,7 @@ def set_access_policy(self, share_acl=None, timeout=None, cls=None, **kwargs): :return: None or the result of cls(response) :rtype: None :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "acl" @@ -692,9 +692,9 @@ def get_statistics(self, timeout=None, cls=None, **kwargs): :param callable cls: A custom type or function that will be passed the direct response :return: ShareStats or the result of cls(response) - :rtype: ~azure.storage.file.models.ShareStats + :rtype: ~azure.storage.fileshare._generated.models.ShareStats :raises: - :class:`StorageErrorException` + :class:`StorageErrorException` """ error_map = kwargs.pop('error_map', None) comp = "stats" diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_generated/version.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_generated/version.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_generated/version.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py similarity index 98% rename from sdk/storage/azure-storage-file/azure/storage/file/_models.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py index b5ef192c9de9..5a4b2849ae99 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_models.py @@ -35,7 +35,7 @@ class Metrics(GeneratedMetrics): File service. :keyword bool include_ap_is: Indicates whether metrics should generate summary statistics for called API operations. - :keyword ~azure.storage.file.RetentionPolicy retention_policy: Determines how long the associated data should + :keyword ~azure.storage.fileshare.RetentionPolicy retention_policy: Determines how long the associated data should persist. """ @@ -160,8 +160,8 @@ class AccessPolicy(GenAccessPolicy): Required unless an id is given referencing a stored access policy which contains this field. This field must be omitted if it has been specified in an associated stored access policy. - :type permission: str or ~azure.storage.file.FileSasPermissions or - ~azure.storage.file.ShareSasPermissions + :type permission: str or ~azure.storage.fileshare.FileSasPermissions or + ~azure.storage.fileshare.ShareSasPermissions :param expiry: The time at which the shared access signature becomes invalid. Required unless an id is given referencing a stored access policy @@ -283,7 +283,7 @@ class SharePropertiesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.ShareProperties) + :vartype current_page: list(~azure.storage.fileshare.ShareProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only shares whose names @@ -380,7 +380,7 @@ class HandlesPaged(PageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.Handle) + :vartype current_page: list(~azure.storage.fileshare.Handle) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per @@ -437,7 +437,7 @@ class DirectoryProperties(DictMixin): :vartype last_write_time: str or ~datetime.datetime :ivar file_attributes: The file system attributes for files and directories. - :vartype file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :vartype file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :ivar permission_key: Key of the permission to be set for the directory/file. :vartype permission_key: str @@ -564,10 +564,10 @@ class FileProperties(DictMixin): Whether encryption is enabled. :ivar copy: The copy properties. - :vartype copy: ~azure.storage.file.CopyProperties + :vartype copy: ~azure.storage.fileshare.CopyProperties :ivar content_settings: The content settings for the file. - :vartype content_settings: ~azure.storage.file.ContentSettings + :vartype content_settings: ~azure.storage.fileshare.ContentSettings """ def __init__(self, **kwargs): @@ -710,7 +710,7 @@ def from_string(cls, permission): :param str permission: The string which dictates the read, create, write, or delete permissions :return: A FileSasPermissions object - :rtype: ~azure.storage.file.FileSasPermissions + :rtype: ~azure.storage.fileshare.FileSasPermissions """ p_read = 'r' in permission p_create = 'c' in permission @@ -767,7 +767,7 @@ def from_string(cls, permission): :param str permission: The string which dictates the read, write, delete, or list permissions :return: A ShareSasPermissions object - :rtype: ~azure.storage.file.ShareSasPermissions + :rtype: ~azure.storage.fileshare.ShareSasPermissions """ p_read = 'r' in permission p_write = 'w' in permission @@ -841,7 +841,7 @@ def from_string(cls, string): :param str string: The string which dictates the permissions. :return: A NTFSAttributes object - :rtype: ~azure.storage.file.NTFSAttributes + :rtype: ~azure.storage.fileshare.NTFSAttributes """ read_only = "ReadOnly" in string hidden = "Hidden" in string diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_parser.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_parser.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_parser.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_parser.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_share_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py similarity index 96% rename from sdk/storage/azure-storage-file/azure/storage/file/_share_client.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py index 0d82eefa1db5..5b28754d55dd 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_share_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py @@ -30,8 +30,8 @@ DeleteSnapshotsOptionType, SharePermission) from ._deserialize import deserialize_share_properties, deserialize_permission_key, deserialize_permission -from ._directory_client import DirectoryClient -from ._file_client import FileClient +from ._directory_client import ShareDirectoryClient +from ._file_client import ShareFileClient if TYPE_CHECKING: from ._models import ShareProperties, AccessPolicy @@ -96,7 +96,7 @@ def __init__( # type: ignore self.share_name = share_name self._query_str, credential = self._format_query_string( sas_token, credential, share_snapshot=self.snapshot) - super(ShareClient, self).__init__(parsed_url, service='file', credential=credential, **kwargs) + super(ShareClient, self).__init__(parsed_url, service='file-share', credential=credential, **kwargs) self._client = AzureFileStorage(version=VERSION, url=self.url, pipeline=self._pipeline) @classmethod @@ -115,6 +115,8 @@ def from_share_url(cls, share_url, # type: str The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A share client. + :rtype: ~azure.storage.fileshare.ShareClient """ try: if not share_url.lower().startswith('http'): @@ -166,6 +168,8 @@ def from_connection_string( The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A share client. + :rtype: ~azure.storage.fileshare.ShareClient .. admonition:: Example: @@ -183,41 +187,41 @@ def from_connection_string( account_url, share_name=share_name, snapshot=snapshot, credential=credential, **kwargs) def get_directory_client(self, directory_path=None): - # type: (Optional[str]) -> DirectoryClient + # type: (Optional[str]) -> ShareDirectoryClient """Get a client to interact with the specified directory. The directory need not already exist. :param str directory_path: Path to the specified directory. :returns: A Directory Client. - :rtype: ~azure.storage.file.DirectoryClient + :rtype: ~azure.storage.fileshare.ShareDirectoryClient """ _pipeline = Pipeline( transport=TransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return DirectoryClient( + return ShareDirectoryClient( self.url, share_name=self.share_name, directory_path=directory_path or "", snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode) def get_file_client(self, file_path): - # type: (str) -> FileClient + # type: (str) -> ShareFileClient """Get a client to interact with the specified file. The file need not already exist. :param str file_path: Path to the specified file. :returns: A File Client. - :rtype: ~azure.storage.file.FileClient + :rtype: ~azure.storage.fileshare.ShareFileClient """ _pipeline = Pipeline( transport=TransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return FileClient( + return ShareFileClient( self.url, share_name=self.share_name, file_path=file_path, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode) @@ -355,7 +359,7 @@ def get_share_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: The share properties. - :rtype: ~azure.storage.file.ShareProperties + :rtype: ~azure.storage.fileshare.ShareProperties .. admonition:: Example: @@ -484,7 +488,7 @@ def set_share_access_policy(self, signed_identifiers, **kwargs): A dictionary of access policies to associate with the share. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.file.AccessPolicy`) + :type signed_identifiers: dict(str, :class:`~azure.storage.fileshare.AccessPolicy`) :keyword int timeout: The timeout parameter is expressed in seconds. :returns: Share-updated property dict (Etag and last modified). @@ -636,7 +640,7 @@ def get_permission_for_share( # type: ignore @distributed_trace def create_directory(self, directory_name, **kwargs): - # type: (str, Any) -> DirectoryClient + # type: (str, Any) -> ShareDirectoryClient """Creates a directory in the share and returns a client to interact with the directory. @@ -647,8 +651,8 @@ def create_directory(self, directory_name, **kwargs): :type metadata: dict(str, str) :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: DirectoryClient - :rtype: ~azure.storage.file.DirectoryClient + :returns: ShareDirectoryClient + :rtype: ~azure.storage.fileshare.ShareDirectoryClient """ directory = self.get_directory_client(directory_name) kwargs.setdefault('merge_span', True) diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_file_service_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py similarity index 86% rename from sdk/storage/azure-storage-file/azure/storage/file/_file_service_client.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py index a484ebec1803..4858a14e4685 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_file_service_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_service_client.py @@ -37,8 +37,8 @@ ) -class FileServiceClient(StorageAccountHostsMixin): - """A client to interact with the File Service at the account level. +class ShareServiceClient(StorageAccountHostsMixin): + """A client to interact with the File Share Service at the account level. This client provides operations to retrieve and configure the account properties as well as list, create and delete shares within the account. @@ -46,7 +46,7 @@ class FileServiceClient(StorageAccountHostsMixin): can also be retrieved using the :func:`get_share_client` function. :param str account_url: - The URL to the file storage account. Any other entities included + The URL to the file share storage account. Any other entities included in the URL path (e.g. share or file) will be discarded. This URL can be optionally authenticated with a SAS token. :param credential: @@ -59,11 +59,11 @@ class FileServiceClient(StorageAccountHostsMixin): .. admonition:: Example: .. literalinclude:: ../samples/file_samples_authentication.py - :start-after: [START create_file_service_client] - :end-before: [END create_file_service_client] + :start-after: [START create_share_service_client] + :end-before: [END create_share_service_client] :language: python :dedent: 8 - :caption: Create the file service client with url and credential. + :caption: Create the share service client with url and credential. """ def __init__( self, account_url, # type: str @@ -80,14 +80,14 @@ def __init__( if not parsed_url.netloc: raise ValueError("Invalid URL: {}".format(account_url)) if hasattr(credential, 'get_token'): - raise ValueError("Token credentials not supported by the File service.") + raise ValueError("Token credentials not supported by the File Share service.") _, sas_token = parse_query(parsed_url.query) if not sas_token and not credential: raise ValueError( 'You need to provide either an account key or SAS token when creating a storage service.') self._query_str, credential = self._format_query_string(sas_token, credential) - super(FileServiceClient, self).__init__(parsed_url, service='file', credential=credential, **kwargs) + super(ShareServiceClient, self).__init__(parsed_url, service='file-share', credential=credential, **kwargs) self._client = AzureFileStorage(version=VERSION, url=self.url, pipeline=self._pipeline) def _format_url(self, hostname): @@ -101,8 +101,8 @@ def from_connection_string( cls, conn_str, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> FileServiceClient - """Create FileServiceClient from a Connection String. + ): # type: (...) -> ShareServiceClient + """Create ShareServiceClient from a Connection String. :param str conn_str: A connection string to an Azure Storage account. @@ -110,15 +110,17 @@ def from_connection_string( The credential with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string or an account shared access key. + :returns: A File Share service client. + :rtype: ~azure.storage.fileshare.ShareServiceClient .. admonition:: Example: .. literalinclude:: ../samples/file_samples_authentication.py - :start-after: [START create_file_service_client_from_conn_string] - :end-before: [END create_file_service_client_from_conn_string] + :start-after: [START create_share_service_client_from_conn_string] + :end-before: [END create_share_service_client_from_conn_string] :language: python :dedent: 8 - :caption: Create the file service client with connection string. + :caption: Create the share service client with connection string. """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'file') if 'secondary_hostname' not in kwargs: @@ -128,12 +130,12 @@ def from_connection_string( @distributed_trace def get_service_properties(self, **kwargs): # type: (Any) -> Dict[str, Any] - """Gets the properties of a storage account's File service, including + """Gets the properties of a storage account's File Share service, including Azure Storage Analytics. :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: An object containing file service properties such as + :returns: A dictionary containing file service properties such as analytics logging, hour/minute metrics, cors rules, etc. :rtype: Dict[str, Any] @@ -144,7 +146,7 @@ def get_service_properties(self, **kwargs): :end-before: [END get_service_properties] :language: python :dedent: 8 - :caption: Get file service properties. + :caption: Get file share service properties. """ timeout = kwargs.pop('timeout', None) try: @@ -161,23 +163,23 @@ def set_service_properties( **kwargs ): # type: (...) -> None - """Sets the properties of a storage account's File service, including + """Sets the properties of a storage account's File Share service, including Azure Storage Analytics. If an element (e.g. hour_metrics) is left as None, the existing settings on the service for that functionality are preserved. :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.Metrics + :type hour_metrics: ~azure.storage.fileshare.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for files. - :type minute_metrics: ~azure.storage.file.Metrics + :type minute_metrics: ~azure.storage.fileshare.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.file.CorsRule`) + :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -189,7 +191,7 @@ def set_service_properties( :end-before: [END set_service_properties] :language: python :dedent: 8 - :caption: Sets file service properties. + :caption: Sets file share service properties. """ timeout = kwargs.pop('timeout', None) props = StorageServiceProperties( @@ -224,7 +226,7 @@ def list_shares( :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.ShareProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.fileshare.ShareProperties] .. admonition:: Example: @@ -233,7 +235,7 @@ def list_shares( :end-before: [END fsc_list_shares] :language: python :dedent: 12 - :caption: List shares in the file service. + :caption: List shares in the file share service. """ timeout = kwargs.pop('timeout', None) include = [] @@ -269,7 +271,7 @@ def create_share( Quota in bytes. :keyword int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.ShareClient + :rtype: ~azure.storage.fileshare.ShareClient .. admonition:: Example: @@ -278,7 +280,7 @@ def create_share( :end-before: [END fsc_create_shares] :language: python :dedent: 8 - :caption: Create a share in the file service. + :caption: Create a share in the file share service. """ metadata = kwargs.pop('metadata', None) quota = kwargs.pop('quota', None) @@ -301,7 +303,7 @@ def delete_share( :param share_name: The share to delete. This can either be the name of the share, or an instance of ShareProperties. - :type share_name: str or ~azure.storage.file.ShareProperties + :type share_name: str or ~azure.storage.fileshare.ShareProperties :param bool delete_snapshots: Indicates if snapshots are to be deleted. :keyword int timeout: @@ -315,7 +317,7 @@ def delete_share( :end-before: [END fsc_delete_shares] :language: python :dedent: 12 - :caption: Delete a share in the file service. + :caption: Delete a share in the file share service. """ timeout = kwargs.pop('timeout', None) share = self.get_share_client(share_name) @@ -331,12 +333,12 @@ def get_share_client(self, share, snapshot=None): :param share: The share. This can either be the name of the share, or an instance of ShareProperties. - :type share: str or ~azure.storage.file.ShareProperties + :type share: str or ~azure.storage.fileshare.ShareProperties :param str snapshot: An optional share snapshot on which to operate. This can be the snapshot ID string or the response returned from :func:`create_snapshot`. :returns: A ShareClient. - :rtype: ~azure.storage.file.ShareClient + :rtype: ~azure.storage.fileshare.ShareClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/__init__.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/authentication.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/authentication.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/base_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/base_client.py similarity index 98% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/base_client.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/base_client.py index cef1079db4b8..9ad754b92b14 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/base_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/base_client.py @@ -78,9 +78,10 @@ def __init__( self._hosts = kwargs.get("_hosts") self.scheme = parsed_url.scheme - if service not in ["blob", "queue", "file"]: + if service not in ["blob", "queue", "file-share"]: raise ValueError("Invalid service: {}".format(service)) - account = parsed_url.netloc.split(".{}.core.".format(service)) + service_name = service.split('-')[0] + account = parsed_url.netloc.split(".{}.core.".format(service_name)) self.account_name = account[0] if len(account) > 1 else None secondary_hostname = None @@ -89,7 +90,8 @@ def __init__( raise ValueError("Token credential is only supported with HTTPS.") if hasattr(self.credential, "account_name"): self.account_name = self.credential.account_name - secondary_hostname = "{}-secondary.{}.{}".format(self.credential.account_name, service, SERVICE_HOST_BASE) + secondary_hostname = "{}-secondary.{}.{}".format( + self.credential.account_name, service_name, SERVICE_HOST_BASE) if not self._hosts: if len(account) > 1: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/base_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/base_client_async.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/base_client_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/base_client_async.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/constants.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/constants.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/constants.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/constants.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/encryption.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/encryption.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/encryption.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/encryption.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/models.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index e4533e5f4dd9..c9879e996263 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared/models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py @@ -259,7 +259,7 @@ def from_string(cls, string): :param str string: Specify service, container, or object in in the string with the first letter of the word. :return: A ResourceTypes object - :rtype: ~azure.storage.file.ResourceTypes + :rtype: ~azure.storage.fileshare.ResourceTypes """ res_service = 's' in string res_container = 'c' in string @@ -333,7 +333,7 @@ def from_string(cls, permission): :param str permission: Specify permissions in the string with the first letter of the word. :return: An AccountSasPermissions object - :rtype: ~azure.storage.file.AccountSasPermissions + :rtype: ~azure.storage.fileshare.AccountSasPermissions """ p_read = 'r' in permission p_write = 'w' in permission @@ -356,17 +356,17 @@ class Services(object): Access for the `~azure.storage.blob.BlobServiceClient` :param bool queue: Access for the `~azure.storage.queue.QueueServiceClient` - :param bool file: - Access for the `~azure.storage.file.FileServiceClient` + :param bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient` """ - def __init__(self, blob=False, queue=False, file=False): + def __init__(self, blob=False, queue=False, fileshare=False): self.blob = blob self.queue = queue - self.file = file + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + - ('f' if self.file else '')) + ('f' if self.fileshare else '')) def __str__(self): return self._str @@ -382,7 +382,7 @@ def from_string(cls, string): :param str string: Specify blob, queue, or file in in the string with the first letter of the word. :return: A Services object - :rtype: ~azure.storage.file.Services + :rtype: ~azure.storage.fileshare.Services """ res_blob = 'b' in string res_queue = 'q' in string diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/parser.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/parser.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/parser.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/parser.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/policies.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies_async.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/policies_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies_async.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/request_handlers.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/request_handlers.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/response_handlers.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/response_handlers.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/shared_access_signature.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/shared_access_signature.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads_async.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared/uploads_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads_async.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_shared_access_signature.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared_access_signature.py similarity index 96% rename from sdk/storage/azure-storage-file/azure/storage/file/_shared_access_signature.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared_access_signature.py index b0bede295578..b45179fe97e5 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/_shared_access_signature.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared_access_signature.py @@ -16,7 +16,7 @@ if TYPE_CHECKING: from datetime import datetime - from azure.storage.file import ( + from azure.storage.fileshare import ( ResourceTypes, AccountSasPermissions, ShareSasPermissions, @@ -56,7 +56,7 @@ def generate_file(self, share_name, directory_name=None, file_name=None, this parameter should only be present if file_name is provided. :param str file_name: Name of file. - :param ~azure.storage.file.FileSasPermissions permission: + :param ~azure.storage.fileshare.FileSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, create, write, delete, list. @@ -247,16 +247,16 @@ def generate_account_sas( # type: (...) -> str """Generates a shared access signature for the file service. - Use the returned signature with the credential parameter of any FileServiceClient, - ShareClient, DirectoryClient, or FileClient. + Use the returned signature with the credential parameter of any ShareServiceClient, + ShareClient, ShareDirectoryClient, or ShareFileClient. :param str account_name: The storage account name used to generate the shared access signature. :param str account_key: The access key to generate the shared access signature. - :param ~azure.storage.file.ResourceTypes resource_types: + :param ~azure.storage.fileshare.ResourceTypes resource_types: Specifies the resource types that are accessible with the account SAS. - :param ~azure.storage.file.AccountSasPermissions permission: + :param ~azure.storage.fileshare.AccountSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Required unless an id is given referencing a stored access policy @@ -299,7 +299,7 @@ def generate_account_sas( """ sas = SharedAccessSignature(account_name, account_key) return sas.generate_account( - services=Services(file=True), + services=Services(fileshare=True), resource_types=resource_types, permission=permission, expiry=expiry, @@ -322,8 +322,8 @@ def generate_share_sas( ): # type: (...) -> str """Generates a shared access signature for a share. - Use the returned signature with the credential parameter of any FileServiceClient, - ShareClient, DirectoryClient, or FileClient. + Use the returned signature with the credential parameter of any ShareServiceClient, + ShareClient, ShareDirectoryClient, or ShareFileClient. :param str account_name: The storage account name used to generate the shared access signature. @@ -331,7 +331,7 @@ def generate_share_sas( The name of the share. :param str account_key: The access key to generate the shared access signature. - :param ~azure.storage.file.ShareSasPermissions permission: + :param ~azure.storage.fileshare.ShareSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, create, write, delete, list. @@ -356,7 +356,7 @@ def generate_share_sas( :param str policy_id: A unique value up to 64 characters in length that correlates to a stored access policy. To create a stored access policy, use - :func:`~azure.storage.file.ShareClient.set_share_access_policy`. + :func:`~azure.storage.fileshare.ShareClient.set_share_access_policy`. :param str ip: Specifies an IP address or a range of IP addresses from which to accept requests. If the IP address from which the request originates does not match the IP address @@ -410,8 +410,8 @@ def generate_file_sas( # type: (...) -> str """Generates a shared access signature for a file. - Use the returned signature with the credential parameter of any FileServiceClient, - ShareClient, DirectoryClient, or FileClient. + Use the returned signature with the credential parameter of any ShareServiceClient, + ShareClient, ShareDirectoryClient, or ShareFileClient. :param str account_name: The storage account name used to generate the shared access signature. @@ -422,7 +422,7 @@ def generate_file_sas( :type file_path: List[str] :param str account_key: The access key to generate the shared access signature. - :param ~azure.storage.file.FileSasPermissions permission: + :param ~azure.storage.fileshare.FileSasPermissions permission: The permissions associated with the shared access signature. The user is restricted to operations allowed by the permissions. Permissions must be ordered read, write, delete, list. diff --git a/sdk/storage/azure-storage-file/azure/storage/file/_version.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py similarity index 100% rename from sdk/storage/azure-storage-file/azure/storage/file/_version.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/__init__.py similarity index 61% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/__init__.py index 4e4af3a9a02b..0496a0d7f044 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/__init__.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/__init__.py @@ -4,15 +4,15 @@ # license information. # -------------------------------------------------------------------------- -from ._file_client_async import FileClient -from ._directory_client_async import DirectoryClient +from ._file_client_async import ShareFileClient +from ._directory_client_async import ShareDirectoryClient from ._share_client_async import ShareClient -from ._file_service_client_async import FileServiceClient +from ._share_service_client_async import ShareServiceClient __all__ = [ - 'FileClient', - 'DirectoryClient', + 'ShareFileClient', + 'ShareDirectoryClient', 'ShareClient', - 'FileServiceClient', + 'ShareServiceClient', ] diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_directory_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_directory_client_async.py similarity index 95% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_directory_client_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_directory_client_async.py index 52383051e30e..3978fcabe533 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_directory_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_directory_client_async.py @@ -25,8 +25,8 @@ from .._shared.request_handlers import add_metadata_headers from .._shared.response_handlers import return_response_headers, process_storage_error from .._deserialize import deserialize_directory_properties -from .._directory_client import DirectoryClient as DirectoryClientBase -from ._file_client_async import FileClient +from .._directory_client import ShareDirectoryClient as ShareDirectoryClientBase +from ._file_client_async import ShareFileClient from ._models import DirectoryPropertiesPaged, HandlesPaged if TYPE_CHECKING: @@ -35,7 +35,7 @@ from .._generated.models import HandleItem -class DirectoryClient(AsyncStorageAccountHostsMixin, DirectoryClientBase): +class ShareDirectoryClient(AsyncStorageAccountHostsMixin, ShareDirectoryClientBase): """A client to interact with a specific directory, although it may not yet exist. For operations relating to a specific subdirectory or file in this share, the clients for those @@ -73,7 +73,7 @@ def __init__( # type: ignore # type: (...) -> None kwargs['retry_policy'] = kwargs.get('retry_policy') or ExponentialRetry(**kwargs) loop = kwargs.pop('loop', None) - super(DirectoryClient, self).__init__( + super(ShareDirectoryClient, self).__init__( account_url, share_name=share_name, directory_path=directory_path, @@ -85,7 +85,7 @@ def __init__( # type: ignore self._loop = loop def get_file_client(self, file_name, **kwargs): - # type: (str, Any) -> FileClient + # type: (str, Any) -> ShareFileClient """Get a client to interact with a specific file. The file need not already exist. @@ -93,7 +93,7 @@ def get_file_client(self, file_name, **kwargs): :param str file_name: The name of the file. :returns: A File Client. - :rtype: ~azure.storage.file.FileClient + :rtype: ~azure.storage.fileshare.ShareFileClient """ if self.directory_path: file_name = self.directory_path.rstrip('/') + "/" + file_name @@ -102,13 +102,13 @@ def get_file_client(self, file_name, **kwargs): transport=AsyncTransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return FileClient( + return ShareFileClient( self.url, file_path=file_name, share_name=self.share_name, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, loop=self._loop, **kwargs) def get_subdirectory_client(self, directory_name, **kwargs): - # type: (str, Any) -> DirectoryClient + # type: (str, Any) -> ShareDirectoryClient """Get a client to interact with a specific subdirectory. The subdirectory need not already exist. @@ -116,7 +116,7 @@ def get_subdirectory_client(self, directory_name, **kwargs): :param str directory_name: The name of the subdirectory. :returns: A Directory Client. - :rtype: ~azure.storage.file.aio.DirectoryClient + :rtype: ~azure.storage.fileshare.aio.ShareDirectoryClient .. admonition:: Example: @@ -133,7 +133,7 @@ def get_subdirectory_client(self, directory_name, **kwargs): transport=AsyncTransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return DirectoryClient( + return ShareDirectoryClient( self.url, share_name=self.share_name, directory_path=directory_path, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, loop=self._loop, **kwargs) @@ -241,7 +241,7 @@ def list_handles(self, recursive=False, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItem - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.HandleItem] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.fileshare.HandleItem] """ timeout = kwargs.pop('timeout', None) results_per_page = kwargs.pop('results_per_page', None) @@ -262,7 +262,7 @@ async def close_handle(self, handle, **kwargs): :param handle: A specific handle to close. - :type handle: str or ~azure.storage.file.Handle + :type handle: str or ~azure.storage.fileshare.Handle :keyword int timeout: The timeout parameter is expressed in seconds. :returns: @@ -340,7 +340,7 @@ async def get_directory_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: DirectoryProperties - :rtype: ~azure.storage.file.DirectoryProperties + :rtype: ~azure.storage.fileshare.DirectoryProperties """ timeout = kwargs.pop('timeout', None) try: @@ -396,7 +396,7 @@ async def set_http_headers(self, file_attributes="none", # type: Union[str, NTF The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Preserve. :type file_creation_time: str or datetime @@ -439,7 +439,7 @@ async def create_subdirectory( self, directory_name, # type: str **kwargs ): - # type: (...) -> DirectoryClient + # type: (...) -> ShareDirectoryClient """Creates a new subdirectory and returns a client to interact with the subdirectory. @@ -449,8 +449,8 @@ async def create_subdirectory( Name-value pairs associated with the subdirectory as metadata. :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: DirectoryClient - :rtype: ~azure.storage.file.aio.DirectoryClient + :returns: ShareDirectoryClient + :rtype: ~azure.storage.fileshare.aio.ShareDirectoryClient .. admonition:: Example: @@ -501,8 +501,8 @@ async def upload_file( length=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> FileClient - """Creates a new file in the directory and returns a FileClient + # type: (...) -> ShareFileClient + """Creates a new file in the directory and returns a ShareFileClient to interact with the file. :param str file_name: @@ -513,7 +513,7 @@ async def upload_file( Length of the file in bytes. Specify its maximum size, up to 1 TiB. :keyword dict(str,str) metadata: Name-value pairs associated with the file as metadata. - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword bool validate_content: @@ -529,8 +529,8 @@ async def upload_file( The timeout parameter is expressed in seconds. :keyword str encoding: Defaults to UTF-8. - :returns: FileClient - :rtype: ~azure.storage.file.aio.FileClient + :returns: ShareFileClient + :rtype: ~azure.storage.fileshare.aio.ShareFileClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_download_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py similarity index 99% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_download_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py index 9f6f19c7f701..7636190e8b8e 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_download_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py @@ -150,7 +150,7 @@ class StorageStreamDownloader(object): # pylint: disable=too-many-instance-attr The full path of the file. :ivar str share: The name of the share where the file is. - :ivar ~azure.storage.file.FileProperties properties: + :ivar ~azure.storage.fileshare.FileProperties properties: The properties of the file being downloaded. If only a range of the data is being downloaded, this will be reflected in the properties. :ivar int size: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_file_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py similarity index 98% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_file_client_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py index bceb8281baf1..48904745fa41 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_file_client_async.py @@ -26,7 +26,7 @@ from .._shared.request_handlers import add_metadata_headers, get_length from .._shared.response_handlers import return_response_headers, process_storage_error from .._deserialize import deserialize_file_properties, deserialize_file_stream -from .._file_client import FileClient as FileClientBase +from .._file_client import ShareFileClient as ShareFileClientBase from ._models import HandlesPaged from ._download_async import StorageStreamDownloader @@ -85,7 +85,7 @@ async def _upload_file_helper( process_storage_error(error) -class FileClient(AsyncStorageAccountHostsMixin, FileClientBase): +class ShareFileClient(AsyncStorageAccountHostsMixin, ShareFileClientBase): """A client to interact with a specific file, although that file may not yet exist. :param str account_url: @@ -122,7 +122,7 @@ def __init__( # type: ignore # type: (...) -> None kwargs["retry_policy"] = kwargs.get("retry_policy") or ExponentialRetry(**kwargs) loop = kwargs.pop('loop', None) - super(FileClient, self).__init__( + super(ShareFileClient, self).__init__( account_url, share_name=share_name, file_path=file_path, snapshot=snapshot, credential=credential, loop=loop, **kwargs ) @@ -152,7 +152,7 @@ async def create_file( # type: ignore If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or ~datetime.datetime @@ -170,7 +170,7 @@ async def create_file( # type: ignore directory/file. Note: Only one of the x-ms-file-permission or x-ms-file-permission-key should be specified. :type permission_key: str - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword dict(str,str) metadata: @@ -249,7 +249,7 @@ async def upload_file( If not set, the default value would be "None" and the attributes will be set to "Archive". Here is an example for when the var type is str: 'Temporary|Archive'. file_attributes value is not case sensitive. - :type file_attributes: str or ~azure.storage.file.NTFSAttributes + :type file_attributes: str or ~azure.storage.fileshare.NTFSAttributes :param file_creation_time: Creation time for the file Default value: Now. :type file_creation_time: str or ~datetime.datetime @@ -269,7 +269,7 @@ async def upload_file( :type permission_key: str :keyword dict(str,str) metadata: Name-value pairs associated with the file as metadata. - :keyword ~azure.storage.file.ContentSettings content_settings: + :keyword ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :keyword bool validate_content: @@ -392,7 +392,7 @@ async def abort_copy(self, copy_id, **kwargs): :param copy_id: The copy operation to abort. This can be either an ID, or an instance of FileProperties. - :type copy_id: str or ~azure.storage.file.FileProperties + :type copy_id: str or ~azure.storage.fileshare.FileProperties :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -507,7 +507,7 @@ async def get_file_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: FileProperties - :rtype: ~azure.storage.file.FileProperties + :rtype: ~azure.storage.fileshare.FileProperties """ timeout = kwargs.pop('timeout', None) try: @@ -534,14 +534,14 @@ async def set_http_headers(self, content_settings, # type: ContentSettings # type: (...) -> Dict[str, Any] """Sets HTTP headers on the file. - :param ~azure.storage.file.ContentSettings content_settings: + :param ~azure.storage.fileshare.ContentSettings content_settings: ContentSettings object used to set file properties. Used to set content type, encoding, language, disposition, md5, and cache control. :param file_attributes: The file system attributes for files and directories. If not set, indicates preservation of existing values. Here is an example for when the var type is str: 'Temporary|Archive' - :type file_attributes: str or :class:`~azure.storage.file.NTFSAttributes` + :type file_attributes: str or :class:`~azure.storage.fileshare.NTFSAttributes` :param file_creation_time: Creation time for the file Default value: Preserve. :type file_creation_time: str or ~datetime.datetime @@ -835,7 +835,7 @@ def list_handles(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An auto-paging iterable of HandleItem - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.HandleItem] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.fileshare.HandleItem] """ timeout = kwargs.pop('timeout', None) results_per_page = kwargs.pop("results_per_page", None) @@ -855,7 +855,7 @@ async def close_handle(self, handle, **kwargs): :param handle: A specific handle to close. - :type handle: str or ~azure.storage.file.Handle + :type handle: str or ~azure.storage.fileshare.Handle :keyword int timeout: The timeout parameter is expressed in seconds. :returns: diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_models.py similarity index 98% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_models.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_models.py index 8fac3df387e5..affee8fb41f4 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_models.py @@ -31,7 +31,7 @@ class SharePropertiesPaged(AsyncPageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.ShareProperties) + :vartype current_page: list(~azure.storage.fileshare.ShareProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only shares whose names @@ -83,7 +83,7 @@ class HandlesPaged(AsyncPageIterator): :ivar str location_mode: The location mode being used to list results. The available options include "primary" and "secondary". :ivar current_page: The current page of listed results. - :vartype current_page: list(~azure.storage.file.Handle) + :vartype current_page: list(~azure.storage.fileshare.Handle) :param callable command: Function to retrieve the next page of items. :param int results_per_page: The maximum number of share names to retrieve per diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_share_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py similarity index 97% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_share_client_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py index 2a0c42d601b5..83a2091162e9 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_share_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_client_async.py @@ -26,8 +26,8 @@ DeleteSnapshotsOptionType) from .._deserialize import deserialize_share_properties, deserialize_permission from .._share_client import ShareClient as ShareClientBase -from ._directory_client_async import DirectoryClient -from ._file_client_async import FileClient +from ._directory_client_async import ShareDirectoryClient +from ._file_client_async import ShareFileClient if TYPE_CHECKING: from .._models import ShareProperties, AccessPolicy @@ -78,41 +78,41 @@ def __init__( # type: ignore self._loop = loop def get_directory_client(self, directory_path=None): - # type: (Optional[str]) -> DirectoryClient + # type: (Optional[str]) -> ShareDirectoryClient """Get a client to interact with the specified directory. The directory need not already exist. :param str directory_path: Path to the specified directory. :returns: A Directory Client. - :rtype: ~azure.storage.file.aio.DirectoryClient + :rtype: ~azure.storage.fileshare.aio.ShareDirectoryClient """ _pipeline = AsyncPipeline( transport=AsyncTransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return DirectoryClient( + return ShareDirectoryClient( self.url, share_name=self.share_name, directory_path=directory_path or "", snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, loop=self._loop) def get_file_client(self, file_path): - # type: (str) -> FileClient + # type: (str) -> ShareFileClient """Get a client to interact with the specified file. The file need not already exist. :param str file_path: Path to the specified file. :returns: A File Client. - :rtype: ~azure.storage.file.aio.FileClient + :rtype: ~azure.storage.fileshare.aio.ShareFileClient """ _pipeline = AsyncPipeline( transport=AsyncTransportWrapper(self._pipeline._transport), # pylint: disable = protected-access policies=self._pipeline._impl_policies # pylint: disable = protected-access ) - return FileClient( + return ShareFileClient( self.url, share_name=self.share_name, file_path=file_path, snapshot=self.snapshot, credential=self.credential, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, loop=self._loop) @@ -250,7 +250,7 @@ async def get_share_properties(self, **kwargs): :keyword int timeout: The timeout parameter is expressed in seconds. :returns: The share properties. - :rtype: ~azure.storage.file.ShareProperties + :rtype: ~azure.storage.fileshare.ShareProperties .. admonition:: Example: @@ -379,7 +379,7 @@ async def set_share_access_policy(self, signed_identifiers, **kwargs): A dictionary of access policies to associate with the share. The dictionary may contain up to 5 elements. An empty dictionary will clear the access policies set on the service. - :type signed_identifiers: dict(str, :class:`~azure.storage.file.AccessPolicy`) + :type signed_identifiers: dict(str, :class:`~azure.storage.fileshare.AccessPolicy`) :keyword int timeout: The timeout parameter is expressed in seconds. :returns: Share-updated property dict (Etag and last modified). @@ -520,7 +520,7 @@ async def get_permission_for_share( # type: ignore @distributed_trace_async async def create_directory(self, directory_name, **kwargs): - # type: (str, Any) -> DirectoryClient + # type: (str, Any) -> ShareDirectoryClient """Creates a directory in the share and returns a client to interact with the directory. @@ -530,8 +530,8 @@ async def create_directory(self, directory_name, **kwargs): Name-value pairs associated with the directory as metadata. :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: DirectoryClient - :rtype: ~azure.storage.file.aio.DirectoryClient + :returns: ShareDirectoryClient + :rtype: ~azure.storage.fileshare.aio.ShareDirectoryClient """ directory = self.get_directory_client(directory_name) kwargs.setdefault('merge_span', True) diff --git a/sdk/storage/azure-storage-file/azure/storage/file/aio/_file_service_client_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py similarity index 88% rename from sdk/storage/azure-storage-file/azure/storage/file/aio/_file_service_client_async.py rename to sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py index 60a82bbd35ee..b624ad83ab8c 100644 --- a/sdk/storage/azure-storage-file/azure/storage/file/aio/_file_service_client_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_share_service_client_async.py @@ -21,7 +21,7 @@ from .._generated.aio import AzureFileStorage from .._generated.models import StorageErrorException, StorageServiceProperties from .._generated.version import VERSION -from .._file_service_client import FileServiceClient as FileServiceClientBase +from .._share_service_client import ShareServiceClient as ShareServiceClientBase from ._share_client_async import ShareClient from ._models import SharePropertiesPaged from .._models import service_properties_deserialize @@ -36,8 +36,8 @@ ) -class FileServiceClient(AsyncStorageAccountHostsMixin, FileServiceClientBase): - """A client to interact with the File Service at the account level. +class ShareServiceClient(AsyncStorageAccountHostsMixin, ShareServiceClientBase): + """A client to interact with the File Share Service at the account level. This client provides operations to retrieve and configure the account properties as well as list, create and delete shares within the account. @@ -45,7 +45,7 @@ class FileServiceClient(AsyncStorageAccountHostsMixin, FileServiceClientBase): can also be retrieved using the :func:`get_share_client` function. :param str account_url: - The URL to the file storage account. Any other entities included + The URL to the file share storage account. Any other entities included in the URL path (e.g. share or file) will be discarded. This URL can be optionally authenticated with a SAS token. :param credential: @@ -60,11 +60,11 @@ class FileServiceClient(AsyncStorageAccountHostsMixin, FileServiceClientBase): .. admonition:: Example: .. literalinclude:: ../samples/file_samples_authentication_async.py - :start-after: [START create_file_service_client] - :end-before: [END create_file_service_client] + :start-after: [START create_share_service_client] + :end-before: [END create_share_service_client] :language: python :dedent: 8 - :caption: Create the file service client with url and credential. + :caption: Create the share service client with url and credential. """ def __init__( self, account_url, # type: str @@ -74,7 +74,7 @@ def __init__( # type: (...) -> None kwargs['retry_policy'] = kwargs.get('retry_policy') or ExponentialRetry(**kwargs) loop = kwargs.pop('loop', None) - super(FileServiceClient, self).__init__( + super(ShareServiceClient, self).__init__( account_url, credential=credential, loop=loop, @@ -85,12 +85,12 @@ def __init__( @distributed_trace_async async def get_service_properties(self, **kwargs): # type: (Any) -> Dict[str, Any] - """Gets the properties of a storage account's File service, including + """Gets the properties of a storage account's File Share service, including Azure Storage Analytics. :keyword int timeout: The timeout parameter is expressed in seconds. - :returns: An object containing file service properties such as + :returns: A dictionary containing file service properties such as analytics logging, hour/minute metrics, cors rules, etc. :rtype: Dict[str, Any] @@ -101,7 +101,7 @@ async def get_service_properties(self, **kwargs): :end-before: [END get_service_properties] :language: python :dedent: 12 - :caption: Get file service properties. + :caption: Get file share service properties. """ timeout = kwargs.pop('timeout', None) try: @@ -118,23 +118,23 @@ async def set_service_properties( **kwargs ): # type: (...) -> None - """Sets the properties of a storage account's File service, including + """Sets the properties of a storage account's File Share service, including Azure Storage Analytics. If an element (e.g. hour_metrics) is left as None, the existing settings on the service for that functionality are preserved. :param hour_metrics: The hour metrics settings provide a summary of request statistics grouped by API in hourly aggregates for files. - :type hour_metrics: ~azure.storage.file.Metrics + :type hour_metrics: ~azure.storage.fileshare.Metrics :param minute_metrics: The minute metrics settings provide request statistics for each minute for files. - :type minute_metrics: ~azure.storage.file.Metrics + :type minute_metrics: ~azure.storage.fileshare.Metrics :param cors: You can include up to five CorsRule elements in the list. If an empty list is specified, all CORS rules will be deleted, and CORS will be disabled for the service. - :type cors: list(:class:`~azure.storage.file.CorsRule`) + :type cors: list(:class:`~azure.storage.fileshare.CorsRule`) :keyword int timeout: The timeout parameter is expressed in seconds. :rtype: None @@ -146,7 +146,7 @@ async def set_service_properties( :end-before: [END set_service_properties] :language: python :dedent: 8 - :caption: Sets file service properties. + :caption: Sets file share service properties. """ timeout = kwargs.pop('timeout', None) props = StorageServiceProperties( @@ -180,7 +180,7 @@ def list_shares( :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of ShareProperties. - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.file.ShareProperties] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.fileshare.ShareProperties] .. admonition:: Example: @@ -189,7 +189,7 @@ def list_shares( :end-before: [END fsc_list_shares] :language: python :dedent: 16 - :caption: List shares in the file service. + :caption: List shares in the file share service. """ timeout = kwargs.pop('timeout', None) include = [] @@ -225,7 +225,7 @@ async def create_share( Quota in bytes. :keyword int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.aio.ShareClient + :rtype: ~azure.storage.fileshare.aio.ShareClient .. admonition:: Example: @@ -234,7 +234,7 @@ async def create_share( :end-before: [END fsc_create_shares] :language: python :dedent: 12 - :caption: Create a share in the file service. + :caption: Create a share in the file share service. """ metadata = kwargs.pop('metadata', None) quota = kwargs.pop('quota', None) @@ -257,7 +257,7 @@ async def delete_share( :param share_name: The share to delete. This can either be the name of the share, or an instance of ShareProperties. - :type share_name: str or ~azure.storage.file.ShareProperties + :type share_name: str or ~azure.storage.fileshare.ShareProperties :param bool delete_snapshots: Indicates if snapshots are to be deleted. :keyword int timeout: @@ -271,7 +271,7 @@ async def delete_share( :end-before: [END fsc_delete_shares] :language: python :dedent: 16 - :caption: Delete a share in the file service. + :caption: Delete a share in the file share service. """ timeout = kwargs.pop('timeout', None) share = self.get_share_client(share_name) @@ -287,12 +287,12 @@ def get_share_client(self, share, snapshot=None): :param share: The share. This can either be the name of the share, or an instance of ShareProperties. - :type share: str or ~azure.storage.file.ShareProperties + :type share: str or ~azure.storage.fileshare.ShareProperties :param str snapshot: An optional share snapshot on which to operate. This can be the snapshot ID string or the response returned from :func:`create_snapshot`. :returns: A ShareClient. - :rtype: ~azure.storage.file.aio.ShareClient + :rtype: ~azure.storage.fileshare.aio.ShareClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file/conftest.py b/sdk/storage/azure-storage-file-share/conftest.py similarity index 100% rename from sdk/storage/azure-storage-file/conftest.py rename to sdk/storage/azure-storage-file-share/conftest.py diff --git a/sdk/storage/azure-storage-file/dev_requirements.txt b/sdk/storage/azure-storage-file-share/dev_requirements.txt similarity index 100% rename from sdk/storage/azure-storage-file/dev_requirements.txt rename to sdk/storage/azure-storage-file-share/dev_requirements.txt diff --git a/sdk/storage/azure-storage-file/mypy.ini b/sdk/storage/azure-storage-file-share/mypy.ini similarity index 81% rename from sdk/storage/azure-storage-file/mypy.ini rename to sdk/storage/azure-storage-file-share/mypy.ini index 5c161ad20d17..80733c8ddbcc 100644 --- a/sdk/storage/azure-storage-file/mypy.ini +++ b/sdk/storage/azure-storage-file-share/mypy.ini @@ -6,7 +6,7 @@ ignore_missing_imports = True # Per-module options: -[mypy-azure.storage.file._generated.*] +[mypy-azure.storage.fileshare._generated.*] ignore_errors = True [mypy-azure.core.*] diff --git a/sdk/storage/azure-storage-file/samples/SampleDestination.txt b/sdk/storage/azure-storage-file-share/samples/SampleDestination.txt similarity index 100% rename from sdk/storage/azure-storage-file/samples/SampleDestination.txt rename to sdk/storage/azure-storage-file-share/samples/SampleDestination.txt diff --git a/sdk/storage/azure-storage-file/samples/SampleSource.txt b/sdk/storage/azure-storage-file-share/samples/SampleSource.txt similarity index 100% rename from sdk/storage/azure-storage-file/samples/SampleSource.txt rename to sdk/storage/azure-storage-file-share/samples/SampleSource.txt diff --git a/sdk/storage/azure-storage-file/samples/file_samples_authentication.py b/sdk/storage/azure-storage-file-share/samples/file_samples_authentication.py similarity index 60% rename from sdk/storage/azure-storage-file/samples/file_samples_authentication.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_authentication.py index cadf83af596c..1253f8f046df 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_authentication.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_authentication.py @@ -12,8 +12,8 @@ DESCRIPTION: These samples demonstrate authenticating a client via a connection string, shared access key, or by generating a sas token with which the returned signature - can be used with the credential parameter of any FileServiceClient, - ShareClient, DirectoryClient, or FileClient. + can be used with the credential parameter of any ShareServiceClient, + ShareClient, ShareDirectoryClient, or ShareFileClient. USAGE: python file_samples_authentication.py @@ -34,34 +34,34 @@ class FileAuthSamples(object): ) def authentication_connection_string(self): - # Instantiate the FileServiceClient from a connection string - # [START create_file_service_client_from_conn_string] - from azure.storage.file import FileServiceClient - file_service_client = FileServiceClient.from_connection_string(self.connection_string) - # [END create_file_service_client_from_conn_string] + # Instantiate the ShareServiceClient from a connection string + # [START create_share_service_client_from_conn_string] + from azure.storage.fileshare import ShareServiceClient + share_service_client = ShareServiceClient.from_connection_string(self.connection_string) + # [END create_share_service_client_from_conn_string] def authentication_shared_access_key(self): - # Instantiate a FileServiceClient using a shared access key - # [START create_file_service_client] - from azure.storage.file import FileServiceClient - file_service_client = FileServiceClient( + # Instantiate a ShareServiceClient using a shared access key + # [START create_share_service_client] + from azure.storage.fileshare import ShareServiceClient + share_service_client = ShareServiceClient( account_url=self.account_url, credential=self.shared_access_key ) - # [END create_file_service_client] + # [END create_share_service_client] def authentication_shared_access_signature(self): - # Instantiate a FileServiceClient using a connection string + # Instantiate a ShareServiceClient using a connection string # [START generate_sas_token] - from azure.storage.file import FileServiceClient - file_service_client = FileServiceClient.from_connection_string(self.connection_string) + from azure.storage.fileshare import ShareServiceClient + share_service_client = ShareServiceClient.from_connection_string(self.connection_string) # Create a SAS token to use to authenticate a new client - from azure.storage.file import generate_account_sas + from azure.storage.fileshare import generate_account_sas sas_token = generate_account_sas( - file_service_client.account_name, - file_service_client.credential.account_key, + share_service_client.account_name, + share_service_client.credential.account_key, resource_types="object", permission="read", expiry=datetime.utcnow() + timedelta(hours=1) diff --git a/sdk/storage/azure-storage-file/samples/file_samples_authentication_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_authentication_async.py similarity index 62% rename from sdk/storage/azure-storage-file/samples/file_samples_authentication_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_authentication_async.py index ff4aa3176714..e8c47abbfc01 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_authentication_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_authentication_async.py @@ -12,8 +12,8 @@ DESCRIPTION: These samples demonstrate authenticating a client via a connection string, shared access key, or by generating a sas token with which the returned signature - can be used with the credential parameter of any FileServiceClient, - ShareClient, DirectoryClient, or FileClient. + can be used with the credential parameter of any ShareServiceClient, + ShareClient, ShareDirectoryClient, or ShareFileClient. USAGE: python file_samples_authentication_async.py @@ -35,33 +35,33 @@ class FileAuthSamplesAsync(object): ) async def authentication_connection_string_async(self): - # Instantiate the FileServiceClient from a connection string - # [START create_file_service_client_from_conn_string] - from azure.storage.file.aio import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) - # [END create_file_service_client_from_conn_string] + # Instantiate the ShareServiceClient from a connection string + # [START create_share_service_client_from_conn_string] + from azure.storage.fileshare.aio import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) + # [END create_share_service_client_from_conn_string] async def authentication_shared_access_key_async(self): - # Instantiate a FileServiceClient using a shared access key - # [START create_file_service_client] - from azure.storage.file.aio import FileServiceClient - file_service_client = FileServiceClient( + # Instantiate a ShareServiceClient using a shared access key + # [START create_share_service_client] + from azure.storage.fileshare.aio import ShareServiceClient + share_service_client = ShareServiceClient( account_url=self.account_url, credential=self.shared_access_key ) - # [END create_file_service_client] + # [END create_share_service_client] async def authentication_shared_access_signature_async(self): - # Instantiate a FileServiceClient using a connection string - from azure.storage.file.aio import FileServiceClient - file_service_client = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate a ShareServiceClient using a connection string + from azure.storage.fileshare.aio import ShareServiceClient + share_service_client = ShareServiceClient.from_connection_string(self.connection_string) # Create a SAS token to use to authenticate a new client - from azure.storage.file import generate_account_sas + from azure.storage.fileshare import generate_account_sas sas_token = generate_account_sas( - file_service_client.account_name, - file_service_client.credential.account_key, + share_service_client.account_name, + share_service_client.credential.account_key, resource_types="object", permission="read", expiry=datetime.utcnow() + timedelta(hours=1) diff --git a/sdk/storage/azure-storage-file/samples/file_samples_client.py b/sdk/storage/azure-storage-file-share/samples/file_samples_client.py similarity index 96% rename from sdk/storage/azure-storage-file/samples/file_samples_client.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_client.py index f82eeba4de6b..ad62c91d1090 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_client.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_client.py @@ -32,7 +32,7 @@ class FileSamples(object): def simple_file_operations(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "filesamples1") # Create the share @@ -73,7 +73,7 @@ def simple_file_operations(self): def copy_file_from_url(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "filesamples2") # Create the share diff --git a/sdk/storage/azure-storage-file/samples/file_samples_client_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_client_async.py similarity index 97% rename from sdk/storage/azure-storage-file/samples/file_samples_client_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_client_async.py index 1b75899cfbc0..2f7684f7afbd 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_client_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_client_async.py @@ -35,7 +35,7 @@ class FileSamplesAsync(object): async def simple_file_operations_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "filesamples1") # Create the share @@ -77,7 +77,7 @@ async def simple_file_operations_async(self): async def file_copy_from_url_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "filesamples2") # Create the share diff --git a/sdk/storage/azure-storage-file/samples/file_samples_directory.py b/sdk/storage/azure-storage-file-share/samples/file_samples_directory.py similarity index 96% rename from sdk/storage/azure-storage-file/samples/file_samples_directory.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_directory.py index aeb1fc963312..f77498d1effd 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_directory.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_directory.py @@ -30,7 +30,7 @@ class DirectorySamples(object): def create_directory_and_file(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples1") # Create the share @@ -65,7 +65,7 @@ def create_directory_and_file(self): def create_subdirectory_and_file(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples2") # Create the share @@ -109,7 +109,7 @@ def create_subdirectory_and_file(self): def get_subdirectory_client(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples3") # Create the share diff --git a/sdk/storage/azure-storage-file/samples/file_samples_directory_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_directory_async.py similarity index 96% rename from sdk/storage/azure-storage-file/samples/file_samples_directory_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_directory_async.py index cd97d817b835..616dec11732a 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_directory_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_directory_async.py @@ -31,7 +31,7 @@ class DirectorySamplesAsync(object): async def create_directory_and_file_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples1") # Create the share @@ -67,7 +67,7 @@ async def create_directory_and_file_async(self): async def create_subdirectory_and_file_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples2") # Create the share @@ -114,7 +114,7 @@ async def create_subdirectory_and_file_async(self): async def get_subdirectory_client_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "directorysamples3") # Create the share diff --git a/sdk/storage/azure-storage-file/samples/file_samples_hello_world.py b/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world.py similarity index 80% rename from sdk/storage/azure-storage-file/samples/file_samples_hello_world.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_hello_world.py index 0a224fb8b97d..48bc8ae4fc42 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_hello_world.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world.py @@ -29,13 +29,13 @@ class HelloWorldSamples(object): connection_string = os.getenv('CONNECTION_STRING') def create_client_with_connection_string(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) def create_file_share(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, share_name="helloworld1") # Create the share @@ -52,17 +52,17 @@ def create_file_share(self): def upload_a_file_to_share(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, share_name="helloworld2") # Create the share share.create_share() try: - # Instantiate the FileClient from a connection string + # Instantiate the ShareFileClient from a connection string # [START create_file_client] - from azure.storage.file import FileClient - file = FileClient.from_connection_string( + from azure.storage.fileshare import ShareFileClient + file = ShareFileClient.from_connection_string( self.connection_string, share_name="helloworld2", file_path="myfile") diff --git a/sdk/storage/azure-storage-file/samples/file_samples_hello_world_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world_async.py similarity index 82% rename from sdk/storage/azure-storage-file/samples/file_samples_hello_world_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_hello_world_async.py index fda6943624cd..e2d2c57cabb8 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_hello_world_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_hello_world_async.py @@ -30,13 +30,13 @@ class HelloWorldSamplesAsync(object): connection_string = os.getenv('CONNECTION_STRING') async def create_client_with_connection_string_async(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file.aio import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare.aio import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) async def create_file_share_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, share_name="helloworld1") # Create the share @@ -54,7 +54,7 @@ async def create_file_share_async(self): async def upload_a_file_to_share_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, share_name='helloworld2') # Create the share @@ -62,10 +62,10 @@ async def upload_a_file_to_share_async(self): await share.create_share() try: - # Instantiate the FileClient from a connection string + # Instantiate the ShareFileClient from a connection string # [START create_file_client] - from azure.storage.file.aio import FileClient - file = FileClient.from_connection_string( + from azure.storage.fileshare.aio import ShareFileClient + file = ShareFileClient.from_connection_string( self.connection_string, share_name='helloworld2', file_path="myfile") diff --git a/sdk/storage/azure-storage-file/samples/file_samples_service.py b/sdk/storage/azure-storage-file-share/samples/file_samples_service.py similarity index 81% rename from sdk/storage/azure-storage-file/samples/file_samples_service.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_service.py index a638afafbe37..3d76f6d51e47 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_service.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_service.py @@ -25,18 +25,18 @@ DEST_FILE = './SampleDestination.txt' -class FileServiceSamples(object): +class FileShareServiceSamples(object): connection_string = os.getenv('CONNECTION_STRING') def file_service_properties(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) # [START set_service_properties] # Create service properties - from azure.storage.file import Metrics, CorsRule, RetentionPolicy + from azure.storage.fileshare import Metrics, CorsRule, RetentionPolicy # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -68,9 +68,9 @@ def file_service_properties(self): # [END get_service_properties] def list_shares_in_service(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) # [START fsc_create_shares] file_service.create_share(share_name="fileshare1") @@ -92,8 +92,8 @@ def list_shares_in_service(self): def get_share_client(self): # [START get_share_client] - from azure.storage.file import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + from azure.storage.fileshare import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) # Get a share client to interact with a specific share share = file_service.get_share_client("fileshare2") @@ -101,7 +101,7 @@ def get_share_client(self): if __name__ == '__main__': - sample = FileServiceSamples() + sample = FileShareServiceSamples() sample.file_service_properties() sample.list_shares_in_service() sample.get_share_client() diff --git a/sdk/storage/azure-storage-file/samples/file_samples_service_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_service_async.py similarity index 82% rename from sdk/storage/azure-storage-file/samples/file_samples_service_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_service_async.py index 4b1ca0f6da65..a3f703d97a31 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_service_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_service_async.py @@ -26,18 +26,18 @@ DEST_FILE = './SampleDestination.txt' -class FileServiceSamplesAsync(object): +class FileShareServiceSamplesAsync(object): connection_string = os.getenv('CONNECTION_STRING') async def file_service_properties_async(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file.aio import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare.aio import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) # [START set_service_properties] # Create service properties - from azure.storage.file import Metrics, CorsRule, RetentionPolicy + from azure.storage.fileshare import Metrics, CorsRule, RetentionPolicy # Create metrics for requests statistics hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -70,9 +70,9 @@ async def file_service_properties_async(self): # [END get_service_properties] async def list_shares_in_service_async(self): - # Instantiate the FileServiceClient from a connection string - from azure.storage.file.aio import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + # Instantiate the ShareServiceClient from a connection string + from azure.storage.fileshare.aio import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) async with file_service: # [START fsc_create_shares] @@ -97,8 +97,8 @@ async def list_shares_in_service_async(self): async def get_share_client_async(self): # [START get_share_client] - from azure.storage.file.aio import FileServiceClient - file_service = FileServiceClient.from_connection_string(self.connection_string) + from azure.storage.fileshare.aio import ShareServiceClient + file_service = ShareServiceClient.from_connection_string(self.connection_string) # Get a share client to interact with a specific share share = file_service.get_share_client("fileshare2") @@ -106,7 +106,7 @@ async def get_share_client_async(self): async def main(): - sample = FileServiceSamplesAsync() + sample = FileShareServiceSamplesAsync() await sample.file_service_properties_async() await sample.list_shares_in_service_async() await sample.get_share_client_async() diff --git a/sdk/storage/azure-storage-file/samples/file_samples_share.py b/sdk/storage/azure-storage-file-share/samples/file_samples_share.py similarity index 94% rename from sdk/storage/azure-storage-file/samples/file_samples_share.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_share.py index 0937216461ae..4901b447ba3a 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_share.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_share.py @@ -31,7 +31,7 @@ class ShareSamples(object): def create_share_snapshot(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples1") # [START create_share] @@ -48,7 +48,7 @@ def create_share_snapshot(self): def set_share_quota_and_metadata(self): # [START create_share_client_from_conn_string] - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples2") # [END create_share_client_from_conn_string] @@ -75,7 +75,7 @@ def set_share_quota_and_metadata(self): def list_directories_and_files(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples3") # Create the share @@ -100,7 +100,7 @@ def list_directories_and_files(self): def get_directory_or_file_client(self): # Instantiate the ShareClient from a connection string - from azure.storage.file import ShareClient + from azure.storage.fileshare import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples4") # Get the directory client to interact with a specific directory diff --git a/sdk/storage/azure-storage-file/samples/file_samples_share_async.py b/sdk/storage/azure-storage-file-share/samples/file_samples_share_async.py similarity index 94% rename from sdk/storage/azure-storage-file/samples/file_samples_share_async.py rename to sdk/storage/azure-storage-file-share/samples/file_samples_share_async.py index 142eac30f4cd..81ad1a2adbba 100644 --- a/sdk/storage/azure-storage-file/samples/file_samples_share_async.py +++ b/sdk/storage/azure-storage-file-share/samples/file_samples_share_async.py @@ -32,7 +32,7 @@ class ShareSamplesAsync(object): async def create_share_snapshot_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples1") async with share: @@ -50,7 +50,7 @@ async def create_share_snapshot_async(self): async def set_share_quota_and_metadata_async(self): # [START create_share_client_from_conn_string] - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples2") # [END create_share_client_from_conn_string] @@ -78,7 +78,7 @@ async def set_share_quota_and_metadata_async(self): async def list_directories_and_files_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples3") # Create the share @@ -106,7 +106,7 @@ async def list_directories_and_files_async(self): async def get_directory_or_file_client_async(self): # Instantiate the ShareClient from a connection string - from azure.storage.file.aio import ShareClient + from azure.storage.fileshare.aio import ShareClient share = ShareClient.from_connection_string(self.connection_string, "sharesamples4") # Get the directory client to interact with a specific directory diff --git a/sdk/storage/azure-storage-file/sdk_packaging.toml b/sdk/storage/azure-storage-file-share/sdk_packaging.toml similarity index 100% rename from sdk/storage/azure-storage-file/sdk_packaging.toml rename to sdk/storage/azure-storage-file-share/sdk_packaging.toml diff --git a/sdk/storage/azure-storage-file/setup.cfg b/sdk/storage/azure-storage-file-share/setup.cfg similarity index 100% rename from sdk/storage/azure-storage-file/setup.cfg rename to sdk/storage/azure-storage-file-share/setup.cfg diff --git a/sdk/storage/azure-storage-file/setup.py b/sdk/storage/azure-storage-file-share/setup.py similarity index 91% rename from sdk/storage/azure-storage-file/setup.py rename to sdk/storage/azure-storage-file-share/setup.py index f41c7c336ab4..f1674df23705 100644 --- a/sdk/storage/azure-storage-file/setup.py +++ b/sdk/storage/azure-storage-file-share/setup.py @@ -12,13 +12,12 @@ from setuptools import find_packages, setup # Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-storage-file" -PACKAGE_PPRINT_NAME = "Azure File Storage" +PACKAGE_NAME = "azure-storage-file-share" +NAMESPACE_NAME = "azure.storage.fileshare" +PACKAGE_PPRINT_NAME = "Azure File Share Storage" -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace('-', '.') +# a.b.c => a/b/c +package_folder_path = NAMESPACE_NAME.replace('.', '/') # azure v0.x is not compatible with this package # azure v0.x used to have a __version__ attribute (newer versions don't) @@ -76,8 +75,6 @@ 'azure', 'azure.storage', 'tests', - 'tests.file', - 'tests.common' ]), install_requires=[ "azure-core<2.0.0,>=1.0.0b5", diff --git a/sdk/storage/azure-storage-file/swagger/README.md b/sdk/storage/azure-storage-file-share/swagger/README.md similarity index 96% rename from sdk/storage/azure-storage-file/swagger/README.md rename to sdk/storage/azure-storage-file-share/swagger/README.md index 2b6d12c5c0e5..ad4909eb60b3 100644 --- a/sdk/storage/azure-storage-file/swagger/README.md +++ b/sdk/storage/azure-storage-file-share/swagger/README.md @@ -20,8 +20,8 @@ autorest --use=C:/work/autorest.python --version=2.0.4280 ### Settings ``` yaml input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.FileStorage/preview/2019-02-02/file.json -output-folder: ../azure/storage/file/_generated -namespace: azure.storage.file +output-folder: ../azure/storage/fileshare/_generated +namespace: azure.storage.fileshare no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION enable-xml: true diff --git a/sdk/storage/azure-storage-file/tests/encryption_test_helper.py b/sdk/storage/azure-storage-file-share/tests/encryption_test_helper.py similarity index 100% rename from sdk/storage/azure-storage-file/tests/encryption_test_helper.py rename to sdk/storage/azure-storage-file-share/tests/encryption_test_helper.py diff --git a/sdk/storage/azure-storage-file/tests/file_settings_fake.py b/sdk/storage/azure-storage-file-share/tests/file_settings_fake.py similarity index 100% rename from sdk/storage/azure-storage-file/tests/file_settings_fake.py rename to sdk/storage/azure-storage-file-share/tests/file_settings_fake.py diff --git a/sdk/storage/azure-storage-file/tests/filetestcase.py b/sdk/storage/azure-storage-file-share/tests/filetestcase.py similarity index 100% rename from sdk/storage/azure-storage-file/tests/filetestcase.py rename to sdk/storage/azure-storage-file-share/tests/filetestcase.py diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories_fail_on_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories_fail_on_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories_fail_on_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories_fail_on_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories_with_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_directories_with_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_directories_with_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_file_in_directory.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_file_in_directory.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_file_in_directory.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_file_in_directory.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_subdirectories.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_subdirectories.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_subdirectories.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_subdirectories.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_subdirectories_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_subdirectories_with_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_create_subdirectories_with_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_create_subdirectories_with_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_directory_with_existing_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_directory_with_existing_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_directory_with_existing_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_directory_with_existing_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_directory_with_non_existing_directory.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_directory_with_non_existing_directory.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_directory_with_non_existing_directory.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_directory_with_non_existing_directory.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_file_in_directory.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_file_in_directory.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_file_in_directory.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_file_in_directory.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_subdirectories.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_subdirectories.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_delete_subdirectories.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_delete_subdirectories.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_exists_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_exists_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_exists_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_exists_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_not_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_not_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_not_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_not_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_not_exists_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_not_exists_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_not_exists_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_not_exists_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_parent_not_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_parent_not_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_directory_parent_not_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_directory_parent_not_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_metadata_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_metadata_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_metadata_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_metadata_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_server_encryption.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_server_encryption.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_server_encryption.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_server_encryption.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_with_non_existing_directory.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_with_non_existing_directory.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_with_non_existing_directory.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_with_non_existing_directory.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_directory_properties_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_directory_properties_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_set_directory_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_set_directory_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_get_set_directory_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_get_set_directory_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_nested_subdirectories_and_files.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_nested_subdirectories_and_files.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_nested_subdirectories_and_files.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_nested_subdirectories_and_files.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files_with_prefix.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files_with_prefix.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files_with_prefix.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files_with_prefix.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_list_subdirectories_and_files_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_list_subdirectories_and_files_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_set_directory_properties_with_empty_smb_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_set_directory_properties_with_empty_smb_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_set_directory_properties_with_empty_smb_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_set_directory_properties_with_empty_smb_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory.test_set_directory_properties_with_file_permission_key.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_set_directory_properties_with_file_permission_key.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory.test_set_directory_properties_with_file_permission_key.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory.test_set_directory_properties_with_file_permission_key.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_fail_on_exist_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_fail_on_exist_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_fail_on_exist_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_fail_on_exist_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_with_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_with_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_directories_with_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_directories_with_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_subdirectories_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_subdirectories_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_subdirectories_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_subdirectories_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_subdirectories_with_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_subdirectories_with_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_create_subdirectories_with_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_create_subdirectories_with_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_directory_with_existing_share_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_directory_with_existing_share_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_directory_with_existing_share_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_directory_with_existing_share_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_directory_with_non_existing_directory_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_directory_with_non_existing_directory_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_directory_with_non_existing_directory_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_directory_with_non_existing_directory_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_file_in_directory_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_file_in_directory_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_file_in_directory_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_file_in_directory_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_subdirectories_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_subdirectories_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_delete_subdirectories_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_delete_subdirectories_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_exists_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_exists_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_exists_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_exists_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_not_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_not_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_not_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_not_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_not_exists_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_not_exists_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_not_exists_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_not_exists_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_parent_not_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_parent_not_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_directory_parent_not_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_directory_parent_not_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_metadata_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_metadata_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_metadata_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_metadata_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_server_encryption_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_server_encryption_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_server_encryption_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_server_encryption_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_with_non_existing_directory_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_with_non_existing_directory_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_with_non_existing_directory_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_with_non_existing_directory_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_directory_properties_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_directory_properties_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_set_directory_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_set_directory_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_get_set_directory_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_get_set_directory_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_nested_subdirectories_and_files_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_nested_subdirectories_and_files_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_nested_subdirectories_and_files_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_nested_subdirectories_and_files_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_prefix_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_prefix_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_prefix_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_prefix_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_list_subdirectories_and_files_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_set_directory_properties_with_empty_smb_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_set_directory_properties_with_empty_smb_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_set_directory_properties_with_empty_smb_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_set_directory_properties_with_empty_smb_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_set_directory_properties_with_file_permission_key_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_set_directory_properties_with_file_permission_key_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_directory_async.test_set_directory_properties_with_file_permission_key_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_directory_async.test_set_directory_properties_with_file_permission_key_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_abort_copy_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_abort_copy_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_abort_copy_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_abort_copy_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_abort_copy_file_with_synchronous_copy_fails.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_abort_copy_file_with_synchronous_copy_fails.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_abort_copy_file_with_synchronous_copy_fails.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_abort_copy_file_with_synchronous_copy_fails.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_async_private_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_async_private_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_async_private_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_async_private_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_async_private_file_with_sas.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_async_private_file_with_sas.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_async_private_file_with_sas.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_async_private_file_with_sas.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_with_existing_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_with_existing_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_copy_file_with_existing_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_copy_file_with_existing_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_from_text.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_from_text.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_from_text.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_from_text.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_from_text_with_encoding.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_from_text_with_encoding.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_from_text_with_encoding.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_from_text_with_encoding.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_will_set_all_smb_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_will_set_all_smb_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_will_set_all_smb_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_will_set_all_smb_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_invalid_file_permission.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_invalid_file_permission.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_invalid_file_permission.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_invalid_file_permission.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_md5_small.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_md5_small.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_md5_small.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_md5_small.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_create_file_with_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_create_file_with_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_delete_file_with_existing_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_delete_file_with_existing_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_delete_file_with_existing_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_delete_file_with_existing_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_delete_file_with_non_existing_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_delete_file_with_non_existing_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_delete_file_with_non_existing_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_delete_file_with_non_existing_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_exists_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_exists_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_exists_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_exists_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_not_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_not_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_not_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_not_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_not_exists_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_not_exists_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_not_exists_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_not_exists_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_unicode_data.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_unicode_data.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_unicode_data.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_unicode_data.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_unicode_data_and_file_attributes.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_unicode_data_and_file_attributes.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_file_unicode_data_and_file_attributes.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_unicode_data_and_file_attributes.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_metadata_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_metadata_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_metadata_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_metadata_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties_with_non_existing_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties_with_non_existing_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties_with_non_existing_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties_with_non_existing_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_get_file_properties_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_get_file_properties_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_2.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_2.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_2.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_2.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_2_from_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_2_from_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_2_from_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_2_from_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_none.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_none.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_none.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_none.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_none_from_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_none_from_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_list_ranges_none_from_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_list_ranges_none_from_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_resize_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_resize_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_resize_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_resize_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_metadata_with_upper_case.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_metadata_with_upper_case.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_metadata_with_upper_case.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_metadata_with_upper_case.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_properties_with_file_permission.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_properties_with_file_permission.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_set_file_properties_with_file_permission.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_set_file_properties_with_file_permission.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_unicode_get_file_binary_data.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_unicode_get_file_binary_data.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_unicode_get_file_binary_data.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_unicode_get_file_binary_data.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_unicode_get_file_unicode_name.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_unicode_get_file_unicode_name.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_unicode_get_file_unicode_name.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_unicode_get_file_unicode_name.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_big_range_from_file_url.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_big_range_from_file_url.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_big_range_from_file_url.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_big_range_from_file_url.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_file_unicode.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_file_unicode.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_file_unicode.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_file_unicode.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_from_file_url.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_from_file_url.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_from_file_url.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_from_file_url.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_with_md5.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_with_md5.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file.test_update_range_with_md5.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_update_range_with_md5.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_abort_copy_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_abort_copy_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_abort_copy_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_abort_copy_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_abort_copy_file_with_synchronous_copy_fails_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_abort_copy_file_with_synchronous_copy_fails_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_abort_copy_file_with_synchronous_copy_fails_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_abort_copy_file_with_synchronous_copy_fails_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_async_private_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_async_private_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_async_private_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_async_private_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_async_private_file_with_sas_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_async_private_file_with_sas_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_async_private_file_with_sas_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_async_private_file_with_sas_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_with_existing_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_with_existing_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_copy_file_with_existing_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_copy_file_with_existing_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_from_text_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_from_text_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_from_text_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_from_text_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_from_text_with_encoding_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_from_text_with_encoding_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_from_text_with_encoding_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_from_text_with_encoding_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_will_set_all_smb_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_will_set_all_smb_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_will_set_all_smb_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_will_set_all_smb_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_invalid_file_permission_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_invalid_file_permission_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_invalid_file_permission_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_invalid_file_permission_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_md5_small_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_md5_small_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_md5_small_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_md5_small_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_create_file_with_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_create_file_with_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_delete_file_with_existing_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_delete_file_with_existing_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_delete_file_with_existing_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_delete_file_with_existing_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_delete_file_with_non_existing_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_delete_file_with_non_existing_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_delete_file_with_non_existing_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_delete_file_with_non_existing_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_exists_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_exists_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_exists_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_exists_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_not_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_not_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_not_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_not_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_not_exists_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_not_exists_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_not_exists_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_not_exists_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_unicode_data_and_file_attributes_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_unicode_data_and_file_attributes_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_unicode_data_and_file_attributes_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_unicode_data_and_file_attributes_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_unicode_data_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_unicode_data_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_file_unicode_data_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_file_unicode_data_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_metadata_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_metadata_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_metadata_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_metadata_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_with_non_existing_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_with_non_existing_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_with_non_existing_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_with_non_existing_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_get_file_properties_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_get_file_properties_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_2_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_2_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_2_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_2_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_2_from_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_2_from_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_2_from_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_2_from_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_none_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_none_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_none_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_none_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_none_from_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_none_from_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_list_ranges_none_from_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_list_ranges_none_from_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_resize_file_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_resize_file_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_resize_file_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_resize_file_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_metadata_with_upper_case_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_metadata_with_upper_case_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_metadata_with_upper_case_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_metadata_with_upper_case_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_properties_with_file_permission_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_properties_with_file_permission_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_set_file_properties_with_file_permission_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_set_file_properties_with_file_permission_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_unicode_get_file_binary_data_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_unicode_get_file_binary_data_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_unicode_get_file_binary_data_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_unicode_get_file_binary_data_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_unicode_get_file_unicode_name_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_unicode_get_file_unicode_name_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_unicode_get_file_unicode_name_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_unicode_get_file_unicode_name_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_big_range_from_file_url_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_big_range_from_file_url_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_big_range_from_file_url_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_big_range_from_file_url_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_file_unicode_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_file_unicode_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_file_unicode_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_file_unicode_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_from_file_url_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_from_file_url_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_from_file_url_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_from_file_url_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_with_md5_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_with_md5_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_async.test_update_range_with_md5_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_update_range_with_md5_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_append.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_append.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_append.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_custom.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_custom.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_custom.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_default.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client.test_user_agent_default.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client.test_user_agent_default.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_append_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_custom_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_client_async.test_user_agent_default_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_file_service_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_file_service_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_file_service_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_cors.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_cors.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_cors.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_hour_metrics.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_set_minute_metrics.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties.test_too_many_cors_rules.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_file_service_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_cors_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_hour_metrics_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_set_minute_metrics_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_file_service_properties_async.test_too_many_cors_rules_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_exact_get_size.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_exact_get_size.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_exact_get_size.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_exact_get_size.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_no_content.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_no_content.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_no_content.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_no_content.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_non_seekable.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_non_seekable.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_non_seekable.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_non_seekable.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_non_seekable_from_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_non_seekable_from_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_non_seekable_from_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_non_seekable_from_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_properties_server_encryption.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_properties_server_encryption.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_properties_server_encryption.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_properties_server_encryption.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_server_encryption.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_server_encryption.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_server_encryption.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_server_encryption.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_bytes_non_parallel.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_bytes_non_parallel.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_bytes_non_parallel.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_bytes_non_parallel.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_bytes_small.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_bytes_small.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_bytes_small.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_bytes_small.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel_from_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel_from_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel_from_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_non_parallel_from_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_small.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_small.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_small.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_small.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_small_from_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_small_from_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_stream_small_from_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_stream_small_from_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_non_parallel.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_non_parallel.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_non_parallel.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_non_parallel.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_small.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_small.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_small.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_small.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_with_encoding.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_with_encoding.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_with_encoding.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_with_encoding.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_with_encoding_and_progress.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_with_encoding_and_progress.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_get_file_to_text_with_encoding_and_progress.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_get_file_to_text_with_encoding_and_progress.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_bytes_with_zero_byte.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_bytes_with_zero_byte.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_bytes_with_zero_byte.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_bytes_with_zero_byte.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_invalid_range_non_parallel.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_invalid_range_non_parallel.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_invalid_range_non_parallel.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_invalid_range_non_parallel.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_non_parallel.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_non_parallel.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_non_parallel.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_non_parallel.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_small.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_small.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_ranged_get_file_to_path_small.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_ranged_get_file_to_path_small.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_unicode_get_file_binary_data.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_unicode_get_file_binary_data.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_unicode_get_file_binary_data.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_unicode_get_file_binary_data.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_unicode_get_file_unicode_data.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_unicode_get_file_unicode_data.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file.test_unicode_get_file_unicode_data.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file.test_unicode_get_file_unicode_data.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_exact_get_size_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_exact_get_size_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_exact_get_size_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_exact_get_size_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_no_content_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_no_content_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_no_content_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_no_content_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_non_seekable_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_non_seekable_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_non_seekable_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_non_seekable_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_non_seekable_from_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_non_seekable_from_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_non_seekable_from_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_non_seekable_from_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_properties_server_encryption_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_properties_server_encryption_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_properties_server_encryption_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_properties_server_encryption_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_server_encryption_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_server_encryption_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_server_encryption_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_server_encryption_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_bytes_non_parallel_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_bytes_non_parallel_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_bytes_non_parallel_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_bytes_non_parallel_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_bytes_small_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_bytes_small_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_bytes_small_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_bytes_small_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_from_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_from_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_from_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_non_parallel_from_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_small_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_small_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_small_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_small_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_small_from_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_small_from_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_stream_small_from_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_stream_small_from_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_non_parallel_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_non_parallel_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_non_parallel_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_non_parallel_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_small_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_small_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_small_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_small_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_and_progress_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_and_progress_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_and_progress_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_and_progress_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_get_file_to_text_with_encoding_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_bytes_with_zero_byte_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_bytes_with_zero_byte_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_bytes_with_zero_byte_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_bytes_with_zero_byte_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_invalid_range_non_parallel_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_invalid_range_non_parallel_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_invalid_range_non_parallel_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_invalid_range_non_parallel_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_non_parallel_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_non_parallel_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_non_parallel_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_non_parallel_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_small_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_small_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_small_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_ranged_get_file_to_path_small_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_unicode_get_file_binary_data_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_unicode_get_file_binary_data_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_unicode_get_file_binary_data_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_unicode_get_file_binary_data_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_unicode_get_file_unicode_data_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_unicode_get_file_unicode_data_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_get_file_async.test_unicode_get_file_unicode_data_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_get_file_async.test_unicode_get_file_unicode_data_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_close_all_handle.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_close_all_handle.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_close_all_handle.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_close_all_handle.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_close_single_handle.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_close_single_handle.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_close_single_handle.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_close_single_handle.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_directory.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_directory.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_directory.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_directory.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_file.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_file.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_file.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_file.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_share_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_share_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_on_share_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_on_share_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_with_marker.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_with_marker.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_handle.test_list_handles_with_marker.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_handle.test_list_handles_with_marker.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_permission_for_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_permission_for_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_permission_for_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_permission_for_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_fail_on_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_fail_on_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_fail_on_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_fail_on_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_already_existing_share_fail_on_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_already_existing_share_fail_on_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_already_existing_share_fail_on_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_already_existing_share_fail_on_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_quota.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_quota.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_share_with_quota.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_share_with_quota.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_snapshot_with_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_snapshot_with_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_create_snapshot_with_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_create_snapshot_with_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_existing_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_existing_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_existing_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_existing_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_existing_share_fail_not_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_existing_share_fail_not_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_existing_share_fail_not_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_existing_share_fail_not_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_non_existing_share.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_non_existing_share.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_non_existing_share.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_non_existing_share.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_non_existing_share_fail_not_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_non_existing_share_fail_not_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_non_existing_share_fail_not_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_non_existing_share_fail_not_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_snapshots.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_snapshots.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_share_with_snapshots.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_share_with_snapshots.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_delete_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_delete_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_metadata_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_metadata_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_metadata_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_metadata_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_stats.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_stats.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_get_share_stats.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_get_share_stats.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_num_results.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_num_results.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_num_results.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_num_results.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_num_results_and_marker.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_num_results_and_marker.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_num_results_and_marker.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_num_results_and_marker.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_prefix.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_prefix.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_prefix.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_prefix.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_directories_and_files_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_directories_and_files_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_no_options.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_no_options.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_no_options.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_no_options.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_include_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_include_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_include_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_include_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_num_results_and_marker.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_num_results_and_marker.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_num_results_and_marker.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_num_results_and_marker.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_prefix.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_prefix.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_prefix.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_prefix.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_snapshot.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_snapshot.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_list_shares_with_snapshot.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_list_shares_with_snapshot.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_too_many_ids.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_too_many_ids.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_too_many_ids.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_too_many_ids.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_with_empty_signed_identifiers.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_with_empty_signed_identifiers.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_with_empty_signed_identifiers.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_with_empty_signed_identifiers.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_with_signed_identifiers.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_with_signed_identifiers.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_acl_with_signed_identifiers.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_acl_with_signed_identifiers.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_metadata.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_metadata.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_metadata.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_metadata.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_properties.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_properties.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_set_share_properties.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_set_share_properties.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_not_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_not_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_not_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_not_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_snapshot_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_snapshot_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_snapshot_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_snapshot_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_snapshot_not_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_snapshot_not_exists.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_share_snapshot_not_exists.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_share_snapshot_not_exists.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share.test_unicode_create_share_unicode_name.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_unicode_create_share_unicode_name.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share.test_unicode_create_share_unicode_name.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share.test_unicode_create_share_unicode_name.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_permission_for_share_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_permission_for_share_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_permission_for_share_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_permission_for_share_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_fail_on_exist.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_fail_on_exist.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_fail_on_exist.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_fail_on_exist.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_already_existing_share_fail_on_exist_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_already_existing_share_fail_on_exist_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_already_existing_share_fail_on_exist_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_already_existing_share_fail_on_exist_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_quota_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_quota_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_share_with_quota_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_share_with_quota_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_snapshot_with_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_snapshot_with_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_create_snapshot_with_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_create_snapshot_with_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_existing_share_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_existing_share_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_existing_share_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_existing_share_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_existing_share_fail_not_exist_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_existing_share_fail_not_exist_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_existing_share_fail_not_exist_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_existing_share_fail_not_exist_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_fail_not_exist_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_fail_not_exist_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_fail_not_exist_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_non_existing_share_fail_not_exist_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_snapshots_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_snapshots_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_share_with_snapshots_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_share_with_snapshots_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_delete_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_delete_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_metadata_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_metadata_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_metadata_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_metadata_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_stats_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_stats_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_get_share_stats_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_get_share_stats_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_and_marker_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_and_marker_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_and_marker_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_and_marker_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_num_results_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_prefix_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_prefix_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_prefix_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_prefix_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_directories_and_files_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_directories_and_files_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_no_options_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_no_options_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_no_options_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_no_options_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_include_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_include_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_include_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_include_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_num_results_and_marker_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_num_results_and_marker_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_num_results_and_marker_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_num_results_and_marker_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_prefix_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_prefix_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_prefix_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_prefix_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_snapshot_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_snapshot_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_list_shares_with_snapshot_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_list_shares_with_snapshot_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_too_many_ids_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_too_many_ids_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_too_many_ids_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_too_many_ids_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_with_empty_signed_identifiers_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_with_empty_signed_identifiers_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_with_empty_signed_identifiers_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_with_empty_signed_identifiers_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_with_signed_identifiers_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_with_signed_identifiers_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_acl_with_signed_identifiers_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_acl_with_signed_identifiers_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_metadata_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_metadata_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_metadata_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_metadata_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_properties_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_properties_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_set_share_properties_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_set_share_properties_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_not_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_not_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_not_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_not_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_snapshot_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_snapshot_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_snapshot_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_snapshot_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_snapshot_not_exists_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_snapshot_not_exists_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_share_snapshot_not_exists_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_share_snapshot_not_exists_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_unicode_create_share_unicode_name_async.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_unicode_create_share_unicode_name_async.yaml similarity index 100% rename from sdk/storage/azure-storage-file/tests/recordings/test_share_async.test_unicode_create_share_unicode_name_async.yaml rename to sdk/storage/azure-storage-file-share/tests/recordings/test_share_async.test_unicode_create_share_unicode_name_async.yaml diff --git a/sdk/storage/azure-storage-file/tests/test_directory.py b/sdk/storage/azure-storage-file-share/tests/test_directory.py similarity index 99% rename from sdk/storage/azure-storage-file/tests/test_directory.py rename to sdk/storage/azure-storage-file-share/tests/test_directory.py index ae1c7699840e..57da7bfc2892 100644 --- a/sdk/storage/azure-storage-file/tests/test_directory.py +++ b/sdk/storage/azure-storage-file-share/tests/test_directory.py @@ -10,8 +10,8 @@ from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError -from azure.storage.file import ( - FileServiceClient, +from azure.storage.fileshare import ( + ShareServiceClient, StorageErrorCode, ) from filetestcase import ( @@ -31,7 +31,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient(url, credential=credential) + self.fsc = ShareServiceClient(url, credential=credential) self.share_name = self.get_resource_name('utshare') if not self.is_playback(): diff --git a/sdk/storage/azure-storage-file/tests/test_directory_async.py b/sdk/storage/azure-storage-file-share/tests/test_directory_async.py similarity index 99% rename from sdk/storage/azure-storage-file/tests/test_directory_async.py rename to sdk/storage/azure-storage-file-share/tests/test_directory_async.py index 7c8a84d8fb0c..aabfbc814d34 100644 --- a/sdk/storage/azure-storage-file/tests/test_directory_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_directory_async.py @@ -12,8 +12,8 @@ from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from azure.storage.file import StorageErrorCode -from azure.storage.file.aio import FileServiceClient +from azure.storage.fileshare import StorageErrorCode +from azure.storage.fileshare.aio import ShareServiceClient from filetestcase import ( FileTestCase, @@ -42,7 +42,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient(url, credential=credential, transport=AiohttpTestTransport()) + self.fsc = ShareServiceClient(url, credential=credential, transport=AiohttpTestTransport()) self.share_name = self.get_resource_name('utshare') def tearDown(self): diff --git a/sdk/storage/azure-storage-file/tests/test_file.py b/sdk/storage/azure-storage-file-share/tests/test_file.py similarity index 96% rename from sdk/storage/azure-storage-file/tests/test_file.py rename to sdk/storage/azure-storage-file-share/tests/test_file.py index d6a2a767ecbd..37d9118e35a4 100644 --- a/sdk/storage/azure-storage-file/tests/test_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file.py @@ -15,11 +15,11 @@ from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceExistsError -from azure.storage.file import ( +from azure.storage.fileshare import ( generate_account_sas, generate_file_sas, - FileClient, - FileServiceClient, + ShareFileClient, + ShareServiceClient, ContentSettings, FileSasPermissions, AccessPolicy, @@ -54,7 +54,7 @@ def setUp(self): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute - self.fsc = FileServiceClient(url, credential=credential, max_range_size=4 * 1024) + self.fsc = ShareServiceClient(url, credential=credential, max_range_size=4 * 1024) self.share_name = self.get_resource_name('utshare') if not self.is_playback(): self.fsc.create_share(self.share_name) @@ -63,7 +63,7 @@ def setUp(self): remote_url = self.get_remote_file_url() remote_credential = self.get_remote_shared_key_credential() - self.fsc2 = FileServiceClient(remote_url, credential=remote_credential) + self.fsc2 = ShareServiceClient(remote_url, credential=remote_credential) self.remote_share_name = None def tearDown(self): @@ -194,7 +194,7 @@ def test_make_file_url_no_directory(self): def test_make_file_url_with_protocol(self): # Arrange url = self.get_file_url().replace('https', 'http') - fsc = FileServiceClient(url, credential=self.settings.STORAGE_ACCOUNT_KEY) + fsc = ShareServiceClient(url, credential=self.settings.STORAGE_ACCOUNT_KEY) share = fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -209,7 +209,7 @@ def test_make_file_url_with_protocol(self): def test_make_file_url_with_sas(self): # Arrange sas = '?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name="vhds", file_path="vhd_dir/my.vhd", @@ -227,7 +227,7 @@ def test_make_file_url_with_sas(self): def test_create_file(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -247,7 +247,7 @@ def test_create_file_with_metadata(self): # Arrange metadata = {'hello': 'world', 'number': '42'} file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -308,7 +308,7 @@ def test_file_exists(self): def test_file_not_exists(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path="missingdir/" + file_name, @@ -329,7 +329,7 @@ def test_file_exists_with_snapshot(self): file_client.delete_file() # Act - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -349,7 +349,7 @@ def test_file_not_exists_with_snapshot(self): file_client = self._create_file() # Act - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -449,7 +449,7 @@ def test_get_file_properties_with_snapshot(self): # Act file_props = file_client.get_file_properties() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -472,7 +472,7 @@ def test_get_file_metadata_with_snapshot(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -494,7 +494,7 @@ def test_get_file_metadata_with_snapshot(self): def test_get_file_properties_with_non_existing_file(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -551,7 +551,7 @@ def test_delete_file_with_existing_file(self): def test_delete_file_with_non_existing_file(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -719,7 +719,7 @@ def test_update_file_unicode(self): def test_list_ranges_none(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -737,7 +737,7 @@ def test_list_ranges_none(self): def test_list_ranges_2(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -763,7 +763,7 @@ def test_list_ranges_2(self): def test_list_ranges_none_from_snapshot(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -772,7 +772,7 @@ def test_list_ranges_none_from_snapshot(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -792,7 +792,7 @@ def test_list_ranges_none_from_snapshot(self): def test_list_ranges_2_from_snapshot(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -804,7 +804,7 @@ def test_list_ranges_2_from_snapshot(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -828,7 +828,7 @@ def test_list_ranges_2_from_snapshot(self): def test_copy_file_with_existing_file(self): # Arrange source_client = self._create_file() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path='file1copy', @@ -853,7 +853,7 @@ def test_copy_file_async_private_file(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -882,7 +882,7 @@ def test_copy_file_async_private_file_with_sas(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -914,7 +914,7 @@ def test_abort_copy_file(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -935,7 +935,7 @@ def test_abort_copy_file_with_synchronous_copy_fails(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -952,7 +952,7 @@ def test_abort_copy_file_with_synchronous_copy_fails(self): def test_unicode_get_file_unicode_name(self): # Arrange file_name = '啊齄丂狛狜' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -969,7 +969,7 @@ def test_unicode_get_file_unicode_name(self): def test_file_unicode_data(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1005,7 +1005,7 @@ def test_unicode_get_file_binary_data(self): binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1026,7 +1026,7 @@ def test_create_file_from_bytes_with_progress(self): # Arrange file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1058,7 +1058,7 @@ def test_create_file_from_bytes_with_index(self): file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) index = 1024 - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1084,7 +1084,7 @@ def test_create_file_from_bytes_with_index_and_count(self): data = self.get_random_bytes(LARGE_FILE_SIZE) index = 512 count = 1024 - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1110,7 +1110,7 @@ def test_create_file_from_path(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1137,7 +1137,7 @@ def test_create_file_from_path_with_progress(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1175,7 +1175,7 @@ def test_create_file_from_stream(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1203,7 +1203,7 @@ def test_create_file_from_stream_non_seekable(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1229,7 +1229,7 @@ def test_create_file_from_stream_with_progress(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1265,7 +1265,7 @@ def test_create_file_from_stream_truncated(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1290,7 +1290,7 @@ def test_create_file_from_stream_with_progress_truncated(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1323,7 +1323,7 @@ def test_create_file_from_text(self): file_name = self._get_file_reference() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-8') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1342,7 +1342,7 @@ def test_create_file_from_text_with_encoding(self): file_name = self._get_file_reference() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1364,7 +1364,7 @@ def test_create_file_from_text_chunked_upload(self): file_name = self._get_file_reference() data = self.get_random_text_data(LARGE_FILE_SIZE) encoded_data = data.encode('utf-8') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1382,7 +1382,7 @@ def test_create_file_with_md5_small(self): # Arrange file_name = self._get_file_reference() data = self.get_random_bytes(512) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1402,7 +1402,7 @@ def test_create_file_with_md5_large(self): # Arrange file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1433,7 +1433,7 @@ def test_sas_access_file(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1468,7 +1468,7 @@ def test_sas_signed_identifier(self): policy_id='testid') # Act - sas_file = FileClient.from_file_url( + sas_file = ShareFileClient.from_file_url( file_client.url, credential=token) @@ -1494,7 +1494,7 @@ def test_account_sas(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1524,7 +1524,7 @@ def test_shared_read_access_file(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1558,7 +1558,7 @@ def test_shared_read_access_file_with_content_query_params(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1590,7 +1590,7 @@ def test_shared_write_access_file(self): permission=FileSasPermissions(write=True), expiry=datetime.utcnow() + timedelta(hours=1), ) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client_admin.file_name, @@ -1621,7 +1621,7 @@ def test_shared_delete_access_file(self): permission=FileSasPermissions(delete=True), expiry=datetime.utcnow() + timedelta(hours=1), ) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client_admin.file_name, diff --git a/sdk/storage/azure-storage-file/tests/test_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_async.py similarity index 96% rename from sdk/storage/azure-storage-file/tests/test_file_async.py rename to sdk/storage/azure-storage-file-share/tests/test_file_async.py index 0c09fbc9d8ed..f2a6f3ee43d8 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_async.py @@ -16,7 +16,7 @@ import pytest from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceExistsError -from azure.storage.file import ( +from azure.storage.fileshare import ( generate_account_sas, generate_file_sas, NTFSAttributes, @@ -27,9 +27,9 @@ AccountSasPermissions, StorageErrorCode ) -from azure.storage.file.aio import ( - FileClient, - FileServiceClient, +from azure.storage.fileshare.aio import ( + ShareFileClient, + ShareServiceClient, ) from filetestcase import ( FileTestCase, @@ -69,7 +69,7 @@ def setUp(self): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute - self.fsc = FileServiceClient(url, credential=credential, max_range_size=4 * 1024, transport=AiohttpTestTransport()) + self.fsc = ShareServiceClient(url, credential=credential, max_range_size=4 * 1024, transport=AiohttpTestTransport()) loop = asyncio.get_event_loop() loop.run_until_complete(self.fsc.__aenter__()) self.share_name = self.get_resource_name('utshare') @@ -77,7 +77,7 @@ def setUp(self): remote_url = self.get_remote_file_url() remote_credential = self.get_remote_shared_key_credential() - self.fsc2 = FileServiceClient(remote_url, credential=remote_credential, transport=AiohttpTestTransport()) + self.fsc2 = ShareServiceClient(remote_url, credential=remote_credential, transport=AiohttpTestTransport()) self.remote_share_name = None loop = asyncio.get_event_loop() loop.run_until_complete(self.fsc2.__aenter__()) @@ -118,7 +118,7 @@ def _get_file_reference(self): async def _setup_share(self, remote=False): share_name = self.remote_share_name if remote else self.share_name - async with FileServiceClient( + async with ShareServiceClient( self.get_file_url(), credential=self.get_shared_key_credential(), max_range_size=4 * 1024) as fsc: @@ -236,7 +236,7 @@ def test_make_file_url_no_directory_async(self): async def _test_make_file_url_with_protocol(self): # Arrange url = self.get_file_url().replace('https', 'http') - fsc = FileServiceClient(url, credential=self.settings.STORAGE_ACCOUNT_KEY) + fsc = ShareServiceClient(url, credential=self.settings.STORAGE_ACCOUNT_KEY) share = fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -255,7 +255,7 @@ def test_make_file_url_with_protocol(self): async def _test_make_file_url_with_sas(self): # Arrange sas = '?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name="vhds", file_path="vhd_dir/my.vhd", @@ -278,7 +278,7 @@ async def _test_create_file_async(self): # Arrange await self._setup_share() file_name = self._get_file_reference() - async with FileClient( + async with ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -303,7 +303,7 @@ async def _test_create_file_with_metadata_async(self): await self._setup_share() metadata = {'hello': 'world', 'number': '42'} file_name = self._get_file_reference() - async with FileClient( + async with ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -384,7 +384,7 @@ def test_file_exists_async(self): async def _test_file_not_exists_async(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path="missingdir/" + file_name, @@ -409,7 +409,7 @@ async def _test_file_exists_with_snapshot_async(self): await file_client.delete_file() # Act - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -434,7 +434,7 @@ async def _test_file_not_exists_with_snapshot_async(self): file_client = await self._create_file() # Act - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -554,7 +554,7 @@ async def _test_get_file_properties_with_snapshot_async(self): # Act file_props = await file_client.get_file_properties() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -582,7 +582,7 @@ async def _test_get_file_metadata_with_snapshot_async(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -608,7 +608,7 @@ def test_get_file_metadata_with_snapshot_async(self): async def _test_get_file_properties_with_non_existing_file_async(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -682,7 +682,7 @@ def test_delete_file_with_existing_file_async(self): async def _test_delete_file_with_non_existing_file_async(self): # Arrange file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -887,7 +887,7 @@ async def _test_list_ranges_none_async(self): # Arrange file_name = self._get_file_reference() await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -911,7 +911,7 @@ async def _test_list_ranges_2_async(self): # Arrange file_name = self._get_file_reference() await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -943,7 +943,7 @@ async def _test_list_ranges_none_from_snapshot_async(self): # Arrange file_name = self._get_file_reference() await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -952,7 +952,7 @@ async def _test_list_ranges_none_from_snapshot_async(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -978,7 +978,7 @@ async def _test_list_ranges_2_from_snapshot_async(self): # Arrange file_name = self._get_file_reference() await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -991,7 +991,7 @@ async def _test_list_ranges_2_from_snapshot_async(self): share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1020,7 +1020,7 @@ def test_list_ranges_2_from_snapshot_async(self): async def _test_copy_file_with_existing_file_async(self): # Arrange source_client = await self._create_file() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path='file1copy', @@ -1051,7 +1051,7 @@ async def _test_copy_file_async_private_file_async(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -1086,7 +1086,7 @@ async def _test_copy_file_async_private_file_with_sas_async(self): # Act target_file_name = 'targetfile' await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -1125,7 +1125,7 @@ async def _test_abort_copy_file_async(self): # Act target_file_name = 'targetfile' await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -1152,7 +1152,7 @@ async def _test_abort_copy_file_with_synchronous_copy_fails_async(self): # Act target_file_name = 'targetfile' - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=target_file_name, @@ -1175,7 +1175,7 @@ async def _test_unicode_get_file_unicode_name_async(self): # Arrange file_name = '啊齄丂狛狜' await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1199,7 +1199,7 @@ async def _test_file_unicode_data_async(self): # Arrange file_name = self._get_file_reference() await self._setup_share() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1246,7 +1246,7 @@ async def _test_unicode_get_file_binary_data_async(self): await self._setup_share() file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1274,7 +1274,7 @@ async def _test_create_file_from_bytes_with_progress_async(self): await self._setup_share() file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1309,7 +1309,7 @@ async def _test_create_file_from_bytes_with_index_async(self): await self._setup_share() data = self.get_random_bytes(LARGE_FILE_SIZE) index = 1024 - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1341,7 +1341,7 @@ async def _test_create_file_from_bytes_with_index_and_count_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) index = 512 count = 1024 - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1373,7 +1373,7 @@ async def _test_create_file_from_path_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1406,7 +1406,7 @@ async def _test_create_file_from_path_with_progress_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1450,7 +1450,7 @@ async def _test_create_file_from_stream_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1484,7 +1484,7 @@ async def _test_create_file_from_stream_non_seekable_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1516,7 +1516,7 @@ async def _test_create_file_from_stream_with_progress_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1558,7 +1558,7 @@ async def _test_create_file_from_stream_truncated_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1589,7 +1589,7 @@ async def _test_create_file_from_stream_with_progress_truncated_async(self): data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1627,7 +1627,7 @@ async def _test_create_file_from_text_async(self): await self._setup_share() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-8') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1651,7 +1651,7 @@ async def _test_create_file_from_text_with_encoding_async(self): await self._setup_share() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1679,7 +1679,7 @@ async def _test_create_file_from_text_chunked_upload_async(self): await self._setup_share() data = self.get_random_text_data(LARGE_FILE_SIZE) encoded_data = data.encode('utf-8') - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1702,7 +1702,7 @@ async def _test_create_file_with_md5_small_async(self): file_name = self._get_file_reference() await self._setup_share() data = self.get_random_bytes(512) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1728,7 +1728,7 @@ async def _test_create_file_with_md5_large_async(self): file_name = self._get_file_reference() await self._setup_share() data = self.get_random_bytes(LARGE_FILE_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_name, @@ -1763,7 +1763,7 @@ async def _test_sas_access_file_async(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1803,7 +1803,7 @@ async def _test_sas_signed_identifier_async(self): policy_id='testid') # Act - sas_file = FileClient.from_file_url( + sas_file = ShareFileClient.from_file_url( file_client.url, credential=token) @@ -1834,7 +1834,7 @@ async def _test_account_sas_async(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1868,7 +1868,7 @@ async def _test_shared_read_access_file_async(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1906,7 +1906,7 @@ async def _test_shared_read_access_file_with_content_query_params_async(self): ) # Act - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client.file_name, @@ -1942,7 +1942,7 @@ async def _test_shared_write_access_file_async(self): permission=FileSasPermissions(write=True), expiry=datetime.utcnow() + timedelta(hours=1), ) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client_admin.file_name, @@ -1978,7 +1978,7 @@ async def _test_shared_delete_access_file_async(self): permission=FileSasPermissions(delete=True), expiry=datetime.utcnow() + timedelta(hours=1), ) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=file_client_admin.file_name, diff --git a/sdk/storage/azure-storage-file/tests/test_file_client.py b/sdk/storage/azure-storage-file-share/tests/test_file_client.py similarity index 92% rename from sdk/storage/azure-storage-file/tests/test_file_client.py rename to sdk/storage/azure-storage-file-share/tests/test_file_client.py index bf2d9039326f..71d5f9812674 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_client.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_client.py @@ -8,12 +8,12 @@ import pytest from azure.core.exceptions import AzureError -from azure.storage.file import ( +from azure.storage.fileshare import ( VERSION, - FileServiceClient, + ShareServiceClient, ShareClient, - DirectoryClient, - FileClient) + ShareDirectoryClient, + ShareFileClient) from filetestcase import ( FileTestCase, @@ -24,10 +24,10 @@ # ------------------------------------------------------------------------------ SERVICES = { - FileServiceClient: 'file', + ShareServiceClient: 'file', ShareClient: 'file', - DirectoryClient: 'file', - FileClient: 'file', + ShareDirectoryClient: 'file', + ShareFileClient: 'file', } _CONNECTION_ENDPOINTS = {'file': 'FileEndpoint'} @@ -261,7 +261,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.credential.account_key, self.account_key) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') - service = FileServiceClient(account_url=custom_account_url) + service = ShareServiceClient(account_url=custom_account_url) self.assertEqual(service.account_name, None) self.assertEqual(service.credential, None) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') @@ -275,7 +275,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?sharesnapshot=snap&')) - service = DirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="bar/baz", snapshot="snap") + service = ShareDirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="bar/baz", snapshot="snap") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "bar/baz") @@ -284,7 +284,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/bar%2Fbaz?sharesnapshot=snap&')) - service = DirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="") + service = ShareDirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "") @@ -293,7 +293,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?')) - service = FileClient(account_url=custom_account_url, share_name="foo", file_path="bar/baz/file", snapshot="snap") + service = ShareFileClient(account_url=custom_account_url, share_name="foo", file_path="bar/baz/file", snapshot="snap") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "bar/baz") @@ -304,7 +304,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/bar/baz/file?sharesnapshot=snap&')) - service = FileClient(account_url=custom_account_url, share_name="foo", file_path="file") + service = ShareFileClient(account_url=custom_account_url, share_name="foo", file_path="file") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "") @@ -323,7 +323,7 @@ def test_client_request_id_echo(self): # Arrange request_id_header_name = 'x-ms-client-request-id' - service = FileServiceClient(self.get_file_url(), credential=self.account_key) + service = ShareServiceClient(self.get_file_url(), credential=self.account_key) # Act make the client request ID slightly different def callback(response): @@ -344,13 +344,13 @@ def callback(response): @record def test_user_agent_default(self): - service = FileServiceClient(self.get_file_url(), credential=self.account_key) + service = ShareServiceClient(self.get_file_url(), credential=self.account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/{} Python/{} ({})".format( + "azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -360,14 +360,14 @@ def callback(response): @record def test_user_agent_custom(self): custom_app = "TestApp/v1.0" - service = FileServiceClient( + service = ShareServiceClient( self.get_file_url(), credential=self.account_key, user_agent=custom_app) def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-file/{} Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -378,7 +378,7 @@ def callback2(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-file/{} Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -387,13 +387,13 @@ def callback2(response): @record def test_user_agent_append(self): - service = FileServiceClient(self.get_file_url(), credential=self.account_key) + service = ShareServiceClient(self.get_file_url(), credential=self.account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/{} Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-file-share/{} Python/{} ({}) customer_user_agent".format( VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-file/tests/test_file_client_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py similarity index 92% rename from sdk/storage/azure-storage-file/tests/test_file_client_async.py rename to sdk/storage/azure-storage-file-share/tests/test_file_client_async.py index 36f24e0a47d2..9331efd665e4 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py @@ -8,12 +8,12 @@ import asyncio from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from azure.storage.file import VERSION -from azure.storage.file.aio import ( - FileServiceClient, +from azure.storage.fileshare import VERSION +from azure.storage.fileshare.aio import ( + ShareServiceClient, ShareClient, - DirectoryClient, - FileClient) + ShareDirectoryClient, + ShareFileClient) from filetestcase import ( TestMode, @@ -24,10 +24,10 @@ # ------------------------------------------------------------------------------ SERVICES = { - FileServiceClient: 'file', + ShareServiceClient: 'file', ShareClient: 'file', - DirectoryClient: 'file', - FileClient: 'file', + ShareDirectoryClient: 'file', + ShareFileClient: 'file', } _CONNECTION_ENDPOINTS = {'file': 'FileEndpoint'} @@ -284,7 +284,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.credential.account_key, self.account_key) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') - service = FileServiceClient(account_url=custom_account_url) + service = ShareServiceClient(account_url=custom_account_url) self.assertEqual(service.account_name, None) self.assertEqual(service.credential, None) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') @@ -298,7 +298,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?sharesnapshot=snap&')) - service = DirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="bar/baz", snapshot="snap") + service = ShareDirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="bar/baz", snapshot="snap") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "bar/baz") @@ -307,7 +307,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/bar%2Fbaz?sharesnapshot=snap&')) - service = DirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="") + service = ShareDirectoryClient(account_url=custom_account_url, share_name='foo', directory_path="") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "") @@ -316,7 +316,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?')) - service = FileClient(account_url=custom_account_url, share_name="foo", file_path="bar/baz/file", snapshot="snap") + service = ShareFileClient(account_url=custom_account_url, share_name="foo", file_path="bar/baz/file", snapshot="snap") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "bar/baz") @@ -327,7 +327,7 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/bar/baz/file?sharesnapshot=snap&')) - service = FileClient(account_url=custom_account_url, share_name="foo", file_path="file") + service = ShareFileClient(account_url=custom_account_url, share_name="foo", file_path="file") self.assertEqual(service.account_name, None) self.assertEqual(service.share_name, "foo") self.assertEqual(service.directory_path, "") @@ -339,13 +339,13 @@ def test_create_service_with_custom_account_endpoint_path(self): self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/file?')) async def _test_user_agent_default_async(self): - service = FileServiceClient(self.get_file_url(), credential=self.account_key, transport=AiohttpTestTransport()) + service = ShareServiceClient(self.get_file_url(), credential=self.account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/{} Python/{} ({})".format( + "azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -359,14 +359,14 @@ def test_user_agent_default_async(self): async def _test_user_agent_custom_async(self): custom_app = "TestApp/v1.0" - service = FileServiceClient( + service = ShareServiceClient( self.get_file_url(), credential=self.account_key, user_agent=custom_app, transport=AiohttpTestTransport()) def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v1.0 azsdk-python-storage-file/{} Python/{} ({})".format( + "TestApp/v1.0 azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -377,7 +377,7 @@ def callback2(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "TestApp/v2.0 azsdk-python-storage-file/{} Python/{} ({})".format( + "TestApp/v2.0 azsdk-python-storage-file-share/{} Python/{} ({})".format( VERSION, platform.python_version(), platform.platform())) @@ -390,13 +390,13 @@ def test_user_agent_custom_async(self): loop.run_until_complete(self._test_user_agent_custom_async()) async def _test_user_agent_append_async(self): - service = FileServiceClient(self.get_file_url(), credential=self.account_key, transport=AiohttpTestTransport()) + service = ShareServiceClient(self.get_file_url(), credential=self.account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) self.assertEqual( response.http_request.headers['User-Agent'], - "azsdk-python-storage-file/{} Python/{} ({}) customer_user_agent".format( + "azsdk-python-storage-file-share/{} Python/{} ({}) customer_user_agent".format( VERSION, platform.python_version(), platform.platform())) diff --git a/sdk/storage/azure-storage-file/tests/test_file_service_properties.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py similarity index 97% rename from sdk/storage/azure-storage-file/tests/test_file_service_properties.py rename to sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py index 07647717f6f3..431c2216aaee 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_service_properties.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py @@ -9,8 +9,8 @@ from azure.core.exceptions import HttpResponseError -from azure.storage.file import ( - FileServiceClient, +from azure.storage.fileshare import ( + ShareServiceClient, Metrics, CorsRule, RetentionPolicy, @@ -32,7 +32,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient(url, credential=credential) + self.fsc = ShareServiceClient(url, credential=credential) # --Helpers----------------------------------------------------------------- def _assert_metrics_equal(self, metrics1, metrics2): diff --git a/sdk/storage/azure-storage-file/tests/test_file_service_properties_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py similarity index 97% rename from sdk/storage/azure-storage-file/tests/test_file_service_properties_async.py rename to sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py index 0d90e9190329..e44d9d6793da 100644 --- a/sdk/storage/azure-storage-file/tests/test_file_service_properties_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py @@ -11,12 +11,12 @@ from azure.core.exceptions import HttpResponseError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from azure.storage.file import ( +from azure.storage.fileshare import ( Metrics, CorsRule, RetentionPolicy, ) -from azure.storage.file.aio import FileServiceClient +from azure.storage.fileshare.aio import ShareServiceClient from filetestcase import ( FileTestCase, @@ -44,7 +44,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient(url, credential=credential, transport=AiohttpTestTransport()) + self.fsc = ShareServiceClient(url, credential=credential, transport=AiohttpTestTransport()) # --Helpers----------------------------------------------------------------- def _assert_metrics_equal(self, metrics1, metrics2): diff --git a/sdk/storage/azure-storage-file/tests/test_get_file.py b/sdk/storage/azure-storage-file-share/tests/test_get_file.py similarity index 95% rename from sdk/storage/azure-storage-file/tests/test_get_file.py rename to sdk/storage/azure-storage-file-share/tests/test_get_file.py index 3884cd2cf144..556e23baa75d 100644 --- a/sdk/storage/azure-storage-file/tests/test_get_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_get_file.py @@ -12,9 +12,9 @@ import pytest from azure.core.exceptions import HttpResponseError -from azure.storage.file import ( - FileClient, - FileServiceClient, +from azure.storage.fileshare import ( + ShareFileClient, + ShareServiceClient, FileProperties ) from filetestcase import ( @@ -43,7 +43,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient( + self.fsc = ShareServiceClient( url, credential=credential, max_single_get_size=self.MAX_SINGLE_GET_SIZE, max_chunk_get_size=self.MAX_CHUNK_GET_SIZE) @@ -60,7 +60,7 @@ def setUp(self): if not self.is_playback(): byte_file = self.directory_name + '/' + self.byte_file - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=byte_file, @@ -108,7 +108,7 @@ def test_unicode_get_file_unicode_data(self): # Arrange file_data = u'hello world啊齄丂狛狜'.encode('utf-8') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -130,7 +130,7 @@ def test_unicode_get_file_binary_data(self): binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -150,7 +150,7 @@ def test_get_file_no_content(self): # Arrange file_data = b'' file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -172,7 +172,7 @@ def test_get_file_to_bytes(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -192,7 +192,7 @@ def test_get_file_to_bytes_with_progress(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -221,7 +221,7 @@ def callback(response): @record def test_get_file_to_bytes_non_parallel(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -252,7 +252,7 @@ def test_get_file_to_bytes_small(self): # Arrange file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -285,7 +285,7 @@ def test_get_file_with_iter(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -308,7 +308,7 @@ def test_get_file_to_stream(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -332,7 +332,7 @@ def test_get_file_to_stream_with_progress(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -365,7 +365,7 @@ def callback(response): @record def test_get_file_to_stream_non_parallel(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -400,7 +400,7 @@ def test_get_file_to_stream_small(self): # Arrange file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -440,14 +440,14 @@ def test_get_file_to_stream_from_snapshot(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -475,14 +475,14 @@ def test_get_file_to_stream_with_progress_from_snapshot(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -519,14 +519,14 @@ def test_get_file_to_stream_non_parallel_from_snapshot(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -562,7 +562,7 @@ def test_get_file_to_stream_small_from_snapshot(self): # Arrange file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -574,7 +574,7 @@ def test_get_file_to_stream_small_from_snapshot(self): share_snapshot = share_client.create_snapshot() file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -611,7 +611,7 @@ def test_ranged_get_file_to_path(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -636,7 +636,7 @@ def test_ranged_get_file_to_path_with_single_byte(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -661,7 +661,7 @@ def test_ranged_get_file_to_bytes_with_zero_byte(self): # Arrange file_data = b'' file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -684,7 +684,7 @@ def test_ranged_get_file_to_path_with_progress(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -724,7 +724,7 @@ def callback(response): @record def test_ranged_get_file_to_path_small(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -745,7 +745,7 @@ def test_ranged_get_file_to_path_small(self): @record def test_ranged_get_file_to_path_non_parallel(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -773,7 +773,7 @@ def test_ranged_get_file_to_path_invalid_range_parallel(self): file_size = self.MAX_SINGLE_GET_SIZE + 1 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -802,7 +802,7 @@ def test_ranged_get_file_to_path_invalid_range_non_parallel(self): file_size = 1024 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -832,7 +832,7 @@ def test_get_file_to_text(self): # Arrange text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -855,7 +855,7 @@ def test_get_file_to_text_with_progress(self): # Arrange text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -888,7 +888,7 @@ def test_get_file_to_text_non_parallel(self): # Arrange text_file = self._get_file_reference() text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -921,7 +921,7 @@ def test_get_file_to_text_small(self): # Arrange file_data = self.get_random_text_data(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -954,7 +954,7 @@ def test_get_file_to_text_with_encoding(self): text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -975,7 +975,7 @@ def test_get_file_to_text_with_encoding_and_progress(self): text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1005,7 +1005,7 @@ def callback(response): @record def test_get_file_non_seekable(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1030,7 +1030,7 @@ def test_get_file_non_seekable_parallel(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1053,14 +1053,14 @@ def test_get_file_non_seekable_from_snapshot(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1089,14 +1089,14 @@ def test_get_file_non_seekable_parallel_from_snapshot(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1117,7 +1117,7 @@ def test_get_file_exact_get_size(self): # Arrange file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1152,7 +1152,7 @@ def test_get_file_exact_chunk_size(self): # Arrange file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE + self.MAX_CHUNK_GET_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1185,7 +1185,7 @@ def test_get_file_with_md5(self): return # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1204,7 +1204,7 @@ def test_get_file_range_with_md5(self): if TestMode.need_recording_file(self.test_mode): return - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1232,7 +1232,7 @@ def test_get_file_range_with_md5(self): def test_get_file_server_encryption(self): #Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1253,7 +1253,7 @@ def test_get_file_server_encryption(self): def test_get_file_properties_server_encryption(self): # Arrange - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, diff --git a/sdk/storage/azure-storage-file/tests/test_get_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py similarity index 96% rename from sdk/storage/azure-storage-file/tests/test_get_file_async.py rename to sdk/storage/azure-storage-file-share/tests/test_get_file_async.py index aa7c8e3c28f3..7be1bb3ba777 100644 --- a/sdk/storage/azure-storage-file/tests/test_get_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py @@ -14,10 +14,10 @@ from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy from azure.core.exceptions import HttpResponseError -from azure.storage.file import FileProperties -from azure.storage.file.aio import ( - FileClient, - FileServiceClient, +from azure.storage.fileshare import FileProperties +from azure.storage.fileshare.aio import ( + ShareFileClient, + ShareServiceClient, ) from filetestcase import ( FileTestCase, @@ -55,7 +55,7 @@ def setUp(self): url = self.get_file_url() credential = self.get_shared_key_credential() - self.fsc = FileServiceClient( + self.fsc = ShareServiceClient( url, credential=credential, max_single_get_size=self.MAX_SINGLE_GET_SIZE, max_chunk_get_size=self.MAX_CHUNK_GET_SIZE, @@ -96,7 +96,7 @@ async def _setup(self): except: pass byte_file = self.directory_name + '/' + self.byte_file - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=byte_file, @@ -127,7 +127,7 @@ async def _test_unicode_get_file_unicode_data_async(self): await self._setup() file_data = u'hello world啊齄丂狛狜'.encode('utf-8') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -155,7 +155,7 @@ async def _test_unicode_get_file_binary_data_async(self): binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -181,7 +181,7 @@ async def _test_get_file_no_content_async(self): await self._setup() file_data = b'' file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -211,7 +211,7 @@ async def _test_get_file_to_bytes_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -238,7 +238,7 @@ async def _test_get_file_to_bytes_with_progress_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -273,7 +273,7 @@ def test_get_file_to_bytes_with_progress_async(self): async def _test_get_file_to_bytes_non_parallel_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -310,7 +310,7 @@ async def _test_get_file_to_bytes_small_async(self): await self._setup() file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -350,7 +350,7 @@ async def _test_get_file_to_stream_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -382,7 +382,7 @@ async def _test_get_file_with_iter_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -412,7 +412,7 @@ async def _test_get_file_to_stream_with_progress_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -451,7 +451,7 @@ def test_get_file_to_stream_with_progress_async(self): async def _test_get_file_to_stream_non_parallel_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -492,7 +492,7 @@ async def _test_get_file_to_stream_small_async(self): await self._setup() file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -539,14 +539,14 @@ async def _test_get_file_to_stream_from_snapshot_async(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -581,14 +581,14 @@ async def _test_get_file_to_stream_with_progress_from_snapshot_async(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -631,14 +631,14 @@ async def _test_get_file_to_stream_non_parallel_from_snapshot_async(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -680,7 +680,7 @@ async def _test_get_file_to_stream_small_from_snapshot_async(self): await self._setup() file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -692,7 +692,7 @@ async def _test_get_file_to_stream_small_from_snapshot_async(self): share_snapshot = await share_client.create_snapshot() await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -736,7 +736,7 @@ async def _test_ranged_get_file_to_path_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -769,7 +769,7 @@ async def _test_ranged_get_file_to_path_with_single_byte_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -800,7 +800,7 @@ async def _test_ranged_get_file_to_bytes_with_zero_byte_async(self): await self._setup() file_data = b'' file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -832,7 +832,7 @@ async def _test_ranged_get_file_to_path_with_progress_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -877,7 +877,7 @@ def test_ranged_get_file_to_path_with_progress_async(self): async def _test_ranged_get_file_to_path_small_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -904,7 +904,7 @@ def test_ranged_get_file_to_path_small_async(self): async def _test_ranged_get_file_to_path_non_parallel_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -938,7 +938,7 @@ async def _test_ranged_get_file_to_path_invalid_range_parallel_async(self): file_size = self.MAX_SINGLE_GET_SIZE + 1 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -971,7 +971,7 @@ async def _test_ranged_get_file_to_path_invalid_range_non_parallel_async(self): file_size = 1024 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1007,7 +1007,7 @@ async def _test_get_file_to_text_async(self): await self._setup() text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -1037,7 +1037,7 @@ async def _test_get_file_to_text_with_progress_async(self): await self._setup() text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -1076,7 +1076,7 @@ async def _test_get_file_to_text_non_parallel_async(self): await self._setup() text_file = self._get_file_reference() text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, @@ -1115,7 +1115,7 @@ async def _test_get_file_to_text_small_async(self): await self._setup() file_data = self.get_random_text_data(1024) file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1154,7 +1154,7 @@ async def _test_get_file_to_text_with_encoding_async(self): text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1181,7 +1181,7 @@ async def _test_get_file_to_text_with_encoding_and_progress_async(self): text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1217,7 +1217,7 @@ def test_get_file_to_text_with_encoding_and_progress_async(self): async def _test_get_file_non_seekable_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1249,7 +1249,7 @@ async def _test_get_file_non_seekable_parallel_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1278,14 +1278,14 @@ async def _test_get_file_non_seekable_from_snapshot_async(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1321,14 +1321,14 @@ async def _test_get_file_non_seekable_parallel_from_snapshot_async(self): # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=self.settings.STORAGE_ACCOUNT_KEY) await file_client.delete_file() - snapshot_client = FileClient( + snapshot_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1355,7 +1355,7 @@ async def _test_get_file_exact_get_size_async(self): await self._setup() file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1397,7 +1397,7 @@ async def _test_get_file_exact_chunk_size_async(self): await self._setup() file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE + self.MAX_CHUNK_GET_SIZE) - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, @@ -1437,7 +1437,7 @@ async def _test_get_file_with_md5_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1463,7 +1463,7 @@ async def _test_get_file_range_with_md5_async(self): return await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1496,7 +1496,7 @@ async def _test_get_file_server_encryption_async(self): #Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, @@ -1522,7 +1522,7 @@ async def _test_get_file_properties_server_encryption_async(self): # Arrange await self._setup() - file_client = FileClient( + file_client = ShareFileClient( self.get_file_url(), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, diff --git a/sdk/storage/azure-storage-file/tests/test_handle.py b/sdk/storage/azure-storage-file-share/tests/test_handle.py similarity index 97% rename from sdk/storage/azure-storage-file/tests/test_handle.py rename to sdk/storage/azure-storage-file-share/tests/test_handle.py index ab9d29f7524d..75347c73311f 100644 --- a/sdk/storage/azure-storage-file/tests/test_handle.py +++ b/sdk/storage/azure-storage-file-share/tests/test_handle.py @@ -13,10 +13,10 @@ ResourceNotFoundError, ResourceExistsError) -from azure.storage.file import ( - FileServiceClient, - DirectoryClient, - FileClient, +from azure.storage.fileshare import ( + ShareServiceClient, + ShareDirectoryClient, + ShareFileClient, ShareClient ) from filetestcase import ( @@ -37,7 +37,7 @@ def setUp(self): super(StorageHandleTest, self).setUp() file_url = self.get_file_url() credentials = self.get_shared_key_credential() - self.fsc = FileServiceClient(account_url=file_url, credential=credentials) + self.fsc = ShareServiceClient(account_url=file_url, credential=credentials) self.test_shares = [] def tearDown(self): diff --git a/sdk/storage/azure-storage-file/tests/test_share.py b/sdk/storage/azure-storage-file-share/tests/test_share.py similarity index 98% rename from sdk/storage/azure-storage-file/tests/test_share.py rename to sdk/storage/azure-storage-file-share/tests/test_share.py index 2e734e718c19..0a2bea5a4a8d 100644 --- a/sdk/storage/azure-storage-file/tests/test_share.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share.py @@ -16,16 +16,16 @@ ResourceNotFoundError, ResourceExistsError) -from azure.storage.file import ( +from azure.storage.fileshare import ( AccessPolicy, ShareSasPermissions, - FileServiceClient, - DirectoryClient, - FileClient, + ShareServiceClient, + ShareDirectoryClient, + ShareFileClient, ShareClient, generate_share_sas) -from azure.storage.file._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType +from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType from filetestcase import ( FileTestCase, TestMode, @@ -45,7 +45,7 @@ def setUp(self): file_url = self.get_file_url() credentials = self.get_shared_key_credential() - self.fsc = FileServiceClient(account_url=file_url, credential=credentials) + self.fsc = ShareServiceClient(account_url=file_url, credential=credentials) self.test_shares = [] def tearDown(self): @@ -737,7 +737,7 @@ def test_shared_access_share(self): expiry=datetime.utcnow() + timedelta(hours=1), permission=ShareSasPermissions(read=True), ) - sas_client = FileClient( + sas_client = ShareFileClient( self.get_file_url(), share_name=share.share_name, file_path=dir_name + '/' + file_name, @@ -779,7 +779,7 @@ def test_transport_closed_only_once(self): credential = self.get_shared_key_credential() prefix = TEST_SHARE_PREFIX share_name = self.get_resource_name(prefix) - with FileServiceClient(url, credential=credential, transport=transport) as fsc: + with ShareServiceClient(url, credential=credential, transport=transport) as fsc: fsc.get_service_properties() assert transport.session is not None with fsc.get_share_client(share_name) as fc: diff --git a/sdk/storage/azure-storage-file/tests/test_share_async.py b/sdk/storage/azure-storage-file-share/tests/test_share_async.py similarity index 98% rename from sdk/storage/azure-storage-file/tests/test_share_async.py rename to sdk/storage/azure-storage-file-share/tests/test_share_async.py index c7ed5f86a71b..5ae151ea2744 100644 --- a/sdk/storage/azure-storage-file/tests/test_share_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share_async.py @@ -18,18 +18,18 @@ ResourceNotFoundError, ResourceExistsError) -from azure.storage.file import ( +from azure.storage.fileshare import ( AccessPolicy, ShareSasPermissions, generate_share_sas, ) -from azure.storage.file.aio import ( - FileServiceClient, - DirectoryClient, - FileClient, +from azure.storage.fileshare.aio import ( + ShareServiceClient, + ShareDirectoryClient, + ShareFileClient, ShareClient ) -from azure.storage.file._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType +from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType from filetestcase import ( FileTestCase, TestMode, @@ -61,7 +61,7 @@ def setUp(self): file_url = self.get_file_url() credentials = self.get_shared_key_credential() - self.fsc = FileServiceClient(account_url=file_url, credential=credentials, transport=AiohttpTestTransport()) + self.fsc = ShareServiceClient(account_url=file_url, credential=credentials, transport=AiohttpTestTransport()) loop = asyncio.get_event_loop() loop.run_until_complete(self.fsc.__aenter__()) self.test_shares = [] @@ -883,7 +883,7 @@ async def _test_shared_access_share_async(self): expiry=datetime.utcnow() + timedelta(hours=1), permission=ShareSasPermissions(read=True), ) - sas_client = FileClient( + sas_client = ShareFileClient( self.get_file_url(), share_name=share.share_name, file_path=dir_name + '/' + file_name, @@ -931,7 +931,7 @@ async def _test_transport_closed_only_once_async(self): credential = self.get_shared_key_credential() prefix = TEST_SHARE_PREFIX share_name = self.get_resource_name(prefix) - async with FileServiceClient(url, credential=credential, transport=transport) as fsc: + async with ShareServiceClient(url, credential=credential, transport=transport) as fsc: await fsc.get_service_properties() assert transport.session is not None async with fsc.get_share_client(share_name) as fc: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py index 5f4a800f22e0..0ab5beffb4b1 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_client.py @@ -114,6 +114,8 @@ def from_queue_url(cls, queue_url, credential=None, **kwargs): The credentials with which to authenticate. This is optional if the account URL already has a SAS token. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. + :returns: A queue client. + :rtype: ~azure.storage.queue.QueueClient """ try: if not queue_url.lower().startswith('http'): @@ -158,6 +160,8 @@ def from_connection_string( account URL already has a SAS token, or the connection string already has shared access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. + :returns: A queue client. + :rtype: ~azure.storage.queue.QueueClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_service_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_service_client.py index 1d2752de948c..1fcb17a37989 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_service_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_queue_service_client.py @@ -121,6 +121,8 @@ def from_connection_string( account URL already has a SAS token, or the connection string already has shared access key values. The value can be a SAS token string, an account shared access key, or an instance of a TokenCredentials class from azure.identity. + :returns: A Queue service client. + :rtype: ~azure.storage.queue.QueueClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/base_client.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/base_client.py index cef1079db4b8..9ad754b92b14 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/base_client.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/base_client.py @@ -78,9 +78,10 @@ def __init__( self._hosts = kwargs.get("_hosts") self.scheme = parsed_url.scheme - if service not in ["blob", "queue", "file"]: + if service not in ["blob", "queue", "file-share"]: raise ValueError("Invalid service: {}".format(service)) - account = parsed_url.netloc.split(".{}.core.".format(service)) + service_name = service.split('-')[0] + account = parsed_url.netloc.split(".{}.core.".format(service_name)) self.account_name = account[0] if len(account) > 1 else None secondary_hostname = None @@ -89,7 +90,8 @@ def __init__( raise ValueError("Token credential is only supported with HTTPS.") if hasattr(self.credential, "account_name"): self.account_name = self.credential.account_name - secondary_hostname = "{}-secondary.{}.{}".format(self.credential.account_name, service, SERVICE_HOST_BASE) + secondary_hostname = "{}-secondary.{}.{}".format( + self.credential.account_name, service_name, SERVICE_HOST_BASE) if not self._hosts: if len(account) > 1: diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index cc67bf799811..87f2f00945ab 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py @@ -348,7 +348,6 @@ def from_string(cls, permission): parsed._str = permission # pylint: disable = protected-access return parsed - class Services(object): """Specifies the services accessible with the account SAS. @@ -356,17 +355,17 @@ class Services(object): Access for the `~azure.storage.blob.BlobServiceClient` :param bool queue: Access for the `~azure.storage.queue.QueueServiceClient` - :param bool file: - Access for the `~azure.storage.file.FileServiceClient` + :param bool fileshare: + Access for the `~azure.storage.fileshare.ShareServiceClient` """ - def __init__(self, blob=False, queue=False, file=False): + def __init__(self, blob=False, queue=False, fileshare=False): self.blob = blob self.queue = queue - self.file = file + self.fileshare = fileshare self._str = (('b' if self.blob else '') + ('q' if self.queue else '') + - ('f' if self.file else '')) + ('f' if self.fileshare else '')) def __str__(self): return self._str diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index b722c3c71e67..0fbcd021b4a4 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -44,8 +44,8 @@ stages: Artifacts: - name: azure_storage_blob safeName: azurestorageblob - - name: azure_storage_file - safeName: azurestoragefile + - name: azure_storage_file_share + safeName: azurestoragefileshare - name: azure_storage_queue safeName: azurestoragequeue - name: azure_mgmt_storage diff --git a/shared_requirements.txt b/shared_requirements.txt index df0780f0ac47..82a776b3cd78 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -106,7 +106,7 @@ six>=1.6 #override azure-eventhub azure-core<2.0.0,>=1.0.0b4 #override azure-storage-blob msrest>=0.6.10 #override azure-storage-queue msrest>=0.6.10 -#override azure-storage-file msrest>=0.6.10 +#override azure-storage-file-share msrest>=0.6.10 opencensus>=0.6.0 opencensus-ext-threading opencensus-ext-azure>=0.3.1