Skip to content

Commit 6bed7da

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] t2-compute-2024-03-14-25862(can only be merged by SDK owner) (#34770)
* code and test * changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: msyyc <[email protected]>
1 parent 9c4e540 commit 6bed7da

File tree

778 files changed

+96480
-221622
lines changed

Some content is hidden

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

778 files changed

+96480
-221622
lines changed

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

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

3-
## 30.6.0 (2024-03-18)
3+
## 30.6.0 (2024-03-15)
44

55
### Features Added
66

77
- Model GalleryArtifactVersionFullSource has a new parameter virtual_machine_id
88

9+
### Bugs Fixed
10+
11+
- Fix api_version in next_link for paging operation
12+
913
## 30.5.0 (2024-01-22)
1014

1115
### Features Added

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "f1872412241b16b5e8f0e00408b8fd807bcb75a8",
2+
"commit": "475747ff6322e9bf180b8911d871561b264379c3",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.7.1",
7-
"@autorest/modelerfour@4.26.2"
6+
"@autorest/python@6.13.7",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/compute/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/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/compute/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/python@6.13.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
1010
"readme": "specification/compute/resource-manager/readme.md",
1111
"package-2023-03-01-only": "2023-04-17 22:42:05 -0400 b06a6f45e472dd07c2e0dab06b1e52dfe2684c88 Microsoft.Compute/ComputeRP/stable/2023-03-01/virtualMachineScaleSet.json",
1212
"package-2023-01-02-only": "2023-06-28 00:48:15 -0400 b1d41f8dc643415d4dc6ee82bdb2fef04ef45bc9 Microsoft.Compute/DiskRP/stable/2023-01-02/snapshot.json",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/compute/azure-mgmt-compute",
5-
"Tag": "python/compute/azure-mgmt-compute_90b04c9287"
5+
"Tag": "python/compute/azure-mgmt-compute_21614a0446"
66
}

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
from typing import Any, Optional, TYPE_CHECKING
1313

14+
from azure.core.pipeline import policies
1415
from azure.mgmt.core import ARMPipelineClient
16+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1517
from azure.profiles import KnownProfiles, ProfileDefinition
1618
from azure.profiles.multiapiclient import MultiApiClientMixin
1719

@@ -118,7 +120,25 @@ def __init__(
118120
if api_version:
119121
kwargs.setdefault('api_version', api_version)
120122
self._config = ComputeManagementClientConfiguration(credential, subscription_id, **kwargs)
121-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
123+
_policies = kwargs.pop("policies", None)
124+
if _policies is None:
125+
_policies = [
126+
policies.RequestIdPolicy(**kwargs),
127+
self._config.headers_policy,
128+
self._config.user_agent_policy,
129+
self._config.proxy_policy,
130+
policies.ContentDecodePolicy(**kwargs),
131+
ARMAutoResourceProviderRegistrationPolicy(),
132+
self._config.redirect_policy,
133+
self._config.retry_policy,
134+
self._config.authentication_policy,
135+
self._config.custom_hook_policy,
136+
self._config.logging_policy,
137+
policies.DistributedTracingPolicy(**kwargs),
138+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
139+
self._config.http_logging_policy,
140+
]
141+
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
122142
super(ComputeManagementClient, self).__init__(
123143
api_version=api_version,
124144
profile=profile

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# --------------------------------------------------------------------------
1111
from typing import Any, TYPE_CHECKING
1212

13-
from azure.core.configuration import Configuration
1413
from azure.core.pipeline import policies
1514
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1615

@@ -20,7 +19,7 @@
2019
# pylint: disable=unused-import,ungrouped-imports
2120
from azure.core.credentials import TokenCredential
2221

23-
class ComputeManagementClientConfiguration(Configuration):
22+
class ComputeManagementClientConfiguration:
2423
"""Configuration for ComputeManagementClient.
2524
2625
Note that all parameters used to create this instance are saved as instance
@@ -42,12 +41,12 @@ def __init__(
4241
raise ValueError("Parameter 'credential' must not be None.")
4342
if subscription_id is None:
4443
raise ValueError("Parameter 'subscription_id' must not be None.")
45-
super(ComputeManagementClientConfiguration, self).__init__(**kwargs)
4644

4745
self.credential = credential
4846
self.subscription_id = subscription_id
4947
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5048
kwargs.setdefault('sdk_moniker', 'azure-mgmt-compute/{}'.format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(

0 commit comments

Comments
 (0)