Skip to content

Commit b6cdd80

Browse files
authored
[202205][yang] add Yang model for MUX_LINKMGR|LINK_PROBER (#15384) (#15607)
* [yang] add Yang model for `MUX_LINKMGR|LINK_PROBER` (#15384) Add yang model for MUX_LINKMGR|LINK_PROBER table. sign-off: [email protected]
1 parent 386ce28 commit b6cdd80

File tree

6 files changed

+156
-0
lines changed

6 files changed

+156
-0
lines changed

src/sonic-yang-models/doc/Configuration.md

+20
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Table of Contents
3838
* [Management VRF](#management-vrf)
3939
* [MAP_PFC_PRIORITY_TO_QUEUE](#map_pfc_priority_to_queue)
4040
* [MUX_CABLE](#muxcable)
41+
* [MUX_LINKMGR](#mux_linkmgr)
4142
* [NTP Global Configuration](#ntp-global-configuration)
4243
* [NTP and SYSLOG servers](#ntp-and-syslog-servers)
4344
* [Peer Switch](#peer-switch)
@@ -1149,6 +1150,25 @@ The **MUX_CABLE** table is used for dualtor interface configuration. The `cable_
11491150
}
11501151
```
11511152

1153+
### MUX_LINKMGR
1154+
The **MUX_LINKMGR** table is used for dualtor device configuration.
1155+
```
1156+
{
1157+
"MUX_LINKMGR": {
1158+
"LINK_PROBER": {
1159+
"interval_v4": "100",
1160+
"interval_v6": "1000",
1161+
"positive_signal_count": "1",
1162+
"negative_signal_count": "3",
1163+
"suspend_timer": "500",
1164+
"use_well_known_mac": "enabled",
1165+
"src_mac": "ToRMac",
1166+
"interval_pck_loss_count_update": "3"
1167+
}
1168+
}
1169+
}
1170+
```
1171+
11521172
### NTP Global Configuration
11531173

11541174
These configuration options are used to modify the way that

src/sonic-yang-models/setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def run(self):
118118
'./yang-models/sonic-mgmt_vrf.yang',
119119
'./yang-models/sonic-mirror-session.yang',
120120
'./yang-models/sonic-mux-cable.yang',
121+
'./yang-models/sonic-mux-linkmgr.yang',
121122
'./yang-models/sonic-ntp.yang',
122123
'./yang-models/sonic-nat.yang',
123124
'./yang-models/sonic-nvgre-tunnel.yang',

src/sonic-yang-models/tests/files/sample_config_db.json

+13
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,19 @@
18271827
}
18281828
},
18291829

1830+
"MUX_LINKMGR": {
1831+
"LINK_PROBER": {
1832+
"interval_v4": "100",
1833+
"interval_v6": "1000",
1834+
"positive_signal_count": "1",
1835+
"negative_signal_count": "3",
1836+
"suspend_timer": "500",
1837+
"use_well_known_mac": "enabled",
1838+
"src_mac": "ToRMac",
1839+
"interval_pck_loss_count_update": "3"
1840+
}
1841+
},
1842+
18301843

18311844
"POLICER": {
18321845
"everflow_static_policer": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"MUX_LINKMGR_LINK_PROBER_INTERVAL_CHANGE": {
3+
"desc": "Consume ICMP heartbeat interval and timeout config changes. "
4+
},
5+
"MUX_LINKMGR_LINK_PROBER_CHANGE_MAC_ADDR": {
6+
"desc": "Use well-known mac and vlan mac as dst/src in linkmgrd link prober. "
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"MUX_LINKMGR_LINK_PROBER_INTERVAL_CHANGE": {
3+
"sonic-mux-linkmgr:sonic-mux-linkmgr": {
4+
"sonic-mux-linkmgr:MUX_LINKMGR": {
5+
"sonic-mux-linkmgr:LINK_PROBER":
6+
{
7+
"interval_v4": "1000",
8+
"interval_v6": "10000",
9+
"positive_signal_count": 3,
10+
"negative_signal_count": 9
11+
}
12+
}
13+
}
14+
},
15+
"MUX_LINKMGR_LINK_PROBER_CHANGE_MAC_ADDR": {
16+
"sonic-mux-linkmgr:sonic-mux-linkmgr": {
17+
"sonic-mux-linkmgr:MUX_LINKMGR": {
18+
"sonic-mux-linkmgr:LINK_PROBER":
19+
{
20+
"use_well_known_mac": "enabled",
21+
"src_mac": "VlanMac"
22+
}
23+
}
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
module sonic-mux-linkmgr {
2+
namespace "http://github.com/sonic-net/sonic-mux-linkmgr";
3+
prefix mux_linkmgr;
4+
yang-version 1.1;
5+
6+
organization
7+
"SONiC";
8+
9+
contact
10+
"SONiC";
11+
12+
description
13+
"SONiC DualToR Linkmgrd configuration data";
14+
15+
revision 2023-06-07 {
16+
description
17+
"Initial revision";
18+
}
19+
20+
container sonic-mux-linkmgr {
21+
22+
container MUX_LINKMGR {
23+
24+
container LINK_PROBER {
25+
26+
leaf interval_v4 {
27+
type uint32;
28+
default 100;
29+
units milliseconds;
30+
31+
description "IPv4 ICMP heartbeat interval. ";
32+
}
33+
34+
leaf interval_v6 {
35+
type uint32;
36+
default 1000;
37+
units milliseconds;
38+
39+
description "IPv6 ICMP heartbeat interval. ";
40+
}
41+
42+
leaf positive_signal_count {
43+
type uint32;
44+
default 1;
45+
46+
description "Linkmgrd positive signal count. ";
47+
}
48+
49+
leaf negative_signal_count {
50+
type uint32;
51+
default 3;
52+
53+
description "Linkmgrd negative signal count. ";
54+
}
55+
56+
leaf suspend_timer {
57+
type uint32;
58+
59+
description "ICMP heartbeat suspending timer, currently not in use. ";
60+
}
61+
62+
leaf use_well_known_mac {
63+
type enumeration {
64+
enum enabled;
65+
enum disabled;
66+
}
67+
68+
description "ICMP heartbeat use well known mac as dst mac or not. ";
69+
}
70+
71+
leaf src_mac {
72+
type enumeration {
73+
enum ToRMac;
74+
enum VlanMac;
75+
}
76+
77+
description "ICMP heartbeat use what mac as src mac. ";
78+
}
79+
80+
leaf interval_pck_loss_count_update {
81+
type uint32;
82+
83+
description "The frequency of streaming ICMP heartbeat loss data to telemetry. ";
84+
}
85+
}
86+
}
87+
}
88+
}

0 commit comments

Comments
 (0)