Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
bf63231
flexible server migration
DaeunYim Feb 7, 2021
a018b7d
single server migration draft
DaeunYim Feb 8, 2021
65fe403
style fixed
DaeunYim Feb 8, 2021
5abef3c
allow large reponse for proxy test
DaeunYim Feb 8, 2021
8b16281
singles server test fixed
DaeunYim Feb 9, 2021
75cd854
minor bugs fixed
DaeunYim Feb 9, 2021
822c738
linter and style issues fixed
DaeunYim Feb 9, 2021
dfe3896
config files added
DaeunYim Feb 10, 2021
bdd876c
empty commit
DaeunYim Feb 10, 2021
7a144d7
empty commit
DaeunYim Feb 18, 2021
ecd6dd2
pulled dev repo
DaeunYim Mar 2, 2021
6d83a71
pulled from dev
DaeunYim Mar 3, 2021
221f2e4
fix recording files for the migration code
DaeunYim Mar 3, 2021
f037cac
fixed mariadb failing test case
DaeunYim Mar 3, 2021
8acc000
fix for failing test cases
DaeunYim Mar 4, 2021
8fd0fa0
fixed typo
DaeunYim Mar 4, 2021
0c25766
Merge branch 'dev' of https://github.com/Azure/azure-cli into python-…
DaeunYim Mar 5, 2021
fdce3c9
change datetime function to accomodate python 3.6
DaeunYim Mar 6, 2021
cc30375
takes care of two different time input
DaeunYim Mar 6, 2021
ab1eb2e
style fixed
DaeunYim Mar 6, 2021
7486023
bug fix auth, LRO polling commands, object create by dict
DaeunYim Mar 10, 2021
0ef1240
empty commit
DaeunYim Mar 11, 2021
98b9265
Merge branch 'dev' into python-sdk-migration-2
DaeunYim Mar 11, 2021
3d71790
id = child name fix
DaeunYim Mar 12, 2021
bb840b3
Merge branch 'python-sdk-migration-2' of https://github.com/DaeunYim/…
DaeunYim Mar 12, 2021
45703ac
Merge branch 'dev' of https://github.com/Azure/azure-cli into python-…
DaeunYim Mar 15, 2021
945de4d
network module test failure fixed
DaeunYim Mar 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
single server migration draft
  • Loading branch information
