forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang] add Yang model for XCVRD_LOG|Y_CABLE (sonic-net#20496)
#### Why I did it Adding yang model for CONFIG_DB table XCVRD_LOG|Y_CABLE. Introduced by https://github.com/sonic-net/sonic-utilities/blob/master/config/muxcable.py#L1230-L1235 #### How I did it Added the changes in sonic-yang-models #### How to verify it UT test ``` ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.9.2, pytest-6.0.2, py-1.10.0, pluggy-0.13.0 rootdir: /sonic/src/sonic-yang-models plugins: pyfakefs-5.2.3, cov-2.10.1 collected 3 items tests/test_sonic_yang_models.py .. [ 66%] tests/yang_model_tests/test_yang_model.py . [100%] ===================================================================================== 3 passed in 2.06s ===================================================================================== ```
- Loading branch information
Showing
6 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/sonic-yang-models/tests/yang_model_tests/tests/xcvrd-log.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"XCVRD_LOG_Y_CABLE_CHANGE_VERBOSITY_LEVEL": { | ||
"desc": "Consume verbosity level config changes. " | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/sonic-yang-models/tests/yang_model_tests/tests_config/xcvrd-log.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"XCVRD_LOG_Y_CABLE_CHANGE_VERBOSITY_LEVEL": { | ||
"sonic-xcvrd-log:sonic-xcvrd-log": { | ||
"sonic-xcvrd-log:XCVRD_LOG": { | ||
"sonic-xcvrd-log:Y_CABLE": | ||
{ | ||
"log_verbosity": "debug" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module sonic-xcvrd-log { | ||
namespace "http://github.com/sonic-net/sonic-xcvrd-log"; | ||
prefix xcvrd_log; | ||
yang-version 1.1; | ||
|
||
organization | ||
"SONiC"; | ||
|
||
contact | ||
"SONiC"; | ||
|
||
description | ||
"SONiC DualToR xcvrd logging configuration data"; | ||
|
||
revision 2024-10-14 { | ||
description | ||
"Initial revision"; | ||
} | ||
|
||
container sonic-xcvrd-log { | ||
|
||
container XCVRD_LOG { | ||
|
||
container Y_CABLE { | ||
|
||
leaf log_verbosity { | ||
type enumeration { | ||
enum info; | ||
enum notice; | ||
enum debug; | ||
enum warning; | ||
enum critical; | ||
} | ||
|
||
description "xcvrd log verbosity level. "; | ||
|
||
} | ||
} | ||
} | ||
} | ||
} |