Skip to content

Commit d627587

Browse files
Praveen Chaudharyjudyjoseph
Praveen Chaudhary
authored andcommitted
[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 <[email protected]>
1 parent 5b74f5d commit d627587

File tree

3 files changed

+3
-70
lines changed

3 files changed

+3
-70
lines changed
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
{
2-
"BREAKOUT_CFG_CORRECT_MODES": {
3-
"desc": "BREAKOUT_CFG correct breakout modes"
4-
},
5-
"BREAKOUT_CFG_INCORRECT_MODES": {
6-
"desc": "BREAKOUT_CFG wrong breakout modes",
7-
"eStr": ["pattern", "does not satisfy"]
8-
},
92
"CRM_BRK_CFG_FLEX_TABLE": {
10-
"desc": "CRM BREAKOUT CFG FLEX COUNTER TABLE."
3+
"desc": "CRM BREAKOUT CFG FLEX COUNTER TABLE."
114
}
125
}

src/sonic-yang-models/tests/yang_model_tests/tests_config/breakout.json

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,4 @@
11
{
2-
"BREAKOUT_CFG_CORRECT_MODES": {
3-
"sonic-breakout_cfg:sonic-breakout_cfg": {
4-
"sonic-breakout_cfg:BREAKOUT_CFG": {
5-
"BREAKOUT_CFG_LIST": [
6-
{
7-
"brkout_mode": "1x200G[100G,50G,40G,25G,10G,1G]",
8-
"port": "Ethernet0"
9-
},
10-
{
11-
"brkout_mode": "2x100G[50G,40G,25G,10G,1G]",
12-
"port": "Ethernet8"
13-
},
14-
{
15-
"brkout_mode": "4x50G[40G,25G,10G,1G]",
16-
"port": "Ethernet4"
17-
},
18-
{
19-
"brkout_mode": "1x25G[10G]",
20-
"port": "Ethernet12"
21-
},
22-
{
23-
"brkout_mode": "1x100G[50G,40G,25G,10G]",
24-
"port": "Ethernet16"
25-
},
26-
{
27-
"brkout_mode": "2x50G[40G,25G,10G]",
28-
"port": "Ethernet20"
29-
},
30-
{
31-
"brkout_mode": "1x400G[200G,100G,50G,40G,25G,10G,1G]",
32-
"port": "Ethernet24"
33-
}
34-
]
35-
}
36-
}
37-
},
38-
"BREAKOUT_CFG_INCORRECT_MODES": {
39-
"sonic-breakout_cfg:sonic-breakout_cfg": {
40-
"sonic-breakout_cfg:BREAKOUT_CFG": {
41-
"BREAKOUT_CFG_LIST": [
42-
{
43-
"brkout_mode": "1x500G[100G,50G,40G,25G,10G,1G]",
44-
"port": "Ethernet0"
45-
},
46-
{
47-
"brkout_mode": "2x300G[50G,40G,25G,1G]",
48-
"port": "Ethernet8"
49-
},
50-
{
51-
"brkout_mode": "5x50G[40G,25G]",
52-
"port": "Ethernet4"
53-
}
54-
]
55-
}
56-
}
57-
},
582
"CRM_BRK_CFG_FLEX_TABLE": {
593
"sonic-breakout_cfg:sonic-breakout_cfg": {
604
"sonic-breakout_cfg:BREAKOUT_CFG": {

src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module sonic-breakout_cfg {
2626

2727
key "port";
2828

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

4243
leaf brkout_mode {
44+
description "break_mode for port, it is verifed using platform.json";
4345
type string {
4446
length 1..64;
45-
/*
46-
* Below allowed patterns are based on most used Platforms,
47-
* Add any other breakout-mode to allow Dynamic Port
48-
* Breakout to that breakout-mode.
49-
*/
50-
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\]';
5147
}
5248
}
5349
}

0 commit comments

Comments
 (0)