diff --git a/admin/client/admin_client.py b/admin/client/admin_client.py index f0701bf7c..891a395f1 100644 --- a/admin/client/admin_client.py +++ b/admin/client/admin_client.py @@ -300,6 +300,43 @@ def encode_to_base64(input_string): return base64_encoded.decode("utf-8") +def show_help(): + """Help info""" + help_text = """ +Commands: +LIST SERVICES +SHOW SERVICE +STARTUP SERVICE +SHUTDOWN SERVICE +RESTART SERVICE +LIST USERS +SHOW USER +DROP USER +CREATE USER +ALTER USER PASSWORD +ALTER USER ACTIVE +LIST DATASETS OF +LIST AGENTS OF +CREATE ROLE +DROP ROLE +ALTER ROLE SET DESCRIPTION +LIST ROLES +SHOW ROLE +GRANT ON TO ROLE +REVOKE ON TO ROLE +ALTER USER SET ROLE +SHOW USER PERMISSION +SHOW VERSION +GRANT ADMIN +REVOKE ADMIN + +Meta Commands: +\\?, \\h, \\help Show this help +\\q, \\quit, \\exit Quit the CLI + """ + print(help_text) + + class AdminCLI(Cmd): def __init__(self): super().__init__() @@ -918,36 +955,12 @@ class AdminCLI(Cmd): args = command.get("args", []) if meta_command in ["?", "h", "help"]: - self.show_help() + show_help() elif meta_command in ["q", "quit", "exit"]: print("Goodbye!") else: print(f"Meta command '{meta_command}' with args {args}") - def show_help(self): - """Help info""" - help_text = """ -Commands: - LIST SERVICES - SHOW SERVICE - STARTUP SERVICE - SHUTDOWN SERVICE - RESTART SERVICE - LIST USERS - SHOW USER - DROP USER - CREATE USER - ALTER USER PASSWORD - ALTER USER ACTIVE - LIST DATASETS OF - LIST AGENTS OF - -Meta Commands: - \\?, \\h, \\help Show this help - \\q, \\quit, \\exit Quit the CLI - """ - print(help_text) - def main(): import sys