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 GRPCCLIENT #20902

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -42,6 +42,7 @@ Table of Contents
* [FABRIC_MONITOR](#fabric-monitor)
* [FABRIC_PORT](#fabric-port)
* [FLEX_COUNTER_TABLE](#flex_counter_table)
* [GRPCCLIENT](#grpcclient)
* [Hash](#hash)
* [IPv6 Link-local] (#ipv6-link-local)
* [KDUMP](#kdump)
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 @@ -204,6 +204,7 @@ def run(self):
'./yang-models/sonic-bgp-sentinel.yang',
'./yang-models/sonic-bmp.yang',
'./yang-models/sonic-xcvrd-log.yang',
'./yang-models/sonic-grpcclient.yang',
'./yang-models/sonic-serial-console.yang',
'./yang-models/sonic-smart-switch.yang',]),
('cvlyang-models', ['./cvlyang-models/sonic-acl.yang',
Expand Down
13 changes: 13 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 @@ -2752,6 +2752,19 @@
"log_verbosity": "notice"
}
},
"GRPCCLIENT": {
"config": {
"type": "secure",
"auth_level": "server",
"log_level": "info"
},
"certs": {
"client_crt": "grpcclient.crt",
"client_key": "grpcclient.key",
"ca_crt": "root.pem",
"grpc_ssl_credential": "azureclient.ms"
}
},
"BANNER_MESSAGE": {
"global": {
"state": "enabled",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"GRPCCLIENT_CONFIG_CHANGE_VERBOSITY_LEVEL": {
"desc": "Consume verbosity level config changes. "
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"GRPCCLIENT_CONFIG_CHANGE_VERBOSITY_LEVEL": {
"sonic-grpcclient:sonic-grpcclient": {
"sonic-grpcclient:GRPCCLIENT": {
"sonic-grpcclient:config":
{
"log_level": "info"
}
}
}
}
}
79 changes: 79 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-grpcclient.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
module sonic-grpcclient {
namespace "http://github.com/sonic-net/sonic-grpcclient";
prefix grpcclient;
yang-version 1.1;

organization
"SONiC";

contact
"SONiC";

description
"SONiC DualToR grpc client configuration data";

revision 2024-10-14 {
description
"Initial revision";
}

container sonic-grpcclient {

container GRPCCLIENT {

container config {

leaf type {
type enumeration {
enum secure;
enum insecure;
}
description "grpc client security level. ";
}

leaf auth_level {
type enumeration {
enum server;
enum client;
}
description "grpc client auth level. ";
}

leaf log_level {
type enumeration {
enum info;
enum notice;
enum debug;
enum warning;
enum critical;
}
description "grpc client log level. ";
}
}

container certs {

leaf client_crt {
type string;
description "grpc client certificate file name ";

}

leaf client_key {
type string;
description "grpc client key file name ";
}

leaf ca_crt {
type string;
description "grpc client root cert";
}

leaf grpc_ssl_credential {
type string;
description "grpc client ssl credential";
}
}
}
}
}
Loading