Skip to content

Commit f51544a

Browse files
pra-mohjleveque
authored andcommitted
[show] Add 'features' subcommand to display status for optional features (#712)
1 parent dcf9520 commit f51544a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

show/main.py

+16
Original file line numberDiff line numberDiff line change
@@ -2389,5 +2389,21 @@ def tablelize(keys, data, enable_table_keys, prefix):
23892389
click.echo(tabulate(tablelize(keys, data, enable_table_keys, prefix), header))
23902390
state_db.close(state_db.STATE_DB)
23912391

2392+
#
2393+
# show features
2394+
#
2395+
2396+
@cli.command('features')
2397+
def features():
2398+
"""Show status of optional features"""
2399+
config_db = ConfigDBConnector()
2400+
config_db.connect()
2401+
header = ['Feature', 'Status']
2402+
body = []
2403+
status_data = config_db.get_table('FEATURE')
2404+
for key in status_data.keys():
2405+
body.append([key, status_data[key]['status']])
2406+
click.echo(tabulate(body, header))
2407+
23922408
if __name__ == '__main__':
23932409
cli()

0 commit comments

Comments
 (0)