Skip to content

Commit

Permalink
[counterpoll]Fixing counterpoll show for tunnel and acl stats (sonic-…
Browse files Browse the repository at this point in the history
…net#2355)

- What I did
Fixing counterpoll show for tunnel and acl stats.

- How I did it
Corrected the copy paste errors.

- How to verify it
Updated test config and UT to verify it.
  • Loading branch information
dgsudharsan authored and mdanish-kh committed Oct 22, 2022
1 parent e9881dd commit 00d27a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions counterpoll/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ def show():
if buffer_pool_wm_info:
data.append(["BUFFER_POOL_WATERMARK_STAT", buffer_pool_wm_info.get("POLL_INTERVAL", DEFLT_60_SEC), buffer_pool_wm_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if acl_info:
data.append([ACL, pg_drop_info.get("POLL_INTERVAL", DEFLT_10_SEC), acl_info.get("FLEX_COUNTER_STATUS", DISABLE)])
data.append([ACL, acl_info.get("POLL_INTERVAL", DEFLT_10_SEC), acl_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if tunnel_info:
data.append(["TUNNEL_STAT", rif_info.get("POLL_INTERVAL", DEFLT_10_SEC), rif_info.get("FLEX_COUNTER_STATUS", DISABLE)])
data.append(["TUNNEL_STAT", tunnel_info.get("POLL_INTERVAL", DEFLT_10_SEC), tunnel_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if trap_info:
data.append(["FLOW_CNT_TRAP_STAT", trap_info.get("POLL_INTERVAL", DEFLT_10_SEC), trap_info.get("FLEX_COUNTER_STATUS", DISABLE)])
if route_info:
Expand Down
3 changes: 2 additions & 1 deletion tests/counterpoll_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
QUEUE_WATERMARK_STAT default (60000) enable
PG_WATERMARK_STAT default (60000) enable
PG_DROP_STAT 10000 enable
ACL 10000 enable
ACL 5000 enable
TUNNEL_STAT 3000 enable
FLOW_CNT_TRAP_STAT 10000 enable
FLOW_CNT_ROUTE_STAT 10000 enable
"""
Expand Down
6 changes: 5 additions & 1 deletion tests/mock_tables/config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,11 @@
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|ACL": {
"POLL_INTERVAL": "10000",
"POLL_INTERVAL": "5000",
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|TUNNEL": {
"POLL_INTERVAL": "3000",
"FLEX_COUNTER_STATUS": "enable"
},
"FLEX_COUNTER_TABLE|FLOW_CNT_TRAP": {
Expand Down

0 comments on commit 00d27a3

Please sign in to comment.