Skip to content

Commit 3919ebc

Browse files
[AutoRelease] t2-quota-2025-01-16-93059(can only be merged by SDK owner) (Azure#39215)
* code and test * update testcases * Update CHANGELOG.md to remove method details * Update changelog for quota operations changes * Update release date in CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent d38a8af commit 3919ebc

File tree

113 files changed

+3349
-5687
lines changed

Some content is hidden

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

113 files changed

+3349
-5687
lines changed

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

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

3+
## 2.0.0b2 (2025-01-22)
4+
5+
### Features Added
6+
7+
- Model `GroupQuotaDetails` added property `resource_name`
8+
- Model `GroupQuotaLimitList` added property `properties`
9+
- Model `GroupQuotaLimitList` added property `id`
10+
- Model `GroupQuotaLimitList` added property `name`
11+
- Model `GroupQuotaLimitList` added property `type`
12+
- Model `GroupQuotaLimitList` added property `system_data`
13+
- Model `SubscriptionQuotaAllocationsList` added property `properties`
14+
- Model `SubscriptionQuotaAllocationsList` added property `id`
15+
- Model `SubscriptionQuotaAllocationsList` added property `name`
16+
- Model `SubscriptionQuotaAllocationsList` added property `type`
17+
- Model `SubscriptionQuotaAllocationsList` added property `system_data`
18+
- Model `SubscriptionQuotaDetails` added property `resource_name`
19+
- Added model `GroupQuotaLimitListProperties`
20+
- Added model `GroupQuotaLimitProperties`
21+
- Added model `GroupQuotasEntityPatchProperties`
22+
- Added model `GroupQuotasEntityProperties`
23+
- Added model `SubscriptionQuotaAllocationsListProperties`
24+
- Added model `SubscriptionQuotaAllocationsProperties`
25+
26+
### Breaking Changes
27+
28+
- Deleted or renamed client operation group `QuotaMgmtClient.group_quota_usages`
29+
- Deleted or renamed client operation group `QuotaMgmtClient.group_quota_location_settings`
30+
- Model `GroupQuotaDetails` deleted or renamed its instance variable `region`
31+
- Model `GroupQuotaLimit` deleted or renamed its instance variable `id`
32+
- Model `GroupQuotaLimit` deleted or renamed its instance variable `name`
33+
- Model `GroupQuotaLimit` deleted or renamed its instance variable `type`
34+
- Model `GroupQuotaLimit` deleted or renamed its instance variable `system_data`
35+
- Model `GroupQuotaLimitList` deleted or renamed its instance variable `value`
36+
- Model `GroupQuotaLimitList` deleted or renamed its instance variable `next_link`
37+
- Model `GroupQuotasEntityBase` deleted or renamed its instance variable `additional_attributes`
38+
- Model `GroupQuotasEntityBasePatch` deleted or renamed its instance variable `additional_attributes`
39+
- Model `SubscriptionQuotaAllocations` deleted or renamed its instance variable `id`
40+
- Model `SubscriptionQuotaAllocations` deleted or renamed its instance variable `name`
41+
- Model `SubscriptionQuotaAllocations` deleted or renamed its instance variable `type`
42+
- Model `SubscriptionQuotaAllocations` deleted or renamed its instance variable `system_data`
43+
- Model `SubscriptionQuotaAllocationsList` deleted or renamed its instance variable `value`
44+
- Model `SubscriptionQuotaAllocationsList` deleted or renamed its instance variable `next_link`
45+
- Model `SubscriptionQuotaDetails` deleted or renamed its instance variable `region`
46+
- Deleted or renamed model `AdditionalAttributes`
47+
- Deleted or renamed model `AdditionalAttributesPatch`
48+
- Deleted or renamed model `BillingAccountId`
49+
- Deleted or renamed model `EnforcementState`
50+
- Deleted or renamed model `EnvironmentType`
51+
- Deleted or renamed model `GroupQuotasEnforcementListResponse`
52+
- Deleted or renamed model `GroupQuotasEnforcementResponse`
53+
- Deleted or renamed model `GroupQuotasEnforcementResponseProperties`
54+
- Deleted or renamed model `GroupingId`
55+
- Deleted or renamed model `GroupingIdType`
56+
- Method `GroupQuotaLimitsOperations.list` inserted a `positional_or_keyword` parameter `location`
57+
- Method `GroupQuotaLimitsOperations.list` deleted or renamed its parameter `filter` of kind `positional_or_keyword`
58+
- Deleted or renamed method `GroupQuotaLimitsOperations.get`
59+
- Method `GroupQuotaLimitsRequestOperations.begin_update` inserted a `positional_or_keyword` parameter `location`
60+
- Method `GroupQuotaLimitsRequestOperations.begin_update` deleted or renamed its parameter `resource_name` of kind `positional_or_keyword`
61+
- Deleted or renamed method `GroupQuotaLimitsRequestOperations.begin_create_or_update`
62+
- Method `GroupQuotaSubscriptionAllocationOperations.list` inserted a `positional_or_keyword` parameter `resource_provider_name`
63+
- Method `GroupQuotaSubscriptionAllocationOperations.list` inserted a `positional_or_keyword` parameter `location`
64+
- Method `GroupQuotaSubscriptionAllocationOperations.list` deleted or renamed its parameter `filter` of kind `positional_or_keyword`
65+
- Deleted or renamed method `GroupQuotaSubscriptionAllocationOperations.get`
66+
- Method `GroupQuotaSubscriptionAllocationRequestOperations.begin_update` inserted a `positional_or_keyword` parameter `location`
67+
- Method `GroupQuotaSubscriptionAllocationRequestOperations.begin_update` deleted or renamed its parameter `resource_name` of kind `positional_or_keyword`
68+
- Method `GroupQuotaSubscriptionAllocationRequestOperations.get` inserted a `positional_or_keyword` parameter `resource_provider_name`
69+
- Deleted or renamed method `GroupQuotaSubscriptionAllocationRequestOperations.begin_create_or_update`
70+
- Deleted or renamed operation group `GroupQuotaLocationSettingsOperations`
71+
- Deleted or renamed operation group `GroupQuotaUsagesOperations`
72+
373
## 2.0.0b1 (2024-04-22)
474

575
### Features Added
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "665e7c3b6f26b148b3c05e55602621bc293cc0a4",
2+
"commit": "1b038fc40563bdafb343a71cd5f7d3dee6bc4b5b",
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.13.7",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/quota/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.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/quota/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 --tag=package-2024-12-18-preview --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/quota/resource-manager/readme.md"
1111
}

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/__init__.py

