sonic-buildimage/src/sonic-yang-models/yang-models/sonic-pfcwd.yang
Praveen Chaudhary 2b7a3ac6c0
[yang-models]: Change name-space from Azure to sonic-net. (#12416)
Changes:
-- Change name-space from Azure to sonic-net.
-- Sort yang list in setup.py for yang-models list.

#### Why I did it
Sonic repo has moved to Linux-foundation.

#### How I did it
[yang-models]: Change name-space from Azure to sonic-net.

#### How to verify it
PR Tests are good enough to verify.
2022-10-31 16:37:25 -07:00

86 lines
2.9 KiB
YANG

module sonic-pfcwd {
namespace "http://github.com/sonic-net/sonic-pfcwd";
prefix sonic-pfcwd;
yang-version 1.1;
import sonic-port {
prefix port;
}
organization
"SONiC";
contact
"SONiC";
description
"SONIC PFC Watchdog parameters";
revision 2021-07-01 {
description
"Initial revision.";
}
container sonic-pfcwd {
container PFC_WD {
list PFC_WD_LIST {
key "ifname";
leaf ifname {
type union {
type leafref {
path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name";
}
type string {
pattern "GLOBAL" {
error-message "Invalid interface name";
error-app-tag interface-name-invalid;
}
}
}
}
leaf action {
must "../ifname != 'GLOBAL'";
type enumeration {
enum drop;
enum forward;
enum alert;
}
description
"PFC watchdog action when entering storm state.";
}
leaf detection_time {
must "../ifname != 'GLOBAL'";
must "(not(boolean(current()/../../PFC_WD_LIST[ifname='GLOBAL'])) or (current() >= current()/../../PFC_WD_LIST[ifname='GLOBAL']/POLL_INTERVAL))" {
error-message "detection_time must be greater than or equal to POLL_INTERVAL";
}
type uint32 {
range 100..5000;
}
description
"Detection interval for pause storm in msec.";
}
leaf restoration_time {
must "../ifname != 'GLOBAL'";
must "(not(boolean(current()/../../PFC_WD_LIST[ifname='GLOBAL'])) or (current() >= current()/../../PFC_WD_LIST[ifname='GLOBAL']/POLL_INTERVAL))" {
error-message "restoration_time must be greater than or equal to POLL_INTERVAL";
}
type uint32 {
range 100..60000;
}
description
"Time delay before resuming normal PFC operation in msec.";
}
leaf POLL_INTERVAL {
must "../ifname = 'GLOBAL'";
type uint32 {
range 100..3000;
}
description
"PFC watchdog global polling interval in msec.";
}
}
}
}
}