Skip to content

Commit 6830e01

Browse files
authored
[counterpoll]Fixing counterpoll show for tunnel and acl stats (sonic-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.
1 parent 3be2ad7 commit 6830e01

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

counterpoll/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ def show():
419419
if buffer_pool_wm_info:
420420
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)])
421421
if acl_info:
422-
data.append([ACL, pg_drop_info.get("POLL_INTERVAL", DEFLT_10_SEC), acl_info.get("FLEX_COUNTER_STATUS", DISABLE)])
422+
data.append([ACL, acl_info.get("POLL_INTERVAL", DEFLT_10_SEC), acl_info.get("FLEX_COUNTER_STATUS", DISABLE)])
423423
if tunnel_info:
424-
data.append(["TUNNEL_STAT", rif_info.get("POLL_INTERVAL", DEFLT_10_SEC), rif_info.get("FLEX_COUNTER_STATUS", DISABLE)])
424+
data.append(["TUNNEL_STAT", tunnel_info.get("POLL_INTERVAL", DEFLT_10_SEC), tunnel_info.get("FLEX_COUNTER_STATUS", DISABLE)])
425425
if trap_info:
426426
data.append(["FLOW_CNT_TRAP_STAT", trap_info.get("POLL_INTERVAL", DEFLT_10_SEC), trap_info.get("FLEX_COUNTER_STATUS", DISABLE)])
427427
if route_info:

tests/counterpoll_test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
QUEUE_WATERMARK_STAT default (60000) enable
2626
PG_WATERMARK_STAT default (60000) enable
2727
PG_DROP_STAT 10000 enable
28-
ACL 10000 enable
28+
ACL 5000 enable
29+
TUNNEL_STAT 3000 enable
2930
FLOW_CNT_TRAP_STAT 10000 enable
3031
FLOW_CNT_ROUTE_STAT 10000 enable
3132
"""

tests/mock_tables/config_db.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,11 @@
16641664
"FLEX_COUNTER_STATUS": "enable"
16651665
},
16661666
"FLEX_COUNTER_TABLE|ACL": {
1667-
"POLL_INTERVAL": "10000",
1667+
"POLL_INTERVAL": "5000",
1668+
"FLEX_COUNTER_STATUS": "enable"
1669+
},
1670+
"FLEX_COUNTER_TABLE|TUNNEL": {
1671+
"POLL_INTERVAL": "3000",
16681672
"FLEX_COUNTER_STATUS": "enable"
16691673
},
16701674
"FLEX_COUNTER_TABLE|FLOW_CNT_TRAP": {

0 commit comments

Comments
 (0)