3 namespace "urn:opendaylight:params:xml:ns:yang:bgp-linkstate";
6 import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
7 import bgp-message { prefix bgp-msg; revision-date 2013-09-19; }
8 import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
9 import bgp-rib { prefix bgp-rib; revision-date 2013-09-25; }
10 import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
11 import network-concepts { prefix netc; revision-date 2013-11-25; }
12 import rsvp { prefix rsvp; revision-date 2013-08-20; }
13 import bgp-segment-routing { prefix bgp-sr; revision-date 2015-02-06; }
15 organization "Cisco Systems, Inc.";
16 contact "Dana Kutenicsova <dkutenic@cisco.com>";
19 "This module contains the base data model of a BGP message.
20 It rolls up the definitions contained in RFC4271
21 and draft-ietf-idr-ls-distribution-03.
23 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
25 This program and the accompanying materials are made available
26 under the terms of the Eclipse Public License v1.0 which
27 accompanies this distribution, and is available at
28 http://www.eclipse.org/legal/epl-v10.html";
30 revision "2015-02-10" {
32 "Updated to include segment routing.";
35 revision "2013-11-25" {
37 "Updated to cover network-concepts.";
40 revision "2013-09-18" {
43 reference "draft-ietf-idr-ls-distribution-03";
46 identity linkstate-address-family {
47 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
49 base bgp-t:address-family;
52 identity linkstate-subsequent-address-family {
53 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
55 base bgp-t:subsequent-address-family;
59 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
77 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
100 typedef ospf-route-type {
101 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1";
124 typedef route-distinguisher {
132 typedef domain-identifier {
133 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
137 typedef area-identifier {
138 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
142 typedef ipv4-interface-identifier {
143 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
144 type inet:ipv4-address;
147 typedef ipv6-interface-identifier {
148 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
149 type inet:ipv6-address;
152 typedef ospf-interface-identifier {
153 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
157 typedef topology-identifier {
158 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5";
165 grouping isis-router-identifier {
166 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
168 type netc:iso-system-identifier;
173 grouping isis-lan-identifier {
174 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
175 container is-is-router-identifier {
176 uses isis-router-identifier;
186 grouping ospf-router-identifier {
187 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
188 leaf ospf-router-id {
194 grouping ospf-v2-lan-identifier {
195 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
196 uses ospf-router-identifier;
198 type ipv4-interface-identifier;
203 grouping ospf-v3-lan-identifier {
204 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
205 uses ospf-router-identifier;
207 type ospf-interface-identifier;
212 grouping node-identifier {
217 type area-identifier;
220 type domain-identifier;
222 choice c-router-identifier {
223 case isis-node-case {
224 container isis-node {
225 uses isis-router-identifier;
228 case isis-pseudonode-case {
229 container isis-pseudonode {
230 uses isis-lan-identifier;
233 case ospf-node-case {
234 container ospf-node {
235 uses ospf-router-identifier;
238 case ospf-pseudonode-case {
239 container ospf-pseudonode {
240 uses ospf-v3-lan-identifier;
246 grouping link-lr-identifiers {
247 reference "http://tools.ietf.org/html/rfc5307";
248 leaf link-local-identifier {
251 leaf link-remote-identifier {
256 grouping prefix-identifiers {
257 leaf multi-topology-id {
258 type topology-identifier;
260 leaf ospf-route-type {
261 when "../../protocol-id = 'ospf'";
262 type ospf-route-type;
264 leaf ip-reachability-information {
269 grouping link-identifier {
270 uses link-lr-identifiers;
271 leaf ipv4-interface-address {
272 type ipv4-interface-identifier;
274 leaf ipv6-interface-address {
275 type ipv6-interface-identifier;
277 leaf ipv4-neighbor-address {
278 type ipv4-interface-identifier;
280 leaf ipv6-neighbor-address {
281 type ipv6-interface-identifier;
283 leaf multi-topology-id {
284 type topology-identifier;
290 type route-distinguisher;
302 container node-descriptors {
303 uses node-identifier;
307 container local-node-descriptors {
308 uses node-identifier;
310 container remote-node-descriptors {
311 uses node-identifier;
313 container link-descriptors {
314 uses link-identifier;
318 container advertising-node-descriptors {
319 uses node-identifier;
321 container prefix-descriptors {
322 uses prefix-identifiers;
328 grouping linkstate-destination {
329 list c-linkstate-destination {
334 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
335 case destination-linkstate-case {
336 container destination-linkstate {
337 uses linkstate-destination;
342 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
343 case destination-linkstate-case {
344 container destination-linkstate {
345 uses linkstate-destination;
350 typedef node-flag-bits {
351 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
368 typedef isis-area-identifier {
369 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
375 typedef ipv4-router-identifier {
376 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
377 type inet:ipv4-address;
380 typedef ipv6-router-identifier {
381 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
382 type inet:ipv6-address;
385 grouping node-state {
386 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
387 leaf-list topology-identifier {
388 type topology-identifier;
393 leaf-list isis-area-id {
394 type isis-area-identifier;
396 leaf dynamic-hostname {
399 leaf ipv4-router-id {
400 type ipv4-router-identifier;
402 leaf ipv6-router-id {
403 type ipv6-router-identifier;
405 container sr-sid-label {
406 uses bgp-sr:sid-label-binding;
408 container sr-capabilities {
409 uses bgp-sr:sr-capabilities;
411 container sr-algorithm {
412 uses bgp-sr:sr-algorithm;
416 typedef link-protection-type {
417 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
428 enum dedicated-1to1 {
431 enum dedicated-1plus1 {
441 typedef mpls-protocol-mask {
442 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
453 typedef administrative-group {
457 grouping unreserved-bandwidth {
468 grouping link-state {
469 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
470 leaf local-ipv4-router-id {
471 type ipv4-router-identifier;
473 leaf local-ipv6-router-id {
474 type ipv6-router-identifier;
476 leaf remote-ipv4-router-id {
477 type ipv4-router-identifier;
479 leaf remote-ipv6-router-id {
480 type ipv6-router-identifier;
483 type mpls-protocol-mask;
491 leaf-list shared-risk-link-groups {
497 leaf max-link-bandwidth {
500 leaf max-reservable-bandwidth {
503 list unreserved-bandwidth {
505 uses unreserved-bandwidth;
507 leaf link-protection {
508 type link-protection-type;
511 type administrative-group;
513 container sr-adj-id {
514 uses bgp-sr:adjacency-segment-identifier;
516 container sr-lan-adj-id {
517 uses bgp-sr:lan-adjacency-segment-identifier;
522 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
528 typedef extended-route-tag {
529 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
536 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
546 grouping prefix-state {
550 leaf-list route-tags {
553 leaf-list extended-tags {
554 type extended-route-tag;
557 type netc:igp-metric;
559 leaf ospf-forwarding-address {
560 type inet:ip-address;
562 container sr-prefix {
563 uses bgp-sr:prefix-sid;
567 grouping linkstate-routes {
568 container linkstate-routes {
569 list linkstate-route {
571 "Link-state information entry. Due to
572 the complexity of link-state information
573 and YANG limitations this is the top-level
574 object from contract perspective. It is
575 keyed by route-key, whose format is
576 internal to the implementation exposing
577 this information. As an explicit example
578 it can rely on information stored in the
579 entry's subtree, so the subtree MUST NOT
580 be modified by outside entities.
581 Augmentations can attach data, but must
582 be explicitly aware that such data, unlike
583 the data modeled directly here, does not
584 have any effects on keys, especially they
585 must not impact equality tests.";
589 "The sole function of this leaf
590 to act as the key in the list.
591 Its format does not form the
592 API contract of this model.";
601 choice attribute-type {
603 container node-attributes {
608 container link-attributes {
613 container prefix-attributes {
624 augment "/bgp-msg:update/bgp-msg:path-attributes" {
625 container linkstate-path-attribute {
626 choice link-state-attribute {
627 case node-attributes-case {
628 container node-attributes {
632 case link-attributes-case {
633 container link-attributes {
637 case prefix-attributes-case {
638 container prefix-attributes {
646 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
647 case linkstate-routes-case {
648 uses linkstate-routes;
652 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
653 case linkstate-routes-case {
654 uses linkstate-routes;