Lines changed: 9 additions & 3 deletions
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 ._quota_mgmt_client import QuotaMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._quota_mgmt_client import QuotaMgmtClient # 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
"QuotaMgmtClient",
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/quota/azure-mgmt-quota/azure/mgmt/quota/_configuration.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
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

21-
class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for QuotaMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class QuotaMgmtClientConfiguration: # pylint: disable=too-many-instance-attribu
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-06-01-preview". Note that overriding
30+
:keyword api_version: Api Version. Default value is "2024-12-18-preview". Note that overriding
3231
this 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-06-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2024-12-18-preview")
3837

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

sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_quota_mgmt_client.py

Lines changed: 12 additions & 25 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
@@ -20,12 +21,10 @@
2021
from .operations import (
2122
GroupQuotaLimitsOperations,
2223
GroupQuotaLimitsRequestOperations,
23-
GroupQuotaLocationSettingsOperations,
2424
GroupQuotaSubscriptionAllocationOperations,
2525
GroupQuotaSubscriptionAllocationRequestOperations,
2626
GroupQuotaSubscriptionRequestsOperations,
2727
GroupQuotaSubscriptionsOperations,
28-
GroupQuotaUsagesOperations,
2928
GroupQuotasOperations,
3029
QuotaOperationOperations,
3130
QuotaOperations,
@@ -34,11 +33,10 @@
3433
)
3534

3635
if TYPE_CHECKING:
37-
# pylint: disable=unused-import,ungrouped-imports
3836
from azure.core.credentials import TokenCredential
3937

4038

