Mass-convert all compontents to use -no-zone addresses
[bgpcep.git] / bmp / bmp-api / src / main / yang / bmp-monitor.yang
1 module bmp-monitor {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:bmp-monitor";
4     prefix "bmp-mon";
5
6     import bgp-rib { prefix rib; revision-date 2018-03-29; }
7     import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; }
8     import bmp-message { prefix bmp-msg; revision-date 2018-03-29; }
9     import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
10     import ietf-yang-types { prefix yang; revision-date 2013-07-15; }
11
12     organization "Cisco Systems, Inc.";
13     contact "Milos Fabian <milfabia@cisco.com>";
14
15     description
16         "This module contains the base data model of a BMP monitor.
17
18         Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
19
20         This program and the accompanying materials are made available
21         under the terms of the Eclipse Public License v1.0 which
22         accompanies this distribution, and is available at
23         http://www.eclipse.org/legal/epl-v10.html";
24
25     revision "2018-03-29" {
26         description "Add support for add-path for all afi/safi.";
27     }
28
29     revision "2017-12-07" {
30         description "Add support for add-path in base BGP NLRI.";
31     }
32
33     revision "2015-05-12" {
34         description
35             "Initial revision.";
36     }
37
38     typedef router-id {
39         description "Monitored router identified by IP address.";
40         type inet:ip-address-no-zone;
41     }
42
43     typedef monitor-id {
44         description "The name of BMP monitoring station instance.";
45         type string;
46     }
47
48     typedef status {
49         type enumeration {
50             enum up;
51             enum down;
52         }
53     }
54
55     grouping afi-safi-route-counter {
56         list afi-safi {
57             uses bgp-mp:bgp-table-type;
58             key "afi safi";
59             leaf count {
60                 type yang:gauge64;
61             }
62         }
63     }
64
65     grouping peers {
66         list peer {
67             key "peer-id";
68             leaf peer-id {
69                 type rib:peer-id;
70             }
71             uses bmp-msg:peer;
72             leaf router-distinguisher {
73                 type string;
74             }
75             container peer-session {
76                 uses bmp-msg:peer-up;
77                 leaf status {
78                     type status;
79                 }
80                 uses bmp-msg:timestamp;
81             }
82             container stats {
83                 leaf rejected-prefixes {
84                     type yang:counter32;
85                 }
86                 leaf duplicate-prefix-advertisements {
87                     type yang:counter32;
88                 }
89                 leaf duplicate-withdraws {
90                     type yang:counter32;
91                 }
92                 leaf invalidated-cluster-list-loop {
93                     type yang:counter32;
94                 }
95                 leaf invalidated-as-path-loop {
96                     type yang:counter32;
97                 }
98                 leaf invalidated-originator-id {
99                     type yang:counter32;
100                 }
101                 leaf invalidated-as-confed-loop {
102                     type yang:counter32;
103                 }
104                 leaf adj-ribs-in-routes {
105                     type yang:gauge64;
106                 }
107                 leaf loc-rib-routes {
108                     type yang:gauge64;
109                 }
110                 container per-afi-safi-adj-rib-in-routes {
111                     uses afi-safi-route-counter;
112                 }
113                 container per-afi-safi-loc-rib-routes {
114                     uses afi-safi-route-counter;
115                 }
116                 leaf updates-treated-as-withdraw {
117                     type yang:counter32;
118                 }
119                 leaf prefixes-treated-as-withdraw {
120                     type yang:counter32;
121                 }
122                 leaf duplicate-updates {
123                     type yang:counter32;
124                 }
125                 uses bmp-msg:timestamp;
126             }
127             container pre-policy-rib {
128                 uses rib:rib;
129             }
130             container post-policy-rib {
131                 uses rib:rib;
132             }
133             container mirrors {
134                 leaf information {
135                     type bmp-msg:mirror-information-code;
136                 }
137                 uses bmp-msg:timestamp;
138             }
139         }
140     }
141
142     grouping routers {
143         list router {
144             key "router-id";
145             leaf name {
146                 type string;
147             }
148             leaf description {
149                 type string;
150             }
151             leaf info {
152                 type string;
153             }
154             leaf router-id {
155                 type router-id;
156             }
157             leaf status {
158                 type status;
159             }
160             uses peers;
161         }
162     }
163
164     container bmp-monitor {
165         list monitor {
166             config false;
167             key "monitor-id";
168             leaf monitor-id {
169                 type monitor-id;
170             }
171             uses routers;
172         }
173     }
174 }