Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Release History

**Redis**

* Add preview param `--replicas-per-master` to `az redis create` command
* Update azure-mgmt-redis from 6.0.0 to 7.0.0rc1
* Fix #2902: Avoid setting memory configs while updating Basic SKU cache

**Reservations**
Expand Down
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/redis/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def load_arguments(self, _):
c.argument('minimum_tls_version', help='Specifies the TLS version required by clients to connect to cache', arg_type=get_enum_type(TlsVersion))
c.argument('vm_size', arg_type=get_enum_type(allowed_c_family_sizes + allowed_p_family_sizes), help='Size of Redis cache to deploy. Basic and Standard Cache sizes start with C. Premium Cache sizes start with P')
c.argument('enable_non_ssl_port', action='store_true', help='If the value is true, then the non-ssl redis server port (6379) will be enabled.')
c.argument('replicas_per_master', help='The number of replicas to be created per master.', is_preview=True)

with self.argument_context('redis firewall-rules list') as c:
c.argument('cache_name', arg_type=cache_name, id_part=None)
Expand Down
8 changes: 7 additions & 1 deletion src/azure-cli/azure/cli/command_modules/redis/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def cli_redis_update(cmd, instance, sku=None, vm_size=None):
if 'maxmemory-delta' in instance.redis_configuration:
instance.redis_configuration.pop('maxmemory-delta')

# Trim zonal-configuration
if 'zonal-configuration' in instance.redis_configuration:
instance.redis_configuration.pop('zonal-configuration')

