sonic-buildimage/src/sonic-yang-models/yang-models/sonic-telemetry.yang
Zain Budhwani 8315d11959
Add YANG model and unit tests for sonic-telemetry (#10840)
- Why I did it

YANG schema is missing for sonic-telemetry

- How I did it

Added YANG schema to sonic-yang-models and appropriate unit tests inside of test and test_config

- How to verify it

Build sonic-yang-models python wheels target and verify that unit tests are passing
2022-05-25 10:17:47 -07:00

79 lines
1.8 KiB
YANG

module sonic-telemetry {
yang-version 1.1;
namespace "http://github.com/Azure/sonic-telemetry";
prefix telemetry;
import ietf-inet-types {
prefix inet;
}
organization
"SONiC";
contact
"SONiC";
description "TELEMETRY YANG Module for SONiC OS";
revision 2022-05-13 {
description "First Revision";
}
container sonic-telemetry {
container TELEMETRY {
description "TELEMETRY TABLE part of config_db.json";
container certs {
leaf ca_crt {
type string {
pattern '(/[a-zA-Z0-9_-]+)*/([a-zA-Z0-9_-]+).cer';
}
description "Local path for ca_crt.";
}
leaf server_crt {
type string {
pattern '(/[a-zA-Z0-9_-]+)*/([a-zA-Z0-9_-]+).cer';
}
description "Local path for server_crt.";
}
leaf server_key {
type string {
pattern '(/[a-zA-Z0-9_-]+)*/([a-zA-Z0-9_-]+).key';
}
description "Local path for server_key.";
}
}
container gnmi {
leaf client_auth {
type boolean;
description "Flag for requiring client auth.";
}
leaf log_level {
type uint8 {
range 0..100;
}
description "Log level for gnmi.";
}
leaf port {
type inet:port-number;
description "Port gnmi runs on.";
}
}
}
}
}