Skip to content

Commit ff85dab

Browse files
azure-sdkChenxiJiang333msyyc
authored
[AutoRelease] t2-desktopvirtualization-2024-08-30-66197(can only be merged by SDK owner) (#37101)
* code and test * update-testcases * Update CHANGELOG.md * Update _version.py * udpate changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: Yuchao Yan <[email protected]> Co-authored-by: msyyc <[email protected]>
1 parent 2c367a0 commit ff85dab

File tree

174 files changed

+9479
-3529
lines changed

Some content is hidden

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

174 files changed

+9479
-3529
lines changed

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

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

3+
## 2.0.0 (2024-09-23)
4+
5+
### Features Added
6+
7+
- The 'DesktopVirtualizationMgmtClient' client had operation group 'app_attach_package_info' added in the current version
8+
- The 'DesktopVirtualizationMgmtClient' client had operation group 'app_attach_package' added in the current version
9+
- The model or publicly exposed class 'ExpandMsixImage' had property 'certificate_name' added in the current version
10+
- The model or publicly exposed class 'ExpandMsixImage' had property 'certificate_expiry' added in the current version
11+
- The model or publicly exposed class 'HostPool' had property 'app_attach_package_references' added in the current version
12+
- The model or publicly exposed class 'PrivateEndpointConnection' had property 'group_ids' added in the current version
13+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'group_ids' added in the current version
14+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'private_endpoint' added in the current version
15+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'private_link_service_connection_state' added in the current version
16+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'provisioning_state' added in the current version
17+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'id' added in the current version
18+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'name' added in the current version
19+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'type' added in the current version
20+
- The model or publicly exposed class 'PrivateEndpointConnectionWithSystemData' had property 'additional_properties' added in the current version
21+
- The model or publicly exposed class 'Resource' had property 'system_data' added in the current version
22+
- The model or publicly exposed class 'AppAttachPackage' was added in the current version
23+
- The model or publicly exposed class 'AppAttachPackageArchitectures' was added in the current version
24+
- The model or publicly exposed class 'AppAttachPackageInfoProperties' was added in the current version
25+
- The model or publicly exposed class 'AppAttachPackageList' was added in the current version
26+
- The model or publicly exposed class 'AppAttachPackagePatch' was added in the current version
27+
- The model or publicly exposed class 'AppAttachPackagePatchProperties' was added in the current version
28+
- The model or publicly exposed class 'AppAttachPackageProperties' was added in the current version
29+
- The model or publicly exposed class 'ErrorAdditionalInfo' was added in the current version
30+
- The model or publicly exposed class 'ErrorDetail' was added in the current version
31+
- The model or publicly exposed class 'ErrorResponse' was added in the current version
32+
- The model or publicly exposed class 'FailHealthCheckOnStagingFailure' was added in the current version
33+
- The model or publicly exposed class 'ImportPackageInfoRequest' was added in the current version
34+
- The model or publicly exposed class 'PackageTimestamped' was added in the current version
35+
- The model or publicly exposed class 'ProvisioningState' was added in the current version
36+
- The model or publicly exposed class 'RegistrationTokenList' was added in the current version
37+
- The model or publicly exposed class 'RegistrationTokenMinimal' was added in the current version
38+
- The model or publicly exposed class 'TrackedResource' was added in the current version
39+
- The 'HostPoolsOperations' method 'list_registration_tokens' was added in the current version
40+
- The model or publicly exposed class 'AppAttachPackageInfoOperations' was added in the current version
41+
- The model or publicly exposed class 'AppAttachPackageOperations' was added in the current version
42+
43+
### Breaking Changes
44+
45+
- Parameter `location` of model `ApplicationGroup` is now required
46+
- Parameter `location` of model `HostPool` is now required
47+
- Parameter `location` of model `ResourceModelWithAllowedPropertySet` is now required
48+
- Parameter `location` of model `ScalingPlan` is now required
49+
- Parameter `location` of model `Workspace` is now required
50+
351
## 1.1.0 (2023-10-23)
452

553
### Features Added

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

Lines changed: 2 additions & 2 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 Desktop Virtualization 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
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "15ba5b8a954afb74a6bb8902038835f0cddb9930",
2+
"commit": "f1e65f90e77a72258801439e757fc76ecb13a7fc",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.7.1",
7-
"@autorest/modelerfour@4.26.2"
6+
"@autorest/python@6.19.0",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/desktopvirtualization/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",
9+
"autorest_command": "autorest specification/desktopvirtualization/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 --tag=package-2024-04 --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/desktopvirtualization/resource-manager/readme.md"
1111
}

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

Lines changed: 6 additions & 7 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,24 +18,23 @@
1918
from azure.core.credentials import TokenCredential
2019

2120

