diff --git a/src/command_modules/azure-cli-redis/HISTORY.rst b/src/command_modules/azure-cli-redis/HISTORY.rst index aee397d1b6b..8840c2910ae 100644 --- a/src/command_modules/azure-cli-redis/HISTORY.rst +++ b/src/command_modules/azure-cli-redis/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +0.3.2 ++++++ +* Minor fixes + 0.3.1 +++++ * Minor fixes diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py index a1a8a5c9f9a..9287249f38d 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py @@ -3,27 +3,26 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long - -from azure.cli.core.commands.parameters import get_resource_name_completion_list, name_type, tags_type import azure.cli.command_modules.redis._help # pylint: disable=unused-import -from azure.cli.command_modules.redis._validators import JsonString, ScheduleEntryList - -from azure.mgmt.redis.models import RebootType, RedisKeyType, SkuName - -from azure.cli.core.commands.parameters import get_enum_type # TODO: Move this into Knack def load_arguments(self, _): + from azure.mgmt.redis.models import RebootType, RedisKeyType, SkuName + from azure.cli.command_modules.redis._validators import JsonString, ScheduleEntryList + from azure.cli.core.commands.parameters import get_enum_type # TODO: Move this into Knack + from azure.cli.core.commands.parameters import get_resource_name_completion_list, name_type, tags_type with self.argument_context('redis') as c: - c.argument('name', options_list=['--name', '-n'], help='Name of the Redis cache.', id_part='name', completer=get_resource_name_completion_list('Microsoft.Cache/redis')) - c.argument('redis_configuration', help='JSON encoded configuration settings. Use @{file} to load from a file.', type=JsonString) + c.argument('name', options_list=['--name', '-n'], help='Name of the Redis cache.', id_part='name', + completer=get_resource_name_completion_list('Microsoft.Cache/redis')) + c.argument('redis_configuration', help='JSON encoded configuration settings. Use @{file} to load from a file.', + type=JsonString) c.argument('reboot_type', arg_type=get_enum_type(RebootType)) c.argument('key_type', arg_type=get_enum_type(RedisKeyType)) c.argument('shard_id', type=int) c.argument('sku', help='Type of Redis cache.', arg_type=get_enum_type(SkuName)) - c.argument('vm_size', help='Size of Redis cache to deploy. Example : values for C family (C0, C1, C2, C3, C4, C5, C6). For P family (P1, P2, P3, P4)') + c.argument('vm_size', help='Size of Redis cache to deploy. Example : values for C family (C0, C1, C2, C3, C4, ' + 'C5, C6). For P family (P1, P2, P3, P4)') c.argument('enable_non_ssl_port', action='store_true') c.argument('shard_count', type=int) c.argument('tags', tags_type) diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_validators.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_validators.py index dd79d31d019..8d3253c5809 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_validators.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_validators.py @@ -4,7 +4,6 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.util import shell_safe_json_parse -from azure.mgmt.redis.models import ScheduleEntry class JsonString(dict): @@ -20,10 +19,13 @@ def __init__(self, value): class ScheduleEntryList(list): def __init__(self, value): super(ScheduleEntryList, self).__init__() + + from azure.mgmt.redis.models import ScheduleEntry + if value[0] in ("'", '"') and value[-1] == value[0]: # Remove leading and trailing quotes for dos/cmd.exe users value = value[1:-1] dictval = shell_safe_json_parse(value) - self.extend([ScheduleEntry(row['dayOfWeek'], - int(row['startHourUtc']), - row.get('maintenanceWindow', None)) for row in dictval]) + self.extend([ScheduleEntry(day_of_week=row['dayOfWeek'], + start_hour_utc=int(row['startHourUtc']), + maintenance_window=row.get('maintenanceWindow', None)) for row in dictval]) diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py index 1201ba69848..3a49b61141c 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py @@ -5,11 +5,10 @@ from azure.cli.core.commands import CliCommandType -from azure.cli.command_modules.redis._client_factory import cf_redis, cf_patch_schedules -from azure.cli.command_modules.redis.custom import wrong_vmsize_argument_exception_handler - def load_command_table(self, _): + from azure.cli.command_modules.redis._client_factory import cf_redis, cf_patch_schedules + from azure.cli.command_modules.redis.custom import wrong_vmsize_argument_exception_handler redis_sdk = CliCommandType( operations_tmpl='azure.mgmt.redis.operations.redis_operations#RedisOperations.{}', diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py index 70a33cad653..ec8ac2313eb 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py @@ -56,7 +56,7 @@ def cli_redis_update_settings(cmd, client, resource_group_name, name, redis_conf # Due to swagger/mgmt SDK quirkiness, we have to manually copy over # the resource retrieved to a create_parameters object - update_params = RedisUpdateParameters( + update_params = RedisUpdateParameters( # pylint: disable=too-many-function-args existing.redis_configuration, existing.enable_non_ssl_port, existing.tenant_settings, @@ -79,7 +79,7 @@ def cli_redis_update(cmd, instance, sku=None, vm_size=None): instance.sku.family = vm_size[0] instance.sku.capacity = vm_size[1:] - update_params = RedisUpdateParameters( + update_params = RedisUpdateParameters( # pylint: disable=too-many-function-args instance.redis_configuration, instance.enable_non_ssl_port, instance.tenant_settings, @@ -113,15 +113,15 @@ def cli_redis_create(cmd, client, """ from azure.mgmt.redis.models import RedisCreateParameters, Sku params = RedisCreateParameters( - location, - Sku(sku, vm_size[0], vm_size[1:]), - tags, - redis_configuration, - enable_non_ssl_port, - tenant_settings, - shard_count, - subnet_id, - static_ip) + location=location, + sku=Sku(sku, vm_size[0], vm_size[1:]), + tags=tags, + redis_configuration=redis_configuration, + enable_non_ssl_port=enable_non_ssl_port, + tenant_settings=tenant_settings, + shard_count=shard_count, + subnet_id=subnet_id, + static_ip=static_ip) return client.create(resource_group_name, name, params) # endregion diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/tests/latest/recordings/test_redis_cache.yaml b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/tests/latest/recordings/test_redis_cache.yaml index 5b204a4cd18..6318e5add51 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/tests/latest/recordings/test_redis_cache.yaml +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/tests/latest/recordings/test_redis_cache.yaml @@ -1,84 +1,86 @@ interactions: - request: - body: '{"tags": {"use": "az-test"}, "location": "westus"}' + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-08-17T17:17:53Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [group create] Connection: [keep-alive] - Content-Length: ['50'] + Content-Length: ['110'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python - AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_redis000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001","name":"cli_test_redis000001","location":"westus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'} + 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":"2018-08-17T17:17:53Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] - content-length: ['328'] + content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:29:24 GMT'] + date: ['Fri, 17 Aug 2018 17:17:56 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: '{"location": "WestUS", "properties": {"sku": {"name": "Basic", "family": - "C", "capacity": 0}}}' + body: '{"properties": {"sku": {"name": "Basic", "family": "C", "capacity": 0}}, + "location": "WestUS"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis create] Connection: [keep-alive] Content-Length: ['94'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] 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/redis000002?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002?api-version=2017-10-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002","location":"West - US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":{"primaryKey":"O+pjzu7q0853JYInDsLoGtDY3DOEpfg5avCDCX8gLKo=","secondaryKey":"72Z3Y+1mE0ug11eCK5DAxf1wjYrqnv5XeolNXsH3fHg="},"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380}}'} + US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":{"primaryKey":"li4aK8zzKGSd62B4dZ3mMbaBTRVqkA3oScsib40mWDM=","secondaryKey":"eJW1uadXXiXthOvRI2LPxdB0KzKxaSC4vExGs8EjE5g="},"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'} headers: cache-control: [no-cache] - content-length: ['801'] + content-length: ['820'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:29:25 GMT'] + date: ['Fri, 17 Aug 2018 17:17:57 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000002?api-version=2016-04-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000002?api-version=2017-10-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: ['1197'] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis create] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] - accept-language: [en-US] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000002?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000002?api-version=2017-10-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002","location":"West - US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380}}'} + US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'} headers: cache-control: [no-cache] - content-length: ['682'] + content-length: ['701'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:29:55 GMT'] + date: ['Fri, 17 Aug 2018 17:18:27 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -86,61 +88,61 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 200, message: OK} - request: - body: '{"location": "WestUS", "properties": {"sku": {"name": "Basic", "family": - "C", "capacity": 1}, "tenantSettings": {"hello": "1"}}}' + body: '{"properties": {"tenantSettings": {"hello": "1"}, "sku": {"name": "Basic", + "family": "C", "capacity": 1}}, "location": "WestUS"}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis create] Connection: [keep-alive] Content-Length: ['128'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] 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/redis000003?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000003?api-version=2017-10-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000003","location":"West - US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":{"primaryKey":"BW1JH+lj8/dOzI43kTwuqpzNJrDErCH6Q/o/zCHK2Fg=","secondaryKey":"WbiDCK0KxeX54PisU5EYG0R/dGcmQUz4QflitdJGwJI="},"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380}}'} + US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":{"primaryKey":"21eEHP5MfvyyVUCcIX4rRDrtIQAZhY3MwrQqcqSCsWg=","secondaryKey":"T4x4X+ekzLDdPq7iJZKybMXXNiUrI3BfeBbVr2pUdB8="},"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'} headers: cache-control: [no-cache] - content-length: ['835'] + content-length: ['854'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:29:58 GMT'] + date: ['Fri, 17 Aug 2018 17:18:28 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000003?api-version=2016-04-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000003?api-version=2017-10-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: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 201, message: Created} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis create] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] - accept-language: [en-US] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000003?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/redis/redis000003?api-version=2017-10-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000003","location":"West - US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":null,"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380}}'} + US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":null,"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'} headers: cache-control: [no-cache] - content-length: ['716'] + content-length: ['735'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:30:29 GMT'] + date: ['Fri, 17 Aug 2018 17:18:59 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -148,29 +150,30 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis show] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002?api-version=2017-10-01 response: body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002","location":"West - US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380}}'} + US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}'} headers: cache-control: [no-cache] - content-length: ['682'] + content-length: ['701'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:30:30 GMT'] + date: ['Fri, 17 Aug 2018 17:19:00 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -178,30 +181,31 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis list] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/?api-version=2017-10-01 response: body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002","location":"West - US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000003","location":"West - US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":null,"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380}}]}'} + US","name":"redis000002","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":0},"enableNonSslPort":false,"redisConfiguration":{"maxclients":"256","maxmemory-reserved":"2","maxfragmentationmemory-reserved":"12","maxmemory-delta":"2"},"accessKeys":null,"hostName":"redis000002.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000003","location":"West + US","name":"redis000003","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"3.2.7","sku":{"name":"Basic","family":"C","capacity":1},"enableNonSslPort":false,"tenantSettings":{"hello":"1"},"redisConfiguration":{"maxclients":"1000","maxmemory-reserved":"50","maxfragmentationmemory-reserved":"50","maxmemory-delta":"50"},"accessKeys":null,"hostName":"redis000003.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}]}'} headers: cache-control: [no-cache] - content-length: ['1411'] + content-length: ['1449'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:30:30 GMT'] + date: ['Fri, 17 Aug 2018 17:19:01 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -209,29 +213,30 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [redis list-keys] Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 redismanagementclient/4.1.0 Azure-SDK-For-Python AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 azure-mgmt-redis/5.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] 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/redis000002/listKeys?api-version=2016-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_redis000001/providers/Microsoft.Cache/Redis/redis000002/listKeys?api-version=2017-10-01 response: - body: {string: '{"primaryKey":"O+pjzu7q0853JYInDsLoGtDY3DOEpfg5avCDCX8gLKo=","secondaryKey":"72Z3Y+1mE0ug11eCK5DAxf1wjYrqnv5XeolNXsH3fHg="}'} + body: {string: '{"primaryKey":"li4aK8zzKGSd62B4dZ3mMbaBTRVqkA3oScsib40mWDM=","secondaryKey":"eJW1uadXXiXthOvRI2LPxdB0KzKxaSC4vExGs8EjE5g="}'} headers: cache-control: [no-cache] content-length: ['123'] content-type: [application/json; charset=utf-8] - date: ['Tue, 03 Oct 2017 22:30:31 GMT'] + date: ['Fri, 17 Aug 2018 17:19:01 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] @@ -239,21 +244,21 @@ interactions: transfer-encoding: [chunked] vary: [Accept-Encoding] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1190'] - x-rp-server-mvid: [9c96d9e4-c135-4090-acf5-f1775944f751] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-rp-server-mvid: [39c2a055-6d59-4a54-a74a-12624f4ffe53] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - CommandName: [unknown] + CommandName: [group delete] Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.3 (Windows-10-10.0.15063-SP0) requests/2.9.1 msrest/0.4.14 - msrest_azure/0.4.14 resourcemanagementclient/1.2.0rc2 Azure-SDK-For-Python - AZURECLI/2.0.17+dev] + User-Agent: [python/3.7.0 (Darwin-17.7.0-x86_64-i386-64bit) requests/2.19.1 + msrest/0.5.4 msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.45] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_redis000001?api-version=2018-05-01 @@ -262,11 +267,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 03 Oct 2017 22:30:31 GMT'] + date: ['Fri, 17 Aug 2018 17:19:02 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGUkVESVNLNTU0WkNLQkhTQ0RZRDdESEpENElQNjRYNVhLRnxCMzAxM0IxNjY5MjI1RTgwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGUkVESVMyUUU0NVJDSVA0MkNYNktaVlhXNjZHNEtDSVFNUXwxNkJGRTlBMEQ5QTkyRUM0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-redis/setup.py b/src/command_modules/azure-cli-redis/setup.py index 70199c6f0ae..81a39217409 100644 --- a/src/command_modules/azure-cli-redis/setup.py +++ b/src/command_modules/azure-cli-redis/setup.py @@ -15,7 +15,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.3.1" +VERSION = "0.3.2" # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers CLASSIFIERS = [ @@ -33,7 +33,7 @@ ] DEPENDENCIES = [ - 'azure-mgmt-redis==4.1.0', + 'azure-mgmt-redis==5.0.0', 'azure-cli-core', ]