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

Changes:
-- Remove pattern from sonic-breakout_cfg.yang, it is redundant.
-- test changes.

Signed-off-by: Praveen Chaudhary <pchaudhary@linkedin.com>
This commit is contained in:
Praveen Chaudhary 2021-11-01 08:26:27 -07:00 committed by Judy Joseph
parent 5b74f5dccf
commit d627587377
3 changed files with 3 additions and 70 deletions

View File

@ -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."
}
}

View File

@ -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": {

View File

@ -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,
@ -40,14 +41,9 @@ module sonic-breakout_cfg {
}
leaf brkout_mode {
description "break_mode for port, it is verifed using platform.json";
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\]';
}
}
}