41-
class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
39+
class QuotaMgmtClient: # pylint: disable=too-many-instance-attributes
4240
"""Microsoft Azure Quota Resource Provider. This Swagger is for Azure Group Quota using GroupQuota
4341
Entity.
4442
@@ -50,24 +48,19 @@ class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
5048
:ivar group_quota_subscription_requests: GroupQuotaSubscriptionRequestsOperations operations
5149
:vartype group_quota_subscription_requests:
5250
azure.mgmt.quota.operations.GroupQuotaSubscriptionRequestsOperations
53-
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
54-
:vartype group_quota_limits: azure.mgmt.quota.operations.GroupQuotaLimitsOperations
5551
:ivar group_quota_limits_request: GroupQuotaLimitsRequestOperations operations
5652
:vartype group_quota_limits_request:
5753
azure.mgmt.quota.operations.GroupQuotaLimitsRequestOperations
58-
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
59-
operations
60-
:vartype group_quota_subscription_allocation:
61-
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationOperations
54+
:ivar group_quota_limits: GroupQuotaLimitsOperations operations
55+
:vartype group_quota_limits: azure.mgmt.quota.operations.GroupQuotaLimitsOperations
6256
:ivar group_quota_subscription_allocation_request:
6357
GroupQuotaSubscriptionAllocationRequestOperations operations
6458
:vartype group_quota_subscription_allocation_request:
6559
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationRequestOperations
66-
:ivar group_quota_usages: GroupQuotaUsagesOperations operations
67-
:vartype group_quota_usages: azure.mgmt.quota.operations.GroupQuotaUsagesOperations
68-
:ivar group_quota_location_settings: GroupQuotaLocationSettingsOperations operations
69-
:vartype group_quota_location_settings:
70-
azure.mgmt.quota.operations.GroupQuotaLocationSettingsOperations
60+
:ivar group_quota_subscription_allocation: GroupQuotaSubscriptionAllocationOperations
61+
operations
62+
:vartype group_quota_subscription_allocation:
63+
azure.mgmt.quota.operations.GroupQuotaSubscriptionAllocationOperations
7164
:ivar usages: UsagesOperations operations
7265
:vartype usages: azure.mgmt.quota.operations.UsagesOperations
7366
:ivar quota: QuotaOperations operations
@@ -82,7 +75,7 @@ class QuotaMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too
8275
:type subscription_id: str
8376
:param base_url: Service URL. Default value is "https://management.azure.com".
8477
:type base_url: str
85-
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
78+
:keyword api_version: Api Version. Default value is "2024-12-18-preview". Note that overriding
8679
this default value may result in unsupported behavior.
8780
:paramtype api_version: str
8881
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -128,22 +121,16 @@ def __init__(
128121
self.group_quota_subscription_requests = GroupQuotaSubscriptionRequestsOperations(
129122
self._client, self._config, self._serialize, self._deserialize
130123
)
131-
self.group_quota_limits = GroupQuotaLimitsOperations(
132-
self._client, self._config, self._serialize, self._deserialize
133-
)
134124
self.group_quota_limits_request = GroupQuotaLimitsRequestOperations(
135125
self._client, self._config, self._serialize, self._deserialize
136126
)
137-
self.group_quota_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
127+
self.group_quota_limits = GroupQuotaLimitsOperations(
138128
self._client, self._config, self._serialize, self._deserialize
139129
)
140130
self.group_quota_subscription_allocation_request = GroupQuotaSubscriptionAllocationRequestOperations(
141131
self._client, self._config, self._serialize, self._deserialize
142132
)
143-
self.group_quota_usages = GroupQuotaUsagesOperations(
144-
self._client, self._config, self._serialize, self._deserialize
145-
)
146-
self.group_quota_location_settings = GroupQuotaLocationSettingsOperations(
133+
self.group_quota_subscription_allocation = GroupQuotaSubscriptionAllocationOperations(
147134
self._client, self._config, self._serialize, self._deserialize
148135
)
149136
self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize)
@@ -178,7 +165,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
178165
def close(self) -> None:
179166
self._client.close()
180167

181-
def __enter__(self) -> "QuotaMgmtClient":
168+
def __enter__(self) -> Self:
182169
self._client.__enter__()
183170
return self
184171

0 commit comments

Comments
 (0)