Skip to content

[RDBMS] Add List-SKUS Command, Table Transformers, Local Context for Postgres, MySQL, Mariadb Single Server - #15450

Merged
Zunli Hu (Juliehzl) merged 6 commits into
Azure:devfrom
DaeunYim:daeunyim/sterling-s177
Oct 20, 2020
Merged

[RDBMS] Add List-SKUS Command, Table Transformers, Local Context for Postgres, MySQL, Mariadb Single Server#15450
Zunli Hu (Juliehzl) merged 6 commits into
Azure:devfrom
DaeunYim:daeunyim/sterling-s177

Conversation

@DaeunYim

@DaeunYim Daeun Yim (DaeunYim) commented Oct 9, 2020

Copy link
Copy Markdown
Contributor

Description

  1. Added list-skus commands for single server Postgres and MySQL
  2. Added table transformers for list-skus and server list commands
  3. Added local-context support for single server

Testing Guide

  1. List-skus command: run with the below commands
  • az postgres server list-skus -l eastus -o table
  • az mysql server list-skus -l eastus -o table
  • az mariadb server list-skus -l eastus -o table
  1. server list command: run with the below commands
  • az postgres server list -g <group_name> -n <server_name> -o table
  • az mysql server list -g <group_name> -n <server_name> -o table
  • az mariadb server list -g <group_name> -n <server_name> -o table
  1. local context command:
    az config param-persist on
  • az postgres -h and run commands to check if server name argument is included in the local context
    e.g.) az postgres server create -g <group_name> -n <server_name> -l => az postgres server show

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

@yonzhan

Copy link
Copy Markdown
Collaborator

RDBMS

Comment thread src/azure-cli/azure/cli/command_modules/rdbms/_transformers.py
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/_client_factory.py
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/_help.py
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/commands.py
@DaeunYim

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 15450 in repo Azure/azure-cli

@DaeunYim Daeun Yim (DaeunYim) changed the title [RDBMS] Add List-SKUS Command, Table Transformers, Local Context for Postgres and MySQL Single Server [RDBMS] Add List-SKUS Command, Table Transformers, Local Context for Postgres, MySQL, Mariadb Single Server Oct 12, 2020
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/_help.py Outdated
Comment on lines +35 to +43
server_name_help = "Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. " + \
"Minimum 3 characters and maximum 63 characters."
server_name_scope = ['{}'.format(command_group)]
server_name_setter_arg_type = CLIArgumentType(metavar='NAME', help=server_name_help, id_part='name',
local_context_attribute=LocalContextAttribute(name='server_name', actions=[LocalContextAction.SET], scopes=server_name_scope))
server_name_getter_arg_type = CLIArgumentType(metavar='NAME', help=server_name_help, id_part='name',
local_context_attribute=LocalContextAttribute(name='server_name', actions=[LocalContextAction.GET], scopes=server_name_scope))
server_name_arg_type = CLIArgumentType(metavar='NAME', help=server_name_help, id_part='name',
local_context_attribute=LocalContextAttribute(name='server_name', actions=[LocalContextAction.SET, LocalContextAction.GET], scopes=server_name_scope))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xiaojian Xu (@arrownj) could you help with local context part?

Comment thread src/azure-cli/azure/cli/command_modules/rdbms/commands.py
Comment thread src/azure-cli/azure/cli/command_modules/rdbms/commands.py

@arrownj Xiaojian Xu (arrownj) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for local context part.

@Juliehzl Zunli Hu (Juliehzl) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for command design

@haroldrandom Harold Ran (haroldrandom) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will merge once arde0708 approve

@arde0708

Copy link
Copy Markdown
Contributor

will merge once arde0708 approve

Done

@Juliehzl
Zunli Hu (Juliehzl) merged commit 72850c4 into Azure:dev Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants