Skip to content

Commit c466467

Browse files
author
SDKAuto
committed
CodeGen from PR 34212 in Azure/azure-rest-api-specs
Merge 38d1e969081ec2b19aa0da921813c21ce0a4c494 into b63d54b2c0e8b1d9685fa08f514743f7c7eda1b7
1 parent 9194780 commit c466467

File tree

227 files changed

+6781
-2047
lines changed

Some content is hidden

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

227 files changed

+6781
-2047
lines changed

sdk/compute/azure-mgmt-avs/CHANGELOG.md

+45
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Release History
22

3+
## 9.1.0 (2025-05-12)
4+
5+
### Features Added
6+
7+
- Client `AVSClient` added operation group `skus`
8+
- Client `AVSClient` added operation group `hosts`
9+
- Client `AVSClient` added operation group `provisioned_networks`
10+
- Client `AVSClient` added operation group `pure_storage_policies`
11+
- Model `AddonHcxProperties` added property `management_network`
12+
- Model `AddonHcxProperties` added property `uplink_network`
13+
- Model `Datastore` added property `pure_storage_volume`
14+
- Model `PrivateCloud` added property `zones`
15+
- Added model `GeneralHostProperties`
16+
- Added model `Host`
17+
- Added enum `HostKind`
18+
- Added model `HostListResult`
19+
- Added enum `HostMaintenance`
20+
- Added model `HostProperties`
21+
- Added enum `HostProvisioningState`
22+
- Added model `PagedResourceSku`
23+
- Added model `ProvisionedNetwork`
24+
- Added model `ProvisionedNetworkListResult`
25+
- Added enum `ProvisionedNetworkProvisioningState`
26+
- Added enum `ProvisionedNetworkTypes`
27+
- Added model `PureStoragePolicy`
28+
- Added model `PureStoragePolicyListResult`
29+
- Added enum `PureStoragePolicyProvisioningState`
30+
- Added model `PureStorageVolume`
31+
- Added model `ResourceSku`
32+
- Added model `ResourceSkuCapabilities`
33+
- Added model `ResourceSkuLocationInfo`
34+
- Added enum `ResourceSkuResourceType`
35+
- Added model `ResourceSkuRestrictionInfo`
36+
- Added model `ResourceSkuRestrictions`
37+
- Added enum `ResourceSkuRestrictionsReasonCode`
38+
- Added enum `ResourceSkuRestrictionsType`
39+
- Added model `ResourceSkuZoneDetails`
40+
- Added model `SpecializedHostProperties`
41+
- Added model `HostsOperations`
42+
- Added model `ProvisionedNetworksOperations`
43+
- Added model `PureStoragePoliciesOperations`
44+
- Added model `SkusOperations`
45+
- Method `PureStoragePoliciesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, private_cloud_name: str, storage_policy_name: str, resource: PureStoragePolicy, content_type: str)`
46+
- Method `PureStoragePoliciesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, private_cloud_name: str, storage_policy_name: str, resource: IO[bytes], content_type: str)`
47+
348
## 9.0.0 (2024-09-22)
449

550
### Features Added

sdk/compute/azure-mgmt-avs/README.md

+3-3
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 Avs Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
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.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.

sdk/compute/azure-mgmt-avs/_meta.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "abb0052f400b0215d4fbbf479e5bbc54714199e0",
2+
"commit": "4cb05484991756149f27956ffda2cec93ff10d4d",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/vmware/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.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/vmware/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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/vmware/resource-manager/readme.md"
1111
}

sdk/compute/azure-mgmt-avs/azure/mgmt/avs/__init__.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._avs_client import AVSClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._avs_client import AVSClient # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"AVSClient",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py

+38-13
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import AVSClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
AddonsOperations,
2325
AuthorizationsOperations,
@@ -26,24 +28,27 @@
2628
DatastoresOperations,
2729
GlobalReachConnectionsOperations,
2830
HcxEnterpriseSitesOperations,
31+
HostsOperations,
2932
IscsiPathsOperations,
3033
LocationsOperations,
3134
Operations,
3235
PlacementPoliciesOperations,
3336
PrivateCloudsOperations,
37+
ProvisionedNetworksOperations,
38+
PureStoragePoliciesOperations,
3439
ScriptCmdletsOperations,
3540
ScriptExecutionsOperations,
3641
ScriptPackagesOperations,
42+
SkusOperations,
3743
VirtualMachinesOperations,
3844
WorkloadNetworksOperations,
3945
)
4046

4147
if TYPE_CHECKING:
42-
# pylint: disable=unused-import,ungrouped-imports
4348
from azure.core.credentials import TokenCredential
4449

4550

