Skip to content
4 changes: 0 additions & 4 deletions src/azure-cli/azure/cli/command_modules/sql/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ def get_sql_databases_operations(cli_ctx, _):
return get_sql_management_client(cli_ctx).databases


def get_sql_import_export_operations(cli_ctx, _):
return get_sql_management_client(cli_ctx).import_export


def get_sql_database_operations_operations(cli_ctx, _):
return get_sql_management_client(cli_ctx).database_operations

Expand Down
12 changes: 1 addition & 11 deletions src/azure-cli/azure/cli/command_modules/sql/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
get_sql_subscription_usages_operations,
get_sql_virtual_clusters_operations,
get_sql_virtual_network_rules_operations,
get_sql_instance_failover_groups_operations,
get_sql_import_export_operations
get_sql_instance_failover_groups_operations
)

from ._validators import (
Expand Down Expand Up @@ -107,10 +106,6 @@ def load_command_table(self, _):
operations_tmpl='azure.mgmt.sql.operations#DatabasesOperations.{}',
client_factory=get_sql_databases_operations)

import_export_operations = CliCommandType(
operations_tmpl='azure.mgmt.sql.operations#ImportExportOperations.{}',
client_factory=get_sql_import_export_operations)

database_lro_transform = LongRunningOperationResultTransform(
self.cli_ctx, db_transform)

Expand Down Expand Up @@ -149,11 +144,6 @@ def load_command_table(self, _):
table_transformer=db_table_format)

g.custom_command('export', 'db_export')

with self.command_group('sql db',
import_export_operations,
client_factory=get_sql_import_export_operations) as g:

g.custom_command('import', 'db_import')

