From dec3bc5a88317ea6e417c54095bd98f768189ac4 Mon Sep 17 00:00:00 2001 From: Renuka Manavalan Date: Thu, 14 Jul 2022 17:54:37 +0000 Subject: [PATCH] Yang models are removed as they are being handled separately by Zain --- .../yang-events/sonic-events-bgp.yang | 97 --------- .../yang-events/sonic-events-common.yang | 46 ----- .../yang-events/sonic-events-dhcp_relay.yang | 79 -------- .../yang-events/sonic-events-host.yang | 188 ------------------ .../yang-events/sonic-events-pmon.yang | 42 ---- .../yang-events/sonic-events-swss.yang | 132 ------------ .../yang-events/sonic-events-syncd.yang | 60 ------ 7 files changed, 644 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 6c275c754e4b..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-bgp.yang +++ /dev/null @@ -1,97 +0,0 @@ -module sonic-events-bgp { - namespace "http://github.com/Azure/sonic-events-bgp"; - - yang-version 1.1; - - import sonic-events-common { - prefix evtcmn; - } - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - revision 2022-12-01 { - description "BGP alert events."; - } - - organization - "SONiC"; - - contact - "SONiC"; - - description - "SONIC BGP events"; - - 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 enumeration { - enum "up"; - enum "down"; - - } - 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 bbff8f87796e..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-common.yang +++ /dev/null @@ -1,46 +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"; - } - } -} 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 b4a07555a21a..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-dhcp_relay.yang +++ /dev/null @@ -1,79 +0,0 @@ -module sonic-events-dhcp-relay { - namespace "http://github.com/sonic-net/sonic-events-dhcp-relay"; - yang-version 1.1; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - import sonic-events-common { - prefix evtcmn; - } - - revision 2022-12-01 { - description "dhcp-relay alert events."; - } - - organization - "SONiC"; - - contact - "SONiC"; - - description - "SONIC dhcp-relay events"; - - 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 string; - description "Name of the i/f discarding"; - } - - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - - 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 string; - 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 95da1106ee5c..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-host.yang +++ /dev/null @@ -1,188 +0,0 @@ -module events-host { - namespace "http://github.com/sonic-net/sonic-events-host"; - yang-version 1.1; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - import sonic-events-common { - prefix evtcmn; - } - revision 2022-12-01 { - description "BGP alert events."; - } - - 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 { - evtcmn: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 { - evtcmn: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: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 6439eacaafc3..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-pmon.yang +++ /dev/null @@ -1,42 +0,0 @@ -module sonic-events-pmon { - namespace "http://github.com/sonic-net/sonic-events-pmon"; - yang-version 1.1; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - import sonic-events-common { - prefix evtcmn; - } - - revision 2022-12-01 { - description "pmon alert events."; - } - - organization - "SONiC"; - - contact - "SONiC"; - - description - "SONIC pmon events"; - - - 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 50ee7471b829..000000000000 --- a/src/sonic-yang-models/yang-events/sonic-events-swss.yang +++ /dev/null @@ -1,132 +0,0 @@ -module sonic-events-swss { - namespace "http://github.com/sonic-net/sonic-events-swss"; - yang-version 1.1; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - import sonic-events-common { - prefix evtcmn; - } - - revision 2022-12-01 { - description "SWSS alert events."; - } - - organization - "SONiC"; - - contact - "SONiC"; - - description - "SONIC SWSS events"; - - container redis-generic { - oc-alarm-types:MAJOR - - description " - Declares an event for a fatal error encountered by swss. - The asic-index of the failing process is the only param."; - - leaf asic_index { - type uint8; - description "ASIC index in case of multi asic platform"; - default 0; - } - - uses evtcmn:sonic-events-cmn; - } - - 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 string; - description "Interface name"; - } - - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - - leaf status { - type enumeration { - enum "up"; - enum "down"; - } - 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 string; - description "Interface name"; - } - - type leafref { - path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; - } - - leaf queue_index { - type uint8; - } - - leaf queue_id { - type uint64_t; - } - - leaf port_id { - type uint64_t; - } - - leaf timestamp { - type yang::date-and-time; - description "time of the event"; - } - } - - 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 8a8a62579c99..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; - - import openconfig-alarm-types { - prefix oc-alarm-types; - } - - import sonic-events-common { - prefix evtcmn; - } - - revision 2022-12-01 { - description "syncd alert events."; - } - - organization - "SONiC"; - - contact - "SONiC"; - - description - "SONIC syncd events"; - - 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; - } -} -