Skip to content

Commit

Permalink
[yang] Update sonic-port yang model to support auto FEC (#16389)
Browse files Browse the repository at this point in the history
To support 'auto' configuration option for FEC in yang model
  • Loading branch information
dgsudharsan authored and pull[bot] committed May 7, 2024
1 parent a67504a commit 6bafea4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
"alias": "Eth31/1",
"lanes": "121,122",
"description": "",
"fec": "fc",
"fec": "auto",
"speed": "11100",
"tpid": "0x8100",
"admin_status": "up"
Expand Down
3 changes: 3 additions & 0 deletions src/sonic-yang-models/tests/yang_model_tests/tests/port.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,8 @@
"desc": "Out of range subport number",
"eStrKey": "Range",
"eStr": "0..8"
},
"PORT_AUTO_FEC_TEST": {
"desc": "PORT_AUTO_FEC_TEST validate auto mode in fec."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -638,5 +638,24 @@
]
}
}
},

"PORT_AUTO_FEC_TEST": {
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"admin_status": "up",
"alias": "eth8",
"description": "Ethernet8",
"fec": "auto",
"lanes": "65",
"mtu": 9000,
"name": "Ethernet8",
"speed": 25000
}
]
}
}
}
}
2 changes: 1 addition & 1 deletion src/sonic-yang-models/yang-models/sonic-port.yang
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module sonic-port{

leaf fec {
type string {
pattern "rs|fc|none";
pattern "rs|fc|none|auto";
}
}

Expand Down

0 comments on commit 6bafea4

Please sign in to comment.