1 module aliveness-monitor {
2 namespace "urn:opendaylight:genius:alivenessmonitor";
5 import ietf-inet-types {
7 revision-date "2013-07-15";
10 import ietf-yang-types {
12 revision-date "2013-07-15";
15 revision "2016-04-11" {
16 description "YANG model describes methods for monitoring endpoints.";
27 typedef monitoring-mode {
34 choice endpoint-type {
36 leaf ip-address { type inet:ip-address; }
39 leaf mac-address { type yang:phys-address; }
40 leaf interface-ip { type inet:ip-address; }
41 leaf interface-name { type string; }
44 leaf host-name { type string; }
49 grouping monitor-profile-params {
50 leaf monitor-interval { type uint32; } //Monitoring interval in milli-seconds
51 leaf monitor-window { type uint32; } //Number M of consecutive intervals to consider for monitoring
52 leaf failure-threshold { type uint32; } //Number N of missing messages in window to detect failure ("N out of M")
53 leaf protocol-type { type ether-types; }
59 description "The shortest interval, in milliseconds, at which this BFD session offers to receive BFD control messages. Defaults to 1000";
63 description "The shortest interval, in milliseconds, at which this BFD session is willing to transmit BFD control messages. Defaults to 100";
67 description "An alternate receive interval, in milliseconds, that must be greater than or equal to bfd:min_rx. This
68 feature may be disabled by setting a value of 0";
71 leaf forwarding_if_rx {
72 description "either true or false. True to consider the interface capable of packet I/O as long as it continues to receive any packets (not just BFD packets)";
76 description "Set to true to notify the remote endpoint that traffic should not be forwarded to this system for some reason other than a
77 connectivity failure on the interface being monitored. Defaults to false";
81 description "either true or false. Set to true to make BFD accept only control messages with a tunnel key of zero.
82 By default, BFD accepts control messages with any tunnel key.";
87 grouping monitor-params {
88 leaf mode { type monitoring-mode; }
89 container source { uses endpoint; }
90 container destination { uses endpoint; }
91 leaf profile-id { type uint32; }
95 rpc monitor-profile-create {
98 uses monitor-profile-params;
102 leaf profile-id { type uint32; }
106 rpc monitor-profile-get {
109 uses monitor-profile-params;
113 leaf profile-id { type uint32; }
124 leaf monitor-id { type uint32; }
130 leaf monitor-id { type uint32; }
134 rpc monitor-unpause {
136 leaf monitor-id { type uint32; }
143 leaf monitor-id { type uint32; }
147 rpc monitor-profile-delete {
149 leaf profile-id { type uint32; }
153 // YANG Notifications
154 typedef liveness-state {
162 grouping liveness-event-state {
163 leaf monitor-id { type uint32; }
164 leaf monitor-state { type liveness-state; }
167 notification monitor-event {
168 container event-data {
169 uses liveness-event-state;
174 container monitor-profiles {
176 list monitor-profile {
178 leaf id { type uint32; }
179 uses monitor-profile-params;
183 container monitor-configs {
185 list monitoring-info {
187 leaf id { type uint32; }
192 typedef monitor-status {
200 container monitoring-states {
202 list monitoring-state {
204 leaf monitor-key { type string; } //Key to identify monitor-id from packet-in
205 leaf monitor-id { type uint32; }
206 leaf response-pending-count { type uint32; }
207 leaf request-count { type uint32; }
208 leaf state { type liveness-state; }
209 leaf status { type monitor-status; }
213 container monitorid-key-map {
215 list monitorid-key-entry {
217 leaf monitor-id { type uint32; }
218 leaf monitor-key { type string; }
222 container interface-monitor-map {
224 list interface-monitor-entry {
225 key "interface-name";
226 leaf interface-name { type string; }
227 leaf-list monitor-ids { type uint32; }