From 25ead2d1aa727cd56b32210aa6bb9bd50a89f2f0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 13 Oct 2022 08:45:54 +0000 Subject: [PATCH] CodeGen from PR 20993 in Azure/azure-rest-api-specs [NetAppFiles] Bugfix Add missing api-version parameter (#20993) * Add missing api-version parameter * update vg examples * update vg examples2 --- sdk/netapp/azure-mgmt-netapp/_meta.json | 10 ++--- .../azure/mgmt/netapp/_version.py | 2 +- .../operations/_account_backups_operations.py | 15 +++++-- .../aio/operations/_accounts_operations.py | 36 +++++++++++---- .../operations/_backup_policies_operations.py | 15 +++++-- .../aio/operations/_backups_operations.py | 15 +++++-- .../_net_app_resource_operations.py | 4 +- ...et_app_resource_quota_limits_operations.py | 15 +++++-- .../mgmt/netapp/aio/operations/_operations.py | 15 +++++-- .../aio/operations/_pools_operations.py | 15 +++++-- .../_snapshot_policies_operations.py | 15 +++++-- .../aio/operations/_snapshots_operations.py | 15 +++++-- .../aio/operations/_subvolumes_operations.py | 15 +++++-- .../aio/operations/_vaults_operations.py | 15 +++++-- .../operations/_volume_groups_operations.py | 15 +++++-- .../_volume_quota_rules_operations.py | 15 +++++-- .../aio/operations/_volumes_operations.py | 28 +++++++++--- .../operations/_account_backups_operations.py | 15 +++++-- .../netapp/operations/_accounts_operations.py | 44 ++++++++++++++----- .../operations/_backup_policies_operations.py | 15 +++++-- .../netapp/operations/_backups_operations.py | 15 +++++-- .../_net_app_resource_operations.py | 4 +- ...et_app_resource_quota_limits_operations.py | 15 +++++-- .../mgmt/netapp/operations/_operations.py | 15 +++++-- .../netapp/operations/_pools_operations.py | 15 +++++-- .../_snapshot_policies_operations.py | 15 +++++-- .../operations/_snapshots_operations.py | 15 +++++-- .../operations/_subvolumes_operations.py | 15 +++++-- .../netapp/operations/_vaults_operations.py | 15 +++++-- .../operations/_volume_groups_operations.py | 15 +++++-- .../_volume_quota_rules_operations.py | 15 +++++-- .../netapp/operations/_volumes_operations.py | 28 +++++++++--- 32 files changed, 377 insertions(+), 139 deletions(-) diff --git a/sdk/netapp/azure-mgmt-netapp/_meta.json b/sdk/netapp/azure-mgmt-netapp/_meta.json index a5b9e32c9a549..7d28cc0be471b 100644 --- a/sdk/netapp/azure-mgmt-netapp/_meta.json +++ b/sdk/netapp/azure-mgmt-netapp/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.8.4", + "autorest": "3.9.2", "use": [ - "@autorest/python@6.1.5", - "@autorest/modelerfour@4.23.5" + "@autorest/python@6.1.11", + "@autorest/modelerfour@4.24.3" ], - "commit": "0507c3d410681049bb5cd9545b49a7578a91d3d0", + "commit": "151a844c1622c47bfe0261e0857a0f3595ea2c2f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/netapp/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.5 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False", + "autorest_command": "autorest specification/netapp/resource-manager/readme.md --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.1.11 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/netapp/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py index b77ac9246082f..e786ca9d25659 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "5.1.0" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py index b4b1867676c54..d53faee406aea 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_account_backups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union, cast -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -101,10 +101,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py index 9a8b300779461..223e07fe67657 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_accounts_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -103,10 +103,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -180,10 +187,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -830,14 +844,16 @@ async def _renew_credentials_initial( # pylint: disable=inconsistent-return-sta error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str cls = kwargs.pop("cls", None) # type: ClsType[None] request = build_renew_credentials_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._renew_credentials_initial.metadata["url"], headers=_headers, params=_params, @@ -887,8 +903,9 @@ async def begin_renew_credentials( :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str cls = kwargs.pop("cls", None) # type: ClsType[None] polling = kwargs.pop("polling", True) # type: Union[bool, AsyncPollingMethod] lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -897,6 +914,7 @@ async def begin_renew_credentials( raw_result = await self._renew_credentials_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, + api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py index 6eab52f2e0097..8c6052d03a421 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backup_policies_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -107,10 +107,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py index c9bd9fe9e19f3..e5fd5dbff7f0f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_backups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -253,10 +253,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py index b49ed7035ebcf..25780c4230896 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_operations.py @@ -60,7 +60,7 @@ async def check_name_availability( self, location: str, name: str, - type: Union[str, "_models.CheckNameResourceTypes"], + type: Union[str, _models.CheckNameResourceTypes], resource_group: str, **kwargs: Any ) -> _models.CheckAvailabilityResponse: @@ -209,7 +209,7 @@ async def check_quota_availability( self, location: str, name: str, - type: Union[str, "_models.CheckQuotaNameResourceTypes"], + type: Union[str, _models.CheckQuotaNameResourceTypes], resource_group: str, **kwargs: Any ) -> _models.CheckAvailabilityResponse: diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py index 70ceb498b599a..5e328f05b4f5e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_net_app_resource_quota_limits_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -98,10 +98,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py index 274c5658d0f27..7caaaa7f1c3b7 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -91,10 +91,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py index f92a2211df6dc..551914e6e2835 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_pools_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -107,10 +107,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py index 7cfd26f34e4b1..da6d688e51446 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshot_policies_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -108,10 +108,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py index 7e68c4e575d5f..36d09d947bd6c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_snapshots_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -122,10 +122,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_subvolumes_operations.py index 729f20451e339..7efa659359e63 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_subvolumes_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -116,10 +116,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py index d97c4c10f203c..e8f7a4f2f039e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_vaults_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -98,10 +98,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py index 2bfa35cb4c5f8..f902f25190146 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_groups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -108,10 +108,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_quota_rules_operations.py index bb006b3f87a2c..267600bbf9d1e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volume_quota_rules_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -115,10 +115,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py index ecbbb5528e98e..fe4a0b6c14e3b 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/_volumes_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( @@ -126,10 +126,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -1815,10 +1822,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py index eb64257a5eb37..423ea9d7ef45e 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_account_backups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union, cast -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -196,10 +196,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py index 019a6afd9836c..edc25dc835d86 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_accounts_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -225,6 +225,9 @@ def build_update_request( def build_renew_credentials_request( resource_group_name: str, account_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version = kwargs.pop("api_version", _params.pop("api-version", "2022-05-01")) # type: str # Construct URL _url = kwargs.pop( "template_url", @@ -240,7 +243,10 @@ def build_renew_credentials_request( _url = _format_url_section(_url, **path_format_arguments) - return HttpRequest(method="POST", url=_url, **kwargs) + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) class AccountsOperations: @@ -302,10 +308,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -379,10 +392,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -1028,14 +1048,16 @@ def _renew_credentials_initial( # pylint: disable=inconsistent-return-statement error_map.update(kwargs.pop("error_map", {}) or {}) _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str cls = kwargs.pop("cls", None) # type: ClsType[None] request = build_renew_credentials_request( resource_group_name=resource_group_name, account_name=account_name, subscription_id=self._config.subscription_id, + api_version=api_version, template_url=self._renew_credentials_initial.metadata["url"], headers=_headers, params=_params, @@ -1083,8 +1105,9 @@ def begin_renew_credentials(self, resource_group_name: str, account_name: str, * :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} - _params = kwargs.pop("params", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + api_version = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) # type: str cls = kwargs.pop("cls", None) # type: ClsType[None] polling = kwargs.pop("polling", True) # type: Union[bool, PollingMethod] lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1093,6 +1116,7 @@ def begin_renew_credentials(self, resource_group_name: str, account_name: str, * raw_result = self._renew_credentials_initial( # type: ignore resource_group_name=resource_group_name, account_name=account_name, + api_version=api_version, cls=lambda x, y, z: x, headers=_headers, params=_params, diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py index 85fda201e47cd..d9aa843bb97af 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backup_policies_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -270,10 +270,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py index 43ff1c1170791..8bed9a391bfab 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_backups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -548,10 +548,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py index 6aa08bdcd258a..78f431b2a56a0 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_operations.py @@ -178,7 +178,7 @@ def check_name_availability( self, location: str, name: str, - type: Union[str, "_models.CheckNameResourceTypes"], + type: Union[str, _models.CheckNameResourceTypes], resource_group: str, **kwargs: Any ) -> _models.CheckAvailabilityResponse: @@ -327,7 +327,7 @@ def check_quota_availability( self, location: str, name: str, - type: Union[str, "_models.CheckQuotaNameResourceTypes"], + type: Union[str, _models.CheckQuotaNameResourceTypes], resource_group: str, **kwargs: Any ) -> _models.CheckAvailabilityResponse: diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py index c447de3850cdd..e39c8ec13a924 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_net_app_resource_quota_limits_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -155,10 +155,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py index 19e311d5004b7..50042e0c23b2a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -113,10 +113,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py index fb62a7e11e576..86d277e3fbedf 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_pools_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -278,10 +278,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py index a5477e8b6e39e..d3ae97176a44a 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshot_policies_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -302,10 +302,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py index cc33eb1dbd235..4f280d392f6df 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_snapshots_operations.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -388,10 +388,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py index 1e52454b42b33..d156bbcfda67c 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_subvolumes_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -415,10 +415,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py index 792bbab8f3868..d0084a732bc09 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_vaults_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -132,10 +132,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py index 30ef64bd8e747..ded72e56a9225 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_groups_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -258,10 +258,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py index 9dc7208670b2f..75c7055a6082f 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volume_quota_rules_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -334,10 +334,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" diff --git a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py index 4af435b0a0eb4..e6cf816df31da 100644 --- a/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py +++ b/sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_volumes_operations.py @@ -7,7 +7,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload -from urllib.parse import parse_qs, urljoin, urlparse +import urllib.parse from azure.core.exceptions import ( ClientAuthenticationError, @@ -819,10 +819,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET" @@ -2501,10 +2508,17 @@ def prepare_request(next_link=None): else: # make call to next link with the client's api-version - _parsed_next_link = urlparse(next_link) - _next_request_params = case_insensitive_dict(parse_qs(_parsed_next_link.query)) + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) _next_request_params["api-version"] = self._config.api_version - request = HttpRequest("GET", urljoin(next_link, _parsed_next_link.path), params=_next_request_params) + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) request = _convert_request(request) request.url = self._client.format_url(request.url) # type: ignore request.method = "GET"