22-
class DesktopVirtualizationMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class DesktopVirtualizationMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for DesktopVirtualizationMgmtClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
2625
attributes.
2726
2827
:param credential: Credential needed for the client to connect to Azure. Required.
2928
:type credential: ~azure.core.credentials.TokenCredential
30-
:param subscription_id: The ID of the target subscription. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3130
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-09-05". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2024-04-03". Note that overriding this
3332
default value may result in unsupported behavior.
3433
:paramtype api_version: str
3534
"""
3635

3736
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
super(DesktopVirtualizationMgmtClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-09-05")
37+
api_version: str = kwargs.pop("api_version", "2024-04-03")
4038

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

5352
def _configure(self, **kwargs: Any) -> None:
@@ -56,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
5655
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5756
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5857
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6058
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6159
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6261
self.authentication_policy = kwargs.get("authentication_policy")
6362
if self.credential and not self.authentication_policy:
6463
self.authentication_policy = ARMChallengeAuthenticationPolicy(

sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_desktop_virtualization_mgmt_client.py

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
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 DesktopVirtualizationMgmtClientConfiguration
1720
from ._serialization import Deserializer, Serializer
1821
from .operations import (
22+
AppAttachPackageInfoOperations,
23+
AppAttachPackageOperations,
1924
ApplicationGroupsOperations,
2025
ApplicationsOperations,
2126
DesktopsOperations,
@@ -77,15 +82,21 @@ class DesktopVirtualizationMgmtClient: # pylint: disable=client-accepts-api-ver
7782
:vartype session_hosts: azure.mgmt.desktopvirtualization.operations.SessionHostsOperations
7883
:ivar msix_packages: MSIXPackagesOperations operations
7984
:vartype msix_packages: azure.mgmt.desktopvirtualization.operations.MSIXPackagesOperations
85+
:ivar app_attach_package_info: AppAttachPackageInfoOperations operations
86+
:vartype app_attach_package_info:
87+
azure.mgmt.desktopvirtualization.operations.AppAttachPackageInfoOperations
8088
:ivar msix_images: MsixImagesOperations operations
8189
:vartype msix_images: azure.mgmt.desktopvirtualization.operations.MsixImagesOperations
90+
:ivar app_attach_package: AppAttachPackageOperations operations
91+
:vartype app_attach_package:
92+
azure.mgmt.desktopvirtualization.operations.AppAttachPackageOperations
8293
:param credential: Credential needed for the client to connect to Azure. Required.
8394
:type credential: ~azure.core.credentials.TokenCredential
84-
:param subscription_id: The ID of the target subscription. Required.
95+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
8596
:type subscription_id: str
8697
:param base_url: Service URL. Default value is "https://management.azure.com".
8798
:type base_url: str
88-
:keyword api_version: Api Version. Default value is "2023-09-05". Note that overriding this
99+
:keyword api_version: Api Version. Default value is "2024-04-03". Note that overriding this
89100
default value may result in unsupported behavior.
90101
:paramtype api_version: str
91102
"""
@@ -100,7 +111,25 @@ def __init__(
100111
self._config = DesktopVirtualizationMgmtClientConfiguration(
101112
credential=credential, subscription_id=subscription_id, **kwargs
102113
)
103-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
114+
_policies = kwargs.pop("policies", None)
115+
if _policies is None:
116+
_policies = [
117+
policies.RequestIdPolicy(**kwargs),
118+
self._config.headers_policy,
119+
self._config.user_agent_policy,
120+
self._config.proxy_policy,
121+
policies.ContentDecodePolicy(**kwargs),
122+
ARMAutoResourceProviderRegistrationPolicy(),
123+
self._config.redirect_policy,
124+
self._config.retry_policy,
125+
self._config.authentication_policy,
126+
self._config.custom_hook_policy,
127+
self._config.logging_policy,
128+
policies.DistributedTracingPolicy(**kwargs),
129+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
130+
self._config.http_logging_policy,
131+
]
132+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
104133

105134
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
106135
self._serialize = Serializer(client_models)
@@ -131,9 +160,15 @@ def __init__(
131160
self.user_sessions = UserSessionsOperations(self._client, self._config, self._serialize, self._deserialize)
132161
self.session_hosts = SessionHostsOperations(self._client, self._config, self._serialize, self._deserialize)
133162
self.msix_packages = MSIXPackagesOperations(self._client, self._config, self._serialize, self._deserialize)
163+
self.app_attach_package_info = AppAttachPackageInfoOperations(
164+
self._client, self._config, self._serialize, self._deserialize
165+
)
134166
self.msix_images = MsixImagesOperations(self._client, self._config, self._serialize, self._deserialize)
167+
self.app_attach_package = AppAttachPackageOperations(
168+
self._client, self._config, self._serialize, self._deserialize
169+
)
135170

136-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
171+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
137172
"""Runs the network request through the client's chained policies.
138173
139174
>>> from azure.core.rest import HttpRequest
@@ -153,12 +188,12 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
153188

154189
request_copy = deepcopy(request)
155190
request_copy.url = self._client.format_url(request_copy.url)
156-
return self._client.send_request(request_copy, **kwargs)
191+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
157192

158193
def close(self) -> None:
159194
self._client.close()
160195

161-
def __enter__(self) -> "DesktopVirtualizationMgmtClient":
196+
def __enter__(self) -> Self:
162197
self._client.__enter__()
163198
return self
164199

0 commit comments

Comments
 (0)