Skip to content

Commit

Permalink
{SQL} fix az sql server ad-admin update , az sql server ad-admin crea…
Browse files Browse the repository at this point in the history
…te calls (#12541)

* Fixing az sql server ad-admin update and az sql server ad-admin create.
Adding test recording too.

* update the comments

* Revert update changes and fix it to have generic parameters. re-record test

* change aad create from properties to parameters

* remove spaces.

* Removing comment for issue #6011 as tests are recorded now.

* Fixing styling issues

Co-authored-by: Amol Agarwal <amagarwa@microsoft.com>
  • Loading branch information
amolagar5 and amolagar5 authored Mar 16, 2020
1 parent 74d9ee5 commit e6c3bdc
Show file tree
Hide file tree
Showing 5 changed files with 973 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/sql/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ def _configure_security_policy_storage_params(arg_ctx):
with self.argument_context('sql server ad-admin create') as c:
# Create args that will be used to build up the ServerAzureADAdministrator object
create_args_for_complex_type(
c, 'properties', ServerAzureADAdministrator, [
c, 'parameters', ServerAzureADAdministrator, [
'login',
'sid',
])
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/sql/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def load_command_table(self, _):
g.command('delete', 'delete')
g.generic_update_command('update',
custom_func_name='server_ad_admin_update',
setter_arg_name='properties')
setter_arg_name='parameters')

server_keys_operations = CliCommandType(
operations_tmpl='azure.mgmt.sql.operations#ServerKeysOperations.{}',
Expand Down
3 changes: 1 addition & 2 deletions src/azure-cli/azure/cli/command_modules/sql/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2071,7 +2071,7 @@ def server_ad_admin_set(
return client.create_or_update(
server_name=server_name,
resource_group_name=resource_group_name,
properties=kwargs)
parameters=kwargs)


def server_ad_admin_update(
Expand All @@ -2090,7 +2090,6 @@ def server_ad_admin_update(

return instance


#####
# sql server firewall-rule
#####
Expand Down
Loading

0 comments on commit e6c3bdc

Please sign in to comment.