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 2015-08-20; }
13 import bgp-segment-routing { prefix bgp-sr; revision-date 2015-02-06; }
14 import bgp-epe { prefix bgp-epe; revision-date 2015-06-22; }
15 import bmp-monitor { prefix bmp-mon; revision-date 2015-05-12; }
17 organization "Cisco Systems, Inc.";
18 contact "Dana Kutenicsova <dkutenic@cisco.com>";
21 "This module contains the base data model of a BGP message.
22 It rolls up the definitions contained in RFC4271
23 and draft-ietf-idr-ls-distribution-03.
25 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
27 This program and the accompanying materials are made available
28 under the terms of the Eclipse Public License v1.0 which
29 accompanies this distribution, and is available at
30 http://www.eclipse.org/legal/epl-v10.html";
32 revision "2015-02-10" {
34 "Updated to include segment routing.";
37 revision "2013-11-25" {
39 "Updated to cover network-concepts.";
42 revision "2013-09-18" {
45 reference "draft-ietf-idr-ls-distribution-03";
48 identity linkstate-address-family {
49 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
51 base bgp-t:address-family;
54 identity linkstate-subsequent-address-family {
55 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
57 base bgp-t:subsequent-address-family;
61 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
79 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2";
100 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4";
106 typedef ospf-route-type {
107 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.3.1";
130 typedef route-distinguisher {
138 typedef domain-identifier {
139 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
143 typedef area-identifier {
144 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
148 typedef ipv4-interface-identifier {
149 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
150 type inet:ipv4-address;
153 typedef ipv6-interface-identifier {
154 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
155 type inet:ipv6-address;
158 typedef ospf-interface-identifier {
159 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
163 typedef topology-identifier {
164 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.5";
171 grouping isis-router-identifier {
172 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
174 type netc:iso-system-identifier;
179 grouping isis-lan-identifier {
180 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
181 container is-is-router-identifier {
182 uses isis-router-identifier;
192 grouping ospf-router-identifier {
193 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
194 leaf ospf-router-id {
200 grouping ospf-v2-lan-identifier {
201 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
202 uses ospf-router-identifier;
204 type ipv4-interface-identifier;
209 grouping ospf-v3-lan-identifier {
210 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
211 uses ospf-router-identifier;
213 type ospf-interface-identifier;
218 grouping node-identifier {
223 type area-identifier;
226 type domain-identifier;
228 choice c-router-identifier {
229 case isis-node-case {
230 container isis-node {
231 uses isis-router-identifier;
234 case isis-pseudonode-case {
235 container isis-pseudonode {
236 uses isis-lan-identifier;
239 case ospf-node-case {
240 container ospf-node {
241 uses ospf-router-identifier;
244 case ospf-pseudonode-case {
245 container ospf-pseudonode {
246 uses ospf-v3-lan-identifier;
252 grouping link-lr-identifiers {
253 reference "http://tools.ietf.org/html/rfc5307";
254 leaf link-local-identifier {
257 leaf link-remote-identifier {
262 grouping prefix-identifiers {
263 leaf multi-topology-id {
264 type topology-identifier;
266 leaf ospf-route-type {
267 when "../../protocol-id = 'ospf'";
268 type ospf-route-type;
270 leaf ip-reachability-information {
275 grouping link-identifier {
276 uses link-lr-identifiers;
277 leaf ipv4-interface-address {
278 type ipv4-interface-identifier;
280 leaf ipv6-interface-address {
281 type ipv6-interface-identifier;
283 leaf ipv4-neighbor-address {
284 type ipv4-interface-identifier;
286 leaf ipv6-neighbor-address {
287 type ipv6-interface-identifier;
289 leaf multi-topology-id {
290 type topology-identifier;
296 type route-distinguisher;
308 container node-descriptors {
309 uses node-identifier;
313 container local-node-descriptors {
314 uses node-identifier;
315 uses bgp-epe:epe-node-descriptors;
317 container remote-node-descriptors {
318 uses node-identifier;
319 uses bgp-epe:epe-node-descriptors;
321 container link-descriptors {
322 uses link-identifier;
326 container advertising-node-descriptors {
327 uses node-identifier;
329 container prefix-descriptors {
330 uses prefix-identifiers;
336 grouping linkstate-destination {
337 list c-linkstate-destination {
342 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
343 case destination-linkstate-case {
344 container destination-linkstate {
345 uses linkstate-destination;
350 augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
351 case destination-linkstate-case {
352 container destination-linkstate {
353 uses linkstate-destination;
358 typedef node-flag-bits {
359 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
376 typedef isis-area-identifier {
377 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
383 typedef ipv4-router-identifier {
384 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
385 type inet:ipv4-address;
388 typedef ipv6-router-identifier {
389 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
390 type inet:ipv6-address;
393 grouping node-state {
394 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
395 leaf-list topology-identifier {
396 type topology-identifier;
401 leaf-list isis-area-id {
402 type isis-area-identifier;
404 leaf dynamic-hostname {
407 leaf ipv4-router-id {
408 type ipv4-router-identifier;
410 leaf ipv6-router-id {
411 type ipv6-router-identifier;
413 container sr-sid-label {
414 uses bgp-sr:sid-label-binding;
416 container sr-capabilities {
417 uses bgp-sr:sr-capabilities;
419 container sr-algorithm {
420 uses bgp-sr:sr-algorithm;
424 typedef link-protection-type {
425 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
436 enum dedicated-1to1 {
439 enum dedicated-1plus1 {
449 typedef mpls-protocol-mask {
450 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
461 typedef administrative-group {
465 grouping unreserved-bandwidth {
476 grouping link-state {
477 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
478 leaf local-ipv4-router-id {
479 type ipv4-router-identifier;
481 leaf local-ipv6-router-id {
482 type ipv6-router-identifier;
484 leaf remote-ipv4-router-id {
485 type ipv4-router-identifier;
487 leaf remote-ipv6-router-id {
488 type ipv6-router-identifier;
491 type mpls-protocol-mask;
499 leaf-list shared-risk-link-groups {
505 leaf max-link-bandwidth {
508 leaf max-reservable-bandwidth {
511 list unreserved-bandwidth {
513 uses unreserved-bandwidth;
515 leaf link-protection {
516 type link-protection-type;
519 type administrative-group;
521 container sr-adj-id {
522 uses bgp-sr:adjacency-segment-identifier;
524 container sr-lan-adj-id {
525 uses bgp-sr:lan-adjacency-segment-identifier;
528 description "The SID representing the peer of the BGP session.";
529 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4.3";
530 uses bgp-sr:adjacency-segment-identifier;
532 container peer-set-sid {
533 description "The SID representing the group the peer is part of.";
534 reference "https://tools.ietf.org/html/draft-ietf-idr-bgpls-segment-routing-epe-00#section-4.3";
535 uses bgp-sr:adjacency-segment-identifier;
540 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
546 typedef extended-route-tag {
547 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
554 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
564 grouping prefix-state {
568 leaf-list route-tags {
571 leaf-list extended-tags {
572 type extended-route-tag;
575 type netc:igp-metric;
577 leaf ospf-forwarding-address {
578 type inet:ip-address;
580 container sr-prefix {
581 uses bgp-sr:prefix-sid;
585 grouping linkstate-path-attribute {
586 choice link-state-attribute {
587 case node-attributes-case {
588 container node-attributes {
592 case link-attributes-case {
593 container link-attributes {
597 case prefix-attributes-case {
598 container prefix-attributes {
605 grouping linkstate-routes {
606 container linkstate-routes {
607 list linkstate-route {
609 "Link-state information entry. Due to
610 the complexity of link-state information
611 and YANG limitations this is the top-level
612 object from contract perspective. It is
613 keyed by route-key, whose format is
614 internal to the implementation exposing
615 this information. As an explicit example
616 it can rely on information stored in the
617 entry's subtree, so the subtree MUST NOT
618 be modified by outside entities.
619 Augmentations can attach data, but must
620 be explicitly aware that such data, unlike
621 the data modeled directly here, does not
622 have any effects on keys, especially they
623 must not impact equality tests.";
627 "The sole function of this leaf
628 to act as the key in the list.
629 Its format does not form the
630 API contract of this model.";
638 augment bgp-msg:attributes {
639 uses linkstate-path-attribute;
646 augment "/bgp-msg:update/bgp-msg:attributes" {
647 uses linkstate-path-attribute;
650 augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
651 case linkstate-routes-case {
652 uses linkstate-routes;
656 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
657 case linkstate-routes-case {
658 uses linkstate-routes;
662 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
663 case linkstate-routes-case {
664 uses linkstate-routes;
668 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
669 case linkstate-routes-case {
670 uses linkstate-routes;
674 augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
675 case linkstate-routes-case {
676 uses linkstate-routes;
680 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:pre-policy-rib/bmp-mon:tables/bmp-mon:routes" {
681 case linkstate-routes-case {
682 uses linkstate-routes;
686 augment "/bmp-mon:bmp-monitor/bmp-mon:monitor/bmp-mon:router/bmp-mon:peer/bmp-mon:post-policy-rib/bmp-mon:tables/bmp-mon:routes" {
687 case linkstate-routes-case {
688 uses linkstate-routes;