Skip to content
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
12 changes: 12 additions & 0 deletions sdk/nginx/azure-mgmt-nginx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 2.0.0 (2022-10-18)

### Features Added

- Added operation CertificatesOperations.begin_create_or_update
- Added operation DeploymentsOperations.begin_create_or_update

### Breaking Changes

- Removed operation CertificatesOperations.begin_create
- Removed operation DeploymentsOperations.begin_create

## 1.1.0 (2022-09-20)

### Features Added
Expand Down
10 changes: 5 additions & 5 deletions sdk/nginx/azure-mgmt-nginx/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.8.4",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.1.6",
"@autorest/modelerfour@4.23.5"
"@autorest/python@6.1.11",
"@autorest/modelerfour@4.24.3"
],
"commit": "5dd50f3a923888cae5b77a4d4a48cb57430ba9de",
"commit": "c71a66dab813061f1d09982c2748a09317fe0860",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/nginx/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
"autorest_command": "autorest specification/nginx/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/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/nginx/resource-manager/readme.md"
}
2 changes: 1 addition & 1 deletion sdk/nginx/azure-mgmt-nginx/azure/mgmt/nginx/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.1.0"
VERSION = "2.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -31,7 +31,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._certificates_operations import (
build_create_request,
build_create_or_update_request,
build_delete_request,
build_get_request,
build_list_request,
Expand Down Expand Up @@ -129,7 +129,7 @@ async def get(

get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"} # type: ignore

async def _create_initial(
async def _create_or_update_initial(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -163,7 +163,7 @@ async def _create_initial(
else:
_json = None

request = build_create_request(
request = build_create_or_update_request(
resource_group_name=resource_group_name,
deployment_name=deployment_name,
certificate_name=certificate_name,
Expand All @@ -172,7 +172,7 @@ async def _create_initial(
content_type=content_type,
json=_json,
content=_content,
template_url=self._create_initial.metadata["url"],
template_url=self._create_or_update_initial.metadata["url"],
headers=_headers,
params=_params,
)
Expand Down Expand Up @@ -203,10 +203,10 @@ async def _create_initial(

return deserialized

_create_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"} # type: ignore
_create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"} # type: ignore

@overload
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -247,7 +247,7 @@ async def begin_create(
"""

@overload
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -288,7 +288,7 @@ async def begin_create(
"""

@distributed_trace_async
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -335,7 +335,7 @@ async def begin_create(
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token = kwargs.pop("continuation_token", None) # type: Optional[str]
if cont_token is None:
raw_result = await self._create_initial( # type: ignore
raw_result = await self._create_or_update_initial( # type: ignore
resource_group_name=resource_group_name,
deployment_name=deployment_name,
certificate_name=certificate_name,
Expand Down Expand Up @@ -373,7 +373,7 @@ def get_long_running_output(pipeline_response):
)
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)

begin_create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"} # type: ignore
begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}/certificates/{certificateName}"} # type: ignore

async def _delete_initial( # pylint: disable=inconsistent-return-statements
self, resource_group_name: str, deployment_name: str, certificate_name: str, **kwargs: Any
Expand Down Expand Up @@ -541,10 +541,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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -109,10 +109,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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -31,7 +31,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._deployments_operations import (
build_create_request,
build_create_or_update_request,
build_delete_request,
build_get_request,
build_list_by_resource_group_request,
Expand Down Expand Up @@ -126,7 +126,7 @@ async def get(self, resource_group_name: str, deployment_name: str, **kwargs: An

get.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"} # type: ignore

async def _create_initial(
async def _create_or_update_initial(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -159,15 +159,15 @@ async def _create_initial(
else:
_json = None

request = build_create_request(
request = build_create_or_update_request(
resource_group_name=resource_group_name,
deployment_name=deployment_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
json=_json,
content=_content,
template_url=self._create_initial.metadata["url"],
template_url=self._create_or_update_initial.metadata["url"],
headers=_headers,
params=_params,
)
Expand Down Expand Up @@ -198,10 +198,10 @@ async def _create_initial(

return deserialized

_create_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"} # type: ignore
_create_or_update_initial.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"} # type: ignore

@overload
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -239,7 +239,7 @@ async def begin_create(
"""

@overload
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -277,7 +277,7 @@ async def begin_create(
"""

@distributed_trace_async
async def begin_create(
async def begin_create_or_update(
self,
resource_group_name: str,
deployment_name: str,
Expand Down Expand Up @@ -321,7 +321,7 @@ async def begin_create(
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token = kwargs.pop("continuation_token", None) # type: Optional[str]
if cont_token is None:
raw_result = await self._create_initial( # type: ignore
raw_result = await self._create_or_update_initial( # type: ignore
resource_group_name=resource_group_name,
deployment_name=deployment_name,
body=body,
Expand Down Expand Up @@ -358,7 +358,7 @@ def get_long_running_output(pipeline_response):
)
return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method)

begin_create.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"} # type: ignore
begin_create_or_update.metadata = {"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Nginx.NginxPlus/nginxDeployments/{deploymentName}"} # type: ignore

async def _update_initial(
self,
Expand Down Expand Up @@ -742,10 +742,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"
Expand Down Expand Up @@ -825,10 +832,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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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"
Expand Down
Loading