forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yang] Support ASIC/SDK health event (sonic-net#17879)
Support ASIC/SDK health event - Suppress ASIC/SDK health event configuration - New event Signed-off-by: Stephen Sun <[email protected]>
- Loading branch information
Showing
9 changed files
with
298 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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
59 changes: 59 additions & 0 deletions
59
src/sonic-yang-models/yang-models/sonic-suppress-asic-sdk-health-event.yang
This file contains 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,59 @@ | ||
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; | ||
description "Maximum of events that can be stored in the database"; | ||
} | ||
|
||
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"; | ||
} | ||
} | ||
} | ||
} | ||
} |