Skip to content

Commit 7b4a8aa

Browse files
author
SDKAuto
committed
CodeGen from PR 21976 in Azure/azure-rest-api-specs
Merge 266f4a45265b7d560b337dc256c3901dd19fd980 into d166d2b4b5691d47dce339fff5822a16c5714084
1 parent 5f7310f commit 7b4a8aa

File tree

645 files changed

+3214707
-107639
lines changed

Some content is hidden

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

645 files changed

+3214707
-107639
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "cb6219f411b14e368af6175587b302ac74b4263d",
2+
"commit": "22520d4852ad539e039d7528c99b8846571de47f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.2",
55
"use": [
66
"@autorest/[email protected]",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.9.2 --version-tolerant=False",
1010
"readme": "specification/network/resource-manager/readme.md"
1111
}

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

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from ._client import NetworkManagementClient
10-
from ._version import VERSION
11-
12-
__version__ = VERSION
9+
from ._network_management_client import NetworkManagementClient
10+
__all__ = ['NetworkManagementClient']
1311

1412
try:
15-
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
13+
from ._patch import patch_sdk # type: ignore
14+
patch_sdk()
1715
except ImportError:
18-
_patch_all = []
19-
from ._patch import patch_sdk as _patch_sdk
16+
pass
2017

21-
__all__ = [
22-
"NetworkManagementClient",
23-
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
18+
from ._version import VERSION
2519

26-
_patch_sdk()
20+
__version__ = VERSION

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

Lines changed: 0 additions & 2574 deletions
This file was deleted.
Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
57
# Code generated by Microsoft (R) AutoRest Code Generator.
6-
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
710
# --------------------------------------------------------------------------
8-
911
from typing import Any, TYPE_CHECKING
1012

1113
from azure.core.configuration import Configuration
@@ -18,44 +20,48 @@
1820
# pylint: disable=unused-import,ungrouped-imports
1921
from azure.core.credentials import TokenCredential
2022

21-
22-
class NetworkManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
23+
class NetworkManagementClientConfiguration(Configuration):
2324
"""Configuration for NetworkManagementClient.
2425
2526
Note that all parameters used to create this instance are saved as instance
2627
attributes.
2728
2829
:param credential: Credential needed for the client to connect to Azure. Required.
2930
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The subscription credentials which uniquely identify the Microsoft
31-
Azure subscription. The subscription ID forms part of the URI for every service call. Required.
31+
:param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
3232
:type subscription_id: str
3333
"""
3434

35-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36-
super(NetworkManagementClientConfiguration, self).__init__(**kwargs)
35+
def __init__(
36+
self,
37+
credential: "TokenCredential",
38+
subscription_id: str,
39+
**kwargs: Any
40+
):
3741
if credential is None:
3842
raise ValueError("Parameter 'credential' must not be None.")
3943
if subscription_id is None:
4044
raise ValueError("Parameter 'subscription_id' must not be None.")
45+
super(NetworkManagementClientConfiguration, self).__init__(**kwargs)
4146

4247
self.credential = credential
4348
self.subscription_id = subscription_id
44-
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
45-
kwargs.setdefault("sdk_moniker", "mgmt-network/{}".format(VERSION))
49+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
50+
kwargs.setdefault('sdk_moniker', 'azure-mgmt-network/{}'.format(VERSION))
4651
self._configure(**kwargs)
4752

48-
def _configure(self, **kwargs: Any) -> None:
49-
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
50-
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
51-
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
52-
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
53-
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
54-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
55-
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
56-
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
57-
self.authentication_policy = kwargs.get("authentication_policy")
53+
def _configure(
54+
self,
55+
**kwargs: Any
56+
):
57+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
58+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
59+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
60+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
61+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
62+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
63+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
64+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
65+
self.authentication_policy = kwargs.get('authentication_policy')
5866
if self.credential and not self.authentication_policy:
59-
self.authentication_policy = ARMChallengeAuthenticationPolicy(
60-
self.credential, *self.credential_scopes, **kwargs
61-
)
67+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)

0 commit comments

Comments
 (0)