From f782f4272569ec3b7d5e995b3265c8e5d2a76761 Mon Sep 17 00:00:00 2001 From: Zain Budhwani <99770260+zbud-msft@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:08:40 -0700 Subject: [PATCH] Revert "Add Structured events yang models (#21)" (#24) This reverts commit 42d718c65ff1d2b0ed78c1ce82c610266394a8a9. --- .../yang-events/sonic-events-bgp.yang | 95 --------- .../yang-events/sonic-events-common.yang | 67 ------- .../yang-events/sonic-events-dhcp_relay.yang | 78 -------- .../yang-events/sonic-events-host.yang | 189 ------------------ .../yang-events/sonic-events-pmon.yang | 40 ---- .../yang-events/sonic-events-swss.yang | 105 ---------- .../yang-events/sonic-events-syncd.yang | 60 ------ 7 files changed, 634 deletions(-) delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-bgp.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-common.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-host.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-pmon.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-swss.yang delete mode 100644 src/sonic-yang-models/yang-events/sonic-events-syncd.yang diff --git a/src/sonic-yang-models/yang-events/sonic-events-bgp.yang b/src/sonic-yang-models/yang-events/sonic-events-bgp.yang deleted file mode 100644 index 44a4a79e72fa..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-bgp.yang +++ /dev/null @@ -1,95 +0,0 @@ -module sonic-events-bgp { - namespace "http://github.com/Azure/sonic-events-bgp"; - prefix events-bgp; - yang-version 1.1; - - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-types { - prefix stypes; - } - - revision 2022-12-01 { - description "BGP alert events."; - } - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC BGP events"; - - container sonic-events-bgp { - container bgp-state { - oc-alarm-types:MINOR - - description " - Declares an event for BGP state for a neighbor IP going up/down."; - - leaf ip { - type inet:ip-address; - description "IP of neighbor"; - } - - leaf status { - type stypes:admin_status; - description "Provides the status as up (true) or down (false)"; - } - - uses evtcmn:sonic-events-cmn; - } - - container notification { - oc-alarm-types:MAJOR - - description " - Reports an notification. - The error codes as per IANA. - The other params are as in the message"; - - leaf major-code { - type uint8; - description "Major IANA error code; [RFC4271][RFC7313]"; - } - - leaf minor-code { - type uint8; - description "Minor IANA error code; [RFC4271][RFC7313]"; - } - - leaf ip { - type inet:ip-address; - description "IP of neighbor associated with this notification"; - } - - leaf ASN { - type uint32; - description "ASN number from the notification"; - } - - leaf is-sent { - type boolean; - description "true - if this notification was for sent messages; false if it was for received."; - } - - uses evtcmn:sonic-events-cmn; - } - - container zebra-no-buff { - oc-alarm-types:MAJOR - - description " - Declares an event for zebra running out of buffer. - This event does not have any other parameter. - Hence source + tag identifies an event"; - - uses evtcmn:sonic-events-cmn; - } - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-common.yang b/src/sonic-yang-models/yang-events/sonic-events-common.yang deleted file mode 100644 index 595bf39ca9b1..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-common.yang +++ /dev/null @@ -1,67 +0,0 @@ -module sonic-events-common { - namespace "http://github.com/Azure/sonic-events-common"; - prefix evtcmn; - yang-version 1.1; - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC Events common definition"; - revision 2022-12-01 { - description - "Common reusable definitions"; - } - - grouping sonic-events-cmn { - leaf timestamp { - type yang::date-and-time; - description "time of the event"; - } - } - - grouping sonic-events-usage { - leaf usage { - type uint8 { - range "0..100" { - error-message "Incorrect val for %"; - } - } - description "Percentage in use"; - } - - leaf limit { - type uint8 { - range "0..100" { - error-message "Incorrect val for %"; - } - } - description "Percentage limit set"; - } - } - - identity EVENT_SEVERITY { - description - "Base identity for event severities. Severities 2-4 - are supported"; - } - - identity EVENT_SEVERITY_2 { - base EVENT_SEVERITY; - description - "Indicates that the severity level of this type of event is 2"; - } - - identity EVENT_SEVERITY_3 { - base EVENT_SEVERITY; - description - "Indicates that the severity level of this type of event is 3"; - } - - identity EVENT_SEVERITY_4 { - base EVENT_SEVERITY; - description - "Indicates that the severity level of this type of event is 4"; - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang b/src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang deleted file mode 100644 index 452bfab7c49a..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang +++ /dev/null @@ -1,78 +0,0 @@ -module sonic-events-dhcp-relay { - namespace "http://github.com/sonic-net/sonic-events-dhcp-relay"; - yang-version 1.1; - prefix events-dhcp-relay; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - revision 2022-12-01 { - description "dhcp-relay alert events."; - } - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC dhcp-relay events"; - - container sonic-events-dhcp-relay { - container dhcp-relay-discard { - oc-alarm-types:MAJOR - - description " - Declares an event for dhcp-relay discarding packet on an - interface due to missing IP address assigned. - Params: - name of the interface discarding. - class of the missing IP address as IPv4 or IPv6."; - - leaf ip_class { - type enumeration { - enum "IPv4"; - enum "IPv6"; - } - description "Class of IP address missing"; - } - - leaf ifname { - type leafref { - path "/prt:sonic-port/prt:PORT/prt:PORT_LIST/prt:name"; - } - description "Name of the i/f discarding"; - } - - uses evtcmn:sonic-events-cmn; - } - - container dhcp-relay-disparity { - oc-alarm-types:MAJOR - - description " - Declares an event for disparity detected in - DHCP Relay behavior by dhcpmon. - parameters: - vlan that shows this disparity - The duration of disparity"; - - leaf vlan { - type leafref { - path "/vlan:sonic-vlan/vlan:VLAN/vlan:VLAN_LIST/vlan:name"; - } - description "Name of the vlan affected"; - } - - leaf duration { - type uint32; - description "Duration of disparity"; - } - - uses evtcmn:sonic-events-cmn; - } - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-host.yang b/src/sonic-yang-models/yang-events/sonic-events-host.yang deleted file mode 100644 index 606ce661051e..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-host.yang +++ /dev/null @@ -1,189 +0,0 @@ -module sonic-events-host { - namespace "http://github.com/sonic-net/sonic-events-host"; - yang-version 1.1; - prefix events-host; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - revision 2022-12-01 { - description "BGP alert events."; - } - - container sonic-events-host { - container disk-usage { - oc-alarm-types:MINOR - - description " - Declares an event for disk usage crossing set limit - The parameters describe the usage & limit set."; - - leaf fs { - type string; - description "Name of the file system"; - default ""; - } - - uses evtcmn:sonic-events-usage; - - uses evtcmn:sonic-events-cmn; - } - - container memory-usage { - oc-alarm-types:MINOR - - description " - Declares an event for memory usage crossing set limit - The parameters describe the usage & limit set."; - - uses evtcmn:sonic-events-usage; - - uses evtcmn:sonic-events-cmn; - } - - container event-sshd { - oc-alarm-types:MINOR - - description " - Declares an event reported by sshd. - The fail type declares the type of failure. - INCORRECT_PASSWORD - denotes that sshd is sending - wrong password to AAA to intentionally fail this login."; - - leaf fail_type { - type enumeration { - enum "INCORRECT_PASSWD"; - } - description "Type of failure"; - } - - uses evtcmn:sonic-events-cmn; - } - - container event-disk { - oc-alarm-types:MINOR - - description " - Declares an event reported by disk check. - The fail type declares the type of failure. - read-only - denotes that disk is in RO state."; - - leaf fail_type { - type enumeration { - enum "read_only"; - } - description "Type of failure"; - } - - uses evtcmn:sonic-events-cmn; - } - - container event-kernel { - oc-alarm-types:MINOR - - description " - Declares an event reported by kernel. - The fail type declares the type of failure."; - - leaf fail_type { - type enumeration { - enum "write_failed"; - enum "write_protected"; - enum "remount_read_only"; - enum "aufs_read_lock"; - enum "invalid_freelist"; - enum "zlib_decompress"; - } - description "Type of failure"; - } - - leaf msg { - type string; - description "human readable hint text"; - default ""; - } - - uses evtcmn:sonic-events-cmn; - } - - container event-monit-proc { - eventcmn:EVENT_SEVERITY_2 - - description " - Declares an event reported by monit for a process - that is not running. - Params: - Name of the process that is not running. - The ASIC-index of that process."; - - leaf proc_name { - type string; - description "Name of the process not running"; - default ""; - } - - leaf asic_index { - type uint8; - description "ASIC index in case of multi asic platform"; - default 0; - } - - uses evtcmn:sonic-events-cmn; - } - - container event-monit-status { - eventcmn:EVENT_SEVERITY_2 - - description " - Declares an event reported by monit for status check - failure for a process - Params: - Name of the process that is not running. - The ASIC-index of that process."; - - leaf entity { - type string; - description "Name of the failing entity"; - default ""; - } - - leaf asic_index { - type uint8; - description "ASIC index in case of multi asic platform"; - default 0; - } - - leaf reason { - type string; - description "Human readble text explaining failure"; - default ""; - } - - uses evtcmn:sonic-events-cmn; - } - - container event-platform { - evtcmn:EVENT_SEVERITY_2 - - description " - Declares an event for platform related failure. - Params: - fail_type provides the type of failure."; - - leaf fail_type { - type enumeration { - enum "watchdog_timeout"; - enum "switch_parity_error"; - enum "SEU_error"; - } - description "Type of failure"; - } - - uses evtcmn:sonic-events-cmn; - } - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-pmon.yang b/src/sonic-yang-models/yang-events/sonic-events-pmon.yang deleted file mode 100644 index a653e955915a..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-pmon.yang +++ /dev/null @@ -1,40 +0,0 @@ -module sonic-events-pmon { - namespace "http://github.com/sonic-net/sonic-events-pmon"; - yang-version 1.1; - prefix events-pmon; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - revision 2022-12-01 { - description "pmon alert events."; - } - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC pmon events"; - - container sonic-events-pmon { - container pmon-exited { - oc-alarm-types:MAJOR - - description " - Declares an event reportes by pmon for an unexpected exit. - The exited entity is the only param"; - - leaf entity { - type string; - description "entity that had unexpected exit"; - } - - uses evtcmn:sonic-events-cmn; - } - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-swss.yang b/src/sonic-yang-models/yang-events/sonic-events-swss.yang deleted file mode 100644 index ded47fead534..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-swss.yang +++ /dev/null @@ -1,105 +0,0 @@ -module sonic-events-swss { - namespace "http://github.com/sonic-net/sonic-events-swss"; - yang-version 1.1; - prefix events-swss; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - import sonic-types { - prefix stypes; - } - revision 2022-12-01 { - description "SWSS alert events."; - } - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC SWSS events"; - - container sonic-events-swss { - container if-state { - oc-alarm-types:MINOR - - description " - Declares an event for i/f flap. - The name of the flapping i/f and status are the only params."; - - leaf ifname { - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - description "Interface name"; - } - - leaf status { - type stypes:admin_status; - description "Provides the status as up (true) or down (false)"; - } - - uses evtcmn:sonic-events-cmn; - } - - container pfc-storm { - oc-alarm-types:MAJOR - - description " - Declares an event for PFC storm. - The name of the i/f facing the storm is the only param."; - - leaf ifname { - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - description "Interface name"; - } - - leaf queue_index { - type uint8; - } - - leaf queue_id { - type uint64_t; - } - - leaf port_id { - type uint64_t; - } - - uses evtcmn:sonic-events-cmn; - } - - container chk_crm_threshold { - oc-alarm-types:MAJOR - - description " - Declares an event for CRM threshold."; - - leaf percent { - type uint8 { - range "0..100" { - error-message "Invalid percentage value"; - } - } - description "percentage used"; - } - - leaf used_cnt { - type uint8; - } - - leaf free_cnt { - type uint64_t; - } - - uses evtcmn:sonic-events-cmn; - } - } -} diff --git a/src/sonic-yang-models/yang-events/sonic-events-syncd.yang b/src/sonic-yang-models/yang-events/sonic-events-syncd.yang deleted file mode 100644 index 6965ff4fe5ac..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-syncd.yang +++ /dev/null @@ -1,60 +0,0 @@ -module sonic-events-syncd { - namespace "http://github.com/sonic-net/sonic-events-syncd"; - yang-version 1.1; - prefix events-syncd; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - import sonic-events-common { - prefix evtcmn; - revision-date 2022-12-01; - } - revision 2022-12-01 { - description "syncd alert events."; - } - - organization - "SONiC"; - contact - "SONiC"; - description - "SONIC syncd events"; - - container sonic-events-syncd { - container syncd_failure { - oc-alarm-types:MAJOR - - description " - Declares an event for all types of syncd failure. - The type of failure and the asic-index of failing syncd are - provided along with a human readable message to give the - dev debugging additional info."; - - leaf asic_index { - type uint8; - description "ASIC index in case of multi asic platform"; - default 0; - } - - leaf fail_type { - type enumeration { - enum "route_add_failed"; - enum "switch_event_2"; - enum "brcm_sai_switch_assert"; - enum "assert"; - enum "mmu_err"; - } - } - - leaf msg { - type string; - description "human readable hint text" - default ""; - } - - uses evtcmn:sonic-events-cmn; - } - } -} -