2021-10-05 17:44:24 -05:00
|
|
|
module sonic-feature{
|
|
|
|
|
|
|
|
yang-version 1.1;
|
|
|
|
|
2022-10-31 18:37:25 -05:00
|
|
|
namespace "http://github.com/sonic-net/sonic-feature";
|
2021-10-05 17:44:24 -05:00
|
|
|
prefix feature;
|
|
|
|
|
2021-12-10 12:34:02 -06:00
|
|
|
import sonic-types {
|
|
|
|
prefix stypes;
|
|
|
|
}
|
|
|
|
|
2021-12-10 01:18:45 -06:00
|
|
|
description "Feature Table yang Module for SONiC";
|
2021-12-10 12:34:02 -06:00
|
|
|
|
2021-12-10 01:18:45 -06:00
|
|
|
typedef feature-state {
|
|
|
|
description "configuration to set the feature running state";
|
2021-12-28 01:42:05 -06:00
|
|
|
type string;
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
|
2021-12-10 01:18:45 -06:00
|
|
|
typedef feature-owner {
|
|
|
|
description "configuration to set if the container is controlled
|
|
|
|
by kubernetes or locally";
|
|
|
|
type string {
|
|
|
|
pattern "kube|local";
|
|
|
|
}
|
|
|
|
}
|
2021-10-05 17:44:24 -05:00
|
|
|
|
2022-11-15 18:20:14 -06:00
|
|
|
typedef feature-scope-status {
|
|
|
|
description "configuration to set the feature has asic scope as true/false";
|
|
|
|
type string;
|
|
|
|
}
|
|
|
|
|
2021-10-05 17:44:24 -05:00
|
|
|
container sonic-feature {
|
|
|
|
|
|
|
|
container FEATURE {
|
|
|
|
|
|
|
|
description "feature table in config_db.json";
|
|
|
|
|
|
|
|
list FEATURE_LIST {
|
|
|
|
|
|
|
|
key "name";
|
|
|
|
|
|
|
|
leaf name {
|
|
|
|
description "feature name in Feature table";
|
|
|
|
type string {
|
|
|
|
length 1..32;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
leaf state {
|
|
|
|
description "state of the feature";
|
2021-12-10 01:18:45 -06:00
|
|
|
type feature-state;
|
2021-10-05 17:44:24 -05:00
|
|
|
default "enabled";
|
|
|
|
}
|
|
|
|
|
|
|
|
leaf auto_restart {
|
2021-12-10 01:18:45 -06:00
|
|
|
type feature-state;
|
2021-10-05 17:44:24 -05:00
|
|
|
default "enabled";
|
|
|
|
}
|
|
|
|
|
2023-06-12 00:22:16 -05:00
|
|
|
leaf delayed {
|
|
|
|
description "This configuration identicates if the feature needs to be delayed until
|
|
|
|
system initialization";
|
2021-12-10 12:34:02 -06:00
|
|
|
type stypes:boolean_type;
|
|
|
|
default "false";
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
leaf has_global_scope {
|
|
|
|
description "This configuration identicates there will only one service
|
|
|
|
spawned for the device";
|
2021-12-10 12:34:02 -06:00
|
|
|
type stypes:boolean_type;
|
|
|
|
default "false";
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
leaf has_per_asic_scope {
|
|
|
|
description "This configuration identicates there will only one service
|
|
|
|
spawned per asic";
|
2022-11-15 18:20:14 -06:00
|
|
|
type feature-scope-status;
|
2021-12-10 12:34:02 -06:00
|
|
|
default "false";
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
leaf high_mem_alert {
|
|
|
|
description "This configuration controls the trigger to generate
|
|
|
|
alert on high memory utilization";
|
2021-12-10 01:18:45 -06:00
|
|
|
type feature-state;
|
2021-10-05 17:44:24 -05:00
|
|
|
default "disabled";
|
|
|
|
}
|
2021-12-10 01:18:45 -06:00
|
|
|
|
|
|
|
leaf set_owner {
|
|
|
|
description " This configuration set the feature owner is
|
|
|
|
kubernetes or local";
|
|
|
|
type feature-owner;
|
|
|
|
default "local";
|
|
|
|
}
|
2022-05-20 15:25:11 -05:00
|
|
|
|
|
|
|
leaf check_up_status {
|
|
|
|
description "This configuration controls the system ready tool to check
|
|
|
|
the app ready/up status";
|
2022-06-19 06:14:01 -05:00
|
|
|
type stypes:boolean_type;
|
|
|
|
default "false";
|
2022-05-20 15:25:11 -05:00
|
|
|
}
|
2022-11-29 08:49:13 -06:00
|
|
|
|
|
|
|
leaf support_syslog_rate_limit {
|
|
|
|
description "This configuration indicates the feature support configuring
|
|
|
|
syslog rate limit";
|
|
|
|
type stypes:boolean_type;
|
|
|
|
default "false";
|
|
|
|
}
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-12-28 01:42:05 -06:00
|
|
|
}
|