sonic-buildimage/src/sonic-yang-models/yang-models/sonic-warm-restart.yang
ArthiSivanantham ada8043ed3
SONiC Yang for Warm Restart (#7698)
Why I did it
SONiC YANG model support for warm restart.

How I did it
Defined warm restart YANG containers and lists based on config-DB schema.

How to verify it
Successful build of the following packages:
make target/python-wheels/sonic_yang_models-1.0-py3-none-any.whl
make target/python-wheels/sonic_yang_mgmt-1.0-py3-none-any.whl

Signed-off-by: Arthi Sivanantham <arthi_sivanantham@dell.com>
2021-09-28 08:51:26 -07:00

106 lines
3.1 KiB
YANG

module sonic-warm-restart {
yang-version 1.1;
namespace "http://github.com/Azure/sonic-warm-restart";
prefix wrm;
description "SONIC WARMRESTART";
revision 2021-05-24 {
description "First Revision";
}
typedef module-name {
type enumeration {
enum bgp {
description
"BGP module";
}
enum teamd {
description
"Teamd module";
}
enum swss {
description
"Switch State Services module";
}
enum system {
description
"Warm Restart on a System level.";
}
}
description
"The modules supported in warm-restart";
}
container sonic-warm-restart {
container WARM_RESTART {
list WARM_RESTART_LIST {
key "module";
leaf module {
type module-name;
description
"Name of the module";
}
leaf bgp_eoiu {
type boolean;
must "current()/../module = 'bgp'" { error-message "bgp_eoiu is only supported for module bgp."; }
description
"BGP End-of-Initial Update (EOIU) signal enable/disable";
}
leaf bgp_timer {
type uint16 {
range "1..3600" {
error-message "Timer must be 1..3600";
error-app-tag timer-invalid;
}
}
must "current()/../module = 'bgp'" { error-message "bgp_timer is only supported for module bgp."; }
description
"Timer value for BGP module";
}
leaf teamsyncd_timer {
type uint16 {
range "1..3600" {
error-message "Timer must be 1..3600";
error-app-tag timer-invalid;
}
}
must "current()/../module = 'teamd'" { error-message "teamsyncd_timer is only supported for module teamd."; }
description
"Timer value for teamd module";
}
leaf neighsyncd_timer {
type uint16 {
range "1..9999" {
error-message "Timer must be 1..9999";
error-app-tag timer-invalid;
}
}
must "current()/../module = 'swss'" { error-message "neighsyncd_timer is only supported for module swss."; }
description
"Timer value for swss module";
}
} /* end of list WARM_RESTART_LIST */
} /* end of container WARM_RESTART */
} /* end of container sonic-warm-restart */
} /* end of module sonic-warm-restart */