DaeunYim committed Feb 8, 2021
commit a018b7da620cc51bb20a2367fe145d4dd6ad3561
129 changes: 75 additions & 54 deletions src/azure-cli/azure/cli/command_modules/rdbms/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ def load_command_table(self, _):
g.custom_command('create', '_server_create')
g.custom_command('restore', '_server_restore', supports_no_wait=True)
g.custom_command('georestore', '_server_georestore', supports_no_wait=True)
g.command('delete', 'delete', confirmation=True)
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.custom_command('list', '_server_list_custom_func', table_transformer=table_transform_output_list_servers)
g.generic_update_command('update',
getter_name='_server_update_get', getter_type=rdbms_custom,
setter_name='_server_update_set', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_server_update_custom_func')
g.custom_wait_command('wait', '_server_mariadb_get')
g.command('restart', 'restart')
g.command('start', 'start')
g.command('stop', 'stop')
g.command('restart', 'begin_restart')
g.command('start', 'begin_start')
g.command('stop', 'begin_stop')

with self.command_group('mysql server', mysql_servers_sdk, client_factory=cf_mysql_servers) as g:
g.custom_command('create', '_server_create')
Expand All @@ -265,10 +265,10 @@ def load_command_table(self, _):
setter_name='_server_update_set', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_server_update_custom_func')
g.custom_wait_command('wait', '_server_mysql_get')
g.command('restart', 'restart')
g.command('start', 'start')
g.command('stop', 'stop')
g.command('upgrade', 'upgrade')
g.command('restart', 'begin_restart')
g.command('start', 'begin_start')
g.command('stop', 'begin_stop')
g.custom_command('upgrade', '_server_mysql_upgrade')

with self.command_group('postgres server', postgres_servers_sdk, client_factory=cf_postgres_servers) as g:
g.custom_command('create', '_server_create')
Expand All @@ -282,7 +282,7 @@ def load_command_table(self, _):
setter_name='_server_update_set', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_server_update_custom_func')
g.custom_wait_command('wait', '_server_postgresql_get')
g.command('restart', 'restart')
g.command('restart', 'begin_restart')

with self.command_group('mariadb server replica', mariadb_replica_sdk) as g:
g.command('list', 'list_by_server')
Expand All @@ -305,73 +305,91 @@ def load_command_table(self, _):
g.custom_command('create', '_replica_create', supports_no_wait=True)
g.custom_command('stop', '_replica_stop', confirmation=True)

with self.command_group('mariadb server firewall-rule', mariadb_firewall_rule_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('mariadb server firewall-rule', mariadb_firewall_rule_sdk,
client_factory=cf_mariadb_firewall_rules, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_firewall_rule_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update',
getter_name='_firewall_rule_custom_getter', getter_type=rdbms_custom,
setter_name='_firewall_rule_custom_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_firewall_rule_update_custom_func')

with self.command_group('mysql server firewall-rule', mysql_firewall_rule_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('mysql server firewall-rule', mysql_firewall_rule_sdk,
client_factory=cf_mysql_firewall_rules, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_firewall_rule_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update',
getter_name='_firewall_rule_custom_getter', getter_type=rdbms_custom,
setter_name='_firewall_rule_custom_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_firewall_rule_update_custom_func')

with self.command_group('postgres server firewall-rule', postgres_firewall_rule_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('postgres server firewall-rule', postgres_firewall_rule_sdk,
client_factory=cf_mariadb_firewall_rules, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_firewall_rule_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update',
getter_name='_firewall_rule_custom_getter', getter_type=rdbms_custom,
setter_name='_firewall_rule_custom_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_firewall_rule_update_custom_func')

with self.command_group('mariadb server vnet-rule', mariadb_vnet_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete')
with self.command_group('mariadb server vnet-rule', mariadb_vnet_sdk,
client_factory=cf_mariadb_virtual_network_rules_operations, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_vnet_rule_create')
g.command('delete', 'begin_delete')
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update')

with self.command_group('mysql server vnet-rule', mysql_vnet_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete')
g.generic_update_command('update',
getter_name='_custom_vnet_update_getter', getter_type=rdbms_custom,
setter_name='_custom_vnet_update_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_vnet_rule_update_custom_func')

with self.command_group('mysql server vnet-rule', mysql_vnet_sdk,
client_factory=cf_mysql_virtual_network_rules_operations, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_vnet_rule_create')
g.command('delete', 'begin_delete')
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update')

with self.command_group('postgres server vnet-rule', postgres_vnet_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete')
g.generic_update_command('update',
getter_name='_custom_vnet_update_getter', getter_type=rdbms_custom,
setter_name='_custom_vnet_update_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_vnet_rule_update_custom_func')

with self.command_group('postgres server vnet-rule', postgres_vnet_sdk,
client_factory=cf_postgres_virtual_network_rules_operations, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_vnet_rule_create')
g.command('delete', 'begin_delete')
g.show_command('show', 'get')
g.command('list', 'list_by_server')
g.generic_update_command('update')
g.generic_update_command('update',
getter_name='_custom_vnet_update_getter', getter_type=rdbms_custom,
setter_name='_custom_vnet_update_setter', setter_type=rdbms_custom, setter_arg_name='parameters',
custom_func_name='_vnet_rule_update_custom_func')

with self.command_group('mariadb server configuration', mariadb_config_sdk) as g:
g.command('set', 'create_or_update')
with self.command_group('mariadb server configuration', mariadb_config_sdk,
client_factory=cf_mariadb_config, custom_command_type=rdbms_custom) as g:
g.custom_command('set', '_configuration_update')
g.show_command('show', 'get')
g.command('list', 'list_by_server')

with self.command_group('mysql server configuration', mysql_config_sdk) as g:
g.command('set', 'create_or_update')
with self.command_group('mysql server configuration', mysql_config_sdk,
client_factory=cf_mysql_config, custom_command_type=rdbms_custom) as g:
g.custom_command('set', '_configuration_update')
g.show_command('show', 'get')
g.command('list', 'list_by_server')

with self.command_group('postgres server configuration', postgres_config_sdk) as g:
g.command('set', 'create_or_update')
with self.command_group('postgres server configuration', postgres_config_sdk,
client_factory=cf_postgres_config, custom_command_type=rdbms_custom) as g:
g.custom_command('set', '_configuration_update')
g.show_command('show', 'get')
g.command('list', 'list_by_server')

with self.command_group('mariadb server-logs', mariadb_log_sdk, client_factory=cf_mariadb_log) as g:
with self.command_group('mariadb server-logs', mariadb_log_sdk, client_factory=cf_mariadb_log,) as g:
g.custom_command('list', '_list_log_files_with_filter')
g.custom_command('download', '_download_log_files')

Expand All @@ -383,21 +401,24 @@ def load_command_table(self, _):
g.custom_command('list', '_list_log_files_with_filter')
g.custom_command('download', '_download_log_files')

with self.command_group('mariadb db', mariadb_db_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('mariadb db', mariadb_db_sdk,
client_factory=cf_mariadb_db, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_db_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')

with self.command_group('mysql db', mysql_db_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('mysql db', mysql_db_sdk,
client_factory=cf_mysql_db, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_db_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')

with self.command_group('postgres db', postgres_db_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
with self.command_group('postgres db', postgres_db_sdk,
client_factory=cf_postgres_db, custom_command_type=rdbms_custom) as g:
g.custom_command('create', '_db_create')
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.command('list', 'list_by_server')

Expand All @@ -408,7 +429,7 @@ def load_command_table(self, _):
validator=validate_private_endpoint_connection_id)
g.custom_command('reject', 'reject_private_endpoint_connection',
validator=validate_private_endpoint_connection_id)
g.command('delete', 'delete', validator=validate_private_endpoint_connection_id)
g.command('delete', 'begin_delete', validator=validate_private_endpoint_connection_id)
g.show_command('show', 'get', validator=validate_private_endpoint_connection_id)

with self.command_group('mariadb server private-link-resource',
Expand All @@ -423,7 +444,7 @@ def load_command_table(self, _):
validator=validate_private_endpoint_connection_id)
g.custom_command('reject', 'reject_private_endpoint_connection',
validator=validate_private_endpoint_connection_id)
g.command('delete', 'delete', validator=validate_private_endpoint_connection_id)
g.command('delete', 'begin_delete', validator=validate_private_endpoint_connection_id)
g.show_command('show', 'get', validator=validate_private_endpoint_connection_id)

with self.command_group('mysql server private-link-resource',
Expand All @@ -438,7 +459,7 @@ def load_command_table(self, _):
validator=validate_private_endpoint_connection_id)
g.custom_command('reject', 'reject_private_endpoint_connection',
validator=validate_private_endpoint_connection_id)
g.command('delete', 'delete', validator=validate_private_endpoint_connection_id)
g.command('delete', 'begin_delete', validator=validate_private_endpoint_connection_id)
g.show_command('show', 'get', validator=validate_private_endpoint_connection_id)

with self.command_group('postgres server private-link-resource',
Expand All @@ -448,7 +469,7 @@ def load_command_table(self, _):

with self.command_group('mysql server key',
mysql_key_sdk,
client_factory=cf_mysql_server_keys_operations) as g:
client_factory=cf_mysql_server_keys_operations, custom_command_type=rdbms_custom) as g:
g.custom_command('create', 'server_key_create')
g.custom_command('delete', 'server_key_delete', confirmation=True)
g.custom_show_command('show', 'server_key_get')
Expand All @@ -467,7 +488,7 @@ def load_command_table(self, _):
client_factory=cf_mysql_server_ad_administrators_operations) as g:
g.custom_command('create', 'server_ad_admin_set', supports_no_wait=True)
g.command('list', 'list')
g.command('delete', 'delete', confirmation=True)
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.custom_wait_command('wait', 'server_ad_admin_get')
g.wait_command('wait')
Expand All @@ -477,7 +498,7 @@ def load_command_table(self, _):
client_factory=cf_postgres_server_ad_administrators_operations) as g:
g.custom_command('create', 'server_ad_admin_set', supports_no_wait=True)
g.command('list', 'list')
g.command('delete', 'delete', confirmation=True)
g.command('delete', 'begin_delete', confirmation=True)
g.show_command('show', 'get')
g.wait_command('wait')

Expand Down
Loading