Skip to content

Commit f481891

Browse files
changlong-liuSDK Automation
andauthored
Sdk automation/azure mgmt redis (Azure#13541)
* Generated from b9c06c4ea0f48bbe80323fa1f239a8602f3d5c26 Update preview version * version 7.0.0rc2 * run test Co-authored-by: SDK Automation <sdkautomation@microsoft.com>
1 parent 028ce59 commit f481891

File tree

8 files changed

+2290
-73
lines changed

8 files changed

+2290
-73
lines changed

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

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

3+
## 7.0.0rc2 (2020-09-01)
4+
5+
**Features**
6+
7+
- Model RedisRebootParameters has a new parameter ports
8+
- Model RedisInstanceDetails has a new parameter is_master
9+
10+
**Breaking changes**
11+
12+
- Operation RedisOperations.force_reboot has a new signature
13+
314
## 7.0.0rc1 (2019-12-07)
415

516
**Features**
Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
1-
## Microsoft Azure SDK for Python
1+
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Redis Cache Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
46

5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
77

8-
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
8+
# Usage
99

10-
For the older Azure Service Management (ASM) libraries, see
11-
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
12-
library.
13-
14-
For a more complete set of Azure libraries, see the
15-
[azure sdk python release](https://aka.ms/azsdk/python/all).
16-
17-
## Usage
18-
19-
For code examples, see [Redis Cache
20-
Management](https://docs.microsoft.com/python/api/overview/azure/redis)
10+
For code examples, see [Redis Cache Management](https://docs.microsoft.com/python/api/overview/azure/redis)
2111
on docs.microsoft.com.
2212

23-
## Provide Feedback
2413

25-
If you encounter any bugs or have suggestions, please file an issue in
26-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
14+
# Provide Feedback
15+
16+
If you encounter any bugs or have suggestions, please file an issue in the
17+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2718
section of the project.
2819

29-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-redis%2FREADME.png)
20+
21+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-redis%2FREADME.png)

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -568,20 +568,24 @@ class RedisInstanceDetails(Model):
568568
:vartype zone: str
569569
:ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance
570570
:vartype shard_id: int
571+
:ivar is_master: Specifies whether the instance is a master node.
572+
:vartype is_master: bool
571573
"""
572574

573575
_validation = {
574576
'ssl_port': {'readonly': True},
575577
'non_ssl_port': {'readonly': True},
576578
'zone': {'readonly': True},
577579
'shard_id': {'readonly': True},
580+
'is_master': {'readonly': True},
578581
}
579582

580583
_attribute_map = {
581584
'ssl_port': {'key': 'sslPort', 'type': 'int'},
582585
'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'},
583586
'zone': {'key': 'zone', 'type': 'str'},
584587
'shard_id': {'key': 'shardId', 'type': 'int'},
588+
'is_master': {'key': 'isMaster', 'type': 'bool'},
585589
}
586590

587591
def __init__(self, **kwargs):
@@ -590,6 +594,7 @@ def __init__(self, **kwargs):
590594
self.non_ssl_port = None
591595
self.zone = None
592596
self.shard_id = None
597+
self.is_master = None
593598

594599

595600
class RedisLinkedServer(Model):
@@ -747,30 +752,29 @@ def __init__(self, **kwargs):
747752
class RedisRebootParameters(Model):
748753
"""Specifies which Redis node(s) to reboot.
749754
750-
All required parameters must be populated in order to send to Azure.
751-
752-
:param reboot_type: Required. Which Redis node(s) to reboot. Depending on
753-
this value data loss is possible. Possible values include: 'PrimaryNode',
755+
:param reboot_type: Which Redis node(s) to reboot. Depending on this value
756+
data loss is possible. Possible values include: 'PrimaryNode',
754757
'SecondaryNode', 'AllNodes'
755758
:type reboot_type: str or ~azure.mgmt.redis.models.RebootType
756759
:param shard_id: If clustering is enabled, the ID of the shard to be
757760
rebooted.
758761
:type shard_id: int
762+
:param ports: A list of redis instances to reboot, specified by
763+
per-instance SSL ports or non-SSL ports.
764+
:type ports: list[int]
759765
"""
760766

761-
_validation = {
762-
'reboot_type': {'required': True},
763-
}
764-
765767
_attribute_map = {
766768
'reboot_type': {'key': 'rebootType', 'type': 'str'},
767769
'shard_id': {'key': 'shardId', 'type': 'int'},
770+
'ports': {'key': 'ports', 'type': '[int]'},
768771
}
769772

770773
def __init__(self, **kwargs):
771774
super(RedisRebootParameters, self).__init__(**kwargs)
772775
self.reboot_type = kwargs.get('reboot_type', None)
773776
self.shard_id = kwargs.get('shard_id', None)
777+
self.ports = kwargs.get('ports', None)
774778

775779

776780
class RedisRegenerateKeyParameters(Model):
@@ -1075,7 +1079,7 @@ class Sku(Model):
10751079
:type family: str or ~azure.mgmt.redis.models.SkuFamily
10761080
:param capacity: Required. The size of the Redis cache to deploy. Valid
10771081
values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P
1078-
(Premium) family (1, 2, 3, 4).
1082+
(Premium) family (1, 2, 3, 4, 5).
10791083
:type capacity: int
10801084
"""
10811085

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -568,20 +568,24 @@ class RedisInstanceDetails(Model):
568568
:vartype zone: str
569569
:ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance
570570
:vartype shard_id: int
571+
:ivar is_master: Specifies whether the instance is a master node.
572+
:vartype is_master: bool
571573
"""
572574

573575
_validation = {
574576
'ssl_port': {'readonly': True},
575577
'non_ssl_port': {'readonly': True},
576578
'zone': {'readonly': True},
577579
'shard_id': {'readonly': True},
580+
'is_master': {'readonly': True},
578581
}
579582

580583
_attribute_map = {
581584
'ssl_port': {'key': 'sslPort', 'type': 'int'},
582585
'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'},
583586
'zone': {'key': 'zone', 'type': 'str'},
584587
'shard_id': {'key': 'shardId', 'type': 'int'},
588+
'is_master': {'key': 'isMaster', 'type': 'bool'},
585589
}
586590

587591
def __init__(self, **kwargs) -> None:
@@ -590,6 +594,7 @@ def __init__(self, **kwargs) -> None:
590594
self.non_ssl_port = None
591595
self.zone = None
592596
self.shard_id = None
597+
self.is_master = None
593598

594599

595600
class RedisLinkedServer(Model):
@@ -747,30 +752,29 @@ def __init__(self, *, schedule_entries, **kwargs) -> None:
747752
class RedisRebootParameters(Model):
748753
"""Specifies which Redis node(s) to reboot.
749754
750-
All required parameters must be populated in order to send to Azure.
751-
752-
:param reboot_type: Required. Which Redis node(s) to reboot. Depending on
753-
this value data loss is possible. Possible values include: 'PrimaryNode',
755+
:param reboot_type: Which Redis node(s) to reboot. Depending on this value
756+
data loss is possible. Possible values include: 'PrimaryNode',
754757
'SecondaryNode', 'AllNodes'
755758
:type reboot_type: str or ~azure.mgmt.redis.models.RebootType
756759
:param shard_id: If clustering is enabled, the ID of the shard to be
757760
rebooted.
758761
:type shard_id: int
762+
:param ports: A list of redis instances to reboot, specified by
763+
per-instance SSL ports or non-SSL ports.
764+
:type ports: list[int]
759765
"""
760766

761-
_validation = {
762-
'reboot_type': {'required': True},
763-
}
764-
765767
_attribute_map = {
766768
'reboot_type': {'key': 'rebootType', 'type': 'str'},
767769
'shard_id': {'key': 'shardId', 'type': 'int'},
770+
'ports': {'key': 'ports', 'type': '[int]'},
768771
}
769772

770-
def __init__(self, *, reboot_type, shard_id: int=None, **kwargs) -> None:
773+
def __init__(self, *, reboot_type=None, shard_id: int=None, ports=None, **kwargs) -> None:
771774
super(RedisRebootParameters, self).__init__(**kwargs)
772775
self.reboot_type = reboot_type
773776
self.shard_id = shard_id
777+
self.ports = ports
774778

775779

776780
class RedisRegenerateKeyParameters(Model):
@@ -1075,7 +1079,7 @@ class Sku(Model):
10751079
:type family: str or ~azure.mgmt.redis.models.SkuFamily
10761080
:param capacity: Required. The size of the Redis cache to deploy. Valid
10771081
values: for C (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P
1078-
(Premium) family (1, 2, 3, 4).
1082+
(Premium) family (1, 2, 3, 4, 5).
10791083
:type capacity: int
10801084
"""
10811085

sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -743,21 +743,16 @@ def regenerate_key(
743743
regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey'}
744744

745745
def force_reboot(
746-
self, resource_group_name, name, reboot_type, shard_id=None, custom_headers=None, raw=False, **operation_config):
746+
self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config):
747747
"""Reboot specified Redis node(s). This operation requires write
748748
permission to the cache resource. There can be potential data loss.
749749
750750
:param resource_group_name: The name of the resource group.
751751
:type resource_group_name: str
752752
:param name: The name of the Redis cache.
753753
:type name: str
754-
:param reboot_type: Which Redis node(s) to reboot. Depending on this
755-
value data loss is possible. Possible values include: 'PrimaryNode',
756-
'SecondaryNode', 'AllNodes'
757-
:type reboot_type: str or ~azure.mgmt.redis.models.RebootType
758-
:param shard_id: If clustering is enabled, the ID of the shard to be
759-
rebooted.
760-
:type shard_id: int
754+
:param parameters: Specifies which Redis node(s) to reboot.
755+
:type parameters: ~azure.mgmt.redis.models.RedisRebootParameters
761756
:param dict custom_headers: headers that will be added to the request
762757
:param bool raw: returns the direct response alongside the
763758
deserialized response
@@ -768,8 +763,6 @@ def force_reboot(
768763
~msrest.pipeline.ClientRawResponse
769764
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
770765
"""
771-
parameters = models.RedisRebootParameters(reboot_type=reboot_type, shard_id=shard_id)
772-
773766
# Construct URL
774767
url = self.force_reboot.metadata['url']
775768
path_format_arguments = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "7.0.0rc1"
12+
VERSION = "7.0.0rc2"
1313

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
pass
3737

3838
# Version extraction inspired from 'requests'
39-
with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
39+
with open(os.path.join(package_folder_path, 'version.py')
40+
if os.path.exists(os.path.join(package_folder_path, 'version.py'))
41+
else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
4042
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
4143
fd.read(), re.MULTILINE).group(1)
4244

@@ -67,6 +69,7 @@
6769
'Programming Language :: Python :: 3.5',
6870
'Programming Language :: Python :: 3.6',
6971
'Programming Language :: Python :: 3.7',
72+
'Programming Language :: Python :: 3.8',
7073
'License :: OSI Approved :: MIT License',
7174
],
7275
zip_safe=False,

0 commit comments

Comments
 (0)