diff --git a/doc/sphinx/package_service_mapping.json b/doc/sphinx/package_service_mapping.json index aeb2f2528ef6..92705bf44180 100644 --- a/doc/sphinx/package_service_mapping.json +++ b/doc/sphinx/package_service_mapping.json @@ -855,6 +855,11 @@ "service_name": "Storage", "manually_generated": true }, + "azure-storage-file-datalake": { + "category": "Client", + "service_name": "Storage", + "manually_generated": true + }, "azure-storage-queue": { "category": "Client", "service_name": "Storage", diff --git a/eng/tox/import_all.py b/eng/tox/import_all.py index 4a02bb6de525..78a789f938e0 100644 --- a/eng/tox/import_all.py +++ b/eng/tox/import_all.py @@ -25,6 +25,7 @@ "azure.appconfiguration", # Github issue 7879. revisit and close after azure-core POST b4 is released. "azure.storage.blob", # Github issue 7879. "azure.storage.fileshare", # Github issue 7879. + "azure.storage.filedatalake", # Github issue 7879. "azure.storage.queue", # Github issue 7879. "azure", "azure.mgmt", diff --git a/packages.md b/packages.md index 906c923e8b82..839ee4a3d6ad 100644 --- a/packages.md +++ b/packages.md @@ -139,3 +139,4 @@ | [`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-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 ) | +| [`azure-storage-file-datalake`]( sdk/storage/azure-storage-file-datalake/setup.py )| [Readme](sdk/storage/azure-storage-file-datalake/README.md) | N/A | [PyPI]( https://pypi.org/project/azure-storage-file-datalake ) | diff --git a/sdk/storage/azure-storage-file-datalake/HISTORY.md b/sdk/storage/azure-storage-file-datalake/HISTORY.md new file mode 100644 index 000000000000..a64b4089c090 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/HISTORY.md @@ -0,0 +1,15 @@ +# Change Log azure-storage-file-datalake + +## Version 12.0.0b5 (2019-11-06) +- Initial Release. Please see the README for information on the new design. +- Support for Azure Data Lake Storage REST APIs. +- Support for DataLakeServiceClient: create file system, delete file system, get file systems, and get user delegation key +- Support for DataLakeLeaseClient: acquire, renew, release, change, and break lease +- Support for FileSystemClient: create, delete, get properties, set metadata, get paths, create directory, delete directory, create file, delete file +- Support for DataLakeDirectoryClient: create, delete, rename, get properties, get access control, set metadata, set properties, set access control, create file, delete file, create sub-directory, delete sub-directory +- Support for DataLakeFileClient: create, delete, rename, get properties, get access control, set metadata, set properties, set access control, append, flush, read + +This package's +[documentation](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/README.md) +and +[samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples) diff --git a/sdk/storage/azure-storage-file-datalake/README.md b/sdk/storage/azure-storage-file-datalake/README.md index 49fcdf7a153a..665fa6148999 100644 --- a/sdk/storage/azure-storage-file-datalake/README.md +++ b/sdk/storage/azure-storage-file-datalake/README.md @@ -7,7 +7,7 @@ This preview package for Python includes ADLS Gen2 specific API support made ava 2. Permission related operations (Get/Set ACLs) for hierarchical namespace enabled (HNS) accounts. -[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake) | [Package (PyPi)](https://pypi.org/project/azure-storage-file-datalake/) | [API reference documentation](https://aka.ms/azsdk-python-storage-file-datalake-ref) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples) +[Source code](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake) | [Package (PyPi)](https://pypi.org/project/azure-storage-file-datalake/) | [API reference documentation](https://aka.ms/azsdk-python-storage-filedatalake-ref) | [Product documentation](https://docs.microsoft.com/azure/storage/) | [Samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples) ## Getting started @@ -59,7 +59,7 @@ You can omit the credential if your account URL already has a SAS token. Once you have your account URL and credentials ready, you can create the DataLakeServiceClient: ```python -from azure.storage.file.datalake import DataLakeServiceClient +from azure.storage.filedatalake import DataLakeServiceClient service = DataLakeServiceClient(account_url="https://.dfs.core.windows.net/", credential=credential) ``` @@ -111,7 +111,7 @@ The following sections provide several code snippets covering some of the most c Create the DataLakeServiceClient using the connection string to your Azure Storage account. ```python -from azure.storage.file.datalake import DataLakeServiceClient +from azure.storage.filedatalake import DataLakeServiceClient service = DataLakeServiceClient.from_connection_string(conn_str="my_connection_string") ``` @@ -120,7 +120,7 @@ service = DataLakeServiceClient.from_connection_string(conn_str="my_connection_s Upload a file to your file system. ```python -from azure.storage.file.datalake import DataLakeFileClient +from azure.storage.filedatalake import DataLakeFileClient data = b"abc" file = DataLakeFileClient.from_connection_string("my_connection_string", @@ -134,7 +134,7 @@ file.flush_data(len(data)) Download a file from your file system. ```python -from azure.storage.file.datalake import DataLakeFileClient +from azure.storage.filedatalake import DataLakeFileClient file = DataLakeFileClient.from_connection_string("my_connection_string", file_system_name="myfilesystem", file_path="myfile") @@ -147,7 +147,7 @@ with open("./BlockDestination.txt", "wb") as my_file: List the paths in your file system. ```python -from azure.storage.file.datalake import FileSystemClient +from azure.storage.filedatalake import FileSystemClient file_system = FileSystemClient.from_connection_string("my_connection_string", file_system_name="myfilesystem") diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/file/__init__.py deleted file mode 100644 index 59cb70146572..000000000000 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: str diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py similarity index 95% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_directory_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 5d38dabd6410..a2b97fb8ca3c 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -86,7 +86,7 @@ def from_connection_string( key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. :return a DataLakeDirectoryClient - :rtype ~azure.storage.file.datalake.DataLakeDirectoryClient + :rtype ~azure.storage.filedatalake.DataLakeDirectoryClient """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs') if 'secondary_hostname' not in kwargs: @@ -102,7 +102,7 @@ def create_directory(self, content_settings=None, # type: Optional[ContentSetti """ Create a new directory. - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the blob as metadata. @@ -110,7 +110,7 @@ def create_directory(self, content_settings=None, # type: Optional[ContentSetti :keyword lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. - :paramtype lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :paramtype lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. @@ -195,7 +195,7 @@ def get_directory_properties(self, **kwargs): :keyword lease: Required if the directory or file has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -239,13 +239,13 @@ def rename_directory(self, rename_destination, **kwargs): :keyword source_lease: A lease ID for the source path. If specified, the source path must have an active lease and the leaase ID must match. - :keyword source_lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :keyword source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. @@ -331,13 +331,13 @@ def create_sub_directory(self, sub_directory, # type: Union[DirectoryProperties :param sub_directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease: + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. @@ -391,7 +391,7 @@ def delete_sub_directory(self, sub_directory, # type: Union[DirectoryProperties :param sub_directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties + :type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties :keyword lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. @@ -434,13 +434,13 @@ def create_file(self, file, # type: Union[FileProperties, str] :param file: The file with which to interact. This can either be the name of the file, or an instance of FileProperties. - :type file: str or ~azure.storage.file.datalake.FileProperties - :keyword ~azure.storage.file.datalake.ContentSettings content_settings: + :type file: str or ~azure.storage.filedatalake.FileProperties + :keyword ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :keyword metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease: + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. @@ -495,9 +495,9 @@ def get_file_client(self, file # type: Union[FileProperties, str] :param file: The file with which to interact. This can either be the name of the file, or an instance of FileProperties. eg. directory/subdirectory/file - :type file: str or ~azure.storage.file.datalake.FileProperties + :type file: str or ~azure.storage.filedatalake.FileProperties :returns: A DataLakeFileClient. - :rtype: ~azure.storage.file.datalake..DataLakeFileClient + :rtype: ~azure.storage.filedatalake..DataLakeFileClient .. admonition:: Example: @@ -530,9 +530,9 @@ def get_sub_directory_client(self, sub_directory # type: Union[DirectoryPropert :param sub_directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type sub_directory: str or ~azure.storage.file.datalake.DirectoryProperties + :type sub_directory: str or ~azure.storage.filedatalake.DirectoryProperties :returns: A DataLakeDirectoryClient. - :rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient + :rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py similarity index 97% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_file_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index e65a85cf7e17..869903d47d75 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -91,7 +91,7 @@ def from_connection_string( key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. :return a DataLakeFileClient - :rtype ~azure.storage.file.datalake.DataLakeFileClient + :rtype ~azure.storage.filedatalake.DataLakeFileClient """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs') if 'secondary_hostname' not in kwargs: @@ -107,12 +107,12 @@ def create_file(self, content_settings=None, # type: Optional[ContentSettings] """ Create a new file. - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease: + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. @@ -199,7 +199,7 @@ def get_file_properties(self, **kwargs): :keyword lease: Required if the directory or file has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -279,7 +279,7 @@ def append_data(self, data, # type: Union[AnyStr, Iterable[AnyStr], IO[AnyStr]] :keyword lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :return: dict of the response header """ options = self._append_data_options( @@ -446,13 +446,13 @@ def rename_file(self, rename_destination, **kwargs): :keyword source_lease: A lease ID for the source path. If specified, the source path must have an active lease and the leaase ID must match. - :keyword source_lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :keyword source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_lease.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_lease.py similarity index 98% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_lease.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_lease.py index 4581fa8663e4..493fccac5cf8 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_lease.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_lease.py @@ -37,8 +37,8 @@ class DataLakeLeaseClient(object): :param client: The client of the file system, directory, or file to lease. - :type client: ~azure.storage.file.datalake.FileSystemClient or - ~azure.storage.file.datalake.DataLakeDirectoryClient or ~azure.storage.file.datalake.DataLakeFileClient + :type client: ~azure.storage.filedatalake.FileSystemClient or + ~azure.storage.filedatalake.DataLakeDirectoryClient or ~azure.storage.filedatalake.DataLakeFileClient :param str lease_id: A string representing the lease ID of an existing lease. This value does not need to be specified in order to acquire a new lease, or break one. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_service_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py similarity index 93% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_service_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py index 334d36dc4d4c..4d9ce88e1592 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_data_lake_service_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py @@ -4,9 +4,6 @@ # license information. # -------------------------------------------------------------------------- -from azure.storage.file.datalake import DataLakeDirectoryClient, DataLakeFileClient -from azure.storage.file.datalake._models import UserDelegationKey - try: from urllib.parse import urlparse except ImportError: @@ -17,9 +14,10 @@ from azure.storage.blob import BlobServiceClient from ._shared.base_client import StorageAccountHostsMixin, parse_query, parse_connection_str from ._file_system_client import FileSystemClient - +from ._data_lake_directory_client import DataLakeDirectoryClient +from ._data_lake_file_client import DataLakeFileClient +from ._models import UserDelegationKey, FileSystemPropertiesPaged from ._serialize import convert_dfs_url_to_blob_url -from ._models import FileSystemPropertiesPaged class DataLakeServiceClient(StorageAccountHostsMixin): @@ -113,7 +111,7 @@ def from_connection_string( key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. :return a DataLakeServiceClient - :rtype ~azure.storage.file.datalake.DataLakeServiceClient + :rtype ~azure.storage.filedatalake.DataLakeServiceClient """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs') if 'secondary_hostname' not in kwargs: @@ -136,7 +134,7 @@ def get_user_delegation_key(self, key_start_time, # type: datetime :keyword int timeout: The timeout parameter is expressed in seconds. :return: The user delegation key. - :rtype: ~azure.storage.file.datalake.UserDelegationKey + :rtype: ~azure.storage.filedatalake.UserDelegationKey """ delegation_key = self._blob_service_client.get_user_delegation_key(key_start_time=key_start_time, key_expiry_time=key_expiry_time, @@ -165,7 +163,7 @@ def list_file_systems(self, name_starts_with=None, # type: Optional[str] :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) of FileSystemProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.datalake.FileSystemProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.filedatalake.FileSystemProperties] .. admonition:: Example: @@ -200,10 +198,10 @@ def create_file_system(self, file_system, # type: Union[FileSystemProperties, s :type metadata: dict(str, str) :param public_access: Possible values include: file system, file. - :type public_access: ~azure.storage.file.datalake.PublicAccess + :type public_access: ~azure.storage.filedatalake.PublicAccess :keyword int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.datalake.FileSystemClient + :rtype: ~azure.storage.filedatalake.FileSystemClient .. admonition:: Example: @@ -229,8 +227,8 @@ def delete_file_system(self, file_system, # type: Union[FileSystemProperties, s :param file_system: The file system to delete. This can either be the name of the file system, or an instance of FileSystemProperties. - :type file_system: str or ~azure.storage.file.datalake.FileSystemProperties - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :type file_system: str or ~azure.storage.filedatalake.FileSystemProperties + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, delete_file_system only succeeds if the file system's lease is active and matches this ID. Required if the file system has an active lease. @@ -278,9 +276,9 @@ def get_file_system_client(self, file_system # type: Union[FileSystemProperties :param file_system: The file system. This can either be the name of the file system, or an instance of FileSystemProperties. - :type file_system: str or ~azure.storage.file.datalake.FileSystemProperties + :type file_system: str or ~azure.storage.filedatalake.FileSystemProperties :returns: A FileSystemClient. - :rtype: ~azure.storage.file.datalake.FileSystemClient + :rtype: ~azure.storage.filedatalake.FileSystemClient .. admonition:: Example: @@ -307,13 +305,13 @@ def get_directory_client(self, file_system, # type: Union[FileSystemProperties, :param file_system: The file system that the directory is in. This can either be the name of the file system, or an instance of FileSystemProperties. - :type file_system: str or ~azure.storage.file.datalake.FileSystemProperties + :type file_system: str or ~azure.storage.filedatalake.FileSystemProperties :param directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type directory: str or ~azure.storage.file.datalake.DirectoryProperties + :type directory: str or ~azure.storage.filedatalake.DirectoryProperties :returns: A DataLakeDirectoryClient. - :rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient + :rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient .. admonition:: Example: @@ -344,13 +342,13 @@ def get_file_client(self, file_system, # type: Union[FileSystemProperties, str] :param file_system: The file system that the file is in. This can either be the name of the file system, or an instance of FileSystemProperties. - :type file_system: str or ~azure.storage.file.datalake.FileSystemProperties + :type file_system: str or ~azure.storage.filedatalake.FileSystemProperties :param file_path: The file with which to interact. This can either be the full path of the file(from the root directory), or an instance of FileProperties. eg. directory/subdirectory/file - :type file_path: str or ~azure.storage.file.datalake.FileProperties + :type file_path: str or ~azure.storage.filedatalake.FileProperties :returns: A DataLakeFileClient. - :rtype: ~azure.storage.file.datalake..DataLakeFileClient + :rtype: ~azure.storage.filedatalake..DataLakeFileClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_deserialize.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_deserialize.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py similarity index 95% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_file_system_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index e20e752827cf..4e38b2dad3b5 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -132,7 +132,7 @@ def from_connection_string( key, or an instance of a TokenCredentials class from azure.identity. Credentials provided here will take precedence over those in the connection string. :return a FileSystemClient - :rtype ~azure.storage.file.datalake.FileSystemClient + :rtype ~azure.storage.filedatalake.FileSystemClient """ account_url, secondary, credential = parse_connection_str(conn_str, credential, 'dfs') if 'secondary_hostname' not in kwargs: @@ -179,7 +179,7 @@ def acquire_lease( :keyword int timeout: The timeout parameter is expressed in seconds. :returns: A DataLakeLeaseClient object, that can be run in a context manager. - :rtype: ~azure.storage.file.datalake.DataLakeLeaseClient + :rtype: ~azure.storage.filedatalake.DataLakeLeaseClient .. admonition:: Example: @@ -210,10 +210,10 @@ def create_file_system(self, metadata=None, # type: Optional[Dict[str, str]] :type metadata: dict(str, str) :param public_access: Possible values include: file system, file. - :type public_access: ~azure.storage.file.datalake.PublicAccess + :type public_access: ~azure.storage.filedatalake.PublicAccess :keyword int timeout: The timeout parameter is expressed in seconds. - :rtype: ~azure.storage.file.datalake.FileSystemClient + :rtype: ~azure.storage.filedatalake.FileSystemClient .. admonition:: Example: @@ -235,7 +235,7 @@ def delete_file_system(self, **kwargs): The file system and any files contained within it are later deleted during garbage collection. If the file system is not found, a ResourceNotFoundError will be raised. - :keyword str or ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :keyword str or ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, delete_file_system only succeeds if the file system's lease is active and matches this ID. Required if the file system has an active lease. @@ -276,13 +276,13 @@ def get_file_system_properties(self, **kwargs): """Returns all user-defined metadata and system properties for the specified file system. The data returned does not include the file system's list of paths. - :keyword str or ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :keyword str or ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, get_file_system_properties only succeeds if the file system's lease is active and matches this ID. :keyword int timeout: The timeout parameter is expressed in seconds. :return: Properties for the specified file system within a file system object. - :rtype: ~azure.storage.file.datalake.FileSystemProperties + :rtype: ~azure.storage.filedatalake.FileSystemProperties .. admonition:: Example: @@ -310,7 +310,7 @@ def set_file_system_metadata( # type: ignore A dict containing name-value pairs to associate with the file system as metadata. Example: {'category':'test'} :type metadata: dict[str, str] - :keyword str or ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :keyword str or ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, set_file_system_metadata only succeeds if the file system's lease is active and matches this ID. :keyword ~datetime.datetime if_modified_since: @@ -371,7 +371,7 @@ def get_paths(self, path=None, # type: Optional[str] :keyword int timeout: The timeout parameter is expressed in seconds. :returns: An iterable (auto-paging) response of PathProperties. - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.file.datalake.PathProperties] + :rtype: ~azure.core.paging.ItemPaged[~azure.storage.filedatalake.PathProperties] .. admonition:: Example: @@ -403,13 +403,13 @@ def create_directory(self, directory, # type: Union[DirectoryProperties, str] :param directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type directory: str or ~azure.storage.file.datalake.DirectoryProperties - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :type directory: str or ~azure.storage.filedatalake.DirectoryProperties + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease: + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. @@ -463,7 +463,7 @@ def delete_directory(self, directory, # type: Union[DirectoryProperties, str] :param directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type directory: str or ~azure.storage.file.datalake.DirectoryProperties + :type directory: str or ~azure.storage.filedatalake.DirectoryProperties :keyword lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. @@ -506,13 +506,13 @@ def create_file(self, file, # type: Union[FileProperties, str] :param file: The file with which to interact. This can either be the name of the file, or an instance of FileProperties. - :type file: str or ~azure.storage.file.datalake.FileProperties - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :type file: str or ~azure.storage.filedatalake.FileProperties + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the blob as metadata. :type metadata: dict(str, str) - :keyword ~azure.storage.file.datalake.DataLakeLeaseClient or str lease: + :keyword ~azure.storage.filedatalake.DataLakeLeaseClient or str lease: Required if the blob has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. @@ -567,7 +567,7 @@ def delete_file(self, file, # type: Union[FileProperties, str] :param file: The file with which to interact. This can either be the name of the file, or an instance of FileProperties. - :type file: str or ~azure.storage.file.datalake.FileProperties + :type file: str or ~azure.storage.filedatalake.FileProperties :keyword lease: Required if the blob has an active lease. Value can be a LeaseClient object or the lease ID as a string. @@ -611,9 +611,9 @@ def get_directory_client(self, directory # type: Union[DirectoryProperties, str :param directory: The directory with which to interact. This can either be the name of the directory, or an instance of DirectoryProperties. - :type directory: str or ~azure.storage.file.datalake.DirectoryProperties + :type directory: str or ~azure.storage.filedatalake.DirectoryProperties :returns: A DataLakeDirectoryClient. - :rtype: ~azure.storage.file.datalake.DataLakeDirectoryClient + :rtype: ~azure.storage.filedatalake.DataLakeDirectoryClient .. admonition:: Example: @@ -643,9 +643,9 @@ def get_file_client(self, file_path # type: Union[FileProperties, str] :param file_path: The file with which to interact. This can either be the path of the file(from root directory), or an instance of FileProperties. eg. directory/subdirectory/file - :type file_path: str or ~azure.storage.file.datalake.FileProperties + :type file_path: str or ~azure.storage.filedatalake.FileProperties :returns: A DataLakeFileClient. - :rtype: ~azure.storage.file.datalake..DataLakeFileClient + :rtype: ~azure.storage.filedatalake..DataLakeFileClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/_configuration.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/_configuration.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/_data_lake_storage_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_data_lake_storage_client.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/_data_lake_storage_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_data_lake_storage_client.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/_configuration_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/_configuration_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/_data_lake_storage_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_data_lake_storage_client_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/_data_lake_storage_client_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_data_lake_storage_client_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_file_system_operations_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_file_system_operations_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_file_system_operations_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_file_system_operations_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_path_operations_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_path_operations_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_path_operations_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_path_operations_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_service_operations_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_service_operations_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/aio/operations_async/_service_operations_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations_async/_service_operations_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_data_lake_storage_client_enums.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_data_lake_storage_client_enums.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_data_lake_storage_client_enums.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_data_lake_storage_client_enums.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_models.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_models.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_models.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_models_py3.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_models_py3.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/models/_models_py3.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/models/_models_py3.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_file_system_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_file_system_operations.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_path_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_path_operations.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_service_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/operations/_service_operations.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/version.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/version.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_generated/version.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/version.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py similarity index 96% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_models.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py index 107ff73d1478..9315ceadddd5 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py @@ -30,7 +30,7 @@ class FileSystemProperties(object): :ivar str etag: The ETag contains a value that you can use to perform operations conditionally. - :ivar ~azure.storage.file.datalake.LeaseProperties lease: + :ivar ~azure.storage.filedatalake.LeaseProperties lease: Stores all the lease information for the file system. :ivar str public_access: Specifies whether data in the file system may be accessed publicly and the level of access. @@ -89,7 +89,7 @@ class FileSystemPropertiesPaged(ContainerPropertiesPaged): :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.datalake.FileSystemProperties) + :vartype current_page: list(~azure.storage.filedatalake.FileSystemProperties) :param callable command: Function to retrieve the next page of items. :param str prefix: Filters the results to return only file systems whose names @@ -117,7 +117,7 @@ class DirectoryProperties(DictMixin): conditionally. :ivar bool deleted: if the current directory marked as deleted :ivar dict metadata: Name-value pairs associated with the blob as metadata. - :ivar ~azure.storage.file.datalake.LeaseProperties lease: + :ivar ~azure.storage.filedatalake.LeaseProperties lease: Stores all the lease information for the directory. :ivar ~datetime.datetime last_modified: A datetime object representing the last time the directory was modified. @@ -125,7 +125,7 @@ class DirectoryProperties(DictMixin): Indicates when the directory was created, in UTC. :ivar int remaining_retention_days: The number of days that the directory will be retained before being permanently deleted by the service. - :var ~azure.storage.file.datalake.ContentSettings content_settings: + :var ~azure.storage.filedatalake.ContentSettings content_settings: """ def __init__(self, **kwargs): super(DirectoryProperties, self).__init__( @@ -164,7 +164,7 @@ class FileProperties(DictMixin): conditionally. :ivar bool deleted: if the current file marked as deleted :ivar dict metadata: Name-value pairs associated with the blob as metadata. - :ivar ~azure.storage.file.datalake.LeaseProperties lease: + :ivar ~azure.storage.filedatalake.LeaseProperties lease: Stores all the lease information for the file. :ivar ~datetime.datetime last_modified: A datetime object representing the last time the file was modified. @@ -173,7 +173,7 @@ class FileProperties(DictMixin): :ivar int size: size of the file :ivar int remaining_retention_days: The number of days that the file will be retained before being permanently deleted by the service. - :var ~azure.storage.file.datalake.ContentSettings content_settings: + :var ~azure.storage.filedatalake.ContentSettings content_settings: """ def __init__(self, **kwargs): super(FileProperties, self).__init__( @@ -259,7 +259,7 @@ class PathPropertiesPaged(PageIterator): :ivar str path: Filters the results to return only paths under the specified path. :ivar int results_per_page: The maximum number of results retrieved per API call. :ivar str continuation_token: The continuation token to retrieve the next page of results. - :ivar list(~azure.storage.file.datalake.PathProperties) current_page: The current page of listed results. + :ivar list(~azure.storage.filedatalake.PathProperties) current_page: The current page of listed results. :param callable command: Function to retrieve the next page of items. :param str path: Filters the results to return only paths under the specified path. @@ -382,7 +382,7 @@ def __init__(self, read=False, write=False, delete=False, list=False, # pylint: class FileSystemSasPermissions(ContainerSasPermissions): """FileSystemSasPermissions class to be used with the - :func:`~azure.storage.file.datalake.generate_file_system_sas` function. + :func:`~azure.storage.filedatalake.generate_file_system_sas` function. :param bool read: Read the content, properties, metadata etc. @@ -402,7 +402,7 @@ def __init__(self, read=False, write=False, delete=False, list=False # pylint: class DirectorySasPermissions(BlobSasPermissions): """DirectorySasPermissions class to be used with the - :func:`~azure.storage.file.datalake.generate_directory_sas` function. + :func:`~azure.storage.filedatalake.generate_directory_sas` function. :param bool read: Read the content, properties, metadata etc. @@ -423,7 +423,7 @@ def __init__(self, read=False, create=False, write=False, class FileSasPermissions(BlobSasPermissions): """FileSasPermissions class to be used with the - :func:`~azure.storage.file.datalake.generate_file_sas` function. + :func:`~azure.storage.filedatalake.generate_file_sas` function. :param bool read: Read the content, properties, metadata etc. Use the file as diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_path_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py similarity index 97% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_path_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py index 8c30de656671..87154def2858 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_path_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_path_client.py @@ -119,7 +119,7 @@ def _create(self, resource_type, content_settings=None, metadata=None, **kwargs) The value must be "file" or "directory". Possible values include: 'directory', 'file' :type resource_type: str - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param metadata: Name-value pairs associated with the file/directory as metadata. @@ -127,7 +127,7 @@ def _create(self, resource_type, content_settings=None, metadata=None, **kwargs) :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. @@ -200,7 +200,7 @@ def _delete(self, **kwargs): :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :param ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -280,7 +280,7 @@ def set_access_control(self, owner=None, # type: Optional[str] :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -346,7 +346,7 @@ def get_access_control(self, upn=None, # type: Optional[bool] :keyword lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -419,13 +419,13 @@ def _rename_path(self, rename_source, :param source_lease: A lease ID for the source path. If specified, the source path must have an active lease and the leaase ID must match. - :type source_lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :type source_lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set path properties. :param lease: Required if the file/directory has an active lease. Value can be a LeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :param str umask: Optional and only valid if Hierarchical Namespace is enabled for the account. When creating a file or directory and the parent folder does not have a default ACL, the umask restricts the permissions of the file or directory to be created. @@ -502,7 +502,7 @@ def _get_path_properties(self, **kwargs): :keyword lease: Required if the directory or file has an active lease. Value can be a DataLakeLeaseClient object or the lease ID as a string. - :type lease: ~azure.storage.file.datalake.DataLakeLeaseClient or str + :type lease: ~azure.storage.filedatalake.DataLakeLeaseClient or str :keyword ~datetime.datetime if_modified_since: A DateTime value. Azure expects the date value passed in to be UTC. If timezone is included, any non-UTC datetimes will be converted to UTC. @@ -549,7 +549,7 @@ def set_metadata(self, metadata=None, # type: Optional[Dict[str, str]] A dict containing name-value pairs to associate with the file system as metadata. Example: {'category':'test'} :type metadata: dict[str, str] - :keyword str or ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :keyword str or ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, set_file_system_metadata only succeeds if the file system's lease is active and matches this ID. :keyword ~datetime.datetime if_modified_since: @@ -591,9 +591,9 @@ def set_http_headers(self, content_settings=None, # type: Optional[ContentSetti If one property is set for the content_settings, all properties will be overriden. - :param ~azure.storage.file.datalake.ContentSettings content_settings: + :param ~azure.storage.filedatalake.ContentSettings content_settings: ContentSettings object used to set file/directory properties. - :keyword str or ~azure.storage.file.datalake.DataLakeLeaseClient lease: + :keyword str or ~azure.storage.filedatalake.DataLakeLeaseClient lease: If specified, set_file_system_metadata only succeeds if the file system's lease is active and matches this ID. :keyword ~datetime.datetime if_modified_since: @@ -657,7 +657,7 @@ def acquire_lease(self, lease_duration=-1, # type: Optional[int] :keyword int timeout: The timeout parameter is expressed in seconds. :returns: A DataLakeLeaseClient object, that can be run in a context manager. - :rtype: ~azure.storage.file.datalake.DataLakeLeaseClient + :rtype: ~azure.storage.filedatalake.DataLakeLeaseClient .. admonition:: Example: diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_serialize.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_serialize.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_serialize.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_serialize.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/__init__.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/__init__.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/__init__.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/authentication.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/authentication.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/authentication.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/base_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/base_client.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/base_client.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/base_client.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/base_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/base_client_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/base_client_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/base_client_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/constants.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/constants.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/constants.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/constants.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/encryption.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/encryption.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/encryption.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/encryption.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/models.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/parser.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/parser.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/parser.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/parser.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/policies.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/policies.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/policies_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/policies_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/request_handlers.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/request_handlers.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/response_handlers.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/response_handlers.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/shared_access_signature.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/shared_access_signature.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/uploads.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/uploads.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/uploads_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared/uploads_async.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared_access_signature.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared_access_signature.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_shared_access_signature.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared_access_signature.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_version.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py similarity index 100% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/_version.py rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/mypy.ini b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/mypy.ini similarity index 80% rename from sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/mypy.ini rename to sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/mypy.ini index a05144527261..a3cb6d2ce589 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/file/datalake/mypy.ini +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/mypy.ini @@ -6,7 +6,7 @@ ignore_missing_imports = True # Per-module options: -[mypy-azure.storage.file.datalake._generated.*] +[mypy-azure.storage.filedatalake._generated.*] ignore_errors = True [mypy-azure.core.*] diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_access_control.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_access_control.py index 912bd07466a5..356229c73c30 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_access_control.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_access_control.py @@ -2,7 +2,7 @@ import random import uuid -from azure.storage.file.datalake import ( +from azure.storage.filedatalake import ( DataLakeServiceClient, ) diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_directory.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_directory.py index 3bae6571b5bf..28cfba312529 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_directory.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_directory.py @@ -2,7 +2,7 @@ import random import uuid -from azure.storage.file.datalake import ( +from azure.storage.filedatalake import ( DataLakeServiceClient, ) diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_upload_download.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_upload_download.py index 46e3a28c0ea8..73c427ea8b32 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_upload_download.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_upload_download.py @@ -1,7 +1,7 @@ import os import random -from azure.storage.file.datalake import ( +from azure.storage.filedatalake import ( DataLakeServiceClient, ) diff --git a/sdk/storage/azure-storage-file-datalake/setup.py b/sdk/storage/azure-storage-file-datalake/setup.py index 883482657a69..beb6fdbd4edd 100644 --- a/sdk/storage/azure-storage-file-datalake/setup.py +++ b/sdk/storage/azure-storage-file-datalake/setup.py @@ -15,10 +15,11 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-storage-file-datalake" -PACKAGE_PPRINT_NAME = "Azure Storage File DataLake" +NAMESPACE_NAME = "azure.storage.filedatalake" +PACKAGE_PPRINT_NAME = "Azure File DataLake Storage" # a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace('-', '/') +package_folder_path = NAMESPACE_NAME.replace('.', '/') # azure v0.x is not compatible with this package diff --git a/sdk/storage/azure-storage-file-datalake/swagger/README.md b/sdk/storage/azure-storage-file-datalake/swagger/README.md index 2c2f465abc63..2cb79feeb6ab 100644 --- a/sdk/storage/azure-storage-file-datalake/swagger/README.md +++ b/sdk/storage/azure-storage-file-datalake/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.StorageDataLake/stable/2018-11-09/DataLakeStorage.json -output-folder: ../azure/storage/file/datalake/_generated -namespace: azure.storage.file.datalake +output-folder: ../azure/storage/filedatalake/_generated +namespace: azure.storage.filedatalake no-namespace-folders: true license-header: MICROSOFT_MIT_NO_VERSION enable-xml: true diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py index 250898735ff4..a3c0d637ab5f 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py @@ -9,8 +9,8 @@ from datetime import datetime, timedelta from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError -from azure.storage.file.datalake import ContentSettings, DirectorySasPermissions, DataLakeDirectoryClient -from azure.storage.file.datalake import DataLakeServiceClient, generate_directory_sas +from azure.storage.filedatalake import ContentSettings, DirectorySasPermissions, DataLakeDirectoryClient +from azure.storage.filedatalake import DataLakeServiceClient, generate_directory_sas from testcase import ( StorageTestCase, record, diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file.py b/sdk/storage/azure-storage-file-datalake/tests/test_file.py index 5c6e9961fca5..aa665a069a66 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file.py @@ -10,11 +10,11 @@ from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, \ ClientAuthenticationError -from azure.storage.file.datalake import ContentSettings, generate_account_sas, generate_file_sas, \ +from azure.storage.filedatalake import ContentSettings, generate_account_sas, generate_file_sas, \ ResourceTypes, AccountSasPermissions, \ DataLakeFileClient, FileSystemClient, DataLakeDirectoryClient, FileSasPermissions -from azure.storage.file.datalake import DataLakeServiceClient -from azure.storage.file.datalake._generated.models import StorageErrorException +from azure.storage.filedatalake import DataLakeServiceClient +from azure.storage.filedatalake._generated.models import StorageErrorException from testcase import ( StorageTestCase, record, diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py index 0db8a1972e19..3571b53c00f9 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import unittest -from azure.storage.file.datalake import DataLakeServiceClient, PublicAccess +from azure.storage.filedatalake import DataLakeServiceClient, PublicAccess from testcase import ( StorageTestCase, record, diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 0fbcd021b4a4..36458e47d3e2 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -46,6 +46,8 @@ stages: safeName: azurestorageblob - name: azure_storage_file_share safeName: azurestoragefileshare + - name: azure_storage_file_datalake + safeName: azurestoragefiledatalake - name: azure_storage_queue safeName: azurestoragequeue - name: azure_mgmt_storage