Skip to content

Commit

Permalink
CodeGen from PR 18432 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Update resource association swagger (Azure#18432)

* update access mode values

* update examples

* Add 202 in delete spec

* Add provisioning issues changes

* update schema

* review changs

* update

* typo in model fix

* make provisioning issues readonly

* Add one example in list association, provisioning state enum update

* Add logggin categories in profile

* examples update

* update

* update examples

* reformat code

* Add x-msidentifier for logger

* update

* provisioning state fix

* Fix provisioning state

* Add location header in delete nsp association

* update location header

* update location header

* location header update

Co-authored-by: Kaushal Kumar <kumarkaushal@microsoft.com>
  • Loading branch information
SDKAuto and Kaushal Kumar committed Apr 19, 2022
1 parent 60f878a commit 5085738
Show file tree
Hide file tree
Showing 5,122 changed files with 1,654,681 additions and 1,490,524 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions sdk/network/azure-mgmt-network/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@5.13.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "200370117556209695877b7631afa7d6c100c356",
"commit": "f20b48325931fd0f2a42dc6d7545f13bb586f206",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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",
"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",
"readme": "specification/network/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

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

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

from typing import TYPE_CHECKING

from msrest import Deserializer, Serializer

from azure.mgmt.core import ARMPipelineClient
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin
from msrest import Deserializer, Serializer

from ._configuration import NetworkManagementClientConfiguration
from ._operations_mixin import NetworkManagementClientOperationsMixin
Expand All @@ -24,7 +25,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -78,6 +78,9 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl
'network_manager_effective_security_admin_rules': '2021-02-01-preview',
'network_managers': '2021-02-01-preview',
'network_security_perimeters': '2021-02-01-preview',
'nsp_access_rules': '2021-02-01-preview',
'nsp_associations': '2021-02-01-preview',
'nsp_profiles': '2021-02-01-preview',
'p2_svpn_server_configurations': '2019-07-01',
'perimeter_associable_resource_types': '2021-02-01-preview',
'security_admin_configurations': '2021-02-01-preview',
Expand All @@ -93,12 +96,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(NetworkManagementClient, self).__init__(
Expand Down Expand Up @@ -4862,6 +4863,45 @@ def network_watchers(self):
raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_access_rules(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAccessRulesOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAccessRulesOperations>`
"""
api_version = self._get_api_version('nsp_access_rules')
if api_version == '2021-02-01-preview':
from .v2021_02_01_preview.operations import NspAccessRulesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_access_rules'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_associations(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspAssociationsOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspAssociationsOperations>`
"""
api_version = self._get_api_version('nsp_associations')
if api_version == '2021-02-01-preview':
from .v2021_02_01_preview.operations import NspAssociationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_associations'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def nsp_profiles(self):
"""Instance depends on the API version:

* 2021-02-01-preview: :class:`NspProfilesOperations<azure.mgmt.network.v2021_02_01_preview.operations.NspProfilesOperations>`
"""
api_version = self._get_api_version('nsp_profiles')
if api_version == '2021-02-01-preview':
from .v2021_02_01_preview.operations import NspProfilesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'nsp_profiles'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def operations(self):
"""Instance depends on the API version:
Expand Down
Loading

0 comments on commit 5085738

Please sign in to comment.