Skip to content

Commit 5a0559c

Browse files
[AutoRelease] t2-dns-2024-09-25-81486(can only be merged by SDK owner) (#37560)
* code and test * update-testcase * Update CHANGELOG.md * Update test_mgmt_dns_test.py --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 6166ba0 commit 5a0559c

File tree

132 files changed

+2663
-2802
lines changed

Some content is hidden

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

132 files changed

+2663
-2802
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 8.2.0 (2024-10-22)
4+
5+
### Features Added
6+
7+
- Model RecordSet has a new parameter traffic_management_profile
8+
39
## 8.1.0 (2023-06-14)
410

511
### Features Added

sdk/network/azure-mgmt-dns/README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure DNS Management Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.8+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.7+ is required to use this package.
15+
- Python 3.8+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -59,6 +59,3 @@ Code samples for this package can be found at:
5959
If you encounter any bugs or have suggestions, please file an issue in the
6060
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6161
section of the project.
62-
63-
64-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-dns%2FREADME.png)

sdk/network/azure-mgmt-dns/_meta.json

+10-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
{
2-
"commit": "e2b5f9323c4214408969a6e953b4075cfdc693b6",
2+
"commit": "7189fb57f69468c56df76f9a4d68dd9ff04ab100",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.6.0",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.19.0",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/dns/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",
10-
"readme": "specification/dns/resource-manager/readme.md"
9+
"autorest_command": "autorest specification/dns/resource-manager/readme.md --generate-sample=True --generate-test=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.10.2 --version-tolerant=False",
10+
"readme": "specification/dns/resource-manager/readme.md",
11+
"package-2023-07-preview": "2024-01-03 09:33:30 -0800 389c6c7476ec7c6585b002b44a9dacfb5c88b71a Microsoft.Network/preview/2023-07-01-preview/dns.json",
12+
"package-2018-05": "2020-11-17 18:50:08 -0800 b47a32169e59378d8005aabb5358e3f4ddf10766 Microsoft.Network/stable/2018-05-01/dns.json",
13+
"package-2018-03-preview": "2020-11-17 18:50:08 -0800 b47a32169e59378d8005aabb5358e3f4ddf10766 Microsoft.Network/preview/2018-03-01-preview/dns.json",
14+
"package-2016-04": "2021-01-26 16:35:03 -0800 866a7d07ee081198c77bf4949e2a6ce366e103fa Microsoft.Network/stable/2016-04-01/dns.json"
1115
}

sdk/network/azure-mgmt-dns/assets.json

-6
This file was deleted.

sdk/network/azure-mgmt-dns/azure/mgmt/dns/_configuration.py

+2-3
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 DnsManagementClientConfiguration(Configuration):
22+
class DnsManagementClientConfiguration:
2423
"""Configuration for DnsManagementClient.
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(DnsManagementClientConfiguration, 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-dns/{}'.format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(

sdk/network/azure-mgmt-dns/azure/mgmt/dns/_dns_management_client.py

+22-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
# --------------------------------------------------------------------------
1111

1212
from typing import Any, Optional, TYPE_CHECKING
13+
from typing_extensions import Self
1314

15+
from azure.core.pipeline import policies
1416
from azure.mgmt.core import ARMPipelineClient
17+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1518
from azure.profiles import KnownProfiles, ProfileDefinition
1619
from azure.profiles.multiapiclient import MultiApiClientMixin
1720

@@ -74,7 +77,25 @@ def __init__(
7477
if api_version:
7578
kwargs.setdefault('api_version', api_version)
7679
self._config = DnsManagementClientConfiguration(credential, subscription_id, **kwargs)
77-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
80+
_policies = kwargs.pop("policies", None)
81+
if _policies is None:
82+
_policies = [
83+
policies.RequestIdPolicy(**kwargs),
84+
self._config.headers_policy,
85+
self._config.user_agent_policy,
86+
self._config.proxy_policy,
87+
policies.ContentDecodePolicy(**kwargs),
88+
ARMAutoResourceProviderRegistrationPolicy(),
89+
self._config.redirect_policy,
90+
self._config.retry_policy,
91+
self._config.authentication_policy,
92+
self._config.custom_hook_policy,
93+
self._config.logging_policy,
94+
policies.DistributedTracingPolicy(**kwargs),
95+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
96+
self._config.http_logging_policy,
97+
]
98+
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
7899
super(DnsManagementClient, self).__init__(
79100
api_version=api_version,
80101
profile=profile

0 commit comments

Comments
 (0)