-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 GRPCCLIENT (#20902)
Why I did it Adding yang model for CONFIG_DB table GRPCCLIENT Introduced by https://github.com/sonic-net/sonic-platform-daemons/blob/b276e415d85f3e8a7c64532d95821c9000c9418d/sonic-ycabled/ycable/ycable_utilities/y_cable_helper.py#L407
- Loading branch information
Showing
6 changed files
with
111 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/grpcclient.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 @@ | ||
{ | ||
"GRPCCLIENT_CONFIG_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/grpcclient.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 @@ | ||
{ | ||
"GRPCCLIENT_CONFIG_CHANGE_VERBOSITY_LEVEL": { | ||
"sonic-grpcclient:sonic-grpcclient": { | ||
"sonic-grpcclient:GRPCCLIENT": { | ||
"sonic-grpcclient:config": | ||
{ | ||
"log_level": "info" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,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"; | ||
} | ||
} | ||
} | ||
} | ||
} |