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

[yang] add Yang model for XCVRD_LOG|Y_CABLE #20496

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ Table of Contents
* [Virtual router](#virtual-router)
* [LOGGER](#logger)
* [WRED_PROFILE](#wred_profile)
* [XCVRD_LOG](#xcvrd_log)
* [PASSWORD_HARDENING](#password_hardening)
* [SSH_SERVER](#ssh_server)
* [SYSTEM_DEFAULTS table](#systemdefaults-table)
Expand Down
1 change: 1 addition & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def run(self):
'./yang-models/sonic-macsec.yang',
'./yang-models/sonic-bgp-sentinel.yang',
'./yang-models/sonic-bmp.yang',
'./yang-models/sonic-xcvrd-log.yang',
'./yang-models/sonic-serial-console.yang',
'./yang-models/sonic-smart-switch.yang',]),
('cvlyang-models', ['./cvlyang-models/sonic-acl.yang',
Expand Down
6 changes: 6 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,12 @@
}
}
},

Copy link
Contributor

Choose a reason for hiding this comment

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

extra space

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

"XCVRD_LOG": {
"Y_CABLE": {
"log_verbosity": "notice"
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

This table should be at the same level as BANNER_MESSAGE.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

"STORMOND_CONFIG": {
"INTERVALS": {
"daemon_polling_interval" : "3600",
Expand Down
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. "
}
}
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"
}
}
}
}
}
42 changes: 42 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-xcvrd-log.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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. ";

}

}
}
}
}
Loading