Skip to content

Commit 24ff6de

Browse files
author
SDKAuto
committed
CodeGen from PR 18440 in Azure/azure-rest-api-specs
Merge 995edb42a00240ed05f5eeb4ede132bc3308769d into 62f25f0db93c098813004f447b5afe9399c82ad1
1 parent be22436 commit 24ff6de

File tree

5,192 files changed

+2937565
-2898627
lines changed

Some content is hidden

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

5,192 files changed

+2937565
-2898627
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.4.5",
2+
"autorest": "3.7.2",
33
"use": [
4-
"@autorest/python@5.8.4",
5-
"@autorest/modelerfour@4.19.2"
4+
"@autorest/python@5.13.0",
5+
"@autorest/modelerfour@4.19.3"
66
],
7-
"commit": "200370117556209695877b7631afa7d6c100c356",
7+
"commit": "9a170f8c2dd0444e388df559d1a48429ffbe7908",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
9+
"autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.13.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
1010
"readme": "specification/network/resource-manager/readme.md"
1111
}

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

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

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
15-
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
15+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1616

1717
from ._version import VERSION
1818

@@ -68,4 +68,4 @@ def _configure(
6868
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
6969
self.authentication_policy = kwargs.get('authentication_policy')
7070
if self.credential and not self.authentication_policy:
71-
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
71+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

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

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
from typing import TYPE_CHECKING
1313

14+
from msrest import Deserializer, Serializer
15+
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
17-
from msrest import Deserializer, Serializer
1819

1920
from ._configuration import NetworkManagementClientConfiguration
2021
from ._operations_mixin import NetworkManagementClientOperationsMixin
@@ -24,7 +25,6 @@
2425
from typing import Any, Optional
2526

2627
from azure.core.credentials import TokenCredential
27-
from azure.core.pipeline.transport import HttpRequest, HttpResponse
2828

2929
class _SDKClient(object):
3030
def __init__(self, *args, **kwargs):
@@ -78,6 +78,9 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl
7878
'network_manager_effective_security_admin_rules': '2021-02-01-preview',
7979
'network_managers': '2021-02-01-preview',
8080
'network_security_perimeters': '2021-02-01-preview',
81+
'nsp_access_rules': '2021-02-01-preview',
82+
'nsp_associations': '2021-02-01-preview',
83+
'nsp_profiles': '2021-02-01-preview',
8184
'p2_svpn_server_configurations': '2019-07-01',
8285
'perimeter_associable_resource_types': '2021-02-01-preview',
8386
'security_admin_configurations': '2021-02-01-preview',
@@ -93,12 +96,10 @@ def __init__(
9396
credential, # type: "TokenCredential"
9497
subscription_id, # type: str
9598
api_version=None, # type: Optional[str]
96-
base_url=None, # type: Optional[str]
99+
base_url="https://management.azure.com", # type: str
97100
profile=KnownProfiles.default, # type: KnownProfiles
98101
**kwargs # type: Any
99102
):
100-
if not base_url:
101-
base_url = 'https://management.azure.com'
102103
self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs)
103104
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
104105
super(NetworkManagementClient, self).__init__(
@@ -4862,6 +4863,45 @@ def network_watchers(self):
48624863
raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version))
48634864
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
48644865

4866+
@property
4867+
def nsp_access_rules(self):
4868+
"""Instance depends on the API version:
4869+
4870+
* 2021-02-01-preview: :class:`NspAccessRulesOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAccessRulesOperations>`
4871+
"""
4872+
api_version = self._get_api_version('nsp_access_rules')
4873+
if api_version == '2021-02-01-preview':
4874+
from .v2021_02_01_preview.operations import NspAccessRulesOperations as OperationClass
4875+
else:
4876+
raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version))
4877+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
4878+
4879+
@property
4880+
def nsp_associations(self):
4881+
"""Instance depends on the API version:
4882+
4883+
* 2021-02-01-preview: :class:`NspAssociationsOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAssociationsOperations>`
4884+
"""
4885+
api_version = self._get_api_version('nsp_associations')
4886+
if api_version == '2021-02-01-preview':
4887+
from .v2021_02_01_preview.operations import NspAssociationsOperations as OperationClass
4888+
else:
4889+
raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version))
4890+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
4891+
4892+
@property
4893+
def nsp_profiles(self):
4894+
"""Instance depends on the API version:
4895+
4896+
* 2021-02-01-preview: :class:`NspProfilesOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspProfilesOperations>`
4897+
"""
4898+
api_version = self._get_api_version('nsp_profiles')
4899+
if api_version == '2021-02-01-preview':
4900+
from .v2021_02_01_preview.operations import NspProfilesOperations as OperationClass
4901+
else:
4902+
raise ValueError("API version {} does not have operation group 'nsp_profiles'".format(api_version))
4903+
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
4904+
48654905
@property
48664906
def operations(self):
48674907
"""Instance depends on the API version:

0 commit comments

Comments
 (0)