diff --git a/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py b/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py index 7579bdcfa8..4754cea88e 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py +++ b/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py @@ -221,6 +221,14 @@ class Test_yang_models: 'DEVICE_METADATA_TYPE_INCORRECT_PATTERN': { 'desc': 'DEVICE_METADATA_TYPE_INCORRECT_PATTERN pattern failure.', 'eStr': self.defaultYANGFailure['Pattern'] + }, + 'BREAKOUT_CFG_CORRECT_MODES': { + 'desc': 'BREAKOUT_CFG correct breakout modes', + 'eStr': self.defaultYANGFailure['None'] + }, + 'BREAKOUT_CFG_INCORRECT_MODES': { + 'desc': 'BREAKOUT_CFG wrong breakout modes', + 'eStr': self.defaultYANGFailure['Pattern'] } } diff --git a/src/sonic-yang-models/tests/yang_model_tests/yangTest.json b/src/sonic-yang-models/tests/yang_model_tests/yangTest.json index d898582605..cb67febe48 100644 --- a/src/sonic-yang-models/tests/yang_model_tests/yangTest.json +++ b/src/sonic-yang-models/tests/yang_model_tests/yangTest.json @@ -1749,5 +1749,61 @@ "UNKNOWN_TABLE": { "Error": "This Table is for testing, This Table does not have YANG models." } - } + }, + "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" + } + ] + } + } + } } diff --git a/src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang b/src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang index 7cc13f1731..1ea2c7df00 100644 --- a/src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang +++ b/src/sonic-yang-models/yang-models/sonic-breakout_cfg.yang @@ -51,7 +51,7 @@ module sonic-breakout_cfg { * 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'; + 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\]'; } } } diff --git a/src/sonic-yang-models/yang-models/sonic-port.yang b/src/sonic-yang-models/yang-models/sonic-port.yang index 8a41d13f1a..6133823412 100644 --- a/src/sonic-yang-models/yang-models/sonic-port.yang +++ b/src/sonic-yang-models/yang-models/sonic-port.yang @@ -63,7 +63,7 @@ module sonic-port{ leaf speed { mandatory true; type uint32 { - range 1..100000; + range 1..400000; } }