Skip to content

Commit 5f9d198

Browse files
author
SDK Automation
committed
Update from master
1 parent 9f4bbb0 commit 5f9d198

File tree

3,779 files changed

+336381
-60932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,779 files changed

+336381
-60932
lines changed

sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py

Lines changed: 732 additions & 1 deletion
Large diffs are not rendered by default.

sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py

Lines changed: 162 additions & 130 deletions
Large diffs are not rendered by default.

sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client_async.py

Lines changed: 732 additions & 1 deletion
Large diffs are not rendered by default.

sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin_async.py

Lines changed: 169 additions & 137 deletions
Large diffs are not rendered by default.

sdk/network/azure-mgmt-network/azure/mgmt/network/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
from .v2019_02_01.models import *
88
from .v2019_07_01.models import *
99
from .v2020_04_01.models import *
10+
from .v2020_06_01.models import *

sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_metadata.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,16 @@
6666
"operation_mixins": {
6767
"check_dns_name_availability" : {
6868
"sync": {
69-
"operation_name": "check_dns_name_availability",
7069
"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"
7170
},
7271
"async": {
73-
"operation_name": "check_dns_name_availability",
7472
"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",
7573
"coroutine": true
7674
},
7775
"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\"\"\"",
7876
"call": "location, domain_name_label"
7977
}
8078
},
81-
"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",
82-
"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"
79+
"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\"]}}}",
80+
"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\"]}}}"
8381
}

sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations_async/_application_gateways_operations_async.py

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ async def _delete_initial(
7070
# Construct headers
7171
header_parameters = {} # type: Dict[str, Any]
7272

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

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

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

245-
deserialized = None
246242
if response.status_code == 200:
247243
deserialized = self._deserialize('ApplicationGateway', pipeline_response)
248244

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

342338
def prepare_request(next_link=None):
339+
# Construct headers
340+
header_parameters = {} # type: Dict[str, Any]
341+
header_parameters['Accept'] = 'application/json'
342+
343343
if not next_link:
344344
# Construct URL
345345
url = self.list.metadata['url'] # type: ignore
@@ -352,15 +352,11 @@ def prepare_request(next_link=None):
352352
query_parameters = {} # type: Dict[str, Any]
353353
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
354354

355+
request = self._client.get(url, query_parameters, header_parameters)
355356
else:
356357
url = next_link
357358
query_parameters = {} # type: Dict[str, Any]
358-
# Construct headers
359-
header_parameters = {} # type: Dict[str, Any]
360-
header_parameters['Accept'] = 'application/json'
361-
362-
# Construct and send request
363-
request = self._client.get(url, query_parameters, header_parameters)
359+
request = self._client.get(url, query_parameters, header_parameters)
364360
return request
365361

366362
async def extract_data(pipeline_response):
@@ -404,6 +400,10 @@ def list_all(
404400
api_version = "2015-06-15"
405401

406402
def prepare_request(next_link=None):
403+
# Construct headers
404+
header_parameters = {} # type: Dict[str, Any]
405+
header_parameters['Accept'] = 'application/json'
406+
407407
if not next_link:
408408
# Construct URL
409409
url = self.list_all.metadata['url'] # type: ignore
@@ -415,15 +415,11 @@ def prepare_request(next_link=None):
415415
query_parameters = {} # type: Dict[str, Any]
416416
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
417417

418+
request = self._client.get(url, query_parameters, header_parameters)
418419
else:
419420
url = next_link
420421
query_parameters = {} # type: Dict[str, Any]
421-
# Construct headers
422-
header_parameters = {} # type: Dict[str, Any]
423-
header_parameters['Accept'] = 'application/json'
424-
425-
# Construct and send request
426-
request = self._client.get(url, query_parameters, header_parameters)
422+
request = self._client.get(url, query_parameters, header_parameters)
427423
return request
428424

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

480-
# Construct and send request
481476
request = self._client.post(url, query_parameters, header_parameters)
482477
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
483478
response = pipeline_response.http_response
@@ -496,7 +491,7 @@ async def begin_start(
496491
resource_group_name: str,
497492
application_gateway_name: str,
498493
**kwargs
499-
) -> None:
494+
) -> AsyncLROPoller[None]:
500495
"""Starts the specified application gateway.
501496
502497
:param resource_group_name: The name of the resource group.
@@ -509,8 +504,8 @@ async def begin_start(
509504
polling object for personal polling strategy
510505
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
511506
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
512-
:return: None, or the result of cls(response)
513-
:rtype: None
507+
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
508+
:rtype: ~azure.core.polling.AsyncLROPoller[None]
514509
:raises ~azure.core.exceptions.HttpResponseError:
515510
"""
516511
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
@@ -576,7 +571,6 @@ async def _stop_initial(
576571
# Construct headers
577572
header_parameters = {} # type: Dict[str, Any]
578573

579-
# Construct and send request
580574
request = self._client.post(url, query_parameters, header_parameters)
581575
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
582576
response = pipeline_response.http_response
@@ -595,7 +589,7 @@ async def begin_stop(
595589
resource_group_name: str,
596590
application_gateway_name: str,
597591
**kwargs
598-
) -> None:
592+
) -> AsyncLROPoller[None]:
599593
"""Stops the specified application gateway in a resource group.
600594
601595
:param resource_group_name: The name of the resource group.
@@ -608,8 +602,8 @@ async def begin_stop(
608602
polling object for personal polling strategy
609603
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
610604
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
611-
:return: None, or the result of cls(response)
612-
:rtype: None
605+
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
606+
:rtype: ~azure.core.polling.AsyncLROPoller[None]
613607
:raises ~azure.core.exceptions.HttpResponseError:
614608
"""
615609
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]

sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/aio/operations_async/_express_route_circuit_authorizations_operations_async.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ async def _delete_initial(
7272
# Construct headers
7373
header_parameters = {} # type: Dict[str, Any]
7474

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

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

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

257-
deserialized = None
258254
if response.status_code == 200:
259255
deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response)
260256

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

362358
def prepare_request(next_link=None):
359+
# Construct headers
360+
header_parameters = {} # type: Dict[str, Any]
361+
header_parameters['Accept'] = 'application/json'
362+
363363
if not next_link:
364364
# Construct URL
365365
url = self.list.metadata['url'] # type: ignore
@@ -373,15 +373,11 @@ def prepare_request(next_link=None):
373373
query_parameters = {} # type: Dict[str, Any]
374374
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
375375

376+
request = self._client.get(url, query_parameters, header_parameters)
376377
else:
377378
url = next_link
378379
query_parameters = {} # type: Dict[str, Any]
379-
# Construct headers
380-
header_parameters = {} # type: Dict[str, Any]
381-
header_parameters['Accept'] = 'application/json'
382-
383-
# Construct and send request
384-
request = self._client.get(url, query_parameters, header_parameters)
380+
request = self._client.get(url, query_parameters, header_parameters)
385381
return request
386382

387383
async def extract_data(pipeline_response):

0 commit comments

Comments
 (0)