# pylint: disable=too-many-function-args
update_params = RedisUpdateParameters(
redis_configuration=instance.redis_configuration,
Expand All @@ -61,7 +65,8 @@ def cli_redis_update(cmd, instance, sku=None, vm_size=None):
def cli_redis_create(cmd, client,
resource_group_name, name, location, sku, vm_size, tags=None,
redis_configuration=None, enable_non_ssl_port=None, tenant_settings=None,
shard_count=None, minimum_tls_version=None, subnet_id=None, static_ip=None, zones=None):
shard_count=None, minimum_tls_version=None, subnet_id=None, static_ip=None,
zones=None, replicas_per_master=None):
# pylint:disable=line-too-long
if ((sku.lower() in ['standard', 'basic'] and vm_size.lower() not in allowed_c_family_sizes) or (sku.lower() in ['premium'] and vm_size.lower() not in allowed_p_family_sizes)):
raise wrong_vmsize_error
Expand All @@ -76,6 +81,7 @@ def cli_redis_create(cmd, client,
location=location,
redis_configuration=redis_configuration,
enable_non_ssl_port=enable_non_ssl_port,
replicas_per_master=replicas_per_master,
tenant_settings=tenant_settings_in_json,
shard_count=shard_count,
minimum_tls_version=minimum_tls_version,
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,152 +1,164 @@
interactions:
- request:
body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
"date": "2019-02-05T23:29:36Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
Content-Length: ['110']
Content-Type: [application/json; charset=utf-8]
ParameterSetName: [--location --name --tag]
User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34
resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.58]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_redis000001?api-version=2019-07-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001","name":"cli_test_redis000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2019-02-05T23:29:36Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
content-length: ['384']
content-type: [application/json; charset=utf-8]
date: ['Tue, 05 Feb 2019 23:27:24 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
body: '{"properties": {"tenantSettings": {}, "sku": {"name": "Basic", "family":
"c", "capacity": 0}}, "location": "WestUS2"}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [redis create]
Connection: [keep-alive]
Content-Length: ['117']
Content-Type: [application/json; charset=utf-8]
ParameterSetName: [-n -g -l --sku --vm-size]
User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34
azure-mgmt-redis/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.58]
accept-language: [en-US]
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- redis create
Connection:
- keep-alive
Content-Length:
- '117'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- -n -g -l --sku --vm-size
User-Agent:
- python/3.7.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
azure-mgmt-redis/7.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.77
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002?api-version=2018-03-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002?api-version=2019-07-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002","location":"West
US 2","name":"cliredis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"tenantSettings":{},"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":{"primaryKey":"2fNwHK15DyZFfhwXEHNUOMnyznC6tDeRZZRZgOhL3kA=","secondaryKey":"0ViXQAVLO2E5sIGw27dfK38XjFC9nJSx9AfvE9PF3JE="},"hostName":"cliredis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'}
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002","location":"West
US 2","name":"cliredis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"4.0.14","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"instances":[{"sslPort":15000}],"tenantSettings":{},"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":{"primaryKey":"bAfdBk2P9pxmcvFhSlpcQfr7L9q8PlWCWRmzpLiNuAQ=","secondaryKey":"kMHshoE8hK21tCtPvZXXe7TJfHLcRR0QtfYsi16odiQ="},"hostName":"cliredis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'
headers:
cache-control: [no-cache]
content-length: ['842']
content-type: [application/json; charset=utf-8]
date: ['Tue, 05 Feb 2019 23:27:26 GMT']
expires: ['-1']
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/cliredis000002?api-version=2018-03-01']
pragma: [no-cache]
server: [Microsoft-HTTPAPI/2.0]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
x-ms-ratelimit-remaining-subscription-writes: ['1199']
x-rp-server-mvid: [742524e0-4536-4de4-8449-006b73714404]
status: {code: 201, message: Created}
cache-control:
- no-cache
content-length:
- '875'
content-type:
- application/json; charset=utf-8
date:
- Fri, 06 Dec 2019 23:50:41 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/cliredis000002?api-version=2019-07-01
pragma:
- no-cache
server:
- Microsoft-HTTPAPI/2.0
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-rp-server-mvid:
- d4a16663-d537-49d1-8ba4-e2fdb635702d
status:
code: 201
message: Created
- request:
body: null
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [redis create]
Connection: [keep-alive]
ParameterSetName: [-n -g -l --sku --vm-size]
User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34
azure-mgmt-redis/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.58]
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- redis create
Connection:
- keep-alive
ParameterSetName:
- -n -g -l --sku --vm-size
User-Agent:
- python/3.7.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
azure-mgmt-redis/7.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.77
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/cliredis000002?api-version=2018-03-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/cliredis000002?api-version=2019-07-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002","location":"West
US 2","name":"cliredis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"tenantSettings":{},"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"cliredis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'}
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002","location":"West
US 2","name":"cliredis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"4.0.14","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"instances":[{"sslPort":15000}],"tenantSettings":{},"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"cliredis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'
headers:
cache-control: [no-cache]
content-length: ['723']
content-type: [application/json; charset=utf-8]
date: ['Tue, 05 Feb 2019 23:27:56 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-HTTPAPI/2.0]
strict-transport-security: [max-age=31536000; includeSubDomains]
transfer-encoding: [chunked]
vary: [Accept-Encoding]
x-content-type-options: [nosniff]
x-rp-server-mvid: [742524e0-4536-4de4-8449-006b73714404]
status: {code: 200, message: OK}
cache-control:
- no-cache
content-length:
- '756'
content-type:
- application/json; charset=utf-8
date:
- Fri, 06 Dec 2019 23:51:11 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- Microsoft-HTTPAPI/2.0
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-rp-server-mvid:
- d4a16663-d537-49d1-8ba4-e2fdb635702d
status:
code: 200
message: OK
- request:
body: null
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [redis list-keys]
Connection: [keep-alive]
Content-Length: ['0']
ParameterSetName: [-n -g]
User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34
azure-mgmt-redis/6.0.0 Azure-SDK-For-Python AZURECLI/2.0.58]
accept-language: [en-US]
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- redis list-keys
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- -n -g
User-Agent:
- python/3.7.1 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
azure-mgmt-redis/7.0.0rc1 Azure-SDK-For-Python AZURECLI/2.0.77
accept-language:
- en-US
method: POST
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002/listKeys?api-version=2018-03-01
response:
body: {string: '{"primaryKey":"2fNwHK15DyZFfhwXEHNUOMnyznC6tDeRZZRZgOhL3kA=","secondaryKey":"0ViXQAVLO2E5sIGw27dfK38XjFC9nJSx9AfvE9PF3JE="}'}
headers:
cache-control: [no-cache]
content-length: ['123']
content-type: [application/json; charset=utf-8]
date: ['Tue, 05 Feb 2019 23:27:58 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-HTTPAPI/2.0]
strict-transport-security: [max-age=31536000; includeSubDomains]
transfer-encoding: [chunked]
vary: [Accept-Encoding]
x-content-type-options: [nosniff]
x-ms-ratelimit-remaining-subscription-writes: ['1199']
x-rp-server-mvid: [742524e0-4536-4de4-8449-006b73714404]
status: {code: 200, message: OK}
- request:
body: null
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group delete]
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
ParameterSetName: [--name --yes --no-wait]
User-Agent: [python/3.6.5 (Windows-10-10.0.17763-SP0) msrest/0.6.4 msrest_azure/0.4.34
resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.58]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_redis000001?api-version=2019-07-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/cliredis000002/listKeys?api-version=2019-07-01
response:
body: {string: ''}
body:
string: '{"primaryKey":"bAfdBk2P9pxmcvFhSlpcQfr7L9q8PlWCWRmzpLiNuAQ=","secondaryKey":"kMHshoE8hK21tCtPvZXXe7TJfHLcRR0QtfYsi16odiQ="}'
headers:
cache-control: [no-cache]
content-length: ['0']
date: ['Tue, 05 Feb 2019 23:27:58 GMT']
expires: ['-1']
location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGUkVESVNOWlJGNzREWUFEVkpOSU9IWkhQUEVQM1RWSFY1QnwzNjIwOEZFNDY3MkFFNTlELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2019-07-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
x-ms-ratelimit-remaining-subscription-deletes: ['14998']
status: {code: 202, message: Accepted}
cache-control:
- no-cache
content-length:
- '123'
content-type:
- application/json; charset=utf-8
date:
- Fri, 06 Dec 2019 23:51:12 GMT
expires:
- '-1'
pragma:
- no-cache
server:
- Microsoft-HTTPAPI/2.0
strict-transport-security:
- max-age=31536000; includeSubDomains
transfer-encoding:
- chunked
vary:
- Accept-Encoding
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
x-rp-server-mvid:
- d4a16663-d537-49d1-8ba4-e2fdb635702d
status:
code: 200
message: OK
version: 1
Loading