Skip to content

Commit 898faaa

Browse files
iscai-msftmsyyc
andauthored
[network] preview release of coalesced multiapi package (Azure#27972)
* run python multiapi combiner * update changelog * add empty init files * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Yuchao Yan <[email protected]>
1 parent 3b125e3 commit 898faaa

File tree

641 files changed

+108595
-3216305
lines changed

Some content is hidden

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

641 files changed

+108595
-3216305
lines changed

sdk/network/azure-mgmt-network/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Release History
22

3+
## 23.0.0b1 (2022-12-19)
4+
5+
### Other Changes
6+
7+
- Preview package with the same multiapi support but much reduced package size.
8+
9+
### Breaking Changes
10+
11+
- All query and header parameters are now keyword-only
12+
- Can not individually access each API version's client and operations
13+
314
## 22.2.0 (2022-12-15)
415

516
### Features Added

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

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

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

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

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

20-
__version__ = VERSION
26+
_patch_sdk()

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

Lines changed: 2574 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
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
5-
# license information.
6-
#
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
75
# Code generated by Microsoft (R) AutoRest Code Generator.
8-
# Changes may cause incorrect behavior and will be lost if the code is
9-
# regenerated.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
107
# --------------------------------------------------------------------------
8+
119
from typing import Any, TYPE_CHECKING
1210

1311
from azure.core.configuration import Configuration
@@ -20,48 +18,44 @@
2018
# pylint: disable=unused-import,ungrouped-imports
2119
from azure.core.credentials import TokenCredential
2220

23-
class NetworkManagementClientConfiguration(Configuration):
21+
22+
class NetworkManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
2423
"""Configuration for NetworkManagementClient.
2524
2625
Note that all parameters used to create this instance are saved as instance
2726
attributes.
2827
2928
:param credential: Credential needed for the client to connect to Azure. Required.
3029
:type credential: ~azure.core.credentials.TokenCredential
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.
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.
3232
:type subscription_id: str
3333
"""
3434

35-
def __init__(
36-
self,
37-
credential: "TokenCredential",
38-
subscription_id: str,
39-
**kwargs: Any
40-
):
35+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36+
super(NetworkManagementClientConfiguration, self).__init__(**kwargs)
4137
if credential is None:
4238
raise ValueError("Parameter 'credential' must not be None.")
4339
if subscription_id is None:
4440
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
super(NetworkManagementClientConfiguration, self).__init__(**kwargs)
4641

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

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')
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")
6658
if self.credential and not self.authentication_policy:
67-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
59+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
60+
self.credential, *self.credential_scopes, **kwargs
61+
)

0 commit comments

Comments
 (0)