213 lines
7.1 KiB
YANG
213 lines
7.1 KiB
YANG
module sonic-device_metadata {
|
|
|
|
yang-version 1.1;
|
|
|
|
namespace "http://github.com/Azure/sonic-device_metadata";
|
|
prefix device_metadata;
|
|
|
|
import ietf-yang-types {
|
|
prefix yang;
|
|
}
|
|
|
|
import ietf-inet-types {
|
|
prefix inet;
|
|
}
|
|
|
|
import sonic-types {
|
|
prefix stypes;
|
|
}
|
|
|
|
description "DEVICE_METADATA YANG Module for SONiC OS";
|
|
|
|
revision 2021-02-27 {
|
|
description "Added frr_mgmt_framework_config field to handle BGP
|
|
config DB schema events to configure FRR protocols.";
|
|
}
|
|
|
|
revision 2020-04-10 {
|
|
description "First Revision";
|
|
}
|
|
|
|
container sonic-device_metadata {
|
|
|
|
container DEVICE_METADATA {
|
|
|
|
description "DEVICE_METADATA part of config_db.json";
|
|
|
|
container localhost{
|
|
|
|
leaf hwsku {
|
|
type stypes:hwsku;
|
|
}
|
|
|
|
leaf default_bgp_status {
|
|
type enumeration {
|
|
enum up;
|
|
enum down;
|
|
}
|
|
default up;
|
|
}
|
|
|
|
leaf docker_routing_config_mode {
|
|
description "This leaf allows different configuration modes for FRR:
|
|
- separated: FRR config generated from ConfigDB, each FRR daemon has its own config file
|
|
- unified: FRR config generated from ConfigDB, single FRR config file
|
|
- split: FRR config not generated from ConfigDB, each FRR daemon has its own config file
|
|
- split-unified: FRR config not generated from ConfigDB, single FRR config file";
|
|
type string {
|
|
pattern "separated|unified|split|split-unified";
|
|
}
|
|
default "unified";
|
|
}
|
|
|
|
leaf hostname {
|
|
type stypes:hostname;
|
|
}
|
|
|
|
leaf platform {
|
|
type string {
|
|
length 1..255;
|
|
}
|
|
}
|
|
|
|
leaf mac {
|
|
type yang:mac-address;
|
|
}
|
|
|
|
leaf default_pfcwd_status {
|
|
type enumeration {
|
|
enum disable;
|
|
enum enable;
|
|
}
|
|
default disable;
|
|
}
|
|
|
|
leaf bgp_asn {
|
|
type inet:as-number;
|
|
}
|
|
|
|
leaf deployment_id {
|
|
type uint32;
|
|
}
|
|
|
|
leaf type {
|
|
type string {
|
|
length 1..255;
|
|
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC|MgmtToRRouter|SpineRouter|BackEndToRRouter|BackEndLeafRouter|EPMS|MgmtTsToR|BmcMgmtToRRouter|not-provisioned";
|
|
}
|
|
}
|
|
|
|
leaf buffer_model {
|
|
description "This leaf is added for dynamic buffer calculation.
|
|
The dynamic model represents the model in which the buffer configurations,
|
|
like the headroom sizes and buffer pool sizes, are dynamically calculated based
|
|
on the ports' speed, cable length, and MTU. This model is used by Mellanox so far.
|
|
The traditional model represents the model in which all the buffer configurations
|
|
are statically configured in CONFIG_DB tables. This is the default model used by all other vendors";
|
|
type string {
|
|
pattern "dynamic|traditional";
|
|
}
|
|
}
|
|
|
|
leaf frr_mgmt_framework_config {
|
|
type boolean;
|
|
description "FRR configurations are handled by sonic-frr-mgmt-framework module when set to true,
|
|
otherwise, sonic-bgpcfgd handles the FRR configurations based on the predefined templates.";
|
|
default "false";
|
|
}
|
|
|
|
leaf synchronous_mode {
|
|
type enumeration {
|
|
enum enable;
|
|
enum disable;
|
|
}
|
|
default enable;
|
|
}
|
|
|
|
leaf cloudtype {
|
|
type string;
|
|
}
|
|
|
|
leaf region {
|
|
type string;
|
|
}
|
|
|
|
leaf sub_role {
|
|
type string;
|
|
description "sub_role indicates if ASIC is FrontEnd or BackEnd.";
|
|
}
|
|
|
|
leaf downstream_subrole {
|
|
type string;
|
|
}
|
|
|
|
leaf resource_type {
|
|
type string;
|
|
}
|
|
|
|
leaf cluster {
|
|
type string;
|
|
description "The switch is a member of this cluster.";
|
|
}
|
|
|
|
leaf subtype {
|
|
type string {
|
|
pattern "DualToR";
|
|
}
|
|
}
|
|
|
|
leaf peer_switch {
|
|
type stypes:hostname;
|
|
}
|
|
|
|
leaf storage_device {
|
|
type boolean;
|
|
}
|
|
|
|
leaf asic_name {
|
|
type string;
|
|
description "On a VoQ switch, the ASIC Name is used as a qualifier in global
|
|
database keys to create a system wide unique key.";
|
|
}
|
|
|
|
leaf switch_id {
|
|
type uint16;
|
|
description "Vendor specific switch ID. Identifies switch chip.";
|
|
}
|
|
|
|
leaf switch_type {
|
|
type string {
|
|
pattern "chassis-packet|fabric|npu|voq";
|
|
}
|
|
description "Type of switch. Default is NPU, on a VOQ switch voq is used for a regular
|
|
switching device while fabric is used for a fabric device.
|
|
chassis-packet is used for chassis in packet mode.";
|
|
}
|
|
|
|
leaf max_cores {
|
|
type uint8;
|
|
description "Maximum number of cores in a VoQ Switch (chassis).";
|
|
}
|
|
|
|
leaf dhcp_server {
|
|
type stypes:admin_mode;
|
|
description "Indicate whether enable the embedded DHCP server.";
|
|
}
|
|
|
|
leaf rack_mgmt_map {
|
|
type string {
|
|
length 0..128 {
|
|
error-message "Invalid length for the rack mgmt map.";
|
|
}
|
|
}
|
|
description "Information of rack mgmt map.";
|
|
}
|
|
}
|
|
/* end of container localhost */
|
|
}
|
|
/* end of container DEVICE_METADATA */
|
|
}
|
|
/* end of top level container */
|
|
}
|
|
/* end of module sonic-device_metadata */
|