Skip to content

Commit

Permalink
[AutoRelease] t2-dns-2024-09-25-81486(can only be merged by SDK owner) (
Browse files Browse the repository at this point in the history
#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 <v-chenjiang@microsoft.com>
Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent 6166ba0 commit 5a0559c
Show file tree
Hide file tree
Showing 132 changed files with 2,663 additions and 2,802 deletions.
6 changes: 6 additions & 0 deletions sdk/network/azure-mgmt-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 8.2.0 (2024-10-22)

### Features Added

- Model RecordSet has a new parameter traffic_management_profile

## 8.1.0 (2023-06-14)

### Features Added
Expand Down
7 changes: 2 additions & 5 deletions sdk/network/azure-mgmt-dns/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

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

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

### Prerequisites

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

### Install the package
Expand Down Expand Up @@ -59,6 +59,3 @@ Code samples for this package can be found at:
If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-dns%2FREADME.png)
16 changes: 10 additions & 6 deletions sdk/network/azure-mgmt-dns/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"commit": "e2b5f9323c4214408969a6e953b4075cfdc693b6",
"commit": "7189fb57f69468c56df76f9a4d68dd9ff04ab100",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.6.0",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.19.0",
"@autorest/modelerfour@4.27.0"
],
"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/python@6.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/dns/resource-manager/readme.md"
"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/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/dns/resource-manager/readme.md",
"package-2023-07-preview": "2024-01-03 09:33:30 -0800 389c6c7476ec7c6585b002b44a9dacfb5c88b71a Microsoft.Network/preview/2023-07-01-preview/dns.json",
"package-2018-05": "2020-11-17 18:50:08 -0800 b47a32169e59378d8005aabb5358e3f4ddf10766 Microsoft.Network/stable/2018-05-01/dns.json",
"package-2018-03-preview": "2020-11-17 18:50:08 -0800 b47a32169e59378d8005aabb5358e3f4ddf10766 Microsoft.Network/preview/2018-03-01-preview/dns.json",
"package-2016-04": "2021-01-26 16:35:03 -0800 866a7d07ee081198c77bf4949e2a6ce366e103fa Microsoft.Network/stable/2016-04-01/dns.json"
}
6 changes: 0 additions & 6 deletions sdk/network/azure-mgmt-dns/assets.json

This file was deleted.

5 changes: 2 additions & 3 deletions sdk/network/azure-mgmt-dns/azure/mgmt/dns/_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# --------------------------------------------------------------------------
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

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

class DnsManagementClientConfiguration(Configuration):
class DnsManagementClientConfiguration:
"""Configuration for DnsManagementClient.
Note that all parameters used to create this instance are saved as instance
Expand All @@ -42,12 +41,12 @@ def __init__(
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(DnsManagementClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'azure-mgmt-dns/{}'.format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
self._configure(**kwargs)

def _configure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

Expand Down Expand Up @@ -74,7 +77,25 @@ def __init__(
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = DnsManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
policies.RequestIdPolicy(**kwargs),
self._config.headers_policy,
self._config.user_agent_policy,
self._config.proxy_policy,
policies.ContentDecodePolicy(**kwargs),
ARMAutoResourceProviderRegistrationPolicy(),
self._config.redirect_policy,
self._config.retry_policy,
self._config.authentication_policy,
self._config.custom_hook_policy,
self._config.logging_policy,
policies.DistributedTracingPolicy(**kwargs),
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
super(DnsManagementClient, self).__init__(
api_version=api_version,
profile=profile
Expand Down
Loading

0 comments on commit 5a0559c

Please sign in to comment.