Skip to content

Commit 2f891e1

Browse files
[AutoRelease] t2-redis-2024-12-16-68682(can only be merged by SDK owner) (Azure#38893)
* code and test * update testcases * Update release date in CHANGELOG.md * update testcases --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent df22ea8 commit 2f891e1

File tree

111 files changed

+3290
-1165
lines changed

Some content is hidden

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

111 files changed

+3290
-1165
lines changed

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

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

3+
## 14.5.0 (2025-01-20)
4+
5+
### Features Added
6+
7+
- Model `RedisCommonProperties` added property `zonal_allocation_policy`
8+
- Model `RedisCreateParameters` added property `zonal_allocation_policy`
9+
- Model `RedisCreateProperties` added property `zonal_allocation_policy`
10+
- Model `RedisProperties` added property `zonal_allocation_policy`
11+
- Model `RedisResource` added property `zonal_allocation_policy`
12+
- Model `RedisUpdateParameters` added property `zonal_allocation_policy`
13+
- Model `RedisUpdateProperties` added property `zonal_allocation_policy`
14+
- Added enum `ZonalAllocationPolicy`
15+
316
## 14.4.0 (2024-07-21)
417

518
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "3aef2f96202eec656fca4abc4df0fbfe10b89ac0",
2+
"commit": "58740206b853320974ef5e4864f7be8120b15a27",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.19",
6+
"@autorest/python@6.26.4",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/redis/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 --tag=package-2024-03 --use=@autorest/python@6.13.19 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/redis/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.26.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/redis/resource-manager/readme.md"
1111
}

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

Lines changed: 0 additions & 6 deletions
This file was deleted.

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/__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 ._redis_management_client import RedisManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._redis_management_client import RedisManagementClient # 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
"RedisManagementClient",
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/redis/azure-mgmt-redis/azure/mgmt/redis/_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 RedisManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class RedisManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for RedisManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class RedisManagementClientConfiguration: # pylint: disable=too-many-instance-a
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-03-01". Note that overriding this
30+
:keyword api_version: Api Version. Default value is "2024-11-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", "2024-03-01")
36+
api_version: str = kwargs.pop("api_version", "2024-11-01")
3837

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

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py

Lines changed: 4 additions & 4 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
@@ -31,11 +32,10 @@
3132
)
3233

3334
if TYPE_CHECKING:
34-
# pylint: disable=unused-import,ungrouped-imports
3535
from azure.core.credentials import TokenCredential
3636

3737

38-
class RedisManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
38+
class RedisManagementClient: # pylint: disable=too-many-instance-attributes
3939
"""REST API for Azure Redis Cache Service.
4040
4141
:ivar operations: Operations operations
@@ -65,7 +65,7 @@ class RedisManagementClient: # pylint: disable=client-accepts-api-version-keywo
6565
:type subscription_id: str
6666
:param base_url: Service URL. Default value is "https://management.azure.com".
6767
:type base_url: str
68-
:keyword api_version: Api Version. Default value is "2024-03-01". Note that overriding this
68+
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
6969
default value may result in unsupported behavior.
7070
:paramtype api_version: str
7171
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -150,7 +150,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
150150
def close(self) -> None:
151151
self._client.close()
152152

153-
def __enter__(self) -> "RedisManagementClient":
153+
def __enter__(self) -> Self:
154154
self._client.__enter__()
155155
return self
156156

0 commit comments

Comments
 (0)