2021-10-05 17:44:24 -05:00
|
|
|
module sonic-feature{
|
|
|
|
|
|
|
|
yang-version 1.1;
|
|
|
|
|
|
|
|
namespace "http://github.com/Azure/sonic-feature";
|
|
|
|
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";
|
|
|
|
type string {
|
|
|
|
pattern "enabled|disabled|always_enabled|always_disabled";
|
|
|
|
}
|
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
|
|
|
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
|
|
|
|
leaf has_timer {
|
|
|
|
description "This configuration identicates if there is
|
|
|
|
timer associated to this feature";
|
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";
|
2021-12-10 12:34:02 -06:00
|
|
|
type stypes:boolean_type;
|
|
|
|
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";
|
|
|
|
}
|
2021-10-05 17:44:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-11-10 17:36:20 -06:00
|
|
|
}
|