Skip to content

Commit

Permalink
[enable_counters] Set default values only on the first start
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Yurkiv <[email protected]>
  • Loading branch information
ayurkiv-nvda committed May 26, 2022
1 parent 78294af commit 4d3771c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
import time

def enable_counter_group(db, name):
info = {}
info['FLEX_COUNTER_STATUS'] = 'enable'
db.mod_entry("FLEX_COUNTER_TABLE", name, info)
entry_info = db.get_entry("FLEX_COUNTER_TABLE", name)

if not entry_info:
info = {}
info['FLEX_COUNTER_STATUS'] = 'enable'
db.mod_entry("FLEX_COUNTER_TABLE", name, info)

def enable_counters():
db = swsssdk.ConfigDBConnector()
Expand Down

0 comments on commit 4d3771c

Please sign in to comment.