Skip to content

Commit de35716

Browse files
author
SDKAuto
committed
CodeGen from PR 34078 in Azure/azure-rest-api-specs
Merge ad8f1721b088f966554278cb1a9ec87e5d9d4ca5 into 37a849b656ecfb33424822b9f245aebff2ae994f
1 parent 206fa48 commit de35716

File tree

98 files changed

+2662
-2560
lines changed

Some content is hidden

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

98 files changed

+2662
-2560
lines changed

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

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

3+
## 1.2.0b3 (2025-05-12)
4+
5+
### Breaking Changes
6+
7+
- Method `PrivateLinkResourcesOperations.list_by_elastic_san` changed from `asynchronous` to `synchronous`
8+
- Method `ElasticSanList.__init__` removed default value `None` from its parameter `value`
9+
- Method `PrivateEndpointConnectionListResult.__init__` removed default value `None` from its parameter `value`
10+
- Method `PrivateLinkResourceListResult.__init__` removed default value `None` from its parameter `value`
11+
- Method `SnapshotList.__init__` removed default value `None` from its parameter `value`
12+
- Method `VolumeGroupList.__init__` removed default value `None` from its parameter `value`
13+
- Method `VolumeList.__init__` removed default value `None` from its parameter `value`
14+
315
## 1.2.0b2 (2025-04-21)
416

517
### Features Added

sdk/elasticsan/azure-mgmt-elasticsan/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 Elasticsan 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
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "b0a48bcbffead733affe03944ef09f5e8d12f8c8",
2+
"commit": "0e8a60212052dc13f9d071cbc573dedf07234699",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/elasticsan/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/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/elasticsan/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/elasticsan/resource-manager/readme.md"
1111
}

sdk/elasticsan/azure-mgmt-elasticsan/azure/mgmt/elasticsan/_elastic_san_mgmt_client.py

Lines changed: 24 additions & 20 deletions
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 ElasticSanMgmtClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
ElasticSanMgmtClientOperationsMixin,
2325
ElasticSansOperations,
@@ -35,31 +37,31 @@
3537

3638

3739
class ElasticSanMgmtClient(ElasticSanMgmtClientOperationsMixin): # pylint: disable=too-many-instance-attributes
38-
"""ElasticSanMgmtClient.
40+
"""(missing-service-description) Add service description.
3941
4042
:ivar operations: Operations operations
4143
:vartype operations: azure.mgmt.elasticsan.operations.Operations
42-
:ivar skus: SkusOperations operations
43-
:vartype skus: azure.mgmt.elasticsan.operations.SkusOperations
4444
:ivar elastic_sans: ElasticSansOperations operations
4545
:vartype elastic_sans: azure.mgmt.elasticsan.operations.ElasticSansOperations
46-
:ivar volume_groups: VolumeGroupsOperations operations
47-
:vartype volume_groups: azure.mgmt.elasticsan.operations.VolumeGroupsOperations
48-
:ivar volumes: VolumesOperations operations
49-
:vartype volumes: azure.mgmt.elasticsan.operations.VolumesOperations
46+
:ivar skus: SkusOperations operations
47+
:vartype skus: azure.mgmt.elasticsan.operations.SkusOperations
5048
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
5149
:vartype private_endpoint_connections:
5250
azure.mgmt.elasticsan.operations.PrivateEndpointConnectionsOperations
5351
:ivar private_link_resources: PrivateLinkResourcesOperations operations
5452
:vartype private_link_resources:
5553
azure.mgmt.elasticsan.operations.PrivateLinkResourcesOperations
54+
:ivar volume_groups: VolumeGroupsOperations operations
55+
:vartype volume_groups: azure.mgmt.elasticsan.operations.VolumeGroupsOperations
56+
:ivar volumes: VolumesOperations operations
57+
:vartype volumes: azure.mgmt.elasticsan.operations.VolumesOperations
5658
:ivar volume_snapshots: VolumeSnapshotsOperations operations
5759
:vartype volume_snapshots: azure.mgmt.elasticsan.operations.VolumeSnapshotsOperations
5860
:param credential: Credential needed for the client to connect to Azure. Required.
5961
:type credential: ~azure.core.credentials.TokenCredential
6062
:param subscription_id: The ID of the target subscription. Required.
6163
:type subscription_id: str
62-
:param base_url: Service URL. Default value is "https://management.azure.com".
64+
:param base_url: Service URL. Default value is None.
6365
:type base_url: str
6466
:keyword api_version: Api Version. Default value is "2024-07-01-preview". Note that overriding
6567
this default value may result in unsupported behavior.
@@ -69,15 +71,17 @@ class ElasticSanMgmtClient(ElasticSanMgmtClientOperationsMixin): # pylint: disa
6971
"""
7072

7173
def __init__(
72-
self,
73-
credential: "TokenCredential",
74-
subscription_id: str,
75-
base_url: str = "https://management.azure.com",
76-
**kwargs: Any
74+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7775
) -> None:
76+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
77+
_endpoints = get_arm_endpoints(_cloud)
78+
if not base_url:
79+
base_url = _endpoints["resource_manager"]
80+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7881
self._config = ElasticSanMgmtClientConfiguration(
79-
credential=credential, subscription_id=subscription_id, **kwargs
82+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
8083
)
84+
8185
_policies = kwargs.pop("policies", None)
8286
if _policies is None:
8387
_policies = [
@@ -96,23 +100,23 @@ def __init__(
96100
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
97101
self._config.http_logging_policy,
98102
]
99-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
103+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
100104

101105
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
102106
self._serialize = Serializer(client_models)
103107
self._deserialize = Deserializer(client_models)
104108
self._serialize.client_side_validation = False
105109
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
106-
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
107110
self.elastic_sans = ElasticSansOperations(self._client, self._config, self._serialize, self._deserialize)
108-
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
109-
self.volumes = VolumesOperations(self._client, self._config, self._serialize, self._deserialize)
111+
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
110112
self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
111113
self._client, self._config, self._serialize, self._deserialize
112114
)
113115
self.private_link_resources = PrivateLinkResourcesOperations(
114116
self._client, self._config, self._serialize, self._deserialize
115117
)
118+
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
119+
self.volumes = VolumesOperations(self._client, self._config, self._serialize, self._deserialize)
116120
self.volume_snapshots = VolumeSnapshotsOperations(
117121
self._client, self._config, self._serialize, self._deserialize
118122
)
Lines changed: 6 additions & 0 deletions
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)