Skip to content

Commit 08ec38d

Browse files
author
SDKAuto
committed
CodeGen from PR 31392 in Azure/azure-rest-api-specs
Merge e1e92a34974cf02978ba80b921bffcc873483739 into 6e5f45705f8d388df1b63cfb08133a6d5585729b
1 parent a1deb0d commit 08ec38d

File tree

153 files changed

+4389
-4166
lines changed

Some content is hidden

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

153 files changed

+4389
-4166
lines changed

sdk/workloads/azure-mgmt-workloads/README.md

Lines changed: 5 additions & 7 deletions
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 Workloads 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
@@ -45,8 +45,9 @@ client = WorkloadsClient(credential=DefaultAzureCredential(), subscription_id=su
4545

4646
## Examples
4747

48-
49-
Code samples for this package can be found at [Workloads Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
48+
Code samples for this package can be found at:
49+
- [Search Workloads Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
5051

5152

5253
## Troubleshooting
@@ -58,6 +59,3 @@ Code samples for this package can be found at [Workloads Management](https://doc
5859
If you encounter any bugs or have suggestions, please file an issue in the
5960
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6061
section of the project.
61-
62-
63-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-workloads%2FREADME.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "37f79023301bddd4f0f206665d279cbb861771e8",
2+
"commit": "ca45fc1c99c890ed92aaebba149fa0440c8635a6",
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.4.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/workloads/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.4.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/workloads/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/workloads/resource-manager/readme.md"
1111
}

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,19 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2316
if TYPE_CHECKING:
2417
# pylint: disable=unused-import,ungrouped-imports
2518
from azure.core.credentials import TokenCredential
2619

2720

28-
class WorkloadsMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class WorkloadsMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2922
"""Configuration for WorkloadsMgmtClient.
3023
3124
Note that all parameters used to create this instance are saved as instance
@@ -41,8 +34,7 @@ class WorkloadsMgmtClientConfiguration(Configuration): # pylint: disable=too-ma
4134
"""
4235

4336
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
44-
super(WorkloadsMgmtClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2023-04-01"] = kwargs.pop("api_version", "2023-04-01")
37+
api_version: str = kwargs.pop("api_version", "2023-04-01")
4638

4739
if credential is None:
4840
raise ValueError("Parameter 'credential' must not be None.")
@@ -54,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5446
self.api_version = api_version
5547
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5648
kwargs.setdefault("sdk_moniker", "mgmt-workloads/{}".format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5750
self._configure(**kwargs)
5851

5952
def _configure(self, **kwargs: Any) -> None:
@@ -62,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
6255
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
6356
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6457
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
65-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6658
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6759
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6861
self.authentication_policy = kwargs.get("authentication_policy")
6962
if self.credential and not self.authentication_policy:
7063
self.authentication_policy = ARMChallengeAuthenticationPolicy(

sdk/workloads/azure-mgmt-workloads/azure/mgmt/workloads/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

0 commit comments

Comments
 (0)