46-
class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
51+
class AVSClient: # pylint: disable=too-many-instance-attributes
4752
"""Azure VMware Solution API.
4853
4954
:ivar operations: Operations operations
@@ -52,6 +57,8 @@ class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-
5257
:vartype locations: azure.mgmt.avs.operations.LocationsOperations
5358
:ivar private_clouds: PrivateCloudsOperations operations
5459
:vartype private_clouds: azure.mgmt.avs.operations.PrivateCloudsOperations
60+
:ivar skus: SkusOperations operations
61+
:vartype skus: azure.mgmt.avs.operations.SkusOperations
5562
:ivar addons: AddonsOperations operations
5663
:vartype addons: azure.mgmt.avs.operations.AddonsOperations
5764
:ivar authorizations: AuthorizationsOperations operations
@@ -62,6 +69,8 @@ class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-
6269
:vartype clusters: azure.mgmt.avs.operations.ClustersOperations
6370
:ivar datastores: DatastoresOperations operations
6471
:vartype datastores: azure.mgmt.avs.operations.DatastoresOperations
72+
:ivar hosts: HostsOperations operations
73+
:vartype hosts: azure.mgmt.avs.operations.HostsOperations
6574
:ivar placement_policies: PlacementPoliciesOperations operations
6675
:vartype placement_policies: azure.mgmt.avs.operations.PlacementPoliciesOperations
6776
:ivar virtual_machines: VirtualMachinesOperations operations
@@ -72,6 +81,10 @@ class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-
7281
:vartype hcx_enterprise_sites: azure.mgmt.avs.operations.HcxEnterpriseSitesOperations
7382
:ivar iscsi_paths: IscsiPathsOperations operations
7483
:vartype iscsi_paths: azure.mgmt.avs.operations.IscsiPathsOperations
84+
:ivar provisioned_networks: ProvisionedNetworksOperations operations
85+
:vartype provisioned_networks: azure.mgmt.avs.operations.ProvisionedNetworksOperations
86+
:ivar pure_storage_policies: PureStoragePoliciesOperations operations
87+
:vartype pure_storage_policies: azure.mgmt.avs.operations.PureStoragePoliciesOperations
7588
:ivar script_executions: ScriptExecutionsOperations operations
7689
:vartype script_executions: azure.mgmt.avs.operations.ScriptExecutionsOperations
7790
:ivar script_packages: ScriptPackagesOperations operations
@@ -84,23 +97,27 @@ class AVSClient: # pylint: disable=client-accepts-api-version-keyword,too-many-
8497
:type credential: ~azure.core.credentials.TokenCredential
8598
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
8699
:type subscription_id: str
87-
:param base_url: Service URL. Default value is "https://management.azure.com".
100+
:param base_url: Service URL. Default value is None.
88101
:type base_url: str
89-
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
102+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
90103
default value may result in unsupported behavior.
91104
:paramtype api_version: str
92105
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
93106
Retry-After header is present.
94107
"""
95108

96109
def __init__(
97-
self,
98-
credential: "TokenCredential",
99-
subscription_id: str,
100-
base_url: str = "https://management.azure.com",
101-
**kwargs: Any
110+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
102111
) -> None:
103-
self._config = AVSClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
112+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
113+
_endpoints = get_arm_endpoints(_cloud)
114+
if not base_url:
115+
base_url = _endpoints["resource_manager"]
116+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
117+
self._config = AVSClientConfiguration(
118+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
119+
)
120+
104121
_policies = kwargs.pop("policies", None)
105122
if _policies is None:
106123
_policies = [
@@ -119,7 +136,7 @@ def __init__(
119136
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
120137
self._config.http_logging_policy,
121138
]
122-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
139+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
123140

124141
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
125142
self._serialize = Serializer(client_models)
@@ -128,11 +145,13 @@ def __init__(
128145
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
129146
self.locations = LocationsOperations(self._client, self._config, self._serialize, self._deserialize)
130147
self.private_clouds = PrivateCloudsOperations(self._client, self._config, self._serialize, self._deserialize)
148+
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
131149
self.addons = AddonsOperations(self._client, self._config, self._serialize, self._deserialize)
132150
self.authorizations = AuthorizationsOperations(self._client, self._config, self._serialize, self._deserialize)
133151
self.cloud_links = CloudLinksOperations(self._client, self._config, self._serialize, self._deserialize)
134152
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
135153
self.datastores = DatastoresOperations(self._client, self._config, self._serialize, self._deserialize)
154+
self.hosts = HostsOperations(self._client, self._config, self._serialize, self._deserialize)
136155
self.placement_policies = PlacementPoliciesOperations(
137156
self._client, self._config, self._serialize, self._deserialize
138157
)
@@ -146,6 +165,12 @@ def __init__(
146165
self._client, self._config, self._serialize, self._deserialize
147166
)
148167
self.iscsi_paths = IscsiPathsOperations(self._client, self._config, self._serialize, self._deserialize)
168+
self.provisioned_networks = ProvisionedNetworksOperations(
169+
self._client, self._config, self._serialize, self._deserialize
170+
)
171+
self.pure_storage_policies = PureStoragePoliciesOperations(
172+
self._client, self._config, self._serialize, self._deserialize
173+
)
149174
self.script_executions = ScriptExecutionsOperations(
150175
self._client, self._config, self._serialize, self._deserialize
151176
)

sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

@@ -28,13 +27,13 @@ class AVSClientConfiguration: # pylint: disable=too-many-instance-attributes
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
30+
:keyword api_version: Api Version. Default value is "2024-09-01". Note that overriding this
3231
default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-09-01")
36+
api_version: str = kwargs.pop("api_version", "2024-09-01")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)