Skip to content

Commit 752df99

Browse files
[AutoRelease] t2-hybridcompute-2024-07-18-04682(can only be merged by SDK owner) (#36516)
* code and test * Update assets.json * Update assets.json * del testcases that not supported by subscription in use * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 40ab17c commit 752df99

File tree

135 files changed

+3735
-1163
lines changed

Some content is hidden

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

135 files changed

+3735
-1163
lines changed

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

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

3+
## 9.0.0b4 (2024-07-23)
4+
5+
### Features Added
6+
7+
- Added operation NetworkSecurityPerimeterConfigurationsOperations.begin_reconcile_for_private_link_scope
8+
- Model LicenseProfile has a new parameter billing_end_date
9+
- Model LicenseProfile has a new parameter error
10+
- Model LicenseProfileMachineInstanceView has a new parameter billing_end_date
11+
- Model LicenseProfileMachineInstanceView has a new parameter error
12+
- Model OSProfileLinuxConfiguration has a new parameter enable_hotpatching
13+
- Model OSProfileLinuxConfiguration has a new parameter status
14+
- Model OSProfileWindowsConfiguration has a new parameter enable_hotpatching
15+
- Model OSProfileWindowsConfiguration has a new parameter status
16+
- Model ProductFeature has a new parameter billing_end_date
17+
- Model ProductFeature has a new parameter error
18+
19+
### Breaking Changes
20+
21+
- Removed operation MachineRunCommandsOperations.begin_update
22+
323
## 9.0.0b3 (2024-05-30)
424

525
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "34f8f3fa251276229e64680c29abe1d194559661",
2+
"commit": "b574e2a41acda14a90ef237006e8bbdda2b63c63",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.16",
6+
"@autorest/python@6.15.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/hybridcompute/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.13.16 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/hybridcompute/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/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/hybridcompute/resource-manager/readme.md"
1111
}

sdk/hybridcompute/azure-mgmt-hybridcompute/assets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/hybridcompute/azure-mgmt-hybridcompute",
5-
"Tag": "python/hybridcompute/azure-mgmt-hybridcompute_c4b455e500"
6-
}
5+
"Tag": "python/hybridcompute/azure-mgmt-hybridcompute_6e2d602655"
6+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class HybridComputeManagementClientConfiguration: # pylint: disable=too-many-in
2828
:type credential: ~azure.core.credentials.TokenCredential
2929
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-03-31-preview". Note that overriding
31+
:keyword api_version: Api Version. Default value is "2024-05-20-preview". Note that overriding
3232
this default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-03-31-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-05-20-preview")
3838

3939
if credential is None:
4040
raise ValueError("Parameter 'credential' must not be None.")

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_hybrid_compute_management_client.py

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

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

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -80,7 +81,7 @@ class HybridComputeManagementClient(
8081
:type subscription_id: str
8182
:param base_url: Service URL. Default value is "https://management.azure.com".
8283
:type base_url: str
83-
:keyword api_version: Api Version. Default value is "2024-03-31-preview". Note that overriding
84+
:keyword api_version: Api Version. Default value is "2024-05-20-preview". Note that overriding
8485
this default value may result in unsupported behavior.
8586
:paramtype api_version: str
8687
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -174,7 +175,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
174175
def close(self) -> None:
175176
self._client.close()
176177

177-
def __enter__(self) -> "HybridComputeManagementClient":
178+
def __enter__(self) -> Self:
178179
self._client.__enter__()
179180
return self
180181

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod
@@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
14411443
elif isinstance(response, type) and issubclass(response, Enum):
14421444
return self.deserialize_enum(data, response)
14431445

1444-
if data is None:
1446+
if data is None or data is CoreNull:
14451447
return data
14461448
try:
14471449
attributes = response._attribute_map # type: ignore

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_vendor.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
from abc import ABC
99
from typing import TYPE_CHECKING
1010

11-
from azure.core.pipeline.transport import HttpRequest
12-
1311
from ._configuration import HybridComputeManagementClientConfiguration
1412

1513
if TYPE_CHECKING:
@@ -19,14 +17,6 @@
1917
from ._serialization import Deserializer, Serializer
2018

2119

22-
def _convert_request(request, files=None):
23-
data = request.content if not files else None
24-
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data)
25-
if files:
26-
request.set_formdata_body(files)
27-
return request
28-
29-
3020
class HybridComputeManagementClientMixinABC(ABC):
3121
"""DO NOT use this class. It is for internal typing use only."""
3222

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/_version.py

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

9-
VERSION = "9.0.0b3"
9+
VERSION = "9.0.0b4"

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class HybridComputeManagementClientConfiguration: # pylint: disable=too-many-in
2828
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
2929
:param subscription_id: The ID of the target subscription. Required.
3030
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-03-31-preview". Note that overriding
31+
:keyword api_version: Api Version. Default value is "2024-05-20-preview". Note that overriding
3232
this default value may result in unsupported behavior.
3333
:paramtype api_version: str
3434
"""
3535

3636
def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-03-31-preview")
37+
api_version: str = kwargs.pop("api_version", "2024-05-20-preview")
3838

3939
if credential is None:
4040
raise ValueError("Parameter 'credential' must not be None.")

sdk/hybridcompute/azure-mgmt-hybridcompute/azure/mgmt/hybridcompute/aio/_hybrid_compute_management_client.py

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

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

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import AsyncHttpResponse, HttpRequest
@@ -84,7 +85,7 @@ class HybridComputeManagementClient(
8485
:type subscription_id: str
8586
:param base_url: Service URL. Default value is "https://management.azure.com".
8687
:type base_url: str
87-
:keyword api_version: Api Version. Default value is "2024-03-31-preview". Note that overriding
88+
:keyword api_version: Api Version. Default value is "2024-05-20-preview". Note that overriding
8889
this default value may result in unsupported behavior.
8990
:paramtype api_version: str
9091
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -180,7 +181,7 @@ def _send_request(
180181
async def close(self) -> None:
181182
await self._client.close()
182183

183-
async def __aenter__(self) -> "HybridComputeManagementClient":
184+
async def __aenter__(self) -> Self:
184185
await self._client.__aenter__()
185186
return self
186187

0 commit comments

Comments
 (0)