Hello community, here is the log from the commit of package azure-cli-sql for openSUSE:Factory checked in at 2018-05-13 16:03:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-sql (Old) and /work/SRC/openSUSE:Factory/.azure-cli-sql.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-sql" Sun May 13 16:03:23 2018 rev:3 rq:600070 version:2.0.25 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-sql/azure-cli-sql.changes 2018-02-14 09:32:17.406027516 +0100 +++ /work/SRC/openSUSE:Factory/.azure-cli-sql.new/azure-cli-sql.changes 2018-05-13 16:03:23.913979778 +0200 @@ -1,0 +2,8 @@ +Fri Apr 20 12:18:36 UTC 2018 - [email protected] + +- New upstream release + + Version 2.0.25 +- Move LICENSE.txt from %doc to %license section +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- azure-cli-sql-2.0.20.tar.gz New: ---- azure-cli-sql-2.0.25.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-sql.spec ++++++ --- /var/tmp/diff_new_pack.apPSZZ/_old 2018-05-13 16:03:24.469959494 +0200 +++ /var/tmp/diff_new_pack.apPSZZ/_new 2018-05-13 16:03:24.469959494 +0200 @@ -17,7 +17,7 @@ Name: azure-cli-sql -Version: 2.0.20 +Version: 2.0.25 Release: 0 Summary: Microsoft Azure CLI 'SQL' Command Module License: MIT @@ -34,9 +34,10 @@ Requires: azure-cli-command-modules-nspkg Requires: azure-cli-core Requires: azure-cli-nspkg -Requires: python3-azure-mgmt-sql >= 0.8.4 +Requires: python3-azure-mgmt-sql >= 0.8.6 Requires: python3-azure-mgmt-storage >= 1.5.0 Requires: python3-azure-nspkg +Requires: python3-six Conflicts: azure-cli < 2.0.0 BuildArch: noarch @@ -65,7 +66,8 @@ %files %defattr(-,root,root,-) -%doc HISTORY.rst LICENSE.txt README.rst +%doc HISTORY.rst README.rst +%license LICENSE.txt %{python3_sitelib}/azure/cli/command_modules/sql %{python3_sitelib}/azure_cli_sql-*.egg-info ++++++ azure-cli-sql-2.0.20.tar.gz -> azure-cli-sql-2.0.25.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/HISTORY.rst new/azure-cli-sql-2.0.25/HISTORY.rst --- old/azure-cli-sql-2.0.20/HISTORY.rst 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/HISTORY.rst 2018-04-06 19:33:14.000000000 +0200 @@ -2,10 +2,32 @@ Release History =============== +2.0.25 +++++++ +* Use new release azure-mgmt-sql 0.8.6 SDK Python package +* Added az sql elastic-pool op list and az sql elastic-pool op cancel, Support list and cancel azure sql elastic pool operations +* `sdist` is now compatible with wheel 0.31.0 + +2.0.24 +++++++ +* Minor fixes + +2.0.23 +++++++ +* Support Autorest 3.0 based SDKs + +2.0.22 +++++++ +* Added zone redundancy support for databases and elastic pools on creation and update. + +2.0.21 +++++++ +* Added az sql server dns-alias commands. 2.0.20 ++++++ -* Clean up unused test files +* Added az sql db rename +* Support `--ids` argument for db, dw, server, elastic-pool, and server firewall-rule commands. 2.0.19 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/PKG-INFO new/azure-cli-sql-2.0.25/PKG-INFO --- old/azure-cli-sql-2.0.20/PKG-INFO 2018-01-26 17:12:44.000000000 +0100 +++ new/azure-cli-sql-2.0.25/PKG-INFO 2018-04-06 19:33:22.000000000 +0200 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: azure-cli-sql -Version: 2.0.20 +Version: 2.0.25 Summary: Microsoft Azure Command-Line Tools SQL Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: Microsoft Azure CLI 'SQL' Command Module ======================================== @@ -15,10 +16,32 @@ Release History =============== + 2.0.25 + ++++++ + * Use new release azure-mgmt-sql 0.8.6 SDK Python package + * Added az sql elastic-pool op list and az sql elastic-pool op cancel, Support list and cancel azure sql elastic pool operations + * `sdist` is now compatible with wheel 0.31.0 + + 2.0.24 + ++++++ + * Minor fixes + + 2.0.23 + ++++++ + * Support Autorest 3.0 based SDKs + + 2.0.22 + ++++++ + * Added zone redundancy support for databases and elastic pools on creation and update. + + 2.0.21 + ++++++ + * Added az sql server dns-alias commands. 2.0.20 ++++++ - * Clean up unused test files + * Added az sql db rename + * Support `--ids` argument for db, dw, server, elastic-pool, and server firewall-rule commands. 2.0.19 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_help.py new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_help.py --- old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_help.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_help.py 2018-04-06 19:33:14.000000000 +0200 @@ -21,6 +21,11 @@ helps['sql db create'] = """ type: command short-summary: Create a database. + examples: + - name: Create database with zone redundancy enabled + text: az sql db create -g mygroup -s myserver -n mydb -z + - name: Create database with zone redundancy explicitly disabled + text: az sql db create -g mygroup -s myserver -n mydb -z false """ helps['sql db delete'] = """ type: command @@ -42,6 +47,10 @@ - name: Show available max database sizes for P1 service objective text: az sql db list-editions -l westus --service-objective P1 --show-details max-size """ +helps['sql db rename'] = """ + type: command + short-summary: Rename a database. + """ helps['sql db show'] = """ type: command short-summary: Get the details for a database. @@ -56,6 +65,11 @@ helps['sql db update'] = """ type: command short-summary: Update a database. + examples: + - name: Update database with zone redundancy enabled + text: az sql db update -g mygroup -s myserver -n mypool -z + - name: Update database with zone redundancy explicitly disabled + text: az sql db update -g mygroup -s myserver -n mypool -z false """ helps['sql db audit-policy'] = """ type: group @@ -241,6 +255,11 @@ helps['sql elastic-pool create'] = """ type: command short-summary: Create an elastic pool. + examples: + - name: Create elastic pool with zone redundancy enabled + text: az sql elastic-pool create -g mygroup -s myserver -n mypool -z + - name: Create elastic pool with zone redundancy explicitly disabled + text: az sql elastic-pool create -g mygroup -s myserver -n mypool -z false """ helps['sql elastic-pool list-editions'] = """ type: command @@ -262,6 +281,21 @@ helps['sql elastic-pool update'] = """ type: command short-summary: Update an elastic pool. + examples: + - name: Update elastic pool with zone redundancy enabled + text: az sql elastic-pool update -g mygroup -s myserver -n mypool -z + - name: Update elastic pool with zone redundancy explicitly disabled + text: az sql elastic-pool update -g mygroup -s myserver -n mypool -z false + """ +helps['sql elastic-pool op'] = """ + type: group + short-summary: Manage operations on an elastic pool. + """ +helps['sql elastic-pool op cancel'] = """ + type: command + examples: + - name: Cancel an operation. + text: az sql elastic-pool op cancel -g mygroup -s myserver -ep myelasticpool -n d2896db1-2ba8-4c84-bac1-387c430cce40 """ helps['sql server'] = """ type: group @@ -296,6 +330,14 @@ type: command short-summary: Updates a server's secure connection policy. """ +helps['sql server dns-alias'] = """ + type: group + short-summary: Manage a server's DNS aliases. + """ +helps['sql server dns-alias set'] = """ + type: command + short-summary: Sets a server to which DNS alias should point + """ helps['sql server firewall-rule'] = """ type: group short-summary: Manage a server's firewall rules. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_params.py new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_params.py --- old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_params.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_params.py 2018-04-06 19:33:14.000000000 +0200 @@ -115,9 +115,6 @@ create_mode: Valid CreateMode enum value (e.g. `default`, `copy`, etc) """ - # This line to be removed when zone redundancy is fully supported in production. - arg_ctx.ignore('zone_redundant') - # DW does not support all create modes. Check that engine and create_mode are consistent. if engine == Engine.dw and create_mode not in [ CreateMode.default, @@ -179,10 +176,17 @@ c.argument('usage_name', options_list=['--usage', '-u']) with self.argument_context('sql db') as c: + c.argument('server_name', + arg_type=server_param_type, + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') + c.argument('database_name', options_list=['--name', '-n'], - help='Name of the Azure SQL Database.') - c.argument('server_name', arg_type=server_param_type) + help='Name of the Azure SQL Database.', + # Allow --ids command line argument. id_part=child_name_1 is 2nd name in uri + id_part='child_name_1') + c.argument('elastic_pool_name', options_list=['--elastic-pool']) c.argument('requested_service_objective_name', options_list=['--service-objective']) c.argument('max_size_bytes', options_list=['--max-size'], @@ -197,6 +201,11 @@ options_list=['--edition'], help='The edition of the database.') + c.argument('zone_redundant', + options_list=['--zone-redundant', '-z'], + help='Specifies whether to enable zone redundancy for the database.', + arg_type=get_three_state_flag()) + with self.argument_context('sql db create') as c: _configure_db_create_params(c, Engine.db, CreateMode.default) @@ -223,6 +232,10 @@ options_list=['--service-objective'], help='Name of the service objective for the new database.') + with self.argument_context('sql db rename') as c: + c.argument('new_name', + help='The new name that the database will be renamed to.') + with self.argument_context('sql db restore') as c: _configure_db_create_params(c, Engine.db, CreateMode.point_in_time_restore) @@ -477,10 +490,15 @@ # sql dw # ############################################### with self.argument_context('sql dw') as c: - c.argument('database_name', options_list=['--name', '-n'], - help='Name of the data warehouse.') + c.argument('server_name', + arg_type=server_param_type, + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') - c.argument('server_name', arg_type=server_param_type) + c.argument('database_name', options_list=['--name', '-n'], + help='Name of the data warehouse.', + # Allow --ids command line argument. id_part=child_name_1 is 2nd name in uri + id_part='child_name_1') c.argument('max_size_bytes', options_list=['--max-size'], type=SizeWithUnitConverter('B', result_type=int), @@ -513,13 +531,16 @@ # sql elastic-pool # ############################################### with self.argument_context('sql elastic-pool') as c: - # This line to be removed when zone redundancy is fully supported in production. - c.ignore('zone_redundant') + c.argument('server_name', + arg_type=server_param_type, + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') c.argument('elastic_pool_name', options_list=['--name', '-n'], - help='The name of the elastic pool.') - c.argument('server_name', arg_type=server_param_type) + help='The name of the elastic pool.', + # Allow --ids command line argument. id_part=child_name_1 is 2nd name in uri + id_part='child_name_1') # --db-dtu-max and --db-dtu-min were the original param names, which is consistent with the # underlying REST API. @@ -538,6 +559,11 @@ help='The max storage size of the elastic pool. If no unit is specified, defaults' ' to megabytes (MB).') + c.argument('zone_redundant', + options_list=['--zone-redundant', '-z'], + help='Specifies whether to enable zone redundancy for the elastic pool.', + arg_type=get_three_state_flag()) + with self.argument_context('sql elastic-pool create') as c: c.expand('parameters', ElasticPool) # We have a wrapper function that determines server location so user doesn't need to specify @@ -571,11 +597,25 @@ c.argument('dtu', help='TThe total shared DTU for the elastic eool.') c.argument('storage_mb', help='Storage limit for the elastic pool in MB.') + ##### + # sql elastic-pool op + ##### + with self.argument_context('sql elastic-pool op') as c: + c.argument('elastic_pool_name', + options_list=['--elastic-pool'], + help='Name of the Azure SQL Elastic Pool.') + + c.argument('operation_id', + options_list=['--name', '-n'], + help='The unique name of the operation to cancel.') + ############################################### # sql server # ############################################### with self.argument_context('sql server') as c: - c.argument('server_name', options_list=['--name', '-n']) + c.argument('server_name', options_list=['--name', '-n'], + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') c.argument('administrator_login', options_list=['--admin-user', '-u']) c.argument('administrator_login_password', options_list=['--admin-password', '-p']) @@ -631,16 +671,32 @@ arg_type=get_enum_type(ServerConnectionType)) ##### + # sql server dns-alias + ##### + with self.argument_context('sql server dns-alias') as c: + c.argument('server_name', arg_type=server_param_type) + c.argument('dns_alias_name', options_list=('--name', '-n')) + c.argument('original_server_name', options_list=('--original-server'), + help='The name of the server to which alias is currently pointing') + c.argument('original_resource_group_name', options_list=('--original-resource-group')) + c.argument('original_subscription_id', options_list=('--original-subscription-id')) + + ##### # sql server firewall-rule ##### with self.argument_context('sql server firewall-rule') as c: # Help text needs to be specified because 'sql server firewall-rule update' is a custom # command. - c.argument('server_name', arg_type=server_param_type) + c.argument('server_name', + arg_type=server_param_type, + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') c.argument('firewall_rule_name', options_list=['--name', '-n'], - help='The name of the firewall rule.') + help='The name of the firewall rule.', + # Allow --ids command line argument. id_part=child_name_1 is 2nd name in uri + id_part='child_name_1') c.argument('start_ip_address', options_list=['--start-ip-address'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_util.py new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_util.py --- old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/_util.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/_util.py 2018-04-06 19:33:14.000000000 +0200 @@ -60,6 +60,10 @@ return get_sql_management_client(cli_ctx).elastic_pools +def get_sql_elastic_pool_operations_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).elastic_pool_operations + + def get_sql_encryption_protectors_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).encryption_protectors @@ -88,6 +92,10 @@ return get_sql_management_client(cli_ctx).server_connection_policies +def get_sql_server_dns_aliases_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).server_dns_aliases + + def get_sql_server_keys_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).server_keys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/commands.py new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/commands.py --- old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/commands.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/commands.py 2018-04-06 19:33:14.000000000 +0200 @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- from azure.cli.core.commands import CliCommandType + from ._util import ( get_sql_server_azure_ad_administrators_operations, get_sql_capabilities_operations, @@ -15,11 +16,13 @@ get_sql_database_transparent_data_encryptions_operations, get_sql_database_usages_operations, get_sql_elastic_pools_operations, + get_sql_elastic_pool_operations_operations, get_sql_encryption_protectors_operations, get_sql_firewall_rules_operations, get_sql_replication_links_operations, get_sql_restorable_dropped_databases_operations, get_sql_server_connection_policies_operations, + get_sql_server_dns_aliases_operations, get_sql_server_keys_operations, get_sql_servers_operations, get_sql_server_usages_operations, @@ -65,27 +68,28 @@ operations_tmpl='azure.mgmt.sql.operations.databases_operations#DatabasesOperations.{}', client_factory=get_sql_databases_operations) with self.command_group('sql db', database_operations, client_factory=get_sql_databases_operations) as g: - g.custom_command('create', 'db_create', no_wait_param='raw') - g.custom_command('copy', 'db_copy', no_wait_param='raw') - g.custom_command('restore', 'db_restore', no_wait_param='raw') + g.custom_command('create', 'db_create', supports_no_wait=True) + g.custom_command('copy', 'db_copy', supports_no_wait=True) + g.custom_command('restore', 'db_restore', supports_no_wait=True) + g.custom_command('rename', 'db_rename') g.command('show', 'get') g.custom_command('list', 'db_list') g.command('delete', 'delete', confirmation=True) - g.generic_update_command('update', custom_func_name='db_update', no_wait_param='raw') + g.generic_update_command('update', custom_func_name='db_update', supports_no_wait=True) g.custom_command('import', 'db_import') g.custom_command('export', 'db_export') with self.command_group('sql db replica', database_operations, client_factory=get_sql_databases_operations) as g: - g.custom_command('create', 'db_create_replica', no_wait_param='raw') + g.custom_command('create', 'db_create_replica', supports_no_wait=True) with self.command_group('sql dw', database_operations, client_factory=get_sql_databases_operations) as g: - g.custom_command('create', 'dw_create', no_wait_param='raw') + g.custom_command('create', 'dw_create', supports_no_wait=True) g.command('show', 'get') g.custom_command('list', 'dw_list') g.command('delete', 'delete', confirmation=True) g.command('pause', 'pause') g.command('resume', 'resume') - g.generic_update_command('update', custom_func_name='dw_update', no_wait_param='raw') + g.generic_update_command('update', custom_func_name='dw_update', supports_no_wait=True) database_operations_operations = CliCommandType( operations_tmpl='azure.mgmt.sql.operations.database_operations#DatabaseOperations.{}', @@ -158,6 +162,13 @@ with self.command_group('sql elastic-pool', database_operations) as g: g.command('list-dbs', 'list_by_elastic_pool') + elastic_pool_operations_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations.elastic_pool_operations#ElasticPoolOperations.{}', + client_factory=get_sql_elastic_pool_operations_operations) + with self.command_group('sql elastic-pool op', elastic_pool_operations_operations, client_factory=get_sql_elastic_pool_operations_operations) as g: + g.command('list', 'list_by_elastic_pool') + g.command('cancel', 'cancel') + ############################################### # sql server # ############################################### @@ -229,3 +240,13 @@ with self.command_group('sql server conn-policy', server_connection_policies_operations, client_factory=get_sql_server_connection_policies_operations) as c: c.command('show', 'get') c.generic_update_command('update') + + server_dns_aliases_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations.server_dns_aliases_operations#ServerDnsAliasesOperations.{}', + client_factory=get_sql_server_dns_aliases_operations) + with self.command_group('sql server dns-alias', server_dns_aliases_operations, client_factory=get_sql_server_dns_aliases_operations) as c: + c.command('show', 'get') + c.command('list', 'list_by_server') + c.command('create', 'create_or_update') + c.command('delete', 'delete') + c.custom_command('set', 'server_dns_alias_set') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/custom.py new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/custom.py --- old/azure-cli-sql-2.0.20/azure/cli/command_modules/sql/custom.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure/cli/command_modules/sql/custom.py 2018-04-06 19:33:14.000000000 +0200 @@ -14,7 +14,7 @@ from azure.cli.core.commands.client_factory import ( get_mgmt_service_client, get_subscription_id) -from azure.cli.core.util import CLIError +from azure.cli.core.util import CLIError, sdk_no_wait from azure.mgmt.sql.models.server_key import ServerKey from azure.mgmt.sql.models.encryption_protector import EncryptionProtector from azure.mgmt.sql.models.resource_identity import ResourceIdentity @@ -52,11 +52,11 @@ _DEFAULT_SERVER_VERSION = "12.0" - ############################################### # sql db # ############################################### + # pylint: disable=too-few-public-methods class ClientType(Enum): ado_net = 'ado.net' @@ -198,7 +198,7 @@ cli_ctx, client, db_id, - raw, + no_wait, kwargs): # Determine server location @@ -208,12 +208,11 @@ resource_group_name=db_id.resource_group_name) # Create - return client.create_or_update( - server_name=db_id.server_name, - resource_group_name=db_id.resource_group_name, - database_name=db_id.database_name, - raw=raw, - parameters=kwargs) + return sdk_no_wait(no_wait, client.create_or_update, + server_name=db_id.server_name, + resource_group_name=db_id.resource_group_name, + database_name=db_id.database_name, + parameters=kwargs) # Creates a database. Wrapper function which uses the server location so that the user doesn't @@ -224,12 +223,12 @@ database_name, server_name, resource_group_name, - raw=False, + no_wait=False, **kwargs): # Verify edition edition = kwargs.get('edition') # kwags['edition'] throws KeyError if not in dictionary - if edition and edition.lower() == DatabaseEdition.data_warehouse.value.lower(): + if edition and edition.lower() == DatabaseEdition.data_warehouse.value.lower(): # pylint: disable=no-member raise CLIError('Azure SQL Data Warehouse can be created with the command' ' `az sql dw create`.') @@ -237,7 +236,7 @@ cmd.cli_ctx, client, DatabaseIdentity(cmd.cli_ctx, database_name, server_name, resource_group_name), - raw, + no_wait, kwargs) @@ -247,7 +246,7 @@ client, source_db, dest_db, - raw, + no_wait, kwargs): # Determine server location @@ -260,12 +259,11 @@ kwargs['source_database_id'] = source_db.id() # Create - return client.create_or_update( - server_name=dest_db.server_name, - resource_group_name=dest_db.resource_group_name, - database_name=dest_db.database_name, - raw=raw, - parameters=kwargs) + return sdk_no_wait(no_wait, client.create_or_update, + server_name=dest_db.server_name, + resource_group_name=dest_db.resource_group_name, + database_name=dest_db.database_name, + parameters=kwargs) # Copies a database. Wrapper function to make create mode more convenient. @@ -278,7 +276,7 @@ dest_name, dest_server_name=None, dest_resource_group_name=None, - raw=False, + no_wait=False, **kwargs): # Determine optional values @@ -293,7 +291,7 @@ client, DatabaseIdentity(cmd.cli_ctx, database_name, server_name, resource_group_name), DatabaseIdentity(cmd.cli_ctx, dest_name, dest_server_name, dest_resource_group_name), - raw, + no_wait, kwargs) @@ -307,7 +305,7 @@ # Replica must have the same database name as the source db partner_server_name, partner_resource_group_name=None, - raw=False, + no_wait=False, **kwargs): # Determine optional values @@ -322,10 +320,36 @@ client, DatabaseIdentity(cmd.cli_ctx, database_name, server_name, resource_group_name), DatabaseIdentity(cmd.cli_ctx, database_name, partner_server_name, partner_resource_group_name), - raw, + no_wait, kwargs) +# Renames a database. +def db_rename( + cmd, + client, + database_name, + server_name, + resource_group_name, + new_name): + + client.rename( + resource_group_name, + server_name, + database_name, + id=DatabaseIdentity( + cmd.cli_ctx, + new_name, + server_name, + resource_group_name + ).id()) + + return client.get( + resource_group_name, + server_name, + new_name) + + # Creates a database from a database point in time backup or deleted database backup. # Wrapper function to make create mode more convenient. def db_restore( @@ -337,7 +361,7 @@ dest_name, restore_point_in_time=None, source_database_deletion_date=None, - raw=False, + no_wait=False, **kwargs): if not (restore_point_in_time or source_database_deletion_date): @@ -356,7 +380,7 @@ DatabaseIdentity(cmd.cli_ctx, database_name, server_name, resource_group_name), # Cross-server restore is not supported. So dest server/group must be the same as source. DatabaseIdentity(cmd.cli_ctx, dest_name, server_name, resource_group_name), - raw, + no_wait, kwargs) @@ -532,7 +556,7 @@ storage_key): # Import/Export API requires that "?" precede SAS key as an argument. # Add ? prefix if it wasn't included. - if storage_key_type.lower() == StorageKeyType.shared_access_key.value.lower(): + if storage_key_type.lower() == StorageKeyType.shared_access_key.value.lower(): # pylint: disable=no-member if storage_key[0] != '?': storage_key = '?' + storage_key return storage_key @@ -562,10 +586,11 @@ instance, elastic_pool_name=None, max_size_bytes=None, - requested_service_objective_name=None): + requested_service_objective_name=None, + zone_redundant=None): # Verify edition - if instance.edition.lower() == DatabaseEdition.data_warehouse.value.lower(): + if instance.edition.lower() == DatabaseEdition.data_warehouse.value.lower(): # pylint: disable=no-member raise CLIError('Azure SQL Data Warehouse can be updated with the command' ' `az sql dw update`.') @@ -603,6 +628,8 @@ # Set other properties instance.max_size_bytes = max_size_bytes or instance.max_size_bytes + instance.zone_redundant = zone_redundant + return instance @@ -747,7 +774,7 @@ # Apply state if state: instance.state = BlobAuditingPolicyState[state.lower()] - enabled = instance.state.value.lower() == BlobAuditingPolicyState.enabled.value.lower() + enabled = instance.state.value.lower() == BlobAuditingPolicyState.enabled.value.lower() # pylint: disable=no-member # Set storage-related properties _db_security_policy_update( @@ -785,7 +812,7 @@ # Apply state if state: instance.state = SecurityAlertPolicyState[state.lower()] - enabled = instance.state.value.lower() == SecurityAlertPolicyState.enabled.value.lower() + enabled = instance.state.value.lower() == SecurityAlertPolicyState.enabled.value.lower() # pylint: disable=no-member # Set storage-related properties _db_security_policy_update( @@ -826,7 +853,7 @@ database_name, server_name, resource_group_name, - raw=False, + no_wait=False, **kwargs): # Set edition @@ -837,7 +864,7 @@ cmd.cli_ctx, client, DatabaseIdentity(cmd.cli_ctx, database_name, server_name, resource_group_name), - raw, + no_wait, kwargs) @@ -907,13 +934,15 @@ database_dtu_max=None, database_dtu_min=None, dtu=None, - storage_mb=None): + storage_mb=None, + zone_redundant=None): # Apply params to instance instance.database_dtu_max = database_dtu_max or instance.database_dtu_max instance.database_dtu_min = database_dtu_min or instance.database_dtu_min instance.dtu = dtu or instance.dtu instance.storage_mb = storage_mb or instance.storage_mb + instance.zone_redundant = zone_redundant return instance @@ -1189,6 +1218,35 @@ ##### +# sql server dns-alias +##### + + +def server_dns_alias_set( + cmd, + client, + resource_group_name, + server_name, + dns_alias_name, + original_server_name, + original_subscription_id=None, + original_resource_group_name=None): + + # Build the old alias id + old_alias_id = "/subscriptions/{}/resourceGroups/{}/providers/Microsoft.Sql/servers/{}/dnsAliases/{}".format( + quote(original_subscription_id or get_subscription_id(cmd.cli_ctx)), + quote(original_resource_group_name or resource_group_name), + quote(original_server_name), + quote(dns_alias_name)) + + return client.acquire( + resource_group_name=resource_group_name, + server_name=server_name, + dns_alias_name=dns_alias_name, + old_server_dns_alias_id=old_alias_id + ) + +##### # sql server encryption-protector ##### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure_cli_sql.egg-info/PKG-INFO new/azure-cli-sql-2.0.25/azure_cli_sql.egg-info/PKG-INFO --- old/azure-cli-sql-2.0.20/azure_cli_sql.egg-info/PKG-INFO 2018-01-26 17:12:44.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure_cli_sql.egg-info/PKG-INFO 2018-04-06 19:33:22.000000000 +0200 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: azure-cli-sql -Version: 2.0.20 +Version: 2.0.25 Summary: Microsoft Azure Command-Line Tools SQL Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation Author-email: [email protected] License: MIT +Description-Content-Type: UNKNOWN Description: Microsoft Azure CLI 'SQL' Command Module ======================================== @@ -15,10 +16,32 @@ Release History =============== + 2.0.25 + ++++++ + * Use new release azure-mgmt-sql 0.8.6 SDK Python package + * Added az sql elastic-pool op list and az sql elastic-pool op cancel, Support list and cancel azure sql elastic pool operations + * `sdist` is now compatible with wheel 0.31.0 + + 2.0.24 + ++++++ + * Minor fixes + + 2.0.23 + ++++++ + * Support Autorest 3.0 based SDKs + + 2.0.22 + ++++++ + * Added zone redundancy support for databases and elastic pools on creation and update. + + 2.0.21 + ++++++ + * Added az sql server dns-alias commands. 2.0.20 ++++++ - * Clean up unused test files + * Added az sql db rename + * Support `--ids` argument for db, dw, server, elastic-pool, and server firewall-rule commands. 2.0.19 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/azure_cli_sql.egg-info/requires.txt new/azure-cli-sql-2.0.25/azure_cli_sql.egg-info/requires.txt --- old/azure-cli-sql-2.0.20/azure_cli_sql.egg-info/requires.txt 2018-01-26 17:12:44.000000000 +0100 +++ new/azure-cli-sql-2.0.25/azure_cli_sql.egg-info/requires.txt 2018-04-06 19:33:22.000000000 +0200 @@ -1,4 +1,4 @@ azure-cli-core -azure-mgmt-sql==0.8.4 +azure-mgmt-sql==0.8.6 azure-mgmt-storage==1.5.0 six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.0.20/setup.py new/azure-cli-sql-2.0.25/setup.py --- old/azure-cli-sql-2.0.20/setup.py 2018-01-26 17:12:24.000000000 +0100 +++ new/azure-cli-sql-2.0.25/setup.py 2018-04-06 19:33:14.000000000 +0200 @@ -12,7 +12,8 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "2.0.20" +VERSION = "2.0.25" + CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', @@ -29,7 +30,7 @@ DEPENDENCIES = [ 'azure-cli-core', - 'azure-mgmt-sql==0.8.4', + 'azure-mgmt-sql==0.8.6', 'azure-mgmt-storage==1.5.0', 'six' ]
