Change bgp notification leaf name and mem_usage leaf type (#13012)
#### Why I did it Improve naming convention for bgp notification events and change type of leaf for sonic-events-host mem usage from uint64 to decimal64 #### How I did it Replace "-" with "_" Replace uint64 with decimal64 #### How to verify it Run yang model unit tests #### Description for the changelog Change YANG model leaf naming convention for bgp notification
This commit is contained in:
parent
c9a33cb00e
commit
2068a2697a
@ -12,7 +12,7 @@
|
||||
{
|
||||
"tag": "notification",
|
||||
"regex": "NOTIFICATION: (received|sent) (?:to|from) neighbor ([0-9a-f:.]*[0-9a-f+]*)\\s*.* (\\d*)\/(\\d*)",
|
||||
"params": [ "is-sent", "ip", "major-code", "minor-code" ]
|
||||
"params": [ "is_sent", "ip", "major_code", "minor_code" ]
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -38,10 +38,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_MAJOR_CODE": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": "INCORRECT_MAJOR_CODE",
|
||||
"minor-code": 2,
|
||||
"major_code": "INCORRECT_MAJOR_CODE",
|
||||
"minor_code": 2,
|
||||
"ip": "10.0.0.0",
|
||||
"is-sent": true,
|
||||
"is_sent": true,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
}
|
||||
@ -49,10 +49,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_MINOR_CODE": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": 2,
|
||||
"minor-code": "INCORRECT_MINOR_CODE",
|
||||
"major_code": 2,
|
||||
"minor_code": "INCORRECT_MINOR_CODE",
|
||||
"ip": "10.0.0.0",
|
||||
"is-sent": true,
|
||||
"is_sent": true,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
}
|
||||
@ -60,10 +60,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_IP": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": 2,
|
||||
"minor-code": 2,
|
||||
"major_code": 2,
|
||||
"minor_code": 2,
|
||||
"ip": "INCORRECT_IP",
|
||||
"is-sent": true,
|
||||
"is_sent": true,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
}
|
||||
@ -71,10 +71,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_IS-SENT": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": 2,
|
||||
"minor-code": 2,
|
||||
"major_code": 2,
|
||||
"minor_code": 2,
|
||||
"ip": "10.0.0.0",
|
||||
"is-sent": "INCORRECT_VALUE",
|
||||
"is_sent": "INCORRECT_VALUE",
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
}
|
||||
@ -82,10 +82,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_INCORRECT_TIMESTAMP": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": 2,
|
||||
"minor-code": 2,
|
||||
"major_code": 2,
|
||||
"minor_code": 2,
|
||||
"ip": "10.0.0.0",
|
||||
"is-sent": true,
|
||||
"is_sent": true,
|
||||
"timestamp": "INCORRECT_TIMESTAMP"
|
||||
}
|
||||
}
|
||||
@ -93,10 +93,10 @@
|
||||
"SONIC_EVENTS_BGP_NOTIFICATION_VALID": {
|
||||
"sonic-events-bgp:sonic-events-bgp": {
|
||||
"sonic-events-bgp:notification": {
|
||||
"major-code": 2,
|
||||
"minor-code": 2,
|
||||
"major_code": 2,
|
||||
"minor_code": 2,
|
||||
"ip": "10.0.0.0",
|
||||
"is-sent": true,
|
||||
"is_sent": true,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +263,7 @@
|
||||
"sonic-events-host:sonic-events-host": {
|
||||
"sonic-events-host:mem-threshold-exceeded": {
|
||||
"ctr_name": "Invalid$",
|
||||
"mem_usage": 123456,
|
||||
"mem_usage": "123456.78",
|
||||
"threshold": 123456,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
@ -273,7 +273,7 @@
|
||||
"sonic-events-host:sonic-events-host": {
|
||||
"sonic-events-host:mem-threshold-exceeded": {
|
||||
"ctr_name": "invalid-length-for-ctr-name-too-long",
|
||||
"mem_usage": 123456,
|
||||
"mem_usage": "123456.78",
|
||||
"threshold": 123456,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
@ -293,7 +293,7 @@
|
||||
"sonic-events-host:sonic-events-host": {
|
||||
"sonic-events-host:mem-threshold-exceeded": {
|
||||
"ctr_name": "container_name",
|
||||
"mem_usage": 123456,
|
||||
"mem_usage": "123456.78",
|
||||
"threshold": "INCORRECT_THRESHOLD",
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
@ -303,7 +303,7 @@
|
||||
"sonic-events-host:sonic-events-host": {
|
||||
"sonic-events-host:mem-threshold-exceeded": {
|
||||
"ctr_name": "container_name",
|
||||
"mem_usage": 123456,
|
||||
"mem_usage": "123456.78",
|
||||
"threshold": 123456,
|
||||
"timestamp": "INCORRECT_TIMESTAMP"
|
||||
}
|
||||
@ -313,7 +313,7 @@
|
||||
"sonic-events-host:sonic-events-host": {
|
||||
"sonic-events-host:mem-threshold-exceeded": {
|
||||
"ctr_name": "container_name",
|
||||
"mem_usage": 123456,
|
||||
"mem_usage": "123456.78",
|
||||
"threshold": 123456,
|
||||
"timestamp": "1985-04-12T23:20:50.52Z"
|
||||
}
|
||||
|
@ -57,12 +57,12 @@ module sonic-events-bgp {
|
||||
The error codes as per IANA.
|
||||
The other params are as in the message";
|
||||
|
||||
leaf major-code {
|
||||
leaf major_code {
|
||||
type uint8;
|
||||
description "Major IANA error code; [RFC4271][RFC7313]";
|
||||
}
|
||||
|
||||
leaf minor-code {
|
||||
leaf minor_code {
|
||||
type uint8;
|
||||
description "Minor IANA error code; [RFC4271][RFC7313]";
|
||||
}
|
||||
@ -72,7 +72,7 @@ module sonic-events-bgp {
|
||||
description "IP of neighbor associated with this notification";
|
||||
}
|
||||
|
||||
leaf is-sent {
|
||||
leaf is_sent {
|
||||
type boolean;
|
||||
description "true - if this notification was for sent messages; false if it was for received.";
|
||||
}
|
||||
|
@ -196,7 +196,9 @@ module sonic-events-host {
|
||||
}
|
||||
|
||||
leaf mem_usage {
|
||||
type uint64;
|
||||
type decimal64 {
|
||||
fraction-digits 2;
|
||||
}
|
||||
description "Memory usage of process";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user