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

[barefoot]: Update yang models for DPB support #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
60 changes: 60 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-crm.yang
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,66 @@ module sonic-crm {
type threshold;
}

leaf dnat_entry_threshold_type {
must "(((current()='PERCENTAGE' or current()='percentage') and
../dnat_entry_high_threshold<100 and
../dnat_entry_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}

leaf dnat_entry_high_threshold {
must "(current() > ../dnat_entry_low_threshold)"
{
error-message "high_threshold should be more that low_threshold";
}
type threshold;
}

leaf dnat_entry_low_threshold {
type threshold;
}

leaf snat_entry_threshold_type {
must "(((current()='PERCENTAGE' or current()='percentage') and
../snat_entry_high_threshold<100 and
../snat_entry_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}

leaf snat_entry_high_threshold {
must "(current() > ../snat_entry_low_threshold)"
{
error-message "high_threshold should be more that low_threshold";
}
type threshold;
}

leaf snat_entry_low_threshold {
type threshold;
}

leaf ipmc_entry_threshold_type {
must "(((current()='PERCENTAGE' or current()='percentage') and
../ipmc_entry_high_threshold<100 and
../ipmc_entry_low_threshold<100) or
(current()!='PERCENTAGE' and current()!='percentage'))";
type stypes:crm_threshold_type;
}

leaf ipmc_entry_high_threshold {
must "(current() > ../ipmc_entry_low_threshold)"
{
error-message "high_threshold should be more that low_threshold";
}
type threshold;
}

leaf ipmc_entry_low_threshold {
type threshold;
}

}
/* end of Config */
}
Expand Down
24 changes: 24 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-device_metadata.yang
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,30 @@ module sonic-device_metadata {
pattern "ToRRouter|LeafRouter|SpineChassisFrontendRouter|ChassisBackendRouter|ASIC";
}
}

leaf buffer_model {
type string {
length 1..255;
}
}

leaf region {
type string {
length 1..255;
}
}

leaf cloudtype {
type string {
length 1..255;
}
}

leaf synchronous_mode {
type string {
length 1..255;
}
}
}
/* end of container localhost */
}
Expand Down
90 changes: 90 additions & 0 deletions src/sonic-yang-models/yang-models/sonic-port_qos_map.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
module sonic-port_qos_map {

yang-version 1.1;

namespace "http://github.com/Azure/sonic-port_qos_map";
prefix port_qos_map;

import sonic-types {
prefix stypes;
revision-date 2019-07-01;
}

import sonic-port {
prefix port;
revision-date 2019-07-01;
}

import sonic-extension {
prefix ext;
revision-date 2019-07-01;
}

description "PORT_QOS_MAP yang Module for SONiC OS";

revision 2019-07-01 {
description "First Revision";
}

container sonic-port_qos_map {

container PORT_QOS_MAP {

description "PORT_QOS_MAP part of config_db.json";

list PORT_QOS_MAP_LIST {

key "port_name";

ext:key-regex-configdb-to-yang "^(Ethernet[0-9]+)$";

ext:key-regex-yang-to-configdb "<port_name>";

leaf port_name {
type leafref {
path /port:sonic-port/port:PORT/port:PORT_LIST/port:port_name;
}
}

leaf dscp_to_tc_map {
type string {
length 1..128;
}
}

leaf tc_to_queue_map {
type string {
length 1..128;
}
}

leaf tc_to_pg_map {
type string {
length 1..128;
}
}

leaf pfc_to_queue_map {
type string {
length 1..128;
}
}

leaf pfc_to_pg_map {
type string {
length 1..128;
}
}

leaf pfc_enable {
type string {
length 1..128;
}
}
} /* end of list PORT_QOS_MAP_LIST */

} /* end of container PORT_QOS_MAP */

} /* end of container sonic-port_qos_map */

} /* end of module sonic-port_qos_map */