Skip to content

Commit aa246cd

Browse files
[AutoRelease] t2-compute-2025-08-22-00365(can only be merged by SDK owner) (#42644)
* code and test * update changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent db6dcda commit aa246cd

File tree

837 files changed

+98694
-576138
lines changed

Some content is hidden

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

837 files changed

+98694
-576138
lines changed

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

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

3+
## 36.0.0 (2025-08-22)
4+
5+
### Breaking Changes
6+
7+
- This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.
8+
39
## 35.0.0 (2025-07-21)
410

511
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "81cb525ba1985326c5607fc368abfc64ff9f5aa2",
2+
"commit": "ca34618fafb0da43c740f789671a4d3d725b2711",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.35.0",
6+
"@autorest/python@6.38.2",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.35.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --keep-setup-py=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-python-sdk --use=@autorest/python@6.38.2 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md"
1111
}

sdk/compute/azure-mgmt-compute/apiview-properties.json

Lines changed: 1202 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._compute_management_client import ComputeManagementClient
10-
__all__ = ['ComputeManagementClient']
10+
from typing import TYPE_CHECKING
1111

12-
try:
13-
from ._patch import patch_sdk # type: ignore
14-
patch_sdk()
15-
except ImportError:
16-
pass
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
1714

15+
from ._compute_management_client import ComputeManagementClient # type: ignore
1816
from ._version import VERSION
1917

2018
__version__ = VERSION
19+
20+
try:
21+
from ._patch import __all__ as _patch_all
22+
from ._patch import *
23+
except ImportError:
24+
_patch_all = []
25+
from ._patch import patch_sdk as _patch_sdk
26+
27+
__all__ = [
28+
"ComputeManagementClient",
29+
]
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
31+
32+
_patch_sdk()

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py

Lines changed: 333 additions & 1456 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 29 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.pipeline import policies
@@ -16,10 +14,10 @@
1614
from ._version import VERSION
1715

1816
if TYPE_CHECKING:
19-
# pylint: disable=unused-import,ungrouped-imports
2017
from azure.core.credentials import TokenCredential
2118

22-
class ComputeManagementClientConfiguration:
19+
20+
class ComputeManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2321
"""Configuration for ComputeManagementClient.
2422
2523
Note that all parameters used to create this instance are saved as instance
@@ -31,36 +29,30 @@ class ComputeManagementClientConfiguration:
3129
:type subscription_id: str
3230
"""
3331

34-
def __init__(
35-
self,
36-
credential: "TokenCredential",
37-
subscription_id: str,
38-
**kwargs: Any
39-
):
32+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4033
if credential is None:
4134
raise ValueError("Parameter 'credential' must not be None.")
4235
if subscription_id is None:
4336
raise ValueError("Parameter 'subscription_id' must not be None.")
4437

4538
self.credential = credential
4639
self.subscription_id = subscription_id
47-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
48-
kwargs.setdefault('sdk_moniker', 'azure-mgmt-compute/{}'.format(VERSION))
40+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
41+
kwargs.setdefault("sdk_moniker", "mgmt-compute/{}".format(VERSION))
4942
self.polling_interval = kwargs.get("polling_interval", 30)
5043
self._configure(**kwargs)
5144

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

0 commit comments

Comments
 (0)