-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Queues] Generated Queues using newest autorest version (#16148)
* generated and removed StorageErrorException * fixed all failing tests * fixed failing test * fixed failing test * removed import
- Loading branch information
1 parent
c47cdc3
commit 1ca37b4
Showing
39 changed files
with
3,153 additions
and
2,894 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 7 additions & 9 deletions
16
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._azure_queue_storage import AzureQueueStorage | ||
__all__ = ['AzureQueueStorage'] | ||
|
||
from .version import VERSION | ||
|
||
__version__ = VERSION | ||
|
||
try: | ||
from ._patch import patch_sdk # type: ignore | ||
patch_sdk() | ||
except ImportError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 26 additions & 20 deletions
46
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,58 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
from azure.core.configuration import Configuration | ||
from azure.core.pipeline import policies | ||
|
||
from .version import VERSION | ||
if TYPE_CHECKING: | ||
# pylint: disable=unused-import,ungrouped-imports | ||
from typing import Any | ||
|
||
VERSION = "unknown" | ||
|
||
class AzureQueueStorageConfiguration(Configuration): | ||
"""Configuration for AzureQueueStorage | ||
"""Configuration for AzureQueueStorage. | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:param url: The URL of the service account, queue or message that is the targe of the desired operation. | ||
:type url: str | ||
:ivar version: Specifies the version of the operation to use for this | ||
request. | ||
:type version: str | ||
""" | ||
|
||
def __init__(self, url, **kwargs): | ||
|
||
def __init__( | ||
self, | ||
url, # type: str | ||
**kwargs # type: Any | ||
): | ||
# type: (...) -> None | ||
if url is None: | ||
raise ValueError("Parameter 'url' must not be None.") | ||
|
||
super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azsdk-python-azurequeuestorage/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
|
||
self.url = url | ||
self.version = "2018-03-28" | ||
kwargs.setdefault('sdk_moniker', 'azurequeuestorage/{}'.format(VERSION)) | ||
self._configure(**kwargs) | ||
|
||
def _configure(self, **kwargs): | ||
def _configure( | ||
self, | ||
**kwargs # type: Any | ||
): | ||
# type: (...) -> None | ||
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) | ||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) | ||
self.authentication_policy = kwargs.get('authentication_policy') |
9 changes: 3 additions & 6 deletions
9
sdk/storage/azure-storage-queue/azure/storage/queue/_generated/aio/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from ._azure_queue_storage_async import AzureQueueStorage | ||
from ._azure_queue_storage import AzureQueueStorage | ||
__all__ = ['AzureQueueStorage'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 21 additions & 22 deletions
43
...ue/_generated/aio/_configuration_async.py → ...ge/queue/_generated/aio/_configuration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,52 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from typing import Any | ||
|
||
from azure.core.configuration import Configuration | ||
from azure.core.pipeline import policies | ||
|
||
from ..version import VERSION | ||
|
||
VERSION = "unknown" | ||
|
||
class AzureQueueStorageConfiguration(Configuration): | ||
"""Configuration for AzureQueueStorage | ||
"""Configuration for AzureQueueStorage. | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param url: The URL of the service account, queue or message that is the | ||
targe of the desired operation. | ||
:param url: The URL of the service account, queue or message that is the targe of the desired operation. | ||
:type url: str | ||
:ivar version: Specifies the version of the operation to use for this | ||
request. | ||
:type version: str | ||
""" | ||
|
||
def __init__(self, url, **kwargs): | ||
|
||
def __init__( | ||
self, | ||
url: str, | ||
**kwargs: Any | ||
) -> None: | ||
if url is None: | ||
raise ValueError("Parameter 'url' must not be None.") | ||
|
||
super(AzureQueueStorageConfiguration, self).__init__(**kwargs) | ||
self._configure(**kwargs) | ||
|
||
self.user_agent_policy.add_user_agent('azsdk-python-azurequeuestorage/{}'.format(VERSION)) | ||
self.generate_client_request_id = True | ||
self.accept_language = None | ||
|
||
self.url = url | ||
self.version = "2018-03-28" | ||
kwargs.setdefault('sdk_moniker', 'azurequeuestorage/{}'.format(VERSION)) | ||
self._configure(**kwargs) | ||
|
||
def _configure(self, **kwargs): | ||
def _configure( | ||
self, | ||
**kwargs: Any | ||
) -> None: | ||
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) | ||
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) | ||
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) | ||
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) | ||
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) | ||
self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) | ||
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) | ||
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) | ||
self.authentication_policy = kwargs.get('authentication_policy') |
Oops, something went wrong.