Skip to content

Commit

Permalink
[yang] Added Tunnel flex counter group (sonic-net#13483)
Browse files Browse the repository at this point in the history
- Why I did it
Fixes sonic-net#13457
Added Tunnel flex counter group

- How I did it
Added relevant container in sonic-flex_counter yang model

- How to verify it
Added UT to verify
  • Loading branch information
dgsudharsan authored Jan 25, 2023
1 parent 78f249b commit 03348c4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 11 deletions.
29 changes: 18 additions & 11 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -913,17 +913,24 @@ instance is supported in SONiC.

```
{
"FLEX_COUNTER_TABLE": {
"PFCWD": {
"FLEX_COUNTER_STATUS": "enable"
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable"
}
}
"FLEX_COUNTER_TABLE": {
"PFCWD": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"PORT": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "1000"
},
"QUEUE": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"TUNNEL": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
}
}
}
```
Expand Down
4 changes: 4 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,10 @@
"FLOW_CNT_ROUTE": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
},
"TUNNEL": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": "10000"
}
},
"FLOW_COUNTER_ROUTE_PATTERN": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"TUNNEL": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
},
"FLOW_CNT_TRAP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 10000
Expand Down Expand Up @@ -98,6 +102,10 @@
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"TUNNEL": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
},
"FLOW_CNT_TRAP": {
"FLEX_COUNTER_STATUS": "enable",
"POLL_INTERVAL": 99
Expand Down
13 changes: 13 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-flex_counter.yang
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,19 @@ module sonic-flex_counter {
}
}

container TUNNEL {
/* TUNNEL_STAT_COUNTER_FLEX_COUNTER_GROUP */
leaf FLEX_COUNTER_STATUS {
type flex_status;
}
leaf FLEX_COUNTER_DELAY_STATUS {
type flex_delay_status;
}
leaf POLL_INTERVAL {
type poll_interval;
}
}

}
/* end of container FLEX_COUNTER_TABLE */

Expand Down

0 comments on commit 03348c4

Please sign in to comment.