-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Feature yang changes #7955
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
Feature yang changes #7955
Changes from all commits
fe0f271
dba0518
9047a34
df7f83f
db86b11
60c145e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "FEATURE_WITH_CORRECT_VALUES": { | ||
| "desc": "CONFIG FEATURE TABLE WITH ALL THE CORRECT VALUES" | ||
| }, | ||
| "FEATURE_WITH_INVALID_STATE" : { | ||
| "desc": "Referring invalid feature state.", | ||
| "eStrKey": "Pattern", | ||
| "eStr": ["enabled|disabled|always_enabled"] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| { | ||
| "FEATURE_WITH_CORRECT_VALUES": { | ||
| "sonic-feature:sonic-feature": { | ||
| "sonic-feature:FEATURE": { | ||
| "FEATURE_LIST": [ | ||
| { | ||
| "name": "database", | ||
| "state": "always_enabled", | ||
| "auto_restart": "always_enabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "true", | ||
| "has_per_asic_scope": "true" | ||
| }, | ||
| { | ||
| "name": "swss", | ||
| "state": "always_enabled", | ||
| "auto_restart": "always_enabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "false", | ||
| "has_per_asic_scope": "true" | ||
| }, | ||
| { | ||
| "name": "syncd", | ||
| "state": "always_enabled", | ||
| "auto_restart": "always_enabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "false", | ||
| "has_per_asic_scope": "true" | ||
| }, | ||
| { | ||
| "name": "snmp", | ||
| "state": "enabled", | ||
| "auto_restart": "enabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "true", | ||
| "has_per_asic_scope": "false" | ||
| }, | ||
| { | ||
| "name": "lldp", | ||
| "state": "disabled", | ||
| "auto_restart": "disabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "false", | ||
| "has_per_asic_scope": "true" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, | ||
| "FEATURE_WITH_INVALID_STATE": { | ||
arlakshm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "sonic-feature:sonic-feature": { | ||
| "sonic-feature:FEATURE": { | ||
| "FEATURE_LIST": [ | ||
| { | ||
| "name": "database", | ||
| "state": "dontcare", | ||
| "auto_restart": "always_enabled", | ||
| "has_timer": "false", | ||
| "has_global_scope": "true", | ||
| "has_per_asic_scope": "true" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| module sonic-feature{ | ||
|
|
||
| yang-version 1.1; | ||
|
|
||
| namespace "http://github.com/Azure/sonic-feature"; | ||
| prefix feature; | ||
|
|
||
| import sonic-types { | ||
| prefix stypes; | ||
| } | ||
|
|
||
| description "Feature Table yang Module for SONiC OS"; | ||
|
|
||
| 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; | ||
arlakshm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
|
|
||
| leaf state { | ||
| description "state of the feature"; | ||
arlakshm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type stypes:feature_state; | ||
| default "enabled"; | ||
| } | ||
|
|
||
| leaf auto_restart { | ||
| type stypes:feature_state; | ||
| default "enabled"; | ||
| } | ||
|
|
||
| leaf has_timer { | ||
| description "This configuration identicates if there is | ||
| timer associated to this feature"; | ||
arlakshm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type boolean; | ||
| default false; | ||
| } | ||
|
|
||
| leaf has_global_scope { | ||
| description "This configuration identicates there will only one service | ||
| spawned for the device"; | ||
| type boolean; | ||
| default false; | ||
| } | ||
|
|
||
| leaf has_per_asic_scope { | ||
| description "This configuration identicates there will only one service | ||
| spawned per asic"; | ||
| type boolean; | ||
| default false; | ||
| } | ||
|
|
||
| leaf high_mem_alert { | ||
| description "This configuration controls the trigger to generate | ||
| alert on high memory utilization"; | ||
| type stypes:feature_state; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @arlakshm does always_enabled applies for high_mem_alert ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think it is OK to let |
||
| default "disabled"; | ||
| } | ||
arlakshm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.