capabilities_operations = CliCommandType(
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/mysqlserver-x/databases/restore-dest-cli?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/mysqlserver-x/databases/restore-dest-cli?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateRestoreFromLtrBackupRequest","startTime":"2020-09-08T14:06:20.543Z"}'
Expand Down Expand Up @@ -2545,7 +2545,7 @@ interactions:
- python/3.6.6 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.11.1
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/mysqlserver-x/databases/restore-dest-cli?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/mysqlserver-x/databases/restore-dest-cli?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"66a81ef4-7831-46f6-a6ca-d855b277c2a9","creationDate":"2020-09-08T14:15:31.107Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"westus","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-08T14:45:31.107Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"eastus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/mysqlserver-x/databases/restore-dest-cli","name":"restore-dest-cli","type":"Microsoft.Sql/servers/databases"}'
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1?api-version=2017-10-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateLogicalElasticPool","startTime":"2020-09-30T01:38:58.803Z"}'
Expand Down Expand Up @@ -599,7 +599,7 @@ interactions:
- python/3.7.8 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.12.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1?api-version=2017-10-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"vcore,pool","properties":{"state":"Ready","creationDate":"2020-09-30T01:38:58.93Z","maxSizeBytes":34359738368,"perDatabaseSettings":{"minCapacity":0.0000,"maxCapacity":2.0000},"zoneRedundant":false,"licenseType":"LicenseIncluded"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1","name":"cliautomationpool1","type":"Microsoft.Sql/servers/elasticPools"}'
Expand Down Expand Up @@ -750,7 +750,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateLogicalDatabase","startTime":"2020-09-30T01:39:35.62Z"}'
Expand Down Expand Up @@ -940,7 +940,7 @@ interactions:
- python/3.7.8 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.12.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"8d9f13e3-1e54-4f50-a7b3-d62618fee36a","creationDate":"2020-09-30T01:40:20.2Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"northeurope","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-30T02:10:20.2Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01","name":"cliautomationdb01","type":"Microsoft.Sql/servers/databases"}'
Expand Down Expand Up @@ -1093,7 +1093,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore1?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore1?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateRestoreRequest","startTime":"2020-09-30T02:10:29.813Z"}'
Expand Down Expand Up @@ -2975,7 +2975,7 @@ interactions:
- python/3.7.8 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.12.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore1?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore1?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"Standard","tier":"Standard","capacity":20},"kind":"v12.0,user","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":268435456000,"status":"Online","databaseId":"ce0e58ce-c07d-4a83-aa25-e5d1e4672b29","creationDate":"2020-09-30T02:19:45.06Z","currentServiceObjectiveName":"S1","requestedServiceObjectiveName":"S1","defaultSecondaryLocation":"northeurope","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"earliestRestoreDate":"2020-09-30T02:49:45.06Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"Standard","tier":"Standard","capacity":20},"storageAccountType":"GRS"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore1","name":"cliautomationdb01restore1","type":"Microsoft.Sql/servers/databases"}'
Expand Down Expand Up @@ -3129,7 +3129,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateRestoreRequest","startTime":"2020-09-30T02:20:31.387Z"}'
Expand Down Expand Up @@ -3836,7 +3836,7 @@ interactions:
- python/3.7.8 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.12.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"ElasticPool","tier":"GeneralPurpose","capacity":0},"kind":"v12.0,user,vcore,pool","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"elasticPoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1","status":"Online","databaseId":"afd7a85e-4701-4311-8303-77c4343dfadb","creationDate":"2020-09-30T02:23:31.84Z","currentServiceObjectiveName":"ElasticPool","requestedServiceObjectiveName":"ElasticPool","defaultSecondaryLocation":"northeurope","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":0,"earliestRestoreDate":"2020-09-30T02:53:31.84Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"ElasticPool","tier":"GeneralPurpose","capacity":0},"storageAccountType":"GRS"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2","name":"cliautomationdb01restore2","type":"Microsoft.Sql/servers/databases"}'
Expand Down Expand Up @@ -3885,7 +3885,7 @@ interactions:
accept-language:
- en-US
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"ElasticPool","tier":"GeneralPurpose","capacity":0},"kind":"v12.0,user,vcore,pool","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"elasticPoolId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/elasticPools/cliautomationpool1","status":"Online","databaseId":"afd7a85e-4701-4311-8303-77c4343dfadb","creationDate":"2020-09-30T02:23:31.84Z","currentServiceObjectiveName":"ElasticPool","requestedServiceObjectiveName":"ElasticPool","defaultSecondaryLocation":"northeurope","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":0,"earliestRestoreDate":"2020-09-30T02:53:31.84Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"ElasticPool","tier":"GeneralPurpose","capacity":0},"storageAccountType":"GRS"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/cliautomationdb01restore2","name":"cliautomationdb01restore2","type":"Microsoft.Sql/servers/databases"}'
Expand Down Expand Up @@ -4038,7 +4038,7 @@ interactions:
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/bsr_database?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/bsr_database?api-version=2020-08-01-preview
response:
body:
string: '{"operation":"CreateRestoreRequest","startTime":"2020-09-30T02:24:11.59Z"}'
Expand Down Expand Up @@ -5309,7 +5309,7 @@ interactions:
- python/3.7.8 (Windows-10-10.0.14393-SP0) msrest/0.6.18 msrest_azure/0.6.3
azure-mgmt-sql/0.21.0 Azure-SDK-For-Python AZURECLI/2.12.0
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/bsr_database?api-version=2019-06-01-preview
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/bsr_database?api-version=2020-08-01-preview
response:
body:
string: '{"sku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"kind":"v12.0,user,vcore","properties":{"collation":"SQL_Latin1_General_CP1_CI_AS","maxSizeBytes":34359738368,"status":"Online","databaseId":"8b744aec-305d-4196-a012-354f0d36a1a4","creationDate":"2020-09-30T02:30:11.107Z","currentServiceObjectiveName":"GP_Gen5_2","requestedServiceObjectiveName":"GP_Gen5_2","defaultSecondaryLocation":"northeurope","catalogCollation":"SQL_Latin1_General_CP1_CI_AS","zoneRedundant":false,"licenseType":"LicenseIncluded","maxLogSizeBytes":10307502080,"earliestRestoreDate":"2020-09-30T03:00:11.107Z","readScale":"Disabled","readReplicaCount":0,"currentSku":{"name":"GP_Gen5","tier":"GeneralPurpose","family":"Gen5","capacity":2},"storageAccountType":"GRS"},"location":"westeurope","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Sql/servers/clitestserver000002/databases/bsr_database","name":"bsr_database","type":"Microsoft.Sql/servers/databases"}'
Expand Down
Loading