Skip to content

Commit

Permalink
Proposed yang model changes (sonic-net#35)
Browse files Browse the repository at this point in the history
Add yang models for events and unit tests
  • Loading branch information
zbud-msft authored Oct 4, 2022
1 parent 1527ad2 commit 617559c
Show file tree
Hide file tree
Showing 17 changed files with 1,473 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def run(self):
'./yang-models/sonic-device_neighbor.yang',
'./yang-models/sonic-device_neighbor_metadata.yang',
'./yang-models/sonic-dhcpv6-relay.yang',
'./yang-models/sonic-events-bgp.yang',
'./yang-models/sonic-events-common.yang',
'./yang-models/sonic-events-dhcp-relay.yang',
'./yang-models/sonic-events-host.yang',
'./yang-models/sonic-events-swss.yang',
'./yang-models/sonic-events-syncd.yang',
'./yang-models/sonic-extension.yang',
'./yang-models/sonic-flex_counter.yang',
'./yang-models/sonic-feature.yang',
Expand Down Expand Up @@ -174,6 +180,12 @@ def run(self):
'./cvlyang-models/sonic-crm.yang',
'./cvlyang-models/sonic-device_metadata.yang',
'./cvlyang-models/sonic-device_neighbor.yang',
'./cvlyang-models/sonic-events-bgp.yang',
'./cvlyang-models/sonic-events-common.yang',
'./cvlyang-models/sonic-events-dhcp-relay.yang',
'./cvlyang-models/sonic-events-host.yang',
'./cvlyang-models/sonic-events-swss.yang',
'./cvlyang-models/sonic-events-syncd.yang',
'./cvlyang-models/sonic-device_neighbor_metadata.yang',
'./cvlyang-models/sonic-extension.yang',
'./cvlyang-models/sonic-flex_counter.yang',
Expand Down
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."
}
}
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."
}
}
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."
}
}
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."
}
}
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."
}
}
Loading

0 comments on commit 617559c

Please sign in to comment.