Skip to content

Commit

Permalink
[AutoRelease] t2-keyvault-2024-07-16-73462(can only be merged by SDK …
Browse files Browse the repository at this point in the history
…owner) (#36492)

* code and test

* update

* update-testcase

* update-testcase

* update

* fix _patch

* fix _patch for aio

* test for patch

* test for patch

---------

Co-authored-by: azure-sdk <PythonSdkPipelines>
Co-authored-by: Yuchao Yan <[email protected]>
Co-authored-by: ChenxiJiang333 <[email protected]>
Co-authored-by: msyyc <[email protected]>
  • Loading branch information
4 people authored Jul 17, 2024
1 parent 9e24045 commit 14dd582
Show file tree
Hide file tree
Showing 339 changed files with 13,229 additions and 17,044 deletions.
6 changes: 6 additions & 0 deletions sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 10.3.1 (2024-07-16)

### Other Changes

- Fix docstring

## 10.3.0 (2023-10-23)

### Features Added
Expand Down
4 changes: 2 additions & 2 deletions sdk/keyvault/azure-mgmt-keyvault/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 Key Vault 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
10 changes: 5 additions & 5 deletions sdk/keyvault/azure-mgmt-keyvault/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "fe6e5b6e46f03c2c23f16029f25431bc90e07de2",
"commit": "2608e811fafd18657b224a0d59e1c3924a534adb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
"@autorest/python@6.15.0",
"@autorest/modelerfour@4.27.0"
],
"autorest_command": "autorest specification/keyvault/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",
"autorest_command": "autorest specification/keyvault/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.15.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/keyvault/resource-manager/readme.md",
"package-2019-09": "2021-07-15 01:23:27 -0700 4fe5435a25386ee460ba89817465c7deba818284 Microsoft.KeyVault/stable/2019-09-01/keyvault.json",
"package-2018-02": "2020-11-03 15:27:00 -0500 111dab2fbec96b208a78b36bb8dcefd958036476 Microsoft.KeyVault/preview/2018-02-14-preview/keyvault.json",
Expand Down
8 changes: 4 additions & 4 deletions sdk/keyvault/azure-mgmt-keyvault/assets.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/keyvault/azure-mgmt-keyvault",
"Tag": "python/keyvault/azure-mgmt-keyvault_f804319f08"
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/keyvault/azure-mgmt-keyvault",
"Tag": "python/keyvault/azure-mgmt-keyvault_40aff98b4f"
}
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 KeyVaultManagementClientConfiguration(Configuration):
class KeyVaultManagementClientConfiguration:
"""Configuration for KeyVaultManagementClient.
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(KeyVaultManagementClientConfiguration, 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-keyvault/{}'.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 = KeyVaultManagementClientConfiguration(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(KeyVaultManagementClient, self).__init__(
api_version=api_version,
profile=profile
Expand Down
Loading

0 comments on commit 14dd582

Please sign in to comment.