-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[yang] Support ASIC/SDK health event #17879
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
00ea737
Support ASIC/SDK health event
stephenxs 67143d5
Minor changes
stephenxs 90c18de
Update documentation
stephenxs 9d5406d
Address community review comments
stephenxs 6f6984c
Update sonic-suppress-asic-sdk-health-event.yang
stephenxs 5bc6b43
Update the sample config_db.json
stephenxs ebeb0ba
Fix error in sampe config_db.json
stephenxs d6565e2
Fix compiling issue
stephenxs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/sonic-yang-models/tests/yang_model_tests/tests/suppress_asic_sdk_health_event.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_FATAL": { | ||
"desc": "Load suppress ASIC/SDK health event list for fatal." | ||
}, | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_WARNING": { | ||
"desc": "Load suppress ASIC/SDK health event list for warning." | ||
}, | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_NOTICE": { | ||
"desc": "Load suppress ASIC/SDK health event list for notice." | ||
}, | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_INVALID_SEVERITY": { | ||
"desc": "Load suppress ASIC/SDK health event list for notice.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_NEGATIVE_MAX_EVENTS": { | ||
"desc": "Load suppress ASIC/SDK health event list missing name.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_INVALID_MAX_EVENTS": { | ||
"desc": "Load suppress ASIC/SDK health event list missing name.", | ||
"eStrKey": "InvalidValue" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
93 changes: 93 additions & 0 deletions
93
...sonic-yang-models/tests/yang_model_tests/tests_config/suppress_asic_sdk_health_event.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_FATAL": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "fatal", | ||
"categories": ["software","firmware"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_WARNING": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "warning", | ||
"categories": ["asic_hw","cpu_hw"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_VALID_NOTICE": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "notice", | ||
"categories": ["software","firmware","cpu_hw","asic_hw"], | ||
"max_events": "100" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_INVALID_SEVERITY": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "unknown", | ||
"categories": ["software","firmware","cpu_hw","asic_hw"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_INVALID_CATEGORY": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "notice", | ||
"categories": ["software","unknown","cpu_hw","asic_hw"] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_NEGATIVE_MAX_EVENTS": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "notice", | ||
"max_events": "-1" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
|
||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST_INVALID_MAX_EVENTS": { | ||
"sonic-suppress-asic-sdk-health-event:sonic-suppress-asic-sdk-health-event": { | ||
"sonic-suppress-asic-sdk-health-event:SUPPRESS_ASIC_SDK_HEALTH_EVENT": { | ||
"SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST": [ | ||
{ | ||
"severity": "notice", | ||
"max_events": "NaN" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/sonic-yang-models/yang-models/sonic-suppress-asic-sdk-health-event.yang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
module sonic-suppress-asic-sdk-health-event { | ||
|
||
yang-version 1.1; | ||
|
||
namespace "http://github.com/sonic-net/sonic-suppress-asic-sdk-health-event"; | ||
|
||
prefix sch; | ||
|
||
organization | ||
"SONiC"; | ||
|
||
contact | ||
"SONiC"; | ||
|
||
description | ||
"Suppress ASIC/SDK health event yang Module for SONiC OS"; | ||
|
||
revision 2023-11-29 { | ||
description | ||
"Initial revision"; | ||
} | ||
|
||
container sonic-suppress-asic-sdk-health-event { | ||
|
||
container SUPPRESS_ASIC_SDK_HEALTH_EVENT { | ||
|
||
description "SUPPRESS_ASIC_SDK_HEALTH_EVENT part of config_db.json"; | ||
|
||
list SUPPRESS_ASIC_SDK_HEALTH_EVENT_LIST { | ||
|
||
key "severity"; | ||
|
||
leaf severity { | ||
type enumeration { | ||
enum fatal; | ||
enum warning; | ||
enum notice; | ||
} | ||
description "Severity of the ASIC/SDK health event to suppress"; | ||
} | ||
|
||
leaf max_events { | ||
type uint32; | ||
} | ||
|
||
leaf-list categories { | ||
type enumeration { | ||
enum software; | ||
enum firmware; | ||
enum cpu_hw; | ||
enum asic_hw; | ||
} | ||
description "Category of the ASIC/SDK health event to suppress"; | ||
} | ||
} | ||
} | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.