Skip to content

Commit

Permalink
Set default values only on the first start (#7735)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayurkiv-nvda authored and qiluo-msft committed Jun 16, 2021
1 parent 15bc3c3 commit 2fe91ae
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dockers/docker-orchagent/enable_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@


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_rates():
# set the default interval for rates
Expand Down

0 comments on commit 2fe91ae

Please sign in to comment.