Bug-2081: PCEP statistics
[bgpcep.git] / pcep / api / src / main / yang / pcep-session-stats.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module pcep-session-stats {
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:pcep:stats";
5     prefix "pcep-stats";
6
7     organization "Cisco Systems, Inc.";
8
9     contact "Milos Fabian <milfabia@cisco.com>";
10
11     description
12         "This module contains the base YANG definitions for
13          PCEP session statistics.
14
15         Copyright (c)2014 Cisco Systems, Inc. All rights reserved.;
16
17         This program and the accompanying materials are made available
18         under the terms of the Eclipse Public License v1.0 which
19         accompanies this distribution, and is available at
20         http://www.eclipse.org/legal/epl-v10.html";
21
22     revision "2014-10-06" {
23         description
24             "Initial revision";
25     }
26
27     grouping error {
28         description "PCEP Error-type/value.";
29         leaf error-type {
30             type uint8;
31             default 0;
32         }
33         leaf error-value {
34             type uint8;
35             default 0;
36         }
37     }
38
39     grouping preferences {
40         leaf keepalive {
41             description "Advertised keep-alive value.";
42             type uint8;
43             default 0;
44         }
45
46         leaf deadtimer {
47             description "Advertised deadtimer value.";
48             type uint8;
49             default 0;
50         }
51
52         leaf ip-address {
53             description "Peer's IP address.";
54             type string;
55             default "";
56         }
57
58         leaf session-id {
59             description "Peer's session identifier.";
60             type uint16;
61             default 0;
62         }
63     }
64
65     grouping pcep-session-state {
66         description "PCEP session statistics.";
67
68         container messages {
69             description "The statistics of PCEP received/sent messages from the PCE point of view.";
70             leaf received-msg-count {
71                 description "Total number of received PCEP messages.";
72                 type uint32;
73             }
74
75             leaf sent-msg-count {
76                 description "Total number of sent PCEP messages.";
77                 type uint32;
78             }
79
80             leaf last-sent-msg-timestamp {
81                 description "The timestamp of last sent message.";
82                 type uint32;
83             }
84
85             leaf unknown-msg-received {
86                 description "The number of received unknown messages.";
87                 type uint16;
88             }
89
90             container error-messages {
91                 description "The message statistics of received/sent PCErr messages.";
92                 leaf received-error-msg-count {
93                     description "Total number of received PCErr messages.";
94                     type uint32;
95                 }
96
97                 leaf sent-error-msg-count {
98                     description "Total number of sent PCErr messages.";
99                     type uint32;
100                 }
101
102                 container last-received-error {
103                     description "Type/value tuple of last received error.";
104                     uses error;
105                 }
106
107                 container last-sent-error {
108                     description "Type/value tuple of last sent error.";
109                     uses error;
110                 }
111             }
112         }
113
114         container local-pref {
115             description "The local (PCE) preferences.";
116             uses preferences;
117         }
118
119         container peer-pref {
120             description "The remote peer (PCC) preferences.";
121             uses preferences;
122         }
123     }
124 }