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

[sonic-breakout_cfg.yang]: Remove pattern from sonic-breakout_cfg.yang. #6801

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"BREAKOUT_CFG_CORRECT_MODES": {
"desc": "BREAKOUT_CFG correct breakout modes"
},
"BREAKOUT_CFG_INCORRECT_MODES": {
"desc": "BREAKOUT_CFG wrong breakout modes",
"eStr": ["pattern", "does not satisfy"]
},
"CRM_BRK_CFG_FLEX_TABLE": {
"desc": "CRM BREAKOUT CFG FLEX COUNTER TABLE."
"desc": "CRM BREAKOUT CFG FLEX COUNTER TABLE."
}
}
Original file line number Diff line number Diff line change
@@ -1,60 +1,4 @@
{
"BREAKOUT_CFG_CORRECT_MODES": {
"sonic-breakout_cfg:sonic-breakout_cfg": {
"sonic-breakout_cfg:BREAKOUT_CFG": {
"BREAKOUT_CFG_LIST": [
{
"brkout_mode": "1x200G[100G,50G,40G,25G,10G,1G]",
"port": "Ethernet0"
},
{
"brkout_mode": "2x100G[50G,40G,25G,10G,1G]",
"port": "Ethernet8"
},
{
"brkout_mode": "4x50G[40G,25G,10G,1G]",
"port": "Ethernet4"
},
{
"brkout_mode": "1x25G[10G]",
"port": "Ethernet12"
},
{
"brkout_mode": "1x100G[50G,40G,25G,10G]",
"port": "Ethernet16"
},
{
"brkout_mode": "2x50G[40G,25G,10G]",
"port": "Ethernet20"
},
{
"brkout_mode": "1x400G[200G,100G,50G,40G,25G,10G,1G]",
"port": "Ethernet24"
}
]
}
}
},
"BREAKOUT_CFG_INCORRECT_MODES": {
"sonic-breakout_cfg:sonic-breakout_cfg": {
"sonic-breakout_cfg:BREAKOUT_CFG": {
"BREAKOUT_CFG_LIST": [
{
"brkout_mode": "1x500G[100G,50G,40G,25G,10G,1G]",
"port": "Ethernet0"
},
{
"brkout_mode": "2x300G[50G,40G,25G,1G]",
"port": "Ethernet8"
},
{
"brkout_mode": "5x50G[40G,25G]",
"port": "Ethernet4"
}
]
}
}
},
"CRM_BRK_CFG_FLEX_TABLE": {
"sonic-breakout_cfg:sonic-breakout_cfg": {
"sonic-breakout_cfg:BREAKOUT_CFG": {
Expand Down
8 changes: 2 additions & 6 deletions src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module sonic-breakout_cfg {

key "port";


/*
* This is leaf instead of a leafref towards port, because this
* table will contains Parent ports and their current breakout-mode,
Expand All @@ -40,14 +41,9 @@ module sonic-breakout_cfg {
}

leaf brkout_mode {
description "break_mode for port, it is verifed using platform.json";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typo.

type string {
length 1..64;
/*
* Below allowed patterns are based on most used Platforms,
* Add any other breakout-mode to allow Dynamic Port
* Breakout to that breakout-mode.
*/
pattern '1x100G\[40G\]|2x50G|4x25G\[10G\]|2x25G\(2\)\+1x50G\(2\)|1x50G\(2\)\+2x25G\(2\)|1x400G|2x200G|4x100G|8x50G|1x200G\[100G,50G,40G,25G,10G,1G\]|2x100G\[50G,40G,25G,10G,1G\]|4x50G\[40G,25G,10G,1G\]|1x25G\[10G\]|1x100G\[50G,40G,25G,10G\]|2x50G\[40G,25G,10G\]|4x25G\[10G\]|1x25G\[10G,1G\]|1x100G\[50G,40G,25G,10G,1G\]|2x50G\[40G,25G,10G,1G\]|4x25G\[10G,1G\]|1x400G\[200G,100G,50G,40G,25G,10G,1G\]|2x200G\[100G,50G,40G,25G,10G,1G\]|4x100G\[50G,40G,25G,10G,1G\]';
}
}
}
Expand Down