Hello community,
here is the log from the commit of package azure-cli-redis for openSUSE:Factory
checked in at 2019-05-22 11:01:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-redis (Old)
and /work/SRC/openSUSE:Factory/.azure-cli-redis.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-redis"
Wed May 22 11:01:40 2019 rev:5 rq:696853 version:0.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-redis/azure-cli-redis.changes
2018-10-15 10:44:31.331320939 +0200
+++
/work/SRC/openSUSE:Factory/.azure-cli-redis.new.5148/azure-cli-redis.changes
2019-05-22 11:01:44.202680134 +0200
@@ -1,0 +2,16 @@
+Tue Apr 16 18:24:01 UTC 2019 - John Paul Adrian Glaubitz
<[email protected]>
+
+- New upstream release
+ + Version 0.4.0
+ + For detailed information about changes see the
+ HISTORY.txt file provided with this package
+- Bump minimum version for Python Azure SDK namespace
+ packages to 3.0.0 in BuildRequires and Requires
+- Remove python3-devel package from BuildRequires
+- Remove unzip package from BuildRequires
+- Run fdupes to hardlink duplicate files
+ + Add fdupes to BuildRequires
+ + Add %fdupes invocation to %install
+- Update Requires from setup.py
+
+-------------------------------------------------------------------
Old:
----
azure-cli-redis-0.3.2.tar.gz
New:
----
azure-cli-redis-0.4.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ azure-cli-redis.spec ++++++
--- /var/tmp/diff_new_pack.IkPm6O/_old 2019-05-22 11:01:44.710679843 +0200
+++ /var/tmp/diff_new_pack.IkPm6O/_new 2019-05-22 11:01:44.714679840 +0200
@@ -1,7 +1,7 @@
#
# spec file for package azure-cli-redis
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: azure-cli-redis
-Version: 0.3.2
+Version: 0.4.0
Release: 0
Summary: Microsoft Azure CLI 'redis' Command Module
License: MIT
@@ -27,15 +27,14 @@
Source1: LICENSE.txt
BuildRequires: azure-cli-command-modules-nspkg
BuildRequires: azure-cli-nspkg
-BuildRequires: python3-azure-nspkg
-BuildRequires: python3-devel
+BuildRequires: fdupes
+BuildRequires: python3-azure-nspkg >= 3.0.0
BuildRequires: python3-setuptools
-BuildRequires: unzip
Requires: azure-cli-command-modules-nspkg
Requires: azure-cli-core
Requires: azure-cli-nspkg
-Requires: python3-azure-mgmt-redis >= 5.0.0
-Requires: python3-azure-nspkg
+Requires: python3-azure-mgmt-redis >= 6.0.0
+Requires: python3-azure-nspkg >= 3.0.0
Conflicts: azure-cli < 2.0.0
BuildArch: noarch
@@ -55,6 +54,7 @@
%install
python3 setup.py install --root=%{buildroot} --prefix=%{_prefix}
--install-lib=%{python3_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
rm -rf %{buildroot}%{python3_sitelib}/azure/cli/command_modules/__init__.*
rm -rf %{buildroot}%{python3_sitelib}/azure/cli/command_modules/__pycache__
rm -rf %{buildroot}%{python3_sitelib}/azure/cli/__init__.*
++++++ azure-cli-redis-0.3.2.tar.gz -> azure-cli-redis-0.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-redis-0.3.2/HISTORY.rst
new/azure-cli-redis-0.4.0/HISTORY.rst
--- old/azure-cli-redis-0.3.2/HISTORY.rst 2018-08-23 01:07:57.000000000
+0200
+++ new/azure-cli-redis-0.4.0/HISTORY.rst 2019-02-12 03:05:13.000000000
+0100
@@ -3,6 +3,16 @@
Release History
===============
+0.4.0
+++++++
+* Added commands for managing firewall-rules (create, update, delete, show,
list)
+* Added commands for managing server-link (create, delete, show, list)
+* Added commands for managing patch-schedule (create, update, delete, show)
+* `az redis create` : Support for Availability Zones and Minimum TLS Version
+* BREAKING CHANGE: Removed 'az redis update-settings' and 'az redis list-all'
command
+* BREAKING CHANGE: Parameter for redis create: 'tenant settings' is not
accepted in key[=value] format
+* Added warning message for deprecating 'az redis import-method' command.
+
0.3.2
+++++
* Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-redis-0.3.2/PKG-INFO
new/azure-cli-redis-0.4.0/PKG-INFO
--- old/azure-cli-redis-0.3.2/PKG-INFO 2018-08-23 01:09:23.000000000 +0200
+++ new/azure-cli-redis-0.4.0/PKG-INFO 2019-02-12 03:05:30.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-redis
-Version: 0.3.2
+Version: 0.4.0
Summary: Microsoft Azure Command-Line Tools Redis Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -20,6 +20,16 @@
Release History
===============
+ 0.4.0
+ ++++++
+ * Added commands for managing firewall-rules (create, update, delete,
show, list)
+ * Added commands for managing server-link (create, delete, show, list)
+ * Added commands for managing patch-schedule (create, update, delete,
show)
+ * `az redis create` : Support for Availability Zones and Minimum TLS
Version
+ * BREAKING CHANGE: Removed 'az redis update-settings' and 'az redis
list-all' command
+ * BREAKING CHANGE: Parameter for redis create: 'tenant settings' is
not accepted in key[=value] format
+ * Added warning message for deprecating 'az redis import-method'
command.
+
0.3.2
+++++
* Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_client_factory.py
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_client_factory.py
---
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_client_factory.py
2018-08-23 01:07:57.000000000 +0200
+++
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_client_factory.py
2019-02-12 03:05:13.000000000 +0100
@@ -4,7 +4,7 @@
#
--------------------------------------------------------------------------------------------
-def cf_redis(cli_ctx, _):
+def cf_redis(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.mgmt.redis import RedisManagementClient
return get_mgmt_service_client(cli_ctx, RedisManagementClient).redis
@@ -14,3 +14,15 @@
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.mgmt.redis import RedisManagementClient
return get_mgmt_service_client(cli_ctx,
RedisManagementClient).patch_schedules
+
+
+def cf_firewall_rule(cli_ctx, _):
+ from azure.cli.core.commands.client_factory import get_mgmt_service_client
+ from azure.mgmt.redis import RedisManagementClient
+ return get_mgmt_service_client(cli_ctx,
RedisManagementClient).firewall_rules
+
+
+def cf_linked_server(cli_ctx, _):
+ from azure.cli.core.commands.client_factory import get_mgmt_service_client
+ from azure.mgmt.redis import RedisManagementClient
+ return get_mgmt_service_client(cli_ctx,
RedisManagementClient).linked_server
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_help.py
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_help.py
--- old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_help.py
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_help.py
2019-02-12 03:05:13.000000000 +0100
@@ -12,6 +12,11 @@
short-summary: Manage dedicated Redis caches for your Azure applications.
"""
+helps['redis create'] = """
+ type: command
+ short-summary: Create new Redis Cache instance.
+"""
+
helps['redis export'] = """
type: command
short-summary: Export data stored in a Redis cache.
@@ -22,32 +27,58 @@
short-summary: Import data into a Redis cache.
"""
-helps['redis import-method'] = """
+helps['redis list'] = """
type: command
- short-summary: Import data into a Redis cache.
+ short-summary: List Redis Caches.
+ long-summary: Lists details about all caches within current Subscription
or provided Resource Group.
"""
-helps['redis list'] = """
+helps['redis update'] = """
+ type: command
+ short-summary: Update a Redis cache.
+ long-summary: Scale or update settings of a Redis cache.
+"""
+
+helps['redis patch-schedule'] = """
+ type: group
+ short-summary: Manage Redis patch schedules.
+"""
+
+helps['redis patch-schedule create'] = """
type: command
- short-summary: List Redis caches.
+ short-summary: Create patching schedule for Redis cache.
+ long-summary: Usage example - az redis patch-schedule create --name
testCacheName --resource-group testResourceGroup --schedule-entries
'[{\"dayOfWeek\":\"Tuesday\",\"startHourUtc\":\"00\",\"maintenanceWindow\":\"PT5H\"}]'
"""
-helps['redis list-all'] = """
+helps['redis patch-schedule update'] = """
type: command
- short-summary: Gets all Redis caches in the specified subscription.
+ short-summary: Update the patching schedule for Redis cache.
+ long-summary: Usage example - az redis patch-schedule update --name
testCacheName --resource-group testResourceGroup --schedule-entries
'[{\"dayOfWeek\":\"Tuesday\",\"startHourUtc\":\"00\",\"maintenanceWindow\":\"PT5H\"}]'
+"""
+
+helps['redis firewall-rules'] = """
+ type: group
+ short-summary: Manage Redis firewall rules.
"""
-helps['redis update-settings'] = """
+helps['redis firewall-rules create'] = """
type: command
- short-summary: Update the settings of a Redis cache.
+ short-summary: Create a redis cache firewall rule.
+ long-summary: Usage example - az redis firewall-rules create --name
testCacheName --resource-group testResourceGroup --start-ip 10.10.10.10
--end-ip 20.20.20.20 --rule-name 10to20
"""
-helps['redis update'] = """
+helps['redis firewall-rules update'] = """
type: command
- short-summary: Scale or update settings of a Redis cache.
+ short-summary: Update a redis cache firewall rule.
"""
-helps['redis patch-schedule'] = """
+helps['redis server-link'] = """
type: group
- short-summary: Manage Redis patch schedules.
+ short-summary: Manage Redis server links.
+"""
+
+helps['redis server-link create'] = """
+ type: command
+ short-summary: Adds a server link to the Redis cache (requires Premium
SKU).
+ long-summary: Usage example - az redis server-link create --name
testCacheName --resource-group testResourceGroup --cache-to-link
secondTestCacheName --replication-role Secondary
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_params.py
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_params.py
--- old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/_params.py
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/_params.py
2019-02-12 03:05:13.000000000 +0100
@@ -2,44 +2,57 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
license information.
#
--------------------------------------------------------------------------------------------
+# pylint: disable=line-too-long
+from knack.arguments import CLIArgumentType
import azure.cli.command_modules.redis._help # pylint: disable=unused-import
def load_arguments(self, _):
- from azure.mgmt.redis.models import RebootType, RedisKeyType, SkuName
+ from azure.mgmt.redis.models import RebootType, RedisKeyType, SkuName,
TlsVersion, ReplicationRole
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
+ from azure.cli.command_modules.redis.custom import allowed_c_family_sizes,
allowed_p_family_sizes
+ from azure.cli.core.commands.parameters import get_enum_type, tags_type,
zones_type
+ from azure.cli.core.commands.parameters import
get_resource_name_completion_list
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'))
+ cache_name = CLIArgumentType(options_list=['--name', '-n'], help='Name
of the Redis cache.', id_part='name',
+
completer=get_resource_name_completion_list('Microsoft.Cache/redis'))
+ format_type = CLIArgumentType(options_list=['--file-format'],
help='Format of the blob (Currently rdb is the only supported format, with
other formats expected in the future)')
+
+ c.argument('name', arg_type=cache_name)
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('files', help='SAS url for blobs that needs to be
imported', nargs='+')
+ c.argument('format', arg_type=format_type)
+ c.argument('file_format', arg_type=format_type)
+ c.argument('container', help='SAS url for container where data needs
to be exported to')
+ c.argument('prefix', help='Prefix to use for exported files')
+ c.argument('cache_name', arg_type=cache_name)
+ c.argument('shard_count', type=int, help='The number of shards to be
created on a Premium Cluster Cache.')
+ c.argument('subnet_id', help='The full resource ID of a subnet in a
virtual network to deploy the redis cache in. Example format
/subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1')
+ c.argument('static_ip', help='Specify a static ip if required for the
VNET. If you do not specify a static IP then an IP address is chosen
automatically')
+ c.argument('tenant_settings', arg_type=tags_type,
help='Space-separated tenant settings in key[=value] format')
+ c.argument('tags', arg_type=tags_type)
+ c.argument('zones', arg_type=zones_type)
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('enable_non_ssl_port', action='store_true')
- c.argument('shard_count', type=int)
- c.argument('tags', tags_type)
-
- for scope in ['redis import-method', 'redis import']:
- with self.argument_context(scope) as c:
- c.argument('files', nargs='+', help='Space-separated list of files
to import.')
- c.argument('file_format', help='File format to import.')
-
- with self.argument_context('redis patch-schedule set') as c:
- c.argument('schedule_entries', type=ScheduleEntryList)
-
- with self.argument_context('redis create') as c:
- c.argument('name', arg_type=name_type, completer=None)
- c.argument('tenant_settings', type=JsonString)
-
- with self.argument_context('redis export') as c:
- c.argument('container', help='Container name to export to.')
- c.argument('prefix', help='Prefix to use for exported files.')
- c.argument('file_format', help='File format to export.')
+ 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.')
+
+ with self.argument_context('redis firewall-rules list') as c:
+ c.argument('cache_name', arg_type=cache_name, id_part=None)
+ c.argument('rule_name', help='Name of the firewall rule')
+
+ with self.argument_context('redis server-link') as c:
+ c.argument('name', arg_type=cache_name, id_part=None)
+ c.argument('server_to_link', help='Resource ID or name of the redis
cache to be linked')
+ c.argument('replication_role', help='Role of the redis cache to be
linked', arg_type=get_enum_type(ReplicationRole))
+ c.argument('linked_server_name', help='Name of the linked redis cache')
+
+ with self.argument_context('redis patch-schedule') as c:
+ c.argument('name', arg_type=cache_name, id_part=None)
+ c.argument('schedule_entries', help="List of Patch schedule entries.
Example
Value:[{\"dayOfWeek\":\"Monday\",\"startHourUtc\":\"00\",\"maintenanceWindow\":\"PT5H\"}]",
type=ScheduleEntryList)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/commands.py
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/commands.py
--- old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/commands.py
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/commands.py
2019-02-12 03:05:13.000000000 +0100
@@ -5,11 +5,11 @@
from azure.cli.core.commands import CliCommandType
+# pylint: disable=line-too-long
+from azure.cli.command_modules.redis._client_factory import cf_redis,
cf_patch_schedules, cf_firewall_rule, cf_linked_server
-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
+def load_command_table(self, _):
redis_sdk = CliCommandType(
operations_tmpl='azure.mgmt.redis.operations.redis_operations#RedisOperations.{}',
client_factory=cf_redis)
@@ -18,26 +18,42 @@
operations_tmpl='azure.mgmt.redis.operations.patch_schedules_operations#PatchSchedulesOperations.{}',
client_factory=cf_patch_schedules)
+ redis_firewall_rules = CliCommandType(
+
operations_tmpl='azure.mgmt.redis.operations.firewall_rules_operations#FirewallRulesOperations.{}',
+ client_factory=cf_firewall_rule)
+
+ redis_linked_server = CliCommandType(
+
operations_tmpl='azure.mgmt.redis.operations.linked_server_operations#LinkedServerOperations.{}',
+ client_factory=cf_linked_server)
+
with self.command_group('redis', redis_sdk) as g:
- g.custom_command('create', 'cli_redis_create', client_factory=cf_redis,
-
exception_handler=wrong_vmsize_argument_exception_handler)
- g.command('delete', 'delete')
+ g.custom_command('create', 'cli_redis_create', client_factory=cf_redis)
+ g.command('delete', 'delete', confirmation=True)
g.custom_command('export', 'cli_redis_export')
g.command('force-reboot', 'force_reboot')
- g.custom_command('import-method', 'cli_redis_import_method',
- deprecate_info=g.deprecate(redirect='redis import',
hide='2.0.34'))
- g.custom_command('import', 'cli_redis_import_method')
- g.custom_command('list', 'cli_redis_list')
- g.command('list-all', 'list',
deprecate_info=g.deprecate(redirect='redis list', hide='2.0.34'))
+ g.command('import-method', 'import_data',
deprecate_info=g.deprecate(redirect='redis import', hide=True))
+ g.command('import', 'import_data')
+ g.custom_command('list', 'cli_redis_list_cache')
g.command('list-keys', 'list_keys')
g.command('regenerate-keys', 'regenerate_key')
- g.show_command('show', 'get')
- g.custom_command('update-settings', 'cli_redis_update_settings',
- deprecate_info=g.deprecate(redirect='redis update',
hide='2.0.34'))
- g.generic_update_command('update',
exception_handler=wrong_vmsize_argument_exception_handler,
- setter_name='update',
custom_func_name='cli_redis_update')
+ g.command('show', 'get')
+ g.generic_update_command('update', setter_name='update',
custom_func_name='cli_redis_update')
with self.command_group('redis patch-schedule', redis_patch) as g:
- g.command('set', 'create_or_update')
+ g.command('create', 'create_or_update')
+ g.command('update', 'create_or_update')
+ g.command('delete', 'delete')
+ g.command('show', 'get')
+
+ with self.command_group('redis firewall-rules', redis_firewall_rules) as g:
+ g.command('create', 'create_or_update')
+ g.command('update', 'create_or_update')
+ g.command('delete', 'delete')
+ g.command('show', 'get')
+ g.command('list', 'list_by_redis_resource')
+
+ with self.command_group('redis server-link', redis_linked_server) as g:
+ g.custom_command('create', 'cli_redis_create_server_link',
client_factory=cf_linked_server)
g.command('delete', 'delete')
- g.show_command('show', 'get')
+ g.command('show', 'get')
+ g.command('list', 'list')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/custom.py
new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/custom.py
--- old/azure-cli-redis-0.3.2/azure/cli/command_modules/redis/custom.py
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure/cli/command_modules/redis/custom.py
2019-02-12 03:05:13.000000000 +0100
@@ -5,68 +5,24 @@
from knack.log import get_logger
from knack.util import CLIError
-
+from azure.cli.command_modules.redis._client_factory import cf_redis
logger = get_logger(__name__)
-
-def wrong_vmsize_argument_exception_handler(ex):
-
- from msrest.exceptions import ClientException
- if isinstance(ex, ClientException):
- if ("The value of the parameter
'properties.sku.family/properties.sku.capacity' is invalid"
- in format(ex)) \
- or ("The value of the parameter 'properties.sku.family' is
invalid"
- in format(ex)):
- raise CLIError('Invalid VM size. Example for Valid values: '
- 'For C family (C0, C1, C2, C3, C4, C5, C6), '
- 'for P family (P1, P2, P3, P4)')
- raise ex
-
+allowed_c_family_sizes = ['c0', 'c1', 'c2', 'c3', 'c4', 'c5', 'c6']
+allowed_p_family_sizes = ['p1', 'p2', 'p3', 'p4', 'p5']
+wrong_vmsize_error = CLIError('Invalid VM size. Example for Valid values: '
+ 'For Standard Sku : (C0, C1, C2, C3, C4, C5,
C6), '
+ 'for Premium Sku : (P1, P2, P3, P4, P5)')
# region Custom Commands
+
# pylint: disable=unused-argument
def cli_redis_export(cmd, client, resource_group_name, name, prefix,
container, file_format=None):
from azure.mgmt.redis.models import ExportRDBParameters
parameters = ExportRDBParameters(prefix, container, file_format)
- return client.export(resource_group_name, name, parameters)
-
-
-# pylint: disable=unused-argument
-def cli_redis_import_method(cmd, client, resource_group_name, name,
file_format, files):
- from azure.mgmt.redis.models import ImportRDBParameters
- parameters = ImportRDBParameters(files, file_format)
- return client.import_method(resource_group_name, name, files, parameters)
-
-
-# pylint: disable=unused-argument
-def cli_redis_list(cmd, client, resource_group_name=None):
- if resource_group_name:
- return client.list_by_resource_group(resource_group_name)
- return client.list()
-
-
-# pylint: disable=unused-argument
-def cli_redis_update_settings(cmd, client, resource_group_name, name,
redis_configuration):
- from azure.mgmt.redis.models import RedisUpdateParameters
-
- existing = client.get(resource_group_name, name)
- existing.redis_configuration.update(redis_configuration)
-
- # Due to swagger/mgmt SDK quirkiness, we have to manually copy over
- # the resource retrieved to a create_parameters object
- update_params = RedisUpdateParameters( # pylint:
disable=too-many-function-args
- existing.redis_configuration,
- existing.enable_non_ssl_port,
- existing.tenant_settings,
- existing.shard_count,
- existing.subnet_id,
- existing.static_ip,
- existing.sku,
- existing.tags
- )
- return client.update(resource_group_name, name, parameters=update_params)
+ return client.export_data(resource_group_name, name, parameters)
# pylint: disable=unused-argument
@@ -79,15 +35,15 @@
instance.sku.family = vm_size[0]
instance.sku.capacity = vm_size[1:]
- update_params = RedisUpdateParameters( # pylint:
disable=too-many-function-args
- instance.redis_configuration,
- instance.enable_non_ssl_port,
- instance.tenant_settings,
- instance.shard_count,
- instance.subnet_id,
- instance.static_ip,
- instance.sku,
- instance.tags
+ # pylint: disable=too-many-function-args
+ update_params = RedisUpdateParameters(
+ redis_configuration=instance.redis_configuration,
+ enable_non_ssl_port=instance.enable_non_ssl_port,
+ tenant_settings=instance.tenant_settings,
+ shard_count=instance.shard_count,
+ minimum_tls_version=instance.minimum_tls_version,
+ sku=instance.sku,
+ tags=instance.tags
)
return update_params
@@ -96,32 +52,70 @@
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, subnet_id=None, static_ip=None):
+ shard_count=None, minimum_tls_version=None,
subnet_id=None, static_ip=None, zones=None):
# pylint:disable=line-too-long
- """Create new Redis Cache instance
- :param resource_group_name: Name of resource group
- :param name: Name of redis cache
- :param location: Location
- :param sku: What type of redis cache to deploy. Valid values: (Basic,
Standard, Premium).
- :param vm_size: What size of redis cache to deploy. Valid values for C
family (C0, C1, C2, C3, C4, C5, C6), for P family (P1, P2, P3, P4)
- :param redis_configuration: All Redis Settings. Few possible keys
rdb-backup-enabled, rdb-storage-connection-string, rdb-backup-frequency,
maxmemory-delta, maxmemory-policy, notify-keyspace-events, maxmemory-samples,
slowlog-log-slower-than, slowlog-max-len, list-max-ziplist-entries,
list-max-ziplist-value, hash-max-ziplist-entries, hash-max-ziplist-value,
set-max-intset-entries, zset-max-ziplist-entries, zset-max-ziplist-value etc.
- :param enable_non_ssl_port: If the value is true, then the non-ssl redis
server port (6379) will be enabled.
- :param tenant_settings: Json dictionary with tenant settings
- :param shard_count: The number of shards to be created on a Premium
Cluster Cache.
- :param subnet_id: The full resource ID of a subnet in a virtual network to
deploy the redis cache in. Example format
/subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
- :param static_ip: Required when deploying a redis cache inside an existing
Azure Virtual Network.
- """
+ 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
+ tenant_settings_in_json = {}
+ if tenant_settings is not None:
+ for item in tenant_settings:
+ tenant_settings_in_json.update(get_key_value_pair(item))
from azure.mgmt.redis.models import RedisCreateParameters, Sku
+ # pylint: disable=too-many-function-args
params = RedisCreateParameters(
+ sku=Sku(name=sku, family=vm_size[0], capacity=vm_size[1:]),
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,
+ tenant_settings=tenant_settings_in_json,
shard_count=shard_count,
+ minimum_tls_version=minimum_tls_version,
subnet_id=subnet_id,
- static_ip=static_ip)
+ static_ip=static_ip,
+ zones=zones,
+ tags=tags)
return client.create(resource_group_name, name, params)
+
+def get_key_value_pair(string):
+ result = {}
+ if string:
+ kvp = string.split('=', 1)
+ result = {kvp[0]: kvp[1]} if len(kvp) > 1 else {string: ''}
+ return result
+
+
+# pylint: disable=unused-argument
+def cli_redis_create_server_link(cmd, client, resource_group_name, name,
server_to_link, replication_role):
+ redis_client = cf_redis(cmd.cli_ctx)
+ from azure.cli.core.commands.client_factory import get_subscription_id
+ from msrestazure.tools import is_valid_resource_id, resource_id
+ if not is_valid_resource_id(server_to_link):
+ server_to_link = resource_id(
+ subscription=get_subscription_id(cmd.cli_ctx),
+ resource_group=resource_group_name,
+ namespace='Microsoft.Cache', type='Redis',
+ name=server_to_link
+ )
+
+ cache_to_link = get_cache_from_resource_id(redis_client, server_to_link)
+
+ from azure.mgmt.redis.models import RedisLinkedServerCreateParameters
+ params =
RedisLinkedServerCreateParameters(linked_redis_cache_id=cache_to_link.id,
+
linked_redis_cache_location=cache_to_link.location,
+ server_role=replication_role)
+ return client.create(resource_group_name, name, cache_to_link.name, params)
+
+
+def cli_redis_list_cache(client, resource_group_name=None):
+ cache_list =
client.list_by_resource_group(resource_group_name=resource_group_name) \
+ if resource_group_name else client.list()
+ return list(cache_list)
+
+
+def get_cache_from_resource_id(client, cache_resource_id):
+ from msrestazure.tools import parse_resource_id
+ id_comps = parse_resource_id(cache_resource_id)
+ return client.get(id_comps['resource_group'], id_comps['name'])
+
# endregion
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure_cli_redis.egg-info/PKG-INFO
new/azure-cli-redis-0.4.0/azure_cli_redis.egg-info/PKG-INFO
--- old/azure-cli-redis-0.3.2/azure_cli_redis.egg-info/PKG-INFO 2018-08-23
01:09:23.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure_cli_redis.egg-info/PKG-INFO 2019-02-12
03:05:30.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: azure-cli-redis
-Version: 0.3.2
+Version: 0.4.0
Summary: Microsoft Azure Command-Line Tools Redis Command Module
Home-page: https://github.com/Azure/azure-cli
Author: Microsoft Corporation
@@ -20,6 +20,16 @@
Release History
===============
+ 0.4.0
+ ++++++
+ * Added commands for managing firewall-rules (create, update, delete,
show, list)
+ * Added commands for managing server-link (create, delete, show, list)
+ * Added commands for managing patch-schedule (create, update, delete,
show)
+ * `az redis create` : Support for Availability Zones and Minimum TLS
Version
+ * BREAKING CHANGE: Removed 'az redis update-settings' and 'az redis
list-all' command
+ * BREAKING CHANGE: Parameter for redis create: 'tenant settings' is
not accepted in key[=value] format
+ * Added warning message for deprecating 'az redis import-method'
command.
+
0.3.2
+++++
* Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure-cli-redis-0.3.2/azure_cli_redis.egg-info/requires.txt
new/azure-cli-redis-0.4.0/azure_cli_redis.egg-info/requires.txt
--- old/azure-cli-redis-0.3.2/azure_cli_redis.egg-info/requires.txt
2018-08-23 01:09:23.000000000 +0200
+++ new/azure-cli-redis-0.4.0/azure_cli_redis.egg-info/requires.txt
2019-02-12 03:05:30.000000000 +0100
@@ -1,2 +1,2 @@
-azure-mgmt-redis==5.0.0
+azure-mgmt-redis==6.0.0
azure-cli-core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure-cli-redis-0.3.2/setup.py
new/azure-cli-redis-0.4.0/setup.py
--- old/azure-cli-redis-0.3.2/setup.py 2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-redis-0.4.0/setup.py 2019-02-12 03:05:13.000000000 +0100
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.3.2"
+VERSION = "0.4.0"
# 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==5.0.0',
+ 'azure-mgmt-redis==6.0.0',
'azure-cli-core',
]