Skip to content

Commit b47df9e

Browse files
author
SDKAuto
committed
CodeGen from PR 31725 in Azure/azure-rest-api-specs
Merge 42ea75b63fb3bbd307d8fcb8575a6c1320a8f121 into 1b038fc40563bdafb343a71cd5f7d3dee6bc4b5b
1 parent eeee45f commit b47df9e

File tree

1,169 files changed

+40863
-1671232
lines changed

Some content is hidden

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

1,169 files changed

+40863
-1671232
lines changed

sdk/compute/azure-mgmt-compute/_meta.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "416353cabfea1fc7a1c7c46ba3340408a2618de1",
2+
"commit": "27f63987c69d36a2228236babbce13bb9d503345",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/[email protected].2",
6+
"@autorest/[email protected].4",
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/[email protected].2 --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 --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected].4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md",
1111
"package-2024-03-02-only": "2024-07-16 12:23:13 -0400 602fb5144a226577186e35845422c11db9067cf8 Microsoft.Compute/DiskRP/stable/2024-03-02/snapshot.json",
1212
"package-2024-03-01-only": "2024-06-05 15:03:47 -0700 491e00d17f24909ecf5e1030b3833bed51224e92 Microsoft.Compute/ComputeRP/stable/2024-03-01/virtualMachineScaleSet.json",

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

+19-7
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

+206-3,030
Large diffs are not rendered by default.
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,51 +14,52 @@
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
2624
attributes.
2725
2826
:param credential: Credential needed for the client to connect to Azure. Required.
2927
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. Required.
28+
:param subscription_id: Subscription credentials which uniquely identify Microsoft Azure
29+
subscription. The subscription ID forms part of the URI for every service call. Required.
3130
:type subscription_id: str
31+
:keyword api_version: Api Version. Default value is "2024-07-01". Note that overriding this
32+
default value may result in unsupported behavior.
33+
:paramtype api_version: str
3234
"""
3335

34-
def __init__(
35-
self,
36-
credential: "TokenCredential",
37-
subscription_id: str,
38-
**kwargs: Any
39-
):
36+
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37+
api_version: str = kwargs.pop("api_version", "2024-07-01")
38+
4039
if credential is None:
4140
raise ValueError("Parameter 'credential' must not be None.")
4241
if subscription_id is None:
4342
raise ValueError("Parameter 'subscription_id' must not be None.")
4443

4544
self.credential = credential
4645
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))
46+
self.api_version = api_version
47+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
48+
kwargs.setdefault("sdk_moniker", "mgmt-compute/{}".format(VERSION))
4949
self.polling_interval = kwargs.get("polling_interval", 30)
5050
self._configure(**kwargs)
5151

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')
52+
def _configure(self, **kwargs: Any) -> None:
53+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
54+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
55+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
56+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
57+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
58+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
59+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
61+
self.authentication_policy = kwargs.get("authentication_policy")
6562
if self.credential and not self.authentication_policy:
66-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
63+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
64+
self.credential, *self.credential_scopes, **kwargs
65+
)

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

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=too-many-lines
12
# --------------------------------------------------------------------------
23
#
34
# Copyright (c) Microsoft Corporation. All rights reserved.
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
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.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
67
# --------------------------------------------------------------------------
78

8-
VERSION = "33.1.0"
9+
VERSION = "1.0.0b1"

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

+21-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
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
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._compute_management_client import ComputeManagementClient # type: ignore
16+
17+
try:
18+
from ._patch import __all__ as _patch_all
19+
from ._patch import *
20+
except ImportError:
21+
_patch_all = []
22+
from ._patch import patch_sdk as _patch_sdk
23+
24+
__all__ = [
25+
"ComputeManagementClient",
26+
]
27+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
28+
29+
_patch_sdk()

0 commit comments

Comments
 (0)