Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] API View Feedback For STG84 GA #25085

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions sdk/storage/azure-storage-blob/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Release History

## 12.13.0 (Unreleased)

### Features Added
## 12.13.0 (2022-07-07)

### Bugs Fixed
- Stable release of features from 12.13.0b1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def __init__(
super(BlobClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

def _format_url(self, hostname):
container_name = self.container_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __init__(
super(BlobServiceClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

def _format_url(self, hostname):
"""Format the endpoint URL according to the current location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def __init__(
super(ContainerClient, self).__init__(parsed_url, service='blob', credential=credential, **kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

def _format_url(self, hostname):
container_name = self.container_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _validate_key_encryption_key_wrap(kek):


class StorageEncryptionMixin(object):
def configure_encryption(self, kwargs):
def _configure_encryption(self, kwargs):
self.require_encryption = kwargs.get("require_encryption", False)
self.encryption_version = kwargs.get("encryption_version", "1.0")
self.key_encryption_key = kwargs.get("key_encryption_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(
**kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

@distributed_trace_async
async def get_account_information(self, **kwargs): # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(
**kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

@distributed_trace_async
async def get_user_delegation_key(self, key_start_time, # type: datetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def __init__(
**kwargs)
self._client = AzureBlobStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

@distributed_trace_async
async def create_container(self, metadata=None, public_access=None, **kwargs):
Expand Down
3 changes: 2 additions & 1 deletion sdk/storage/azure-storage-file-datalake/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Release History

## 12.8.0 (Unreleased)
## 12.8.0 (2022-07-07)

### Features Added
- Stable release of features from 12.8.0b1.
- Removed support for `expiry_options` from file `create` APIs. With this change, `expires_on` now covers all functionality `expiry_options` offered.

## 12.8.0b1 (2022-06-15)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def create_directory(self, metadata=None, # type: Optional[Dict[str, str]]
return self._create('directory', metadata=metadata, **kwargs)

def delete_directory(self, **kwargs):
# type: (...) -> Dict[str, Union[str, datetime]]
# type: (...) -> None
"""
Marks the specified directory for deletion.

Expand All @@ -221,8 +221,7 @@ def delete_directory(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
:return: None

.. admonition:: Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ def _delete(self, **kwargs):
The match condition to use upon the etag.
:param int timeout:
The timeout parameter is expressed in seconds.
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
:return: None
"""
options = self._delete_path_options(**kwargs)
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async def exists(self, **kwargs):
return await self._exists(**kwargs)

async def delete_directory(self, **kwargs):
# type: (...) -> Dict[str, Union[str, datetime]]
# type: (...) -> None
"""
Marks the specified directory for deletion.

Expand All @@ -198,8 +198,7 @@ async def delete_directory(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
:return: None

.. admonition:: Example:

Expand Down Expand Up @@ -508,14 +507,13 @@ async def create_file(self, file, # type: Union[FileProperties, str]
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change.
:keyword expiry_options:
Indicates mode of the expiry time.
Possible values include: 'NeverExpire', 'RelativeToNow', 'Absolute'"
:paramtype expiry_options: Literal["NeverExpire", "RelativeToNow", "Absolute"]
:keyword expires_on:
The time to set the file to expiry.
When expiry_options is RelativeTo*, expires_on should be an int in milliseconds.
If the type of expires_on is datetime, it should be in UTC time.
If the type of expires_on is an int, expiration time will be set
as the number of milliseconds elapsed from creation time.
If the type of expires_on is datetime, expiration time will be set
absolute to the time provided. If no time zone info is provided, this
will be interpreted as UTC.
:paramtype expires_on: datetime or int
:keyword str permissions:
Optional and only valid if Hierarchical Namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,13 @@ async def create_file(self, content_settings=None, # type: Optional[ContentSett
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change.
:keyword expiry_options:
Indicates mode of the expiry time.
Possible values include: 'NeverExpire', 'RelativeToNow', 'Absolute'"
:paramtype expiry_options: Literal["NeverExpire", "RelativeToNow", "Absolute"]
:keyword expires_on:
The time to set the file to expiry.
When expiry_options is RelativeTo*, expires_on should be an int in milliseconds.
If the type of expires_on is datetime, it should be in UTC time.
If the type of expires_on is an int, expiration time will be set
as the number of milliseconds elapsed from creation time.
If the type of expires_on is datetime, expiration time will be set
absolute to the time provided. If no time zone info is provided, this
will be interpreted as UTC.
:paramtype expires_on: datetime or int
:keyword str permissions:
Optional and only valid if Hierarchical Namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,14 +665,13 @@ async def create_file(self, file, # type: Union[FileProperties, str]
(-1) for a lease that never expires. A non-infinite lease can be
between 15 and 60 seconds. A lease duration cannot be changed
using renew or change.
:keyword expiry_options:
Indicates mode of the expiry time.
Possible values include: 'NeverExpire', 'RelativeToNow', 'Absolute'"
:paramtype expiry_options: Literal["NeverExpire", "RelativeToNow", "Absolute"]
:keyword expires_on:
The time to set the file to expiry.
When expiry_options is RelativeTo*, expires_on should be an int in milliseconds.
If the type of expires_on is datetime, it should be in UTC time.
If the type of expires_on is an int, expiration time will be set
as the number of milliseconds elapsed from creation time.
If the type of expires_on is datetime, expiration time will be set
absolute to the time provided. If no time zone info is provided, this
will be interpreted as UTC.
:paramtype expires_on: datetime or int
:keyword str permissions:
Optional and only valid if Hierarchical Namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ async def _delete(self, **kwargs):
The match condition to use upon the etag.
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: A dictionary of response headers.
:rtype: Dict[str, Union[str, datetime]]
:return: None
"""
options = self._delete_path_options(**kwargs)
try:
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file-datalake/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
install_requires=[
"azure-core<2.0.0,>=1.23.1",
"msrest>=0.6.21",
"azure-storage-blob<13.0.0,>=12.13.0"
"azure-storage-blob<13.0.0,>=12.13.0b1"
],
)
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file-share/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 12.9.0 (Unreleased)
## 12.9.0 (2022-07-07)

### Features Added
- Stable release of features from 12.9.0b1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ async def rename_directory(
:keyword file_last_write_time:
Last write time for the file.
:paramtype file_last_write_time:~datetime.datetime or str
:keyword file_change_time:
Change time for the directory. If not specified, change time will be set to the current date/time.

.. versionadded:: 12.8.0
This parameter was introduced in API version '2021-06-08'.

:paramtype file_change_time: str or ~datetime.datetime
:keyword Dict[str,str] metadata:
A name-value pair to associate with a file storage object.
:keyword destination_lease:
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-queue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 12.4.0 (Unreleased)
## 12.4.0 (2022-07-07)

### Features Added
- Stable release of features from 12.4.0b1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _validate_key_encryption_key_wrap(kek):


class StorageEncryptionMixin(object):
def configure_encryption(self, kwargs):
def _configure_encryption(self, kwargs):
self.require_encryption = kwargs.get("require_encryption", False)
self.encryption_version = kwargs.get("encryption_version", "1.0")
self.key_encryption_key = kwargs.get("key_encryption_key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(
self._config.message_decode_policy = kwargs.get('message_decode_policy', None) or NoDecodePolicy()
self._client = AzureQueueStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

def _format_url(self, hostname):
"""Format the endpoint URL according to the current location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
super(QueueServiceClient, self).__init__(parsed_url, service='queue', credential=credential, **kwargs)
self._client = AzureQueueStorage(self.url, base_url=self.url, pipeline=self._pipeline)
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

def _format_url(self, hostname):
"""Format the endpoint URL according to the current location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
pipeline=self._pipeline, loop=loop) # type: ignore
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self._loop = loop
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

@distributed_trace_async
async def create_queue(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(
self._client = AzureQueueStorage(self.url, base_url=self.url, pipeline=self._pipeline, loop=loop) # type: ignore
self._client._config.version = get_api_version(kwargs) # pylint: disable=protected-access
self._loop = loop
self.configure_encryption(kwargs)
self._configure_encryption(kwargs)

@distributed_trace_async
async def get_service_stats(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion shared_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ chardet<5,>=3.0.2
#override azure-storage-queue azure-core<2.0.0,>=1.23.1
#override azure-storage-file-share azure-core<2.0.0,>=1.23.1
#override azure-storage-file-datalake azure-core<2.0.0,>=1.23.1
#override azure-storage-file-datalake azure-storage-blob<13.0.0,>=12.13.0
#override azure-storage-file-datalake azure-storage-blob<13.0.0,>=12.13.0b1
#override azure-security-attestation azure-core<2.0.0,>=1.8.2
#override azure-data-tables msrest>=0.6.19
#override azure-schemaregistry azure-core<2.0.0,>=1.23.0
Expand Down