1 module aliveness-monitor {
2 namespace "urn:opendaylight:vpnservice:alivenessmonitor";
5 import ietf-inet-types {
9 revision "2015-06-29" {
10 description "YANG model describes methods for monitoring endpoints.";
20 typedef monitoring-mode {
27 choice endpoint-type {
29 leaf ip-address { type inet:ip-address; }
32 leaf interface-ip { type inet:ip-address; }
33 leaf interface-name { type string; }
36 leaf host-name { type string; }
41 grouping monitor-profile-params {
42 leaf monitor-interval { type uint32; } //Monitoring interval in milli-seconds
43 leaf monitor-window { type uint32; } //Number M of consecutive intervals to consider for monitoring
44 leaf failure-threshold { type uint32; } //Number N of missing messages in window to detect failure ("N out of M")
45 leaf protocol-type { type ether-types; }
48 grouping monitor-params {
49 leaf mode { type monitoring-mode; }
50 container source { uses endpoint; }
51 container destination { uses endpoint; }
52 leaf profile-id { type uint32; }
56 rpc monitor-profile-create {
59 uses monitor-profile-params;
63 leaf profile-id { type uint32; }
74 leaf monitor-id { type uint32; }
80 leaf monitor-id { type uint32; }
86 leaf monitor-id { type uint32; }
93 leaf monitor-id { type uint32; }
97 rpc monitor-profile-delete {
99 leaf profile-id { type uint32; }
103 // YANG Notifications
104 typedef liveness-state {
112 grouping liveness-event-state {
113 leaf monitor-id { type uint32; }
114 leaf monitor-state { type liveness-state; }
117 notification monitor-event {
118 container event-data {
119 uses liveness-event-state;
124 container monitor-profiles {
126 list monitor-profile {
128 leaf id { type uint32; }
129 uses monitor-profile-params;
133 container monitor-configs {
135 list monitoring-info {
137 leaf id { type uint32; }
142 typedef monitor-status {
150 container monitoring-states {
152 list monitoring-state {
154 leaf monitor-key { type string; } //Key to identify monitor-id from packet-in
155 leaf monitor-id { type uint32; }
156 leaf response-pending-count { type uint32; }
157 leaf request-count { type uint32; }
158 leaf state { type liveness-state; }
159 leaf status { type monitor-status; }
163 container monitorid-key-map {
165 list monitorid-key-entry {
167 leaf monitor-id { type uint32; }
168 leaf monitor-key { type string; }
172 container interface-monitor-map {
174 list interface-monitor-entry {
175 key "interface-name";
176 leaf interface-name { type string; }
177 leaf-list monitor-ids { type uint32; }