Skip to content

Commit

Permalink
Hide mysql/postgres db create/delete/show (Azure#5277)
Browse files Browse the repository at this point in the history
* Hide mysql/postgres db create/delete/show

* Address pylint
  • Loading branch information
derekbekoe authored Jan 11, 2018
1 parent d93f0af commit 05aa2a1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/command_modules/azure-cli-rdbms/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Release History

0.0.11
++++++
* Updated helpfile
* Minor fixes.

0.0.10
++++++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from knack.help_files import helps

# pylint: disable=line-too-long


def add_helps(command_group, server_type):
helps['{}'.format(command_group)] = """
Expand Down Expand Up @@ -146,23 +148,23 @@ def add_helps(command_group, server_type):
type: group
short-summary: Manage {0} databases on a server.
""".format(server_type)
helps['{} db create'.format(command_group)] = """
type: command
short-summary: Create a {0} database.
examples:
- name: Create database 'testdb' in the server 'testsvr' with the default parameters.
text: az {1} db create -g testgroup -s testsvr -n testdb
- name: Create database 'testdb' in server 'testsvr' with a given character set and collation rules.
text: az {1} db create -g testgroup -s testsvr -n testdb --charset <valid_charset> --collation <valid_collation>
""".format(server_type, command_group)
helps['{} db delete'.format(command_group)] = """
type: command
short-summary: Delete a database.
"""
helps['{} db show'.format(command_group)] = """
type: command
short-summary: Show the details of a database.
"""
# helps['{} db create'.format(command_group)] = """
# type: command
# short-summary: Create a {0} database.
# examples:
# - name: Create database 'testdb' in the server 'testsvr' with the default parameters.
# text: az {1} db create -g testgroup -s testsvr -n testdb
# - name: Create database 'testdb' in server 'testsvr' with a given character set and collation rules.
# text: az {1} db create -g testgroup -s testsvr -n testdb --charset <valid_charset> --collation <valid_collation>
# """.format(server_type, command_group)
# helps['{} db delete'.format(command_group)] = """
# type: command
# short-summary: Delete a database.
# """
# helps['{} db show'.format(command_group)] = """
# type: command
# short-summary: Show the details of a database.
# """
helps['{} db list'.format(command_group)] = """
type: command
short-summary: List the databases for a server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ def load_command_table(self, _):
g.custom_command('download', '_download_log_files')

with self.command_group('mysql db', mysql_db_sdk) as g:
g.command('create', 'create_or_update')
g.command('delete', 'delete', confirmation=True)
g.command('show', 'get')
# g.command('create', 'create_or_update')
# g.command('delete', 'delete', confirmation=True)
# g.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)
g.command('show', 'get')
# g.command('create', 'create_or_update')
# g.command('delete', 'delete', confirmation=True)
# g.command('show', 'get')
g.command('list', 'list_by_server')

0 comments on commit 05aa2a1

Please sign in to comment.