Skip to content

Commit

Permalink
show auto_ts history added
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy Karri <[email protected]>
  • Loading branch information
vivekrnv committed Aug 19, 2021
1 parent c446e5f commit a5cf16e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions show/plugins/auto_techsupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,20 @@ def AUTO_TECHSUPPORT_global(db):
{'name': 'since', 'description': '', 'is-leaf-list': False, 'is-mandatory': False, 'group': ''}
),
]

body.append(row)
click.echo(tabulate.tabulate(body, header))



@AUTO_TECHSUPPORT.command(name="history")
@clicommon.pass_db
def AUTO_TECHSUPPORT_history(db):
fv = db.db.get_all("STATE_DB", "AUTO_TECHSUPPORT|TS_CORE_MAP")
header = ["Techsupport Dump", "Triggered By", "Critical Process"]
body = []
for field, value in fv.items():
core_dump, _, supervisor_crit_proc = value.split(";")
body.append([field, core_dump, supervisor_crit_proc])
click.echo(tabulate.tabulate(body, header))


def register(cli):
Expand Down

0 comments on commit a5cf16e

Please sign in to comment.