Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
__all__ = ['NetworkManagementClient']

try:
from ._patch import patch_sdk # type: ignore
from ._patch import patch_sdk
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -44,7 +43,8 @@ def __init__(

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

Expand All @@ -57,7 +57,6 @@ def _configure(
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from typing import TYPE_CHECKING
import warnings

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
Expand Down Expand Up @@ -43,14 +43,9 @@ def begin_delete_bastion_shareable_link(
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
:return: None, or the result of cls(response)
:rtype: None
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_delete_bastion_shareable_link')
if api_version == '2019-09-01':
Expand All @@ -68,7 +63,7 @@ def begin_delete_bastion_shareable_link(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand All @@ -95,14 +90,9 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
operation.
:type vpn_client_params: ~azure.mgmt.network.v2020_06_01.models.VirtualWanVpnProfileParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse]
:raises ~azure.core.exceptions.HttpResponseError:
:return: VpnProfileResponse, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2020_06_01.models.VpnProfileResponse
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile')
if api_version == '2019-08-01':
Expand All @@ -122,7 +112,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand All @@ -143,14 +133,9 @@ def begin_get_active_sessions(
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult]]
:raises ~azure.core.exceptions.HttpResponseError:
:return: BastionActiveSessionListResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionActiveSessionListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_get_active_sessions')
if api_version == '2019-09-01':
Expand All @@ -168,7 +153,7 @@ def begin_get_active_sessions(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand All @@ -192,14 +177,9 @@ def begin_put_bastion_shareable_link(
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.PollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]]
:raises ~azure.core.exceptions.HttpResponseError:
:return: BastionShareableLinkListResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('begin_put_bastion_shareable_link')
if api_version == '2019-09-01':
Expand All @@ -217,7 +197,7 @@ def begin_put_bastion_shareable_link(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand Down Expand Up @@ -305,7 +285,7 @@ def check_dns_name_availability(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand All @@ -329,8 +309,8 @@ def disconnect_active_sessions(
:param session_ids: The list of sessionids to disconnect.
:type session_ids: ~azure.mgmt.network.v2020_06_01.models.SessionIds
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionSessionDeleteResult]
:return: BastionSessionDeleteResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionSessionDeleteResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('disconnect_active_sessions')
Expand All @@ -349,7 +329,7 @@ def disconnect_active_sessions(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand All @@ -373,8 +353,8 @@ def get_bastion_shareable_link(
:param bsl_request: Post request for all the Bastion Shareable Link endpoints.
:type bsl_request: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListRequest
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)
:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult]
:return: BastionShareableLinkListResult, or the result of cls(response)
:rtype: ~azure.mgmt.network.v2020_06_01.models.BastionShareableLinkListResult
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = self._get_api_version('get_bastion_shareable_link')
Expand All @@ -393,7 +373,7 @@ def get_bastion_shareable_link(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand Down Expand Up @@ -453,7 +433,7 @@ def supported_security_providers(
elif api_version == '2020-06-01':
from .v2020_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version))
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance._config = self._config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._network_management_client import NetworkManagementClient
from ._network_management_client_async import NetworkManagementClient
__all__ = ['NetworkManagementClient']

This file was deleted.

Loading