Hello community, here is the log from the commit of package azure-cli-sql for openSUSE:Factory checked in at 2019-10-31 18:17:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/azure-cli-sql (Old) and /work/SRC/openSUSE:Factory/.azure-cli-sql.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "azure-cli-sql" Thu Oct 31 18:17:34 2019 rev:7 rq:742727 version:2.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/azure-cli-sql/azure-cli-sql.changes 2019-06-05 11:45:41.327002967 +0200 +++ /work/SRC/openSUSE:Factory/.azure-cli-sql.new.2990/azure-cli-sql.changes 2019-10-31 18:17:39.954160242 +0100 @@ -1,0 +2,9 @@ +Thu Oct 24 12:12:24 UTC 2019 - John Paul Adrian Glaubitz <[email protected]> + +- New upstream release + + Version 2.2.5 + + For detailed information about changes see the + HISTORY.txt file provided with this package +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- azure-cli-sql-2.1.9.tar.gz New: ---- azure-cli-sql-2.2.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ azure-cli-sql.spec ++++++ --- /var/tmp/diff_new_pack.vlfGgf/_old 2019-10-31 18:17:40.938161261 +0100 +++ /var/tmp/diff_new_pack.vlfGgf/_new 2019-10-31 18:17:40.974161298 +0100 @@ -17,7 +17,7 @@ Name: azure-cli-sql -Version: 2.1.9 +Version: 2.2.5 Release: 0 Summary: Microsoft Azure CLI 'SQL' Command Module License: MIT @@ -33,8 +33,8 @@ Requires: azure-cli-command-modules-nspkg Requires: azure-cli-core Requires: azure-cli-nspkg -Requires: python3-azure-mgmt-sql >= 0.11.0 -Requires: python3-azure-mgmt-storage >= 3.1.1 +Requires: python3-azure-mgmt-sql >= 0.12.0 +Requires: python3-azure-mgmt-storage >= 3.3.0 Requires: python3-azure-nspkg >= 3.0.0 Requires: python3-six Conflicts: azure-cli < 2.0.0 ++++++ azure-cli-sql-2.1.9.tar.gz -> azure-cli-sql-2.2.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/HISTORY.rst new/azure-cli-sql-2.2.5/HISTORY.rst --- old/azure-cli-sql-2.1.9/HISTORY.rst 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/HISTORY.rst 2019-06-13 23:17:47.000000000 +0200 @@ -2,6 +2,35 @@ Release History =============== +2.2.5 ++++++ +* az sql server create, az sql mi create: make location optional. If unspecified, use resource group location. + +2.2.4 ++++++ +* Minor fixes + +2.2.3 ++++++ +* Added commands sql virtual-cluster list/show/delete +* Upgrade azure-mgmt-storage from 3.1.1 to 3.3.0 +* Fixed "'NoneType' object is not iterable" error for `az sql db list-editions --available`. + +2.2.2 ++++++ +* Support for custom time zone on managed instance. +* Allow elastic pool name (as an alternative to elastic pool id) to be specified for az sql db update. +* `sql server create/update`: Added `--no-wait` support. +* `sql server`: Added new command `wait`. + +2.2.1 ++++++ +* Updating az sql mi create and update with two new properties (proxyOverride and publicDataEndpointEnabled) + +2.2.0 ++++++ +* Minor fixes + 2.1.9 +++++ * Minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/PKG-INFO new/azure-cli-sql-2.2.5/PKG-INFO --- old/azure-cli-sql-2.1.9/PKG-INFO 2019-02-12 03:05:38.000000000 +0100 +++ new/azure-cli-sql-2.2.5/PKG-INFO 2019-06-13 23:18:13.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: azure-cli-sql -Version: 2.1.9 +Version: 2.2.5 Summary: Microsoft Azure Command-Line Tools SQL Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -15,6 +15,35 @@ Release History =============== + 2.2.5 + +++++ + * az sql server create, az sql mi create: make location optional. If unspecified, use resource group location. + + 2.2.4 + +++++ + * Minor fixes + + 2.2.3 + +++++ + * Added commands sql virtual-cluster list/show/delete + * Upgrade azure-mgmt-storage from 3.1.1 to 3.3.0 + * Fixed "'NoneType' object is not iterable" error for `az sql db list-editions --available`. + + 2.2.2 + +++++ + * Support for custom time zone on managed instance. + * Allow elastic pool name (as an alternative to elastic pool id) to be specified for az sql db update. + * `sql server create/update`: Added `--no-wait` support. + * `sql server`: Added new command `wait`. + + 2.2.1 + +++++ + * Updating az sql mi create and update with two new properties (proxyOverride and publicDataEndpointEnabled) + + 2.2.0 + +++++ + * Minor fixes + 2.1.9 +++++ * Minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/__init__.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/__init__.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/__init__.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/__init__.py 2019-06-13 23:17:47.000000000 +0200 @@ -12,10 +12,11 @@ def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType + from azure.cli.core.profiles import ResourceType sql_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.sql.custom#{}') super(SqlCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=sql_custom, - min_profile='2017-03-10-profile') + resource_type=ResourceType.MGMT_SQL) def load_command_table(self, args): from azure.cli.command_modules.sql.commands import load_command_table diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_format.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_format.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_format.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_format.py 2019-06-13 23:17:47.000000000 +0200 @@ -177,6 +177,7 @@ sku = slo['sku'] yield OrderedDict([ ('serviceObjective', slo['name']), + ('sku', sku['name']), ('edition', e['name']), # Dummy ' ' value ensures that value is not skipped, which # would cause the column to not show up in the correct order @@ -269,6 +270,7 @@ for slo in e['supportedElasticPoolPerformanceLevels']: sku = slo['sku'] yield OrderedDict([ + ('sku', sku['name']), ('edition', e['name']), # Dummy ' ' value ensures that value is not skipped, which # would cause the column to not show up in the correct order diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_help.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_help.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_help.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_help.py 2019-06-13 23:17:47.000000000 +0200 @@ -56,9 +56,9 @@ long-summary: Includes available service objectives and storage limits. In order to reduce verbosity, settings to intentionally reduce storage limits are hidden by default. examples: - name: Show all database editions in a location. - text: az sql db list-editions -l westus + text: az sql db list-editions -l westus -o table - name: Show all available database service objectives for Standard edition. - text: az sql db list-editions -l westus --edition Standard + text: az sql db list-editions -l westus --edition Standard -o table - 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 """ @@ -185,12 +185,12 @@ az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \\ --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \\ --storage-key-type SharedAccessKey \\ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + --storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac - name: Export bacpac using a storage account key. text: | az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \\ --storage-key MYKEY== --storage-key-type StorageAccessKey \\ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + --storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac """ helps['sql db import'] = """ type: command @@ -205,12 +205,12 @@ az sql db import -s myserver -n mydatabase -g mygroup -p password -u login \\ --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \\ --storage-key-type SharedAccessKey \\ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + --storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac - name: Import bacpac into an existing database using a storage account key. text: | az sql db import -s myserver -n mydatabase -g mygroup -p password -u login --storage-key MYKEY== \\ --storage-key-type StorageAccessKey \\ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + --storage-uri https://myAccountName.blob.core.windows.net/myContainer/myBacpac.bacpac """ helps['sql db restore'] = """ type: command @@ -304,13 +304,13 @@ database settings are hidden by default. examples: - name: Show all elastic pool editions and pool DTU limits in the West US region. - text: az sql elastic-pool list-editions -l westus + text: az sql elastic-pool list-editions -l westus -o table - name: Show all pool DTU limits for Standard edition in the West US region. - text: az sql elastic-pool list-editions -l westus --edition Standard + text: az sql elastic-pool list-editions -l westus --edition Standard -o table - name: Show available max sizes for elastic pools with at least 100 DTUs in the West US region. - text: az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size + text: az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size -o table - name: Show available per database settings for Standard 100 DTU elastic pools in the West US region. - text: az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 + text: az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 -o table --show-details db-min-dtu db-max-dtu db-max-size """ helps['sql elastic-pool update'] = """ @@ -372,6 +372,10 @@ type: command short-summary: Update a server. """ +helps['sql server wait'] = """ + type: command + short-summary: Place the CLI in a waiting state until a condition of the SQL server is met. + """ helps['sql server conn-policy'] = """ type: group short-summary: Manage a server's connection policy. @@ -557,3 +561,30 @@ - name: Delete a managed database text: az sql midb delete -g mygroup --mi myinstance -n mymanageddb --yes """ +helps['sql virtual-cluster'] = """ + type: group + short-summary: Manage SQL virtual clusters. + """ +helps['sql virtual-cluster list'] = """ + type: command + short-summary: List available virtual clusters. + examples: + - name: List all virtual clusters in the current subscription. + text: az sql virtual-cluster list + - name: List all virtual clusters in a resource group. + text: az sql virtual-cluster list -g mygroup + """ +helps['sql virtual-cluster show'] = """ + type: command + short-summary: Get the details for a virtual cluster. + examples: + - name: Get the details for a virtual cluster + text: az sql virtual-cluster show -g mygroup -n mycluster + """ +helps['sql virtual-cluster delete'] = """ + type: command + short-summary: Delete a virtual cluster. + examples: + - name: Delete a virtual cluster + text: az sql virtual-cluster delete -g mygroup -n mycluster + """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_params.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_params.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_params.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_params.py 2019-06-13 23:17:47.000000000 +0200 @@ -8,8 +8,6 @@ import itertools from enum import Enum -from knack.arguments import CLIArgumentType, ignore_type - from azure.mgmt.sql.models import ( Database, ElasticPool, @@ -41,9 +39,16 @@ get_enum_type, get_resource_name_completion_list, get_location_type, - tags_type + tags_type, + resource_group_name_type +) + +from azure.cli.core.commands.validators import ( + get_default_location_from_resource_group ) +from knack.arguments import CLIArgumentType, ignore_type + from .custom import ( ClientAuthenticationType, ClientType, @@ -104,6 +109,14 @@ server_configure_help = 'You can configure the default using `az configure --defaults sql-server=<name>`' + +def get_location_type_with_default_from_resource_group(cli_ctx): + return CLIArgumentType( + arg_type=get_location_type(cli_ctx), + required=False, + validator=get_default_location_from_resource_group) + + server_param_type = CLIArgumentType( options_list=['--server', '-s'], configured_default='sql-server', @@ -287,6 +300,8 @@ c.argument('location_name', arg_type=get_location_type(self.cli_ctx)) c.argument('usage_name', options_list=['--usage', '-u']) c.argument('tags', arg_type=tags_type) + c.argument('allow_data_loss', + help='If specified, the failover operation will allow data loss.') with self.argument_context('sql db') as c: c.argument('server_name', @@ -549,9 +564,6 @@ help='Name of the resource group containing the secondary replica that' ' will become the new primary.') - c.argument('allow_data_loss', - help='If specified, the failover operation will allow data loss.') - with self.argument_context('sql db replica delete-link') as c: c.argument('partner_server_name', options_list=['--partner-server'], @@ -872,6 +884,9 @@ 'for use with key management services like Azure KeyVault.') with self.argument_context('sql server create') as c: + c.argument('location', + arg_type=get_location_type_with_default_from_resource_group(self.cli_ctx)) + # Create args that will be used to build up the Server object create_args_for_complex_type( c, 'parameters', Server, [ @@ -941,17 +956,20 @@ arg_type=server_param_type) c.argument('dns_alias_name', - options_list=('--name', '-n')) + options_list=('--name', '-n'), + help='Name of the DNS alias.') 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')) + options_list=('--original-resource-group'), + help='Name of the original resource group.') c.argument('original_subscription_id', - options_list=('--original-subscription-id')) + options_list=('--original-subscription-id'), + help='ID of the original subscription.') ##### # sql server firewall-rule @@ -1052,7 +1070,7 @@ c.argument('tier', arg_type=tier_param_type, - help='The edition component of the sku. Allowed value is GeneralPurpose.') + help='The edition component of the sku. Allowed values: GeneralPurpose, BusinessCritical.') c.argument('family', arg_type=family_param_type, @@ -1070,13 +1088,28 @@ help='The license type to apply for this managed instance.') c.argument('vcores', - options_list=['--capacity', '-c'], + arg_type=capacity_param_type, help='The capacity of the managed instance in vcores.') c.argument('collation', help='The collation of the managed instance.') + c.argument('proxy_override', + arg_type=get_enum_type(ServerConnectionType), + help='The connection type used for connecting to the instance.') + + c.argument('public_data_endpoint_enabled', + arg_type=get_three_state_flag(), + help='Whether or not the public data endpoint is enabled for the instance.') + + c.argument('timezone_id', + help='The time zone id for the instance to set. ' + 'A list of time zone ids is exposed through the sys.time_zone_info (Transact-SQL) view.') + with self.argument_context('sql mi create') as c: + c.argument('location', + arg_type=get_location_type_with_default_from_resource_group(self.cli_ctx)) + # Create args that will be used to build up the ManagedInstance object create_args_for_complex_type( c, 'parameters', ManagedInstance, [ @@ -1086,7 +1119,10 @@ 'virtual_network_subnet_id', 'vcores', 'storage_size_in_gb', - 'collation' + 'collation', + 'proxy_override', + 'public_data_endpoint_enabled', + 'timezone_id', ]) # Create args that will be used to build up the Managed Instance's Sku object @@ -1201,3 +1237,15 @@ with self.argument_context('sql midb list') as c: c.argument('managed_instance_name', id_part=None) + + ############################################### + # sql virtual cluster # + ############################################### + with self.argument_context('sql virtual-cluster') as c: + c.argument('virtual_cluster_name', + help='The virtual cluster name', + options_list=['--name', '-n'], + # Allow --ids command line argument. id_part=name is 1st name in uri + id_part='name') + + c.argument('resource_group_name', arg_type=resource_group_name_type) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_util.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_util.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/_util.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/_util.py 2019-06-13 23:17:47.000000000 +0200 @@ -126,3 +126,7 @@ def get_sql_managed_databases_operations(cli_ctx, _): return get_sql_management_client(cli_ctx).managed_databases + + +def get_sql_virtual_clusters_operations(cli_ctx, _): + return get_sql_management_client(cli_ctx).virtual_clusters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/commands.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/commands.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/commands.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/commands.py 2019-06-13 23:17:47.000000000 +0200 @@ -45,6 +45,7 @@ get_sql_servers_operations, get_sql_server_usages_operations, get_sql_subscription_usages_operations, + get_sql_virtual_clusters_operations, get_sql_virtual_network_rules_operations, ) @@ -61,7 +62,7 @@ ############################################### subscription_usages_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.subscription_usages_operations#SubscriptionUsagesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#SubscriptionUsagesOperations.{}', client_factory=get_sql_subscription_usages_operations) with self.command_group('sql', @@ -82,7 +83,7 @@ g.custom_command('show-connection-string', 'db_show_conn_str') database_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.databases_operations#DatabasesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#DatabasesOperations.{}', client_factory=get_sql_databases_operations) database_lro_transform = LongRunningOperationResultTransform( @@ -125,7 +126,7 @@ g.custom_command('export', 'db_export') capabilities_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.capabilities_operations#CapabilitiesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#CapabilitiesOperations.{}', client_factory=get_sql_capabilities_operations) with self.command_group('sql db', @@ -168,7 +169,7 @@ transform=database_lro_transform) database_operations_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.database_operations#DatabaseOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#DatabaseOperations.{}', client_factory=get_sql_database_operations_operations) with self.command_group('sql db op', database_operations_operations) as g: @@ -177,7 +178,7 @@ g.command('cancel', 'cancel') transparent_data_encryptions_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.transparent_data_encryptions_operations#TransparentDataEncryptionsOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#TransparentDataEncryptionsOperations.{}', client_factory=get_sql_database_transparent_data_encryptions_operations) with self.command_group('sql db tde', transparent_data_encryptions_operations) as g: @@ -186,7 +187,7 @@ g.show_command('show', 'get') transparent_data_encryption_activities_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.transparent_data_encryption_activities_operations#TransparentDataEncryptionActivitiesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#TransparentDataEncryptionActivitiesOperations.{}', client_factory=get_sql_database_transparent_data_encryption_activities_operations) with self.command_group('sql db tde', transparent_data_encryption_activities_operations) as g: @@ -194,7 +195,7 @@ g.command('list-activity', 'list_by_configuration') replication_links_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.replication_links_operations#ReplicationLinksOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ReplicationLinksOperations.{}', client_factory=get_sql_replication_links_operations) with self.command_group('sql db replica', @@ -207,7 +208,7 @@ g.custom_command('set-primary', 'db_failover') restorable_dropped_databases_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.restorable_dropped_databases_operations#RestorableDroppedDatabasesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#RestorableDroppedDatabasesOperations.{}', client_factory=get_sql_restorable_dropped_databases_operations) with self.command_group('sql db', restorable_dropped_databases_operations) as g: @@ -215,7 +216,7 @@ g.command('list-deleted', 'list_by_server') database_blob_auditing_policies_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.database_blob_auditing_policies_operations#DatabaseBlobAuditingPoliciesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#DatabaseBlobAuditingPoliciesOperations.{}', client_factory=get_sql_database_blob_auditing_policies_operations) with self.command_group('sql db audit-policy', @@ -227,7 +228,7 @@ custom_func_name='db_audit_policy_update') database_threat_detection_policies_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.database_threat_detection_policies_operations#DatabaseThreatDetectionPoliciesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#DatabaseThreatDetectionPoliciesOperations.{}', client_factory=get_sql_database_threat_detection_policies_operations) with self.command_group('sql db threat-policy', @@ -239,7 +240,7 @@ custom_func_name='db_threat_detection_policy_update') database_usages_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.database_usages_operations#DatabaseUsagesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#DatabaseUsagesOperations.{}', client_factory=get_sql_database_usages_operations) with self.command_group('sql db', database_usages_operations) as g: @@ -251,7 +252,7 @@ ############################################### elastic_pools_ops = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.elastic_pools_operations#ElasticPoolsOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ElasticPoolsOperations.{}', client_factory=get_sql_elastic_pools_operations) elastic_pool_lro_transform = LongRunningOperationResultTransform( @@ -293,7 +294,7 @@ table_transformer=elastic_pool_edition_table_format) elastic_pool_operations_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.elastic_pool_operations#ElasticPoolOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ElasticPoolOperations.{}', client_factory=get_sql_elastic_pool_operations_operations) with self.command_group('sql elastic-pool op', @@ -308,7 +309,7 @@ ############################################### failover_groups_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.failover_groups_operations#FailoverGroupsOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#FailoverGroupsOperations.{}', client_factory=get_sql_failover_groups_operations) with self.command_group('sql failover-group', failover_groups_operations, client_factory=get_sql_failover_groups_operations) as g: g.command('show', 'get') @@ -323,7 +324,7 @@ ############################################### servers_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.servers_operations#ServersOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServersOperations.{}', client_factory=get_sql_servers_operations) with self.command_group('sql server', @@ -331,7 +332,8 @@ client_factory=get_sql_servers_operations) as g: g.custom_command('create', 'server_create', - table_transformer=server_table_format) + table_transformer=server_table_format, + supports_no_wait=True) g.command('delete', 'delete', confirmation=True) g.show_command('show', 'get', @@ -339,17 +341,19 @@ g.custom_command('list', 'server_list', table_transformer=server_table_format) g.generic_update_command('update', - custom_func_name='server_update') + custom_func_name='server_update', + supports_no_wait=True) + g.wait_command('wait') server_usages_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.server_usages_operations#ServerUsagesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServerUsagesOperations.{}', client_factory=get_sql_server_usages_operations) with self.command_group('sql server', server_usages_operations) as g: g.command('list-usages', 'list_by_server') firewall_rules_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.firewall_rules_operations#FirewallRulesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#FirewallRulesOperations.{}', client_factory=get_sql_firewall_rules_operations) with self.command_group('sql server firewall-rule', @@ -367,7 +371,7 @@ table_transformer=firewall_rule_table_format) aadadmin_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.server_azure_ad_administrators_operations#ServerAzureADAdministratorsOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServerAzureADAdministratorsOperations.{}', client_factory=get_sql_server_azure_ad_administrators_operations) with self.command_group('sql server ad-admin', @@ -381,7 +385,7 @@ setter_arg_name='properties') server_keys_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.server_keys_operations#ServerKeysOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServerKeysOperations.{}', client_factory=get_sql_server_keys_operations) with self.command_group('sql server key', @@ -394,7 +398,7 @@ g.command('list', 'list_by_server') encryption_protectors_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.encryption_protectors_operations#EncryptionProtectorsOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#EncryptionProtectorsOperations.{}', client_factory=get_sql_encryption_protectors_operations) with self.command_group('sql server tde-key', @@ -405,7 +409,7 @@ g.custom_command('set', 'encryption_protector_update') virtual_network_rules_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.virtual_network_rules_operations#VirtualNetworkRulesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#VirtualNetworkRulesOperations.{}', client_factory=get_sql_virtual_network_rules_operations) with self.command_group('sql server vnet-rule', @@ -420,7 +424,7 @@ g.generic_update_command('update') server_connection_policies_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.server_connection_policies_operations#ServerConnectionPoliciesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServerConnectionPoliciesOperations.{}', client_factory=get_sql_server_connection_policies_operations) with self.command_group('sql server conn-policy', @@ -431,7 +435,7 @@ c.generic_update_command('update') server_dns_aliases_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.server_dns_aliases_operations#ServerDnsAliasesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ServerDnsAliasesOperations.{}', client_factory=get_sql_server_dns_aliases_operations) with self.command_group('sql server dns-alias', @@ -449,7 +453,7 @@ ############################################### managed_instances_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.managed_instances_operations#ManagedInstancesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ManagedInstancesOperations.{}', client_factory=get_sql_managed_instances_operations) with self.command_group('sql mi', @@ -467,7 +471,7 @@ ############################################### managed_databases_operations = CliCommandType( - operations_tmpl='azure.mgmt.sql.operations.managed_databases_operations#ManagedDatabasesOperations.{}', + operations_tmpl='azure.mgmt.sql.operations#ManagedDatabasesOperations.{}', client_factory=get_sql_managed_databases_operations) with self.command_group('sql midb', @@ -479,3 +483,19 @@ g.show_command('show', 'get') g.command('list', 'list_by_instance') g.command('delete', 'delete', confirmation=True, supports_no_wait=True) + + ############################################### + # sql virtual cluster # + ############################################### + + virtual_clusters_operations = CliCommandType( + operations_tmpl='azure.mgmt.sql.operations#VirtualClustersOperations.{}', + client_factory=get_sql_virtual_clusters_operations) + + with self.command_group('sql virtual-cluster', + virtual_clusters_operations, + client_factory=get_sql_virtual_clusters_operations) as g: + + g.command('delete', 'delete', supports_no_wait=True) + g.show_command('show', 'get') + g.custom_command('list', 'virtual_cluster_list') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/custom.py new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/custom.py --- old/azure-cli-sql-2.1.9/azure/cli/command_modules/sql/custom.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure/cli/command_modules/sql/custom.py 2019-06-13 23:17:47.000000000 +0200 @@ -6,8 +6,6 @@ # pylint: disable=C0302 from enum import Enum -from knack.log import get_logger - from azure.cli.core.util import ( CLIError, sdk_no_wait, @@ -36,6 +34,8 @@ StorageKeyType, ) +from knack.log import get_logger + from ._util import ( get_sql_capabilities_operations, get_sql_servers_operations, @@ -210,17 +210,16 @@ capacity=sku.capacity, capacities=[slo.sku.capacity for slo in supported_service_level_objectives] )) - else: - raise CLIError( - "Could not find sku in tier '{tier}' with family '{family}', capacity {capacity}." - " Supported families & capacities for '{tier}' are: {skus}. Please specify one of these" - " supported combinations of family and capacity.".format( - tier=sku.tier, - family=sku.family, - capacity=sku.capacity, - skus=[(slo.sku.family, slo.sku.capacity) - for slo in supported_service_level_objectives] - )) + raise CLIError( + "Could not find sku in tier '{tier}' with family '{family}', capacity {capacity}." + " Supported families & capacities for '{tier}' are: {skus}. Please specify one of these" + " supported combinations of family and capacity.".format( + tier=sku.tier, + family=sku.family, + capacity=sku.capacity, + skus=[(slo.sku.family, slo.sku.capacity) + for slo in supported_service_level_objectives] + )) elif sku.family: # Error - cannot find based on family alone. raise CLIError('If --family is specified, --capacity must also be specified.') @@ -879,7 +878,8 @@ for e in editions: e.supported_service_level_objectives = _filter_available(e.supported_service_level_objectives) for slo in e.supported_service_level_objectives: - slo.supported_max_sizes = _filter_available(slo.supported_max_sizes) + if slo.supported_max_sizes: + slo.supported_max_sizes = _filter_available(slo.supported_max_sizes) # Remove editions with no service objectives (due to filters) editions = [e for e in editions if e.supported_service_level_objectives] @@ -888,7 +888,8 @@ if DatabaseCapabilitiesAdditionalDetails.max_size.value not in show_details: for e in editions: for slo in e.supported_service_level_objectives: - slo.supported_max_sizes = [] + if slo.supported_max_sizes: + slo.supported_max_sizes = [] return editions @@ -1023,6 +1024,8 @@ def db_update( cmd, instance, + server_name, + resource_group_name, elastic_pool_id=None, max_size_bytes=None, service_objective=None, @@ -1033,7 +1036,6 @@ ''' Applies requested parameters to a db resource instance for a DB update. ''' - # Verify edition if instance.sku.tier.lower() == DatabaseEdition.data_warehouse.value.lower(): # pylint: disable=no-member raise CLIError('Azure SQL Data Warehouse can be updated with the command' @@ -1054,12 +1056,18 @@ ' unspecified or equal \'{}\'.'.format( ServiceObjectiveName.elastic_pool.value)) - # Update instance pool and service objective. The service treats these properties like PATCH, + # Update both elastic pool and sku. The service treats elastic pool and sku properties like PATCH, # so if either of these properties is null then the service will keep the property unchanged - # except if pool is null/empty and service objective is a standalone SLO value (e.g. 'S0', # 'S1', etc), in which case the pool being null/empty is meaningful - it means remove from # pool. - instance.elastic_pool_id = elastic_pool_id + + # Validate elastic pool id + instance.elastic_pool_id = _validate_elastic_pool_id( + cmd.cli_ctx, + elastic_pool_id, + server_name, + resource_group_name) # Update sku _db_elastic_pool_update_sku( @@ -1639,6 +1647,7 @@ resource_group_name, server_name, assign_identity=False, + no_wait=False, **kwargs): ''' Creates a server. @@ -1648,10 +1657,10 @@ kwargs['identity'] = ResourceIdentity(type=IdentityType.system_assigned.value) # Create - return client.create_or_update( - server_name=server_name, - resource_group_name=resource_group_name, - parameters=kwargs) + return sdk_no_wait(no_wait, client.create_or_update, + server_name=server_name, + resource_group_name=resource_group_name, + parameters=kwargs) def server_list( @@ -1922,8 +1931,7 @@ else: if kid is None: raise CLIError('A uri must be provided if the server_key_type is AzureKeyVault.') - else: - key_name = _get_server_key_name_from_uri(kid) + key_name = _get_server_key_name_from_uri(kid) return client.create_or_update( resource_group_name=resource_group_name, @@ -2027,7 +2035,9 @@ license_type=None, vcores=None, storage_size_in_gb=None, - assign_identity=False): + assign_identity=False, + proxy_override=None, + public_data_endpoint_enabled=None): ''' Updates a managed instance. Custom update function to apply parameters to instance. ''' @@ -2045,6 +2055,11 @@ vcores or instance.v_cores) instance.storage_size_in_gb = ( storage_size_in_gb or instance.storage_size_in_gb) + instance.proxy_override = ( + proxy_override or instance.proxy_override) + + if public_data_endpoint_enabled is not None: + instance.public_data_endpoint_enabled = public_data_endpoint_enabled return instance @@ -2278,3 +2293,22 @@ {x.lower() for x in add_db_ids}) - {x.lower() for x in remove_db_ids}) return databases + +############################################### +# sql virtual cluster # +############################################### + + +def virtual_cluster_list( + client, + resource_group_name=None): + ''' + Lists virtual clusters in a resource group or subscription + ''' + + if resource_group_name: + # List all virtual clusters in the resource group + return client.list_by_resource_group(resource_group_name=resource_group_name) + + # List all virtual clusters in the subscription + return client.list() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure_cli_sql.egg-info/PKG-INFO new/azure-cli-sql-2.2.5/azure_cli_sql.egg-info/PKG-INFO --- old/azure-cli-sql-2.1.9/azure_cli_sql.egg-info/PKG-INFO 2019-02-12 03:05:38.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure_cli_sql.egg-info/PKG-INFO 2019-06-13 23:18:13.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: azure-cli-sql -Version: 2.1.9 +Version: 2.2.5 Summary: Microsoft Azure Command-Line Tools SQL Command Module Home-page: https://github.com/Azure/azure-cli Author: Microsoft Corporation @@ -15,6 +15,35 @@ Release History =============== + 2.2.5 + +++++ + * az sql server create, az sql mi create: make location optional. If unspecified, use resource group location. + + 2.2.4 + +++++ + * Minor fixes + + 2.2.3 + +++++ + * Added commands sql virtual-cluster list/show/delete + * Upgrade azure-mgmt-storage from 3.1.1 to 3.3.0 + * Fixed "'NoneType' object is not iterable" error for `az sql db list-editions --available`. + + 2.2.2 + +++++ + * Support for custom time zone on managed instance. + * Allow elastic pool name (as an alternative to elastic pool id) to be specified for az sql db update. + * `sql server create/update`: Added `--no-wait` support. + * `sql server`: Added new command `wait`. + + 2.2.1 + +++++ + * Updating az sql mi create and update with two new properties (proxyOverride and publicDataEndpointEnabled) + + 2.2.0 + +++++ + * Minor fixes + 2.1.9 +++++ * Minor fixes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/azure_cli_sql.egg-info/requires.txt new/azure-cli-sql-2.2.5/azure_cli_sql.egg-info/requires.txt --- old/azure-cli-sql-2.1.9/azure_cli_sql.egg-info/requires.txt 2019-02-12 03:05:38.000000000 +0100 +++ new/azure-cli-sql-2.2.5/azure_cli_sql.egg-info/requires.txt 2019-06-13 23:18:13.000000000 +0200 @@ -1,4 +1,4 @@ azure-cli-core -azure-mgmt-sql==0.11.0 -azure-mgmt-storage==3.1.1 +azure-mgmt-sql==0.12.0 +azure-mgmt-storage==3.3.0 six diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-cli-sql-2.1.9/setup.py new/azure-cli-sql-2.2.5/setup.py --- old/azure-cli-sql-2.1.9/setup.py 2019-02-12 03:05:13.000000000 +0100 +++ new/azure-cli-sql-2.2.5/setup.py 2019-06-13 23:17:47.000000000 +0200 @@ -12,7 +12,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "2.1.9" +VERSION = "2.2.5" CLASSIFIERS = [ 'Development Status :: 4 - Beta', @@ -30,8 +30,8 @@ DEPENDENCIES = [ 'azure-cli-core', - 'azure-mgmt-sql==0.11.0', - 'azure-mgmt-storage==3.1.1', + 'azure-mgmt-sql==0.12.0', + 'azure-mgmt-storage==3.3.0', 'six' ]
