Skip to content

Commit c1bc744

Browse files
author
SDK Automation
committed
Generated from f3673d817a3917a038521ec2e4ec2e66f83e0d1d
1 parent 24dcee5 commit c1bc744

File tree

6,029 files changed

+921803
-973437
lines changed

Some content is hidden

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

6,029 files changed

+921803
-973437
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
__all__ = ['NetworkManagementClient']
1111

1212
try:
13-
from ._patch import patch_sdk # type: ignore
13+
from ._patch import patch_sdk
1414
patch_sdk()
1515
except ImportError:
1616
pass

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
1615

1716
from ._version import VERSION
1817

@@ -44,7 +43,8 @@ def __init__(
4443

4544
self.credential = credential
4645
self.subscription_id = subscription_id
47-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
46+
self.credential_scopes = ['https://management.azure.com/.default']
47+
self.credential_scopes.extend(kwargs.pop('credential_scopes', []))
4848
kwargs.setdefault('sdk_moniker', 'azure-mgmt-network/{}'.format(VERSION))
4949
self._configure(**kwargs)
5050

@@ -57,7 +57,6 @@ def _configure(
5757
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
5858
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
5959
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
60-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
6160
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
6261
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
6362
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)

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

Lines changed: 110 additions & 108 deletions
Large diffs are not rendered by default.

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

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from typing import TYPE_CHECKING
1313
import warnings
1414

15-
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
15+
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
1616
from azure.core.paging import ItemPaged
1717
from azure.core.pipeline import PipelineResponse
1818
from azure.core.pipeline.transport import HttpRequest, HttpResponse
@@ -43,14 +43,9 @@ def begin_delete_bastion_shareable_link(
4343
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
4444
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
4545
:keyword callable cls: A custom type or function that will be passed the direct response
46-
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
47-
:keyword polling: True for ARMPolling, False for no polling, or a
48-
polling object for personal polling strategy
49-
:paramtype polling: bool or ~azure.core.polling.PollingMethod
50-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
51-
:return: An instance of LROPoller that returns either None or the result of cls(response)
52-
:rtype: ~azure.core.polling.LROPoller[None]
53-
:raises ~azure.core.exceptions.HttpResponseError:
46+
:return: None, or the result of cls(response)
47+
:rtype: None
48+
:raises: ~azure.core.exceptions.HttpResponseError
5449
"""
5550
api_version = self._get_api_version('begin_delete_bastion_shareable_link')
5651
if api_version == '2019-09-01':
@@ -68,7 +63,7 @@ def begin_delete_bastion_shareable_link(
6863
elif api_version == '2020-06-01':
6964
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
7065
else:
71-
raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version))
66+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
7267
mixin_instance = OperationClass()
7368
mixin_instance._client = self._client
7469
mixin_instance._config = self._config
@@ -95,14 +90,9 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
9590
operation.
9691
:type vpn_client_params: ~azure.mgmt.network.v2020_06_01.models.VirtualWanVpnProfileParameters
9792
:keyword callable cls: A custom type or function that will be passed the direct response
98-
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
99-
:keyword polling: True for ARMPolling, False for no polling, or a
100-
polling object for personal polling strategy
101-
:paramtype polling: bool or ~azure.core.polling.PollingMethod
102-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
103-
:return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response)
104-
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse]
105-
:raises ~azure.core.exceptions.HttpResponseError:
93+
:return: VpnProfileResponse, or the result of cls(response)
94+
:rtype: ~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse
95+
:raises: ~azure.core.exceptions.HttpResponseError
10696
"""
10797
api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile')
10898
if api_version == '2019-08-01':
@@ -122,7 +112,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
122112
elif api_version == '2020-06-01':
123113
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
124114
else:
125-
raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version))
115+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
126116
mixin_instance = OperationClass()
127117
mixin_instance._client = self._client
128118
mixin_instance._config = self._config
@@ -143,14 +133,9 @@ def begin_get_active_sessions(
143133
:param bastion_host_name: The name of the Bastion Host.
144134
:type bastion_host_name: str
145135
:keyword callable cls: A custom type or function that will be passed the direct response
146-
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
147-
:keyword polling: True for ARMPolling, False for no polling, or a
148-
polling object for personal polling strategy
149-
:paramtype polling: bool or ~azure.core.polling.PollingMethod
150-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
151-
:return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)
152-
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult]]
153-
:raises ~azure.core.exceptions.HttpResponseError:
136+
:return: BastionActiveSessionListResult, or the result of cls(response)
137+
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult
138+
:raises: ~azure.core.exceptions.HttpResponseError
154139
"""
155140
api_version = self._get_api_version('begin_get_active_sessions')
156141
if api_version == '2019-09-01':
@@ -168,7 +153,7 @@ def begin_get_active_sessions(
168153
elif api_version == '2020-06-01':
169154
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
170155
else:
171-
raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version))
156+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
172157
mixin_instance = OperationClass()
173158
mixin_instance._client = self._client
174159
mixin_instance._config = self._config
@@ -192,14 +177,9 @@ def begin_put_bastion_shareable_link(
192177
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
193178
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
194179
:keyword callable cls: A custom type or function that will be passed the direct response
195-
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
196-
:keyword polling: True for ARMPolling, False for no polling, or a
197-
polling object for personal polling strategy
198-
:paramtype polling: bool or ~azure.core.polling.PollingMethod
199-
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
200-
:return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
201-
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]]
202-
:raises ~azure.core.exceptions.HttpResponseError:
180+
:return: BastionShareableLinkListResult, or the result of cls(response)
181+
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult
182+
:raises: ~azure.core.exceptions.HttpResponseError
203183
"""
204184
api_version = self._get_api_version('begin_put_bastion_shareable_link')
205185
if api_version == '2019-09-01':
@@ -217,7 +197,7 @@ def begin_put_bastion_shareable_link(
217197
elif api_version == '2020-06-01':
218198
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
219199
else:
220-
raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version))
200+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
221201
mixin_instance = OperationClass()
222202
mixin_instance._client = self._client
223203
mixin_instance._config = self._config
@@ -305,7 +285,7 @@ def check_dns_name_availability(
305285
elif api_version == '2020-06-01':
306286
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
307287
else:
308-
raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version))
288+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
309289
mixin_instance = OperationClass()
310290
mixin_instance._client = self._client
311291
mixin_instance._config = self._config
@@ -329,8 +309,8 @@ def disconnect_active_sessions(
329309
:param session_ids: The list of sessionids to disconnect.
330310
:type session_ids: ~azure.mgmt.network.v2020_06_01.models.SessionIds
331311
:keyword callable cls: A custom type or function that will be passed the direct response
332-
:return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)
333-
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionSessionDeleteResult]
312+
:return: BastionSessionDeleteResult, or the result of cls(response)
313+
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionSessionDeleteResult
334314
:raises: ~azure.core.exceptions.HttpResponseError
335315
"""
336316
api_version = self._get_api_version('disconnect_active_sessions')
@@ -349,7 +329,7 @@ def disconnect_active_sessions(
349329
elif api_version == '2020-06-01':
350330
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
351331
else:
352-
raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version))
332+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
353333
mixin_instance = OperationClass()
354334
mixin_instance._client = self._client
355335
mixin_instance._config = self._config
@@ -373,8 +353,8 @@ def get_bastion_shareable_link(
373353
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
374354
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
375355
:keyword callable cls: A custom type or function that will be passed the direct response
376-
:return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
377-
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]
356+
:return: BastionShareableLinkListResult, or the result of cls(response)
357+
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult
378358
:raises: ~azure.core.exceptions.HttpResponseError
379359
"""
380360
api_version = self._get_api_version('get_bastion_shareable_link')
@@ -393,7 +373,7 @@ def get_bastion_shareable_link(
393373
elif api_version == '2020-06-01':
394374
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
395375
else:
396-
raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version))
376+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
397377
mixin_instance = OperationClass()
398378
mixin_instance._client = self._client
399379
mixin_instance._config = self._config
@@ -453,7 +433,7 @@ def supported_security_providers(
453433
elif api_version == '2020-06-01':
454434
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
455435
else:
456-
raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version))
436+
raise NotImplementedError("APIVersion {} is not available".format(api_version))
457437
mixin_instance = OperationClass()
458438
mixin_instance._client = self._client
459439
mixin_instance._config = self._config

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._network_management_client import NetworkManagementClient
9+
from ._network_management_client_async import NetworkManagementClient
1010
__all__ = ['NetworkManagementClient']

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

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)