Skip to content

Commit 2f8a692

Browse files
vdahiya12VladimirKuk
authored andcommitted
1 parent 90f2974 commit 2f8a692

File tree

6 files changed

+111
-0
lines changed

6 files changed

+111
-0
lines changed

src/sonic-yang-models/doc/Configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Table of Contents
4242
* [FABRIC_MONITOR](#fabric-monitor)
4343
* [FABRIC_PORT](#fabric-port)
4444
* [FLEX_COUNTER_TABLE](#flex_counter_table)
45+
* [GRPCCLIENT](#grpcclient)
4546
* [Hash](#hash)
4647
* [IPv6 Link-local] (#ipv6-link-local)
4748
* [KDUMP](#kdump)

src/sonic-yang-models/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def run(self):
205205
'./yang-models/sonic-bgp-sentinel.yang',
206206
'./yang-models/sonic-bmp.yang',
207207
'./yang-models/sonic-xcvrd-log.yang',
208+
'./yang-models/sonic-grpcclient.yang',
208209
'./yang-models/sonic-serial-console.yang',
209210
'./yang-models/sonic-smart-switch.yang',]),
210211
('cvlyang-models', ['./cvlyang-models/sonic-acl.yang',

src/sonic-yang-models/tests/files/sample_config_db.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2762,6 +2762,19 @@
27622762
"log_verbosity": "notice"
27632763
}
27642764
},
2765+
"GRPCCLIENT": {
2766+
"config": {
2767+
"type": "secure",
2768+
"auth_level": "server",
2769+
"log_level": "info"
2770+
},
2771+
"certs": {
2772+
"client_crt": "grpcclient.crt",
2773+
"client_key": "grpcclient.key",
2774+
"ca_crt": "root.pem",
2775+
"grpc_ssl_credential": "azureclient.ms"
2776+
}
2777+
},
27652778
"BANNER_MESSAGE": {
27662779
"global": {
27672780
"state": "enabled",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"GRPCCLIENT_CONFIG_CHANGE_VERBOSITY_LEVEL": {
3+
"desc": "Consume verbosity level config changes. "
4+
}
5+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"GRPCCLIENT_CONFIG_CHANGE_VERBOSITY_LEVEL": {
3+
"sonic-grpcclient:sonic-grpcclient": {
4+
"sonic-grpcclient:GRPCCLIENT": {
5+
"sonic-grpcclient:config":
6+
{
7+
"log_level": "info"
8+
}
9+
}
10+
}
11+
}
12+
}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
module sonic-grpcclient {
2+
namespace "http://github.com/sonic-net/sonic-grpcclient";
3+
prefix grpcclient;
4+
yang-version 1.1;
5+
6+
organization
7+
"SONiC";
8+
9+
contact
10+
"SONiC";
11+
12+
description
13+
"SONiC DualToR grpc client configuration data";
14+
15+
revision 2024-10-14 {
16+
description
17+
"Initial revision";
18+
}
19+
20+
container sonic-grpcclient {
21+
22+
container GRPCCLIENT {
23+
24+
container config {
25+
26+
leaf type {
27+
type enumeration {
28+
enum secure;
29+
enum insecure;
30+
}
31+
description "grpc client security level. ";
32+
}
33+
34+
leaf auth_level {
35+
type enumeration {
36+
enum server;
37+
enum client;
38+
}
39+
description "grpc client auth level. ";
40+
}
41+
42+
leaf log_level {
43+
type enumeration {
44+
enum info;
45+
enum notice;
46+
enum debug;
47+
enum warning;
48+
enum critical;
49+
}
50+
description "grpc client log level. ";
51+
}
52+
}
53+
54+
container certs {
55+
56+
leaf client_crt {
57+
type string;
58+
description "grpc client certificate file name ";
59+
60+
}
61+
62+
leaf client_key {
63+
type string;
64+
description "grpc client key file name ";
65+
}
66+
67+
leaf ca_crt {
68+
type string;
69+
description "grpc client root cert";
70+
}
71+
72+
leaf grpc_ssl_credential {
73+
type string;
74+
description "grpc client ssl credential";
75+
}
76+
}
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)