operational state of LLGR procedures
[bgpcep.git] / bgp / openconfig-api / src / main / yang / bgp-openconfig-extensions.yang
1 module bgp-openconfig-extensions {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions";
4     prefix "odl-oc-ext";
5
6     import openconfig-bgp-types { prefix bgp-types; }
7     import openconfig-network-instance { prefix netinst; }
8     import openconfig-bgp { prefix openconfig-bgp; }
9     import ietf-inet-types { prefix inet; }
10     import yang-ext { prefix ext; revision-date 2013-07-09; }
11     import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; }
12     import openconfig-bgp-operational { prefix bgp-op; }
13
14     organization "Cisco Systems, Inc.";
15     contact "Milos Fabian <milfabia@cisco.com>";
16
17     description
18         "This module contains the custom extensions to the
19         draft-ietf-idr-bgp-model-00 Yang data models.
20
21         Copyright (c)2015 Cisco Systems, Inc. All rights reserved.
22
23         This program and the accompanying materials are made available
24         under the terms of the Eclipse Public License v1.0 which
25         accompanies this distribution, and is available at
26         http://www.eclipse.org/legal/epl-v10.html";
27
28     revision "2018-03-29" {
29         description "Add support for add-path for all afi/safi.";
30     }
31
32     revision 2018-03-21 {
33         description "Augment Peer group with transport config.";
34     }
35
36     revision 2017-12-07 {
37         description "Add support for add-path in base BGP NLRI.";
38     }
39
40     revision 2016-06-14 {
41         description
42             "Update to follow naming conventions.";
43     }
44
45     revision 2015-09-30 {
46         description "Initial revision";
47     }
48
49     identity IPV4-FLOW {
50         base bgp-types:afi-safi-type;
51         description
52           "IPv4 Flow specification (AFI,SAFI = 1,133)";
53         reference "https://tools.ietf.org/html/rfc5575";
54     }
55
56     identity IPV6-FLOW {
57         base bgp-types:afi-safi-type;
58         description
59           "IPv6 Flow specification (AFI,SAFI = 2,133)";
60         reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06";
61     }
62
63     identity IPV6-L3VPN-FLOW {
64         base bgp-types:afi-safi-type;
65         description
66           "IPv6 Flow specification (AFI,SAFI = 2,133)";
67         reference "https://tools.ietf.org/html/draft-ietf-idr-flow-spec-v6-06";
68     }
69
70     identity IPV4-L3VPN-FLOW {
71         base bgp-types:afi-safi-type;
72         description
73           "IPv6 Flow specification (AFI,SAFI = 2,133)";
74         reference "https://tools.ietf.org/html/rfc5575";
75     }
76
77     identity LINKSTATE {
78         base bgp-types:afi-safi-type;
79         description
80           "Link-State (AFI,SAFI = 16388,71)";
81         reference "https://tools.ietf.org/html/rfc7752";
82     }
83
84     identity IPV4-MCAST-VPN {
85         base bgp-types:afi-safi-type;
86         description
87             "Multicast IPv4 VPN (AFI,SAFI = 1,5)";
88         reference "RFC6514";
89     }
90
91     identity IPV6-MCAST-VPN {
92         base bgp-types:afi-safi-type;
93         description
94             "Multicast IPv6 VPN (AFI,SAFI = 2,5)";
95         reference "RFC6514";
96     }
97
98     identity ROUTE-TARGET-CONSTRAIN {
99         base bgp-types:afi-safi-type;
100         description
101             "Route Target constrains (AFI,SAFI = 1,132)";
102         reference "RFC4684";
103     }
104
105     grouping transport-config {
106         leaf remote-port {
107             type inet:port-number;
108             default 179;
109             description
110                 "Remote port being used by the peer for the TCP session
111                  supporting the BGP session";
112         }
113     }
114
115     grouping neighbor-afi-safi-ll-graceful-restart-state {
116         leaf ll-received {
117             type boolean;
118             description
119                 "This leaf indicates whether the neighbor advertised the
120                 ability to support long-lived graceful-restart for this AFI-SAFI";
121         }
122         leaf ll-advertised {
123             type boolean;
124             description
125                 "This leaf indicates whether the ability to support
126                 long-lived graceful-restart has been advertised to the peer";
127         }
128         leaf ll-stale-timer {
129             type uint32;
130             description
131                 "Value of timer used during long-lived graceful restart in nseconds.
132                 If table is both advertised and received use lower value. Zero value
133                 means table is not supported by any side";
134             units seconds;
135         }
136     }
137
138     augment /netinst:network-instances/netinst:network-instance/netinst:protocols/netinst:protocol {
139         ext:augment-identifier network-instance-protocol;
140         uses openconfig-bgp:bgp-top {
141             augment bgp/neighbors/neighbor/afi-safis/afi-safi {
142                 ext:augment-identifier neighbor-add-paths-config;
143                 uses openconfig-bgp:bgp-neighbor-add-paths_config;
144             }
145             augment bgp/global/afi-safis/afi-safi {
146                 ext:augment-identifier global-add-paths-config;
147                 uses openconfig-bgp:bgp-neighbor-add-paths_config;
148             }
149             augment bgp/global/afi-safis/afi-safi/state {
150                 ext:augment-identifier global-afi-safi_state-augmentation;
151                 uses bgp-op:bgp-global-afi-safi_state;
152             }
153             augment bgp/neighbors/neighbor/transport/config {
154                 ext:augment-identifier neighbor-transport-config;
155                 uses transport-config;
156             }
157             augment bgp/neighbors/neighbor/config {
158                 ext:augment-identifier neighbor-peer-group-config;
159                 description
160                     "Augmentation to allow association of a neighbor with a
161                      peer-group";
162                 uses openconfig-bgp:bgp-neighbor-peer-group_config;
163             }
164             augment bgp/global/config {
165                 ext:augment-identifier global-config-augmentation;
166                 leaf route-reflector-cluster-id {
167                     type bgp-types:rr-cluster-id-type;
168                     description
169                       "Route-reflector cluster id to use when local router is
170                       configured as a route reflector.";
171                   }
172             }
173             augment bgp/neighbors/neighbor/state {
174                 ext:augment-identifier neighbor_state-augmentation;
175                 uses bgp-op:bgp-neighbor_state;
176             }
177             augment bgp/neighbors/neighbor/state {
178                 ext:augment-identifier bgp-neighbor_state-augmentation;
179                 container messages {
180                     container sent {
181                         uses bgp-op:bgp-neighbor-message-counters-sent_state;
182                     }
183
184                     container received {
185                         uses bgp-op:bgp-neighbor-message-counters-received_state;
186                     }
187                 }
188
189                 container queues {
190                     uses bgp-op:bgp-neighbor-queue-counters_state;
191                 }
192             }
193             augment bgp/neighbors/neighbor/timers/state {
194                 ext:augment-identifier neighbor-timers_state-augmentation;
195                 uses bgp-op:bgp-neighbor-timers_state;
196             }
197             augment bgp/neighbors/neighbor/transport/state {
198                 ext:augment-identifier neighbor-transport_state-augmentation;
199                 uses bgp-op:bgp-neighbor-transport_state;
200             }
201             augment bgp/neighbors/neighbor/error-handling/state {
202                 ext:augment-identifier neighbor-error-handling_state-augmentation;
203                 uses bgp-op:bgp-neighbor-error-handling_state;
204             }
205             augment bgp/neighbors/neighbor/afi-safis/afi-safi/state {
206                 ext:augment-identifier neighbor-afi-safi_state-augmentation;
207                 uses bgp-op:bgp-neighbor-afi-safi_state;
208             }
209             augment bgp/neighbors/neighbor/graceful-restart/state {
210                 ext:augment-identifier neighbor-graceful-restart_state-augmentation;
211                 uses bgp-op:bgp-afi-safi-graceful-restart_state;
212             }
213             augment bgp/neighbors/neighbor/afi-safis/afi-safi/graceful-restart/state {
214                 ext:augment-identifier neighbor-afi-safi-graceful-restart_state-augmentation;
215                 uses bgp-op:bgp-neighbor-afi-safi-graceful-restart_state;
216                 uses neighbor-afi-safi-ll-graceful-restart-state;
217             }
218             augment bgp/peer-groups/peer-group/state {
219                 ext:augment-identifier peer-group_state-augmentation;
220                 uses bgp-op:bgp-peer-group_state;
221             }
222             augment bgp/peer-groups/peer-group/transport/config {
223                 ext:augment-identifier peer-group-transport-config;
224                 uses transport-config;
225             }
226             augment bgp/peer-groups/peer-group/afi-safis/afi-safi {
227                 ext:augment-identifier group-add-paths-config;
228                 uses openconfig-bgp:bgp-neighbor-add-paths_config;
229             }
230         }
231     }
232
233 }