Skip to content

Commit

Permalink
[AutoRelease] t2-recoveryservicesbackup-2021-12-21-50277 (Azure#22242)
Browse files Browse the repository at this point in the history
* CodeGen from PR 16985 in Azure/azure-rest-api-specs
[Recoveryservicesbackup]python config (Azure#16985)

* python config

* split namespace

* Update readme.python.md

* version,CHANGELOG

* delete unnecessary files and update changelog

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 23, 2021
1 parent 6d96e1d commit 6c50bbe
Show file tree
Hide file tree
Showing 168 changed files with 67,543 additions and 36,099 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 4.0.0 (2021-12-21)

**Breaking changes**

- namespace splitted from `azure.mgmt.recoveryservicesbackup` to `azure.mgmt.recoveryservicesbackup.activestamp` and `azure.mgmt.recoveryservicesbackup.passivestamp`

## 3.0.0 (2021-10-19)

**Features**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "33998161763a845ec4160ab09bb5de7d70befb37",
"commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/recoveryservicesbackup/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._recovery_services_backup_client import RecoveryServicesBackupClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['RecoveryServicesBackupClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
__path__ = __import__("pkgutil").extend_path(__path__, __name__)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.0.0"
VERSION = "4.0.0"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._recovery_services_backup_client import RecoveryServicesBackupClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['RecoveryServicesBackupClient']

# `._patch.py` is used for handwritten extensions to the generated code
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
from ._patch import patch_sdk
patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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

from ._version import VERSION

Expand Down Expand Up @@ -40,14 +40,15 @@ def __init__(
**kwargs # type: Any
):
# type: (...) -> None
super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
super(RecoveryServicesBackupClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-recoveryservicesbackup/{}'.format(VERSION))
self._configure(**kwargs)
Expand All @@ -67,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading

0 comments on commit 6c50bbe

Please sign in to comment.