1 module aliveness-monitor {
2 namespace "urn:opendaylight:vpnservice:alivenessmonitor";
5 import ietf-inet-types {
7 revision-date "2010-09-24";
10 revision "2015-06-29" {
11 description "YANG model describes methods for monitoring endpoints.";
21 typedef monitoring-mode {
28 choice endpoint-type {
30 leaf ip-address { type inet:ip-address; }
33 leaf interface-ip { type inet:ip-address; }
34 leaf interface-name { type string; }
37 leaf host-name { type string; }
42 grouping monitor-profile-params {
43 leaf monitor-interval { type uint32; } //Monitoring interval in milli-seconds
44 leaf monitor-window { type uint32; } //Number M of consecutive intervals to consider for monitoring
45 leaf failure-threshold { type uint32; } //Number N of missing messages in window to detect failure ("N out of M")
46 leaf protocol-type { type ether-types; }
49 grouping monitor-params {
50 leaf mode { type monitoring-mode; }
51 container source { uses endpoint; }
52 container destination { uses endpoint; }
53 leaf profile-id { type uint32; }
57 rpc monitor-profile-create {
60 uses monitor-profile-params;
64 leaf profile-id { type uint32; }
75 leaf monitor-id { type uint32; }
81 leaf monitor-id { type uint32; }
87 leaf monitor-id { type uint32; }
94 leaf monitor-id { type uint32; }
98 rpc monitor-profile-delete {
100 leaf profile-id { type uint32; }
104 // YANG Notifications
105 typedef liveness-state {
113 grouping liveness-event-state {
114 leaf monitor-id { type uint32; }
115 leaf monitor-state { type liveness-state; }
118 notification monitor-event {
119 container event-data {
120 uses liveness-event-state;
125 container monitor-profiles {
127 list monitor-profile {
129 leaf id { type uint32; }
130 uses monitor-profile-params;
134 container monitor-configs {
136 list monitoring-info {
138 leaf id { type uint32; }
143 typedef monitor-status {
151 container monitoring-states {
153 list monitoring-state {
155 leaf monitor-key { type string; } //Key to identify monitor-id from packet-in
156 leaf monitor-id { type uint32; }
157 leaf response-pending-count { type uint32; }
158 leaf request-count { type uint32; }
159 leaf state { type liveness-state; }
160 leaf status { type monitor-status; }
164 container monitorid-key-map {
166 list monitorid-key-entry {
168 leaf monitor-id { type uint32; }
169 leaf monitor-key { type string; }
173 container interface-monitor-map {
175 list interface-monitor-entry {
176 key "interface-name";
177 leaf interface-name { type string; }
178 leaf-list monitor-ids { type uint32; }