Skip to content

Commit

Permalink
Update from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Aug 13, 2020
1 parent 1216acf commit 1dcfc11
Show file tree
Hide file tree
Showing 3,555 changed files with 188,044 additions and 60,932 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.

Large diffs are not rendered by default.

276 changes: 146 additions & 130 deletions sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
from .v2019_02_01.models import *
from .v2019_07_01.models import *
from .v2020_04_01.models import *
from .v2020_05_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,16 @@
"operation_mixins": {
"check_dns_name_availability" : {
"sync": {
"operation_name": "check_dns_name_availability",
"signature": "def check_dns_name_availability(\n self,\n location, # type: str\n domain_name_label=None, # type: Optional[str]\n **kwargs # type: Any\n):\n"
},
"async": {
"operation_name": "check_dns_name_availability",
"signature": "async def check_dns_name_availability(\n self,\n location: str,\n domain_name_label: Optional[str] = None,\n **kwargs\n) -\u003e \"models.DnsNameAvailabilityResult\":\n",
"coroutine": true
},
"doc": " \"\"\"Checks whether a domain name in the cloudapp.net zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2015_06_15.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"",
"call": "location, domain_name_label"
}
},
"sync_imports": "from typing import TYPE_CHECKING\nimport warnings\n\nfrom azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error\nfrom azure.core.pipeline import PipelineResponse\nfrom azure.core.pipeline.transport import HttpRequest, HttpResponse\nfrom azure.mgmt.core.exceptions import ARMErrorFormat\n\nif TYPE_CHECKING:\n # pylint: disable=unused-import,ungrouped-imports\n from typing import Any, Callable, Dict, Generic, Optional, TypeVar",
"async_imports": "from typing import Any, Callable, Dict, Generic, Optional, TypeVar\nimport warnings\n\nfrom azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error\nfrom azure.core.pipeline import PipelineResponse\nfrom azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest\nfrom azure.mgmt.core.exceptions import ARMErrorFormat"
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand All @@ -89,7 +88,7 @@ async def begin_delete(
resource_group_name: str,
application_gateway_name: str,
**kwargs
) -> None:
) -> AsyncLROPoller[None]:
"""Deletes the specified application gateway.
:param resource_group_name: The name of the resource group.
Expand All @@ -102,8 +101,8 @@ async def begin_delete(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: None, or the result of cls(response)
:rtype: None
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -181,7 +180,6 @@ async def get(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -229,7 +227,6 @@ async def _create_or_update_initial(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(parameters, 'ApplicationGateway')
body_content_kwargs['content'] = body_content
Expand All @@ -242,7 +239,6 @@ async def _create_or_update_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ApplicationGateway', pipeline_response)

Expand All @@ -261,7 +257,7 @@ async def begin_create_or_update(
application_gateway_name: str,
parameters: "models.ApplicationGateway",
**kwargs
) -> "models.ApplicationGateway":
) -> AsyncLROPoller["models.ApplicationGateway"]:
"""Creates or updates the specified application gateway.
:param resource_group_name: The name of the resource group.
Expand All @@ -276,8 +272,8 @@ async def begin_create_or_update(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: ApplicationGateway, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2015_06_15.models.ApplicationGateway
:return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2015_06_15.models.ApplicationGateway]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -340,6 +336,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -352,15 +352,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down Expand Up @@ -404,6 +400,10 @@ def list_all(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list_all.metadata['url'] # type: ignore
Expand All @@ -415,15 +415,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down Expand Up @@ -477,7 +473,6 @@ async def _start_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand All @@ -496,7 +491,7 @@ async def begin_start(
resource_group_name: str,
application_gateway_name: str,
**kwargs
) -> None:
) -> AsyncLROPoller[None]:
"""Starts the specified application gateway.
:param resource_group_name: The name of the resource group.
Expand All @@ -509,8 +504,8 @@ async def begin_start(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: None, or the result of cls(response)
:rtype: None
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -576,7 +571,6 @@ async def _stop_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.post(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand All @@ -595,7 +589,7 @@ async def begin_stop(
resource_group_name: str,
application_gateway_name: str,
**kwargs
) -> None:
) -> AsyncLROPoller[None]:
"""Stops the specified application gateway in a resource group.
:param resource_group_name: The name of the resource group.
Expand All @@ -608,8 +602,8 @@ async def begin_stop(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: None, or the result of cls(response)
:rtype: None
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ async def _delete_initial(
# Construct headers
header_parameters = {} # type: Dict[str, Any]

# Construct and send request
request = self._client.delete(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand All @@ -92,7 +91,7 @@ async def begin_delete(
circuit_name: str,
authorization_name: str,
**kwargs
) -> None:
) -> AsyncLROPoller[None]:
"""Deletes the specified authorization from the specified express route circuit.
:param resource_group_name: The name of the resource group.
Expand All @@ -107,8 +106,8 @@ async def begin_delete(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: None, or the result of cls(response)
:rtype: None
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -191,7 +190,6 @@ async def get(
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
Expand Down Expand Up @@ -241,7 +239,6 @@ async def _create_or_update_initial(
header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
header_parameters['Accept'] = 'application/json'

# Construct and send request
body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization')
body_content_kwargs['content'] = body_content
Expand All @@ -254,7 +251,6 @@ async def _create_or_update_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response)

Expand All @@ -274,7 +270,7 @@ async def begin_create_or_update(
authorization_name: str,
authorization_parameters: "models.ExpressRouteCircuitAuthorization",
**kwargs
) -> "models.ExpressRouteCircuitAuthorization":
) -> AsyncLROPoller["models.ExpressRouteCircuitAuthorization"]:
"""Creates or updates an authorization in the specified express route circuit.
:param resource_group_name: The name of the resource group.
Expand All @@ -292,8 +288,8 @@ async def begin_create_or_update(
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: ExpressRouteCircuitAuthorization, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2015_06_15.models.ExpressRouteCircuitAuthorization
:return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2015_06_15.models.ExpressRouteCircuitAuthorization]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -360,6 +356,10 @@ def list(
api_version = "2015-06-15"

def prepare_request(next_link=None):
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
Expand All @@ -373,15 +373,11 @@ def prepare_request(next_link=None):
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'

# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
request = self._client.get(url, query_parameters, header_parameters)
return request

async def extract_data(pipeline_response):
Expand Down
Loading

0 comments on commit 1dcfc11

Please sign in to comment.