1 module aliveness-monitor {
2 namespace "urn:opendaylight:vpnservice:alivenessmonitor";
5 import ietf-inet-types {
7 revision-date "2013-07-15";
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; }
68 rpc monitor-profile-get {
71 uses monitor-profile-params;
75 leaf profile-id { type uint32; }
86 leaf monitor-id { type uint32; }
92 leaf monitor-id { type uint32; }
98 leaf monitor-id { type uint32; }
105 leaf monitor-id { type uint32; }
109 rpc monitor-profile-delete {
111 leaf profile-id { type uint32; }
115 // YANG Notifications
116 typedef liveness-state {
124 grouping liveness-event-state {
125 leaf monitor-id { type uint32; }
126 leaf monitor-state { type liveness-state; }
129 notification monitor-event {
130 container event-data {
131 uses liveness-event-state;
136 container monitor-profiles {
138 list monitor-profile {
140 leaf id { type uint32; }
141 uses monitor-profile-params;
145 container monitor-configs {
147 list monitoring-info {
149 leaf id { type uint32; }
154 typedef monitor-status {
162 container monitoring-states {
164 list monitoring-state {
166 leaf monitor-key { type string; } //Key to identify monitor-id from packet-in
167 leaf monitor-id { type uint32; }
168 leaf response-pending-count { type uint32; }
169 leaf request-count { type uint32; }
170 leaf state { type liveness-state; }
171 leaf status { type monitor-status; }
175 container monitorid-key-map {
177 list monitorid-key-entry {
179 leaf monitor-id { type uint32; }
180 leaf monitor-key { type string; }
184 container interface-monitor-map {
186 list interface-monitor-entry {
187 key "interface-name";
188 leaf interface-name { type string; }
189 leaf-list monitor-ids { type uint32; }