Skip to content

Commit 3ae4c8d

Browse files
azure-sdkChenxiJiang333msyyc
authored
[AutoRelease] t2-hdinsight-2024-08-08-57787(can only be merged by SDK owner) (#36817)
* code and test * update-testcase * Update CHANGELOG.md * Update _version.py * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: Yuchao Yan <[email protected]>
1 parent 31bb621 commit 3ae4c8d

File tree

140 files changed

+6335
-3430
lines changed

Some content is hidden

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

140 files changed

+6335
-3430
lines changed

sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Release History
22

3+
## 9.0.0b3 (2024-08-21)
4+
5+
### Features Added
6+
7+
- The 'azure.mgmt.hdinsight.operations.ExtensionsOperations' method 'begin_disable_azure_monitor_agent' was added in the current version
8+
- The 'azure.mgmt.hdinsight.operations.ExtensionsOperations' method 'begin_enable_azure_monitor_agent' was added in the current version
9+
- The 'azure.mgmt.hdinsight.operations.ExtensionsOperations' method 'get_azure_monitor_agent_status' was added in the current version
10+
- The 'azure.mgmt.hdinsight.aio.operations.ExtensionsOperations' method 'begin_disable_azure_monitor_agent' was added in the current version
11+
- The 'azure.mgmt.hdinsight.aio.operations.ExtensionsOperations' method 'begin_enable_azure_monitor_agent' was added in the current version
12+
- The 'azure.mgmt.hdinsight.aio.operations.ExtensionsOperations' method 'get_azure_monitor_agent_status' was added in the current version
13+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.ClusterPatchParameters' had property 'identity' added in the current version
14+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.NetworkProperties' had property 'outbound_dependencies_managed_type' added in the current version
15+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.NetworkProperties' had property 'public_ip_tag' added in the current version
16+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.StorageAccount' had property 'enable_secure_channel' added in the current version
17+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.IpTag' was added in the current version
18+
- The model or publicly exposed class 'azure.mgmt.hdinsight.models.OutboundDependenciesManagedType' was added in the current version
19+
320
## 9.0.0b2 (2023-07-21)
421

522
### Features Added

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

Lines changed: 2 additions & 5 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 HDInsight 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-hdinsight%2FREADME.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "237afa17929313c909f72f2fea59f4437e305c99",
2+
"commit": "21c2852d62ccc3abe9cc3800c989c6826f8363dc",
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.17.0",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/hdinsight/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",
9+
"autorest_command": "autorest specification/hdinsight/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.17.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/hdinsight/resource-manager/readme.md"
1111
}

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

@@ -19,7 +18,7 @@
1918
from azure.core.credentials import TokenCredential
2019

2120

22-
class HDInsightManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class HDInsightManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for HDInsightManagementClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
@@ -30,14 +29,13 @@ class HDInsightManagementClientConfiguration(Configuration): # pylint: disable=
3029
:param subscription_id: The subscription credentials which uniquely identify Microsoft Azure
3130
subscription. The subscription ID forms part of the URI for every service call. Required.
3231
:type subscription_id: str
33-
:keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding
32+
:keyword api_version: Api Version. Default value is "2024-08-01-preview". Note that overriding
3433
this default value may result in unsupported behavior.
3534
:paramtype api_version: str
3635
"""
3736

3837
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
39-
super(HDInsightManagementClientConfiguration, self).__init__(**kwargs)
40-
api_version: str = kwargs.pop("api_version", "2023-04-15-preview")
38+
api_version: str = kwargs.pop("api_version", "2024-08-01-preview")
4139

4240
if credential is None:
4341
raise ValueError("Parameter 'credential' must not be None.")
@@ -49,6 +47,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4947
self.api_version = api_version
5048
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5149
kwargs.setdefault("sdk_moniker", "mgmt-hdinsight/{}".format(VERSION))
50+
self.polling_interval = kwargs.get("polling_interval", 30)
5251
self._configure(**kwargs)
5352

5453
def _configure(self, **kwargs: Any) -> None:
@@ -57,9 +56,9 @@ def _configure(self, **kwargs: Any) -> None:
5756
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5857
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5958
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
60-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6159
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6260
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
61+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6362
self.authentication_policy = kwargs.get("authentication_policy")
6463
if self.credential and not self.authentication_policy:
6564
self.authentication_policy = ARMChallengeAuthenticationPolicy(

sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_hd_insight_management_client.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

13+
from azure.core.pipeline import policies
1214
from azure.core.rest import HttpRequest, HttpResponse
1315
from azure.mgmt.core import ARMPipelineClient
16+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1417

1518
from . import models as _models
1619
from ._configuration import HDInsightManagementClientConfiguration
@@ -68,7 +71,7 @@ class HDInsightManagementClient: # pylint: disable=client-accepts-api-version-k
6871
:type subscription_id: str
6972
:param base_url: Service URL. Default value is "https://management.azure.com".
7073
:type base_url: str
71-
:keyword api_version: Api Version. Default value is "2023-04-15-preview". Note that overriding
74+
:keyword api_version: Api Version. Default value is "2024-08-01-preview". Note that overriding
7275
this default value may result in unsupported behavior.
7376
:paramtype api_version: str
7477
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -85,7 +88,25 @@ def __init__(
8588
self._config = HDInsightManagementClientConfiguration(
8689
credential=credential, subscription_id=subscription_id, **kwargs
8790
)
88-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
91+
_policies = kwargs.pop("policies", None)
92+
if _policies is None:
93+
_policies = [
94+
policies.RequestIdPolicy(**kwargs),
95+
self._config.headers_policy,
96+
self._config.user_agent_policy,
97+
self._config.proxy_policy,
98+
policies.ContentDecodePolicy(**kwargs),
99+
ARMAutoResourceProviderRegistrationPolicy(),
100+
self._config.redirect_policy,
101+
self._config.retry_policy,
102+
self._config.authentication_policy,
103+
self._config.custom_hook_policy,
104+
self._config.logging_policy,
105+
policies.DistributedTracingPolicy(**kwargs),
106+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
107+
self._config.http_logging_policy,
108+
]
109+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
89110

90111
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
91112
self._serialize = Serializer(client_models)
@@ -111,7 +132,7 @@ def __init__(
111132
self._client, self._config, self._serialize, self._deserialize
112133
)
113134

114-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
135+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
115136
"""Runs the network request through the client's chained policies.
116137
117138
>>> from azure.core.rest import HttpRequest
@@ -131,12 +152,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
131152

132153
request_copy = deepcopy(request)
133154
request_copy.url = self._client.format_url(request_copy.url)
134-
return self._client.send_request(request_copy, **kwargs)
155+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
135156

136157
def close(self) -> None:
137158
self._client.close()
138159

139-
def __enter__(self) -> "HDInsightManagementClient":
160+
def __enter__(self) -> Self:
140161
self._client.__enter__()
141162
return self
142163

0 commit comments

Comments
 (0)