Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YANG model for enabling fabric monitor attribute #19767

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/sonic-config-engine/tests/test_cfggen_from_yang.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ def test_fabric_monitor_data_table(self):
"monErrThreshCrcCells": "1",
"monErrThreshRxCells": "61035156",
"monPollThreshIsolation": "1",
"monPollThreshRecovery": "8"
"monPollThreshRecovery": "8",
"monCapacityThreshWarn": "10",
"monState": "enable"
}
})

Expand All @@ -283,6 +285,7 @@ def test_fabric_port_table(self):
"Fabric0": {
"alias": "Fabric0",
"isolateStatus": "False",
"lanes": "0"
"lanes": "0",
"forceUnisolateStatus": "0"
}
})
7 changes: 5 additions & 2 deletions src/sonic-config-engine/tests/test_yang_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@
"monErrThreshCrcCells": "1",
"monErrThreshRxCells": "61035156",
"monPollThreshIsolation": "1",
"monPollThreshRecovery": "8"
"monPollThreshRecovery": "8",
"monCapacityThreshWarn": "10",
"monState": "enable"
}
}
},
Expand All @@ -389,7 +391,8 @@
"name": "Fabric0",
"alias": "Fabric0",
"isolateStatus": "False",
"lanes": "0"
"lanes": "0",
"forceUnisolateStatus": "0"
}
]
}
Expand Down
10 changes: 7 additions & 3 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,9 @@ The FG_NHG_PREFIX table provides the FG_NHG_PREFIX for which FG behavior is desi
"monErrThreshCrcCells": "1",
"monErrThreshRxCells": "61035156",
"monPollThreshIsolation": "1",
"monPollThreshRecovery": "8"
"monPollThreshRecovery": "8",
"monCapacityThreshWarn": "10",
"monState": "enable"
}
}
}
Expand All @@ -1211,12 +1213,14 @@ The FG_NHG_PREFIX table provides the FG_NHG_PREFIX for which FG behavior is desi
"Fabric0": {
"alias": "Fabric0",
"isolateStatus": "False",
"lanes": "0"
"lanes": "0",
"forceUnisolateStatus": "0"
},
"Fabric1": {
"alias": "Fabric1",
"isolateStatus": "False",
"lanes": "1"
"lanes": "1",
"forceUnisolateStatus": "0"
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1378,19 +1378,23 @@
"monErrThreshCrcCells": "1",
"monErrThreshRxCells": "61035156",
"monPollThreshIsolation": "1",
"monPollThreshRecovery": "8"
"monPollThreshRecovery": "8",
"monCapacityThreshWarn": "10",
"monState": "enable"
}
},
"FABRIC_PORT": {
"Fabric0": {
"alias": "Fabric0",
"isolateStatus": "False",
"lanes": "0"
"lanes": "0",
"forceUnisolateStatus": "0"
},
"Fabric1": {
"alias": "Fabric1",
"isolateStatus": "False",
"lanes": "1"
"lanes": "1",
"forceUnisolateStatus": "0"
}
},
"FLEX_COUNTER_TABLE": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"monErrThreshCrcCells": "1",
"monErrThreshRxCells": "61035156",
"monPollThreshIsolation": "1",
"monPollThreshRecovery": "8"
"monPollThreshRecovery": "8",
"monCapacityThreshWarn": "10",
"monState": "enable"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"name": "Fabric0",
"alias": "Fabric0",
"isolateStatus": "False",
"lanes": "0"
"lanes": "0",
"forceUnisolateStatus": "0"
}
]
}
Expand Down
18 changes: 16 additions & 2 deletions src/sonic-yang-models/yang-models/sonic-fabric-monitor.yang
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,31 @@ module sonic-fabric-monitor{
}

leaf monPollThreshIsolation {
type uint32;
type uint8;
jfeng-arista marked this conversation as resolved.
Show resolved Hide resolved
default 1;
description "Consecutive polls with higher error rate for isolation.";
}

leaf monPollThreshRecovery {
type uint32;
type uint8;
default 8;
description "Consecutive polls with lesser error rate for inclusion.";
}

leaf monCapacityThreshWarn {
type uint8;
default 10;
description "Percentage of up fabric links.";
jfeng-arista marked this conversation as resolved.
Show resolved Hide resolved
}

leaf monState {
description "Configuration to set fabric link monitoring state: enable/disable";
type string {
jfeng-arista marked this conversation as resolved.
Show resolved Hide resolved
jfeng-arista marked this conversation as resolved.
Show resolved Hide resolved
length 1..32;
pattern "enable|disable";
}
}

} /* end of container FABRIC_MONITOR_DATA */

} /* end of container FABRIC_MONITOR */
Expand Down
6 changes: 6 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-fabric-port.yang
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ module sonic-fabric-port{
}
}

leaf forceUnisolateStatus {
jfeng-arista marked this conversation as resolved.
Show resolved Hide resolved
description "Force unisolate status of a fabric port";
type uint32;
default 0;
}

} /* end of list FABRIC_PORT_LIST */

} /* end of container FABRIC_PORT */
Expand Down
Loading