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.
Proposed yang model changes (sonic-net#35)
Add yang models for events and unit tests
- Loading branch information
Showing
17 changed files
with
1,473 additions
and
0 deletions.
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
47 changes: 47 additions & 0 deletions
47
src/sonic-yang-models/tests/yang_model_tests/tests/sonic-events-bgp.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,47 @@ | ||
{ | ||
"SONIC_EVENTS_BGP_BGP_STATE_INCORRECT_IP": { | ||
"desc": "BGP_STATE_EVENT_INCORRECT_IP failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_BGP_STATE_INCORRECT_STATUS": { | ||
"desc": "BGP_STATE_EVENT_INCORRECT_STATUS failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_BGP_STATE_INCORRECT_TIMESTAMP": { | ||
"desc": "BGP_STATE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_BGP_BGP_STATE_VALID": { | ||
"desc": "VALID BGP STATE EVENT." | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_MAJOR_CODE": { | ||
"desc": "BGP_NOTIFICATION_INCORRECT_MAJOR_CODE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_MINOR_CODE": { | ||
"desc": "BGP_NOTIFICATION_INCORRECT_MINOR_CODE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_IP": { | ||
"desc": "BGP_NOTIFICATION_INCORRECT_IP failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_IS-SENT": { | ||
"desc": "BGP_NOTIFICATION_INCORRECT_IS-SENT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_TIMESTAMP": { | ||
"desc": "BGP_NOTIFICATION_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_BGP_NOTIFICATION_VALID": { | ||
"desc": "VALID BGP NOTIFICATION." | ||
}, | ||
"SONIC_EVENTS_BGP_ZEBRA_NO_BUFF_INCORRECT_TIMESTAMP": { | ||
"desc": "ZEBRA_NO_BUFF_EVENT_INCORRECT_TIMESTAMP.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_BGP_ZEBRA_NO_BUFF_VALID": { | ||
"desc": "VALID ZEBRA_NO_BUFF EVENT." | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/sonic-yang-models/tests/yang_model_tests/tests/sonic-events-dhcp-relay.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,28 @@ | ||
{ | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_INCORRECT_IFNAME": { | ||
"desc": "DHCP_RELAY_DISCARD_EVENT_INCORRECT_IFNAME failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_INCORRECT_TIMESTAMP": { | ||
"desc": "DHCP_RELAY_DISCARD_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISCARD_VALID": { | ||
"desc": "VALID DHCP_RELAY_DISCARD EVENT." | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISPARITY_INCORRECT_VLAN": { | ||
"desc": "DHCP_RELAY_DISPARITY_EVENT_INCORRECT_VLAN failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISPARITY_INCORRECT_DURATION": { | ||
"desc": "DHCP_RELAY_DISPARITY_EVENT_INCORRECT_DURATION failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISPARITY_INCORRECT_TIMESTAMP": { | ||
"desc": "DHCP_RELAY_DISPARITY_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_DHCP_RELAY_DHCP_RELAY_DISPARITY_VALID": { | ||
"desc": "VALID DHCP_RELAY_DISPARITY EVENT." | ||
} | ||
} |
115 changes: 115 additions & 0 deletions
115
src/sonic-yang-models/tests/yang_model_tests/tests/sonic-events-host.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,115 @@ | ||
{ | ||
"SONIC_EVENTS_HOST_DISK_USAGE_INCORRECT_USAGE": { | ||
"desc": "DISK_USAGE_EVENT_INCORRECT_USAGE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_DISK_USAGE_INCORRECT_LIMIT": { | ||
"desc": "DISK_USAGE_EVENT_INCORRECT_LIMIT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_DISK_USAGE_INCORRECT_TIMESTAMP": { | ||
"desc": "DISK_USAGE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_DISK_USAGE_VALID": { | ||
"desc": "VALID DISK_USAGE EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_MEMORY_USAGE_INCORRECT_USAGE": { | ||
"desc": "MEMORY_USAGE_EVENT_INCORRECT_USAGE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_MEMORY_USAGE_INCORRECT_LIMIT": { | ||
"desc": "MEMORY_USAGE_EVENT_INCORRECT_LIMIT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_MEMORY_USAGE_INCORRECT_TIMESTAMP": { | ||
"desc": "MEMORY_USAGE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_MEMORY_USAGE_VALID": { | ||
"desc": "VALID MEMORY_USAGE EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_CPU_USAGE_INCORRECT_USAGE": { | ||
"desc": "CPU_USAGE_EVENT_INCORRECT_USAGE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_CPU_USAGE_INCORRECT_LIMIT": { | ||
"desc": "CPU_USAGE_EVENT_INCORRECT_LIMIT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_CPU_USAGE_INCORRECT_TIMESTAMP": { | ||
"desc": "CPU_USAGE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_CPU_USAGE_VALID": { | ||
"desc": "VALID CPU_USAGE EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_SSHD_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_SSHD_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_SSHD_VALID": { | ||
"desc": "VALID EVENT_SSHD EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_DISK_INCORRECT_FAIL_TYPE": { | ||
"desc": "EVENT_DISK_EVENT_INCORRECT_FAIL_TYPE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_DISK_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_DISK_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_DISK_VALID": { | ||
"desc": "VALID EVENT_DISK EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_KERNEL_INCORRECT_FAIL_TYPE": { | ||
"desc": "EVENT_KERNEL_EVENT_INCORRECT_FAIL_TYPE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_KERNEL_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_KERNEL_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_KERNEL_VALID": { | ||
"desc": "VALID EVENT_KERNEL EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_DOWN_CTR_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_DOWN_CTR_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_DOWN_CTR_VALID": { | ||
"desc": "VALID EVENT_DOWN_CTR EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_STOPPED_CTR_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_STOPPED_CTR_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_STOPPED_CTR_VALID": { | ||
"desc": "VALID EVENT_STOPPED_CTR EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_WATCHDOG_TIMEOUT_INCORRECT_LIMIT": { | ||
"desc": "WATCHDOG_TIMEOUT_EVENT_INCORRECT_LIMIT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_HOST_WATCHDOG_TIMEOUT_INCORRECT_TIMESTAMP": { | ||
"desc": "WATCHDOG_TIMEOUT_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_WATCHDOG_TIMEOUT_VALID": { | ||
"desc": "VALID WATCHDOG_TIMEOUT EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_SEU_INCORRECT_TIMESTAMP": { | ||
"desc": "EVENT_SEU_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_EVENT_SEU_VALID": { | ||
"desc": "VALID EVENT_SEU EVENT." | ||
}, | ||
"SONIC_EVENTS_HOST_INVALID_FREELIST_INCORRECT_TIMESTAMP": { | ||
"desc": "INVALID_FREELIST_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_HOST_INVALID_FREELIST_VALID": { | ||
"desc": "VALID INVALID_FREELIST EVENT." | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
src/sonic-yang-models/tests/yang_model_tests/tests/sonic-events-swss.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,59 @@ | ||
{ | ||
"SONIC_EVENTS_SWSS_IF_STATE_INCORRECT_IFNAME": { | ||
"desc": "IF_STATE_EVENT_INCORRECT_IFNAME failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SWSS_IF_STATE_INCORRECT_STATUS": { | ||
"desc": "IF_STATE_EVENT_INCORRECT_STATUS failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_IF_STATE_INCORRECT_TIMESTAMP": { | ||
"desc": "IF_STATE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SWSS_IF_STATE_VALID": { | ||
"desc": "VALID IF_STATE EVENT." | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_INCORRECT_IFNAME": { | ||
"desc": "PFC_STORM_EVENT_INCORRECT_IFNAME failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_INCORRECT_QUEUE_INDEX": { | ||
"desc": "PFC_STORM_EVENT_INCORRECT_QUEUE_INDEX failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_INCORRECT_QUEUE_ID": { | ||
"desc": "PFC_STORM_EVENT_INCORRECT_QUEUE_ID failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_INCORRECT_PORT_ID": { | ||
"desc": "PFC_STORM_EVENT_INCORRECT_PORT_ID failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_INCORRECT_TIMESTAMP": { | ||
"desc": "PFC_STORM_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SWSS_PFC_STORM_VALID": { | ||
"desc": "VALID IF_STATE EVENT." | ||
}, | ||
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_INCORRECT_PERCENT": { | ||
"desc": "CHK_CRM_THRESHOLD_EVENT_INCORRECT_PERCENT failure.", | ||
"eStrKey": "Range" | ||
}, | ||
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_INCORRECT_USED_CNT": { | ||
"desc": "CHK_CRM_THRESHOLD_EVENT_INCORRECT_USED_CNT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_INCORRECT_FREE_CNT": { | ||
"desc": "CHK_CRM_THRESHOLD_EVENT_INCORRECT_FREE_CNT failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_INCORRECT_TIMESTAMP": { | ||
"desc": "CHK_CRM_THRESHOLD_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SWSS_CHK_CRM_THRESHOLD_VALID": { | ||
"desc": "VALID CHK_CRM_THRESHOLD EVENT." | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/sonic-yang-models/tests/yang_model_tests/tests/sonic-events-syncd.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,13 @@ | ||
{ | ||
"SONIC_EVENTS_SYNCD_SYNCD_FAILURE_INCORRECT_FAIL_TYPE": { | ||
"desc": "SYNCD_FAILURE_EVENT_INCORRECT_FAIL_TYPE failure.", | ||
"eStrKey": "InvalidValue" | ||
}, | ||
"SONIC_EVENTS_SYNCD_SYNCD_FAILURE_INCORRECT_TIMESTAMP": { | ||
"desc": "SYNCD_FAILURE_EVENT_INCORRECT_TIMESTAMP failure.", | ||
"eStrKey": "Pattern" | ||
}, | ||
"SONIC_EVENTS_SYNCD_SYNCD_FAILURE_VALID": { | ||
"desc": "VALID SYNCD_FAILURE EVENT." | ||
} | ||
} |
Oops, something went wrong.