Skip to content

Commit

Permalink
[pfcwd]:enable/disable counter poll (#273)
Browse files Browse the repository at this point in the history
Signed-off-by: Sihui Han <sihan@microsoft.com>
  • Loading branch information
sihuihan88 authored Jun 26, 2018
1 parent b90a504 commit 7c34641
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pfcwd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,17 @@ def start_default():
pfcwd_info['POLL_INTERVAL'] = DEFAULT_POLL_INTERVAL * multiply
configdb.mod_entry("PFC_WD_TABLE", "GLOBAL", pfcwd_info)

# Enable/disable PFC WD counter polling
@cli.command()
@click.argument('counter_poll', type=click.Choice(['enable', 'disable']))
def counter_poll(big_red_switch):
""" Enable/disable counter polling """
configdb = swsssdk.ConfigDBConnector()
configdb.connect()
pfcwd_info = {}
pfcwd_info['FLEX_COUNTER_STATUS'] = counter_poll
configdb.mod_entry("FLEX_COUNTER_TABLE", "PFCWD", pfcwd_info)

# Enable/disable PFC WD BIG_RED_SWITCH mode
@cli.command()
@click.argument('big_red_switch', type=click.Choice(['enable', 'disable']))
Expand Down

0 comments on commit 7c34641

Please sign in to comment.