From e84f13161a18dd7c0ac273d20a3949ee93c07e48 Mon Sep 17 00:00:00 2001 From: lulzette Date: Sun, 10 Jul 2022 04:11:24 +0300 Subject: [PATCH] Added '--raw' option to dbs list --- twvdscli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twvdscli.py b/twvdscli.py index a2ef53d..0609705 100644 --- a/twvdscli.py +++ b/twvdscli.py @@ -429,12 +429,15 @@ def dbs_create(passwd: str = typer.Option(..., help="DB password"), @dbs_app.command("list") -def dbs_list(): +def dbs_list(raw: bool = typer.Option(False, help="Get result as raw json")): """ Show list of DBs: ID, State, Name, IP, local IP, Password, Type """ list_of_dbaas = Dbaas.list() + if raw: + print(list_of_dbaas) + return x = PrettyTable() x.field_names = ['id', 'state', 'name', 'ip', 'local_ip', 'password', 'type'] if list_of_dbaas is None: