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; }
14 organization "Cisco Systems, Inc.";
15 contact "Dana Kutenicsova <dkutenic@cisco.com>";
18 "This module contains the base data model of a BGP message.
19 It rolls up the definitions contained in RFC4271
20 and draft-ietf-idr-ls-distribution-03.
22 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
24 This program and the accompanying materials are made available
25 under the terms of the Eclipse Public License v1.0 which
26 accompanies this distribution, and is available at
27 http://www.eclipse.org/legal/epl-v10.html";
29 revision "2013-11-25" {
31 "Updated to cover network-concepts.";
34 revision "2013-09-18" {
37 reference "draft-ietf-idr-ls-distribution-03";
40 identity linkstate-address-family {
41 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
43 base bgp-t:address-family;
46 identity linkstate-subsequent-address-family {
47 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
49 base bgp-t:subsequent-address-family;
53 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
71 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
94 typedef ospf-route-type {
95 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1";
118 typedef route-distinguisher {
126 typedef domain-identifier {
127 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
131 typedef area-identifier {
132 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
136 typedef ipv4-interface-identifier {
137 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
138 type inet:ipv4-address;
141 typedef ipv6-interface-identifier {
142 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
143 type inet:ipv6-address;
146 typedef ospf-interface-identifier {
147 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
151 typedef topology-identifier {
152 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5";
159 grouping isis-router-identifier {
160 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
162 type netc:iso-system-identifier;
167 grouping isis-lan-identifier {
168 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
169 container is-is-router-identifier {
170 uses isis-router-identifier;
180 grouping ospf-router-identifier {
181 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
182 leaf ospf-router-id {
188 grouping ospf-v2-lan-identifier {
189 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
190 uses ospf-router-identifier;
192 type ipv4-interface-identifier;
197 grouping ospf-v3-lan-identifier {
198 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
199 uses ospf-router-identifier;
201 type ospf-interface-identifier;
206 grouping node-identifier {
211 type area-identifier;
214 type domain-identifier;
216 choice c-router-identifier {
217 case isis-node-case {
218 container isis-node {
219 uses isis-router-identifier;
223 case isis-pseudonode-case {
224 container isis-pseudonode {
225 uses isis-lan-identifier;
229 case ospf-node-case {
230 container ospf-node {
231 uses ospf-router-identifier;
235 case ospf-pseudonode-case {
236 container ospf-pseudonode {
237 uses ospf-v3-lan-identifier;
243 grouping link-lr-identifiers {
244 reference "http://tools.ietf.org/html/rfc5307";
245 leaf link-local-identifier {
248 leaf link-remote-identifier {
253 grouping prefix-identifiers {
254 leaf multi-topology-id {
255 type topology-identifier;
257 leaf ospf-route-type {
258 when "../../protocol-id = 'ospf'";
259 type ospf-route-type;
261 leaf ip-reachability-information {
266 grouping link-identifier {
267 uses link-lr-identifiers;
268 leaf ipv4-interface-address {
269 type ipv4-interface-identifier;
271 leaf ipv6-interface-address {
272 type ipv6-interface-identifier;
274 leaf ipv4-neighbor-address {
275 type ipv4-interface-identifier;
277 leaf ipv6-neighbor-address {
278 type ipv6-interface-identifier;
280 leaf multi-topology-id {
281 type topology-identifier;
285 grouping linkstate-destination {
286 list c-linkstate-destination {
291 type route-distinguisher;
299 container local-node-descriptors {
300 uses node-identifier;
302 container remote-node-descriptors {
303 when "../nlri-type = link";
304 uses node-identifier;
306 container link-descriptors {
307 when "../nlri-type = link";
308 uses link-identifier;
310 container prefix-descriptors {
311 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
312 uses prefix-identifiers;
317 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
318 case destination-linkstate-case {
319 container destination-linkstate {
320 uses linkstate-destination;
325 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
326 case destination-linkstate-case {
327 container destination-linkstate {
328 uses linkstate-destination;
333 typedef node-flag-bits {
334 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
351 typedef isis-area-identifier {
352 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
358 typedef ipv4-router-identifier {
359 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
360 type inet:ipv4-address;
363 typedef ipv6-router-identifier {
364 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
365 type inet:ipv6-address;
368 grouping node-state {
369 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
370 leaf-list topology-identifier {
371 type topology-identifier;
376 leaf-list isis-area-id {
377 type isis-area-identifier;
379 leaf dynamic-hostname {
382 leaf ipv4-router-id {
383 type ipv4-router-identifier;
385 leaf ipv6-router-id {
386 type ipv6-router-identifier;
390 typedef link-protection-type {
391 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
402 enum dedicated-1to1 {
405 enum dedicated-1plus1 {
415 typedef mpls-protocol-mask {
416 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
427 typedef administrative-group {
431 grouping unreserved-bandwidth {
442 grouping link-state {
443 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
444 leaf local-ipv4-router-id {
445 type ipv4-router-identifier;
447 leaf local-ipv6-router-id {
448 type ipv6-router-identifier;
450 leaf remote-ipv4-router-id {
451 type ipv4-router-identifier;
453 leaf remote-ipv6-router-id {
454 type ipv6-router-identifier;
457 type mpls-protocol-mask;
465 leaf-list shared-risk-link-groups {
471 leaf max-link-bandwidth {
474 leaf max-reservable-bandwidth {
477 list unreserved-bandwidth {
479 uses unreserved-bandwidth;
481 leaf link-protection {
482 type link-protection-type;
485 type administrative-group;
490 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
496 typedef extended-route-tag {
497 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
504 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
514 grouping prefix-state {
518 leaf-list route-tags {
521 leaf-list extended-tags {
522 type extended-route-tag;
525 type netc:igp-metric;
527 leaf ospf-forwarding-address {
528 type inet:ip-address;
532 grouping linkstate-routes {
533 container linkstate-routes {
534 list linkstate-route {
536 "Link-state information entry. Due to
537 the complexity of link-state information
538 and YANG limitations this is the top-level
539 object from contract perspective. It is
540 keyed by route-key, whose format is
541 internal to the implementation exposing
542 this information. As an explicit example
543 it can rely on information stored in the
544 entry's subtree, so the subtree MUST NOT
545 be modified by outside entities.
546 Augmentations can attach data, but must
547 be explicitly aware that such data, unlike
548 the data modeled directly here, does not
549 have any effects on keys, especially they
550 must not impact equality tests.";
554 "The sole function of this leaf
555 to act as the key in the list.
556 Its format does not form the
557 API contract of this model.";
563 type route-distinguisher;
574 container node-descriptors {
575 uses node-identifier;
579 container local-node-descriptors {
580 uses node-identifier;
582 container remote-node-descriptors {
583 uses node-identifier;
585 container link-descriptors {
586 uses link-identifier;
590 container advertising-node-descriptors {
591 uses node-identifier;
594 uses prefix-identifiers;
600 choice attribute-type {
602 container node-attributes {
607 container link-attributes {
612 container prefix-attributes {
623 augment "/bgp-msg:update/bgp-msg:path-attributes" {
624 container linkstate-path-attribute {
625 choice link-state-attribute {
626 case node-attributes-case {
627 container node-attributes {
628 when "../../nlri-type = node";
632 case link-attributes-case {
633 container link-attributes {
634 when "../../nlri-type = link";
638 case prefix-attributes-case {
639 container prefix-attributes {
640 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
648 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
649 case linkstate-routes-case {
650 uses linkstate-routes;
654 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
655 case linkstate-routes-case {
656 uses linkstate-routes;