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";
133 typedef area-identifier {
134 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
140 typedef ipv4-interface-identifier {
141 reference "http://tools.ietf.org/html/rfc5305#section-3.2";
142 type inet:ipv4-address;
145 typedef ipv6-interface-identifier {
146 reference "http://tools.ietf.org/html/rfc6119#section-4.2";
147 type inet:ipv6-address;
150 typedef ospf-interface-identifier {
151 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 {
196 grouping ospf-v2-lan-identifier {
197 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
198 uses ospf-router-identifier;
200 type ipv4-interface-identifier;
205 grouping ospf-v3-lan-identifier {
206 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.2.1.4";
207 uses ospf-router-identifier;
209 type ospf-interface-identifier;
214 grouping node-identifier {
219 type area-identifier;
222 type domain-identifier;
224 choice c-router-identifier {
225 case isis-node-case {
226 container isis-node {
227 uses isis-router-identifier;
231 case isis-pseudonode-case {
232 container isis-pseudonode {
233 uses isis-lan-identifier;
237 case ospf-node-case {
238 container ospf-node {
239 uses ospf-router-identifier;
243 case ospf-pseudonode-case {
244 container ospf-pseudonode {
245 uses ospf-v3-lan-identifier;
251 grouping link-lr-identifiers {
252 reference "http://tools.ietf.org/html/rfc5307";
253 leaf link-local-identifier {
258 leaf link-remote-identifier {
265 grouping prefix-identifiers {
266 leaf multi-topology-id {
267 type topology-identifier;
269 leaf ospf-route-type {
270 when "../../protocol-id = 'ospf'";
271 type ospf-route-type;
273 leaf ip-reachability-information {
278 grouping link-identifier {
279 uses link-lr-identifiers;
280 leaf ipv4-interface-address {
281 type ipv4-interface-identifier;
283 leaf ipv6-interface-address {
284 type ipv6-interface-identifier;
286 leaf ipv4-neighbor-address {
287 type ipv4-interface-identifier;
289 leaf ipv6-neighbor-address {
290 type ipv6-interface-identifier;
292 leaf multi-topology-id {
293 type topology-identifier;
297 grouping linkstate-destination {
298 list c-linkstate-destination {
303 type route-distinguisher;
311 container local-node-descriptors {
312 uses node-identifier;
314 container remote-node-descriptors {
315 when "../nlri-type = link";
316 uses node-identifier;
318 container link-descriptors {
319 when "../nlri-type = link";
320 uses link-identifier;
322 container prefix-descriptors {
323 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
324 uses prefix-identifiers;
329 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
330 case destination-linkstate-case {
331 container destination-linkstate {
332 uses linkstate-destination;
337 augment "/bgp-msg:update/bgp-msg:path-attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
338 case destination-linkstate-case {
339 container destination-linkstate {
340 uses linkstate-destination;
345 typedef node-flag-bits {
346 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.1";
363 typedef isis-area-identifier {
364 reference "https://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.2";
370 typedef ipv4-router-identifier {
371 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
372 type inet:ipv4-address;
375 typedef ipv6-router-identifier {
376 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1.4";
377 type inet:ipv6-address;
380 grouping node-state {
381 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.1";
382 leaf-list topology-identifier {
383 type topology-identifier;
388 leaf-list isis-area-id {
389 type isis-area-identifier;
391 leaf dynamic-hostname {
394 leaf ipv4-router-id {
395 type ipv4-router-identifier;
397 leaf ipv6-router-id {
398 type ipv6-router-identifier;
402 typedef link-protection-type {
403 reference "http://tools.ietf.org/html/rfc5307#section-1.2";
414 enum dedicated-1to1 {
417 enum dedicated-1plus1 {
427 typedef mpls-protocol-mask {
428 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2.2";
439 typedef administrative-group {
443 grouping unreserved-bandwidth {
454 grouping link-state {
455 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.2";
456 leaf local-ipv4-router-id {
457 type ipv4-router-identifier;
459 leaf local-ipv6-router-id {
460 type ipv6-router-identifier;
462 leaf remote-ipv4-router-id {
463 type ipv4-router-identifier;
465 leaf remote-ipv6-router-id {
466 type ipv6-router-identifier;
469 type mpls-protocol-mask;
477 leaf-list shared-risk-link-groups {
483 leaf max-link-bandwidth {
486 leaf max-reservable-bandwidth {
489 list unreserved-bandwidth {
491 uses unreserved-bandwidth;
493 leaf link-protection {
494 type link-protection-type;
497 type administrative-group;
502 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.2";
508 typedef extended-route-tag {
509 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.3";
516 reference "http://tools.ietf.org/html/draft-ietf-idr-ls-distribution-03#section-3.3.3.1";
526 grouping prefix-state {
530 leaf-list route-tags {
533 leaf-list extended-tags {
534 type extended-route-tag;
537 type netc:igp-metric;
539 leaf ospf-forwarding-address {
540 type inet:ipv4-address;
544 augment "/bgp-msg:update/bgp-msg:path-attributes" {
545 container linkstate-path-attribute {
546 choice link-state-attribute {
547 case node-attributes-case {
548 container node-attributes {
549 when "../../nlri-type = node";
553 case link-attributes-case {
554 container link-attributes {
555 when "../../nlri-type = link";
559 case prefix-attributes-case {
560 container prefix-attributes {
561 when "../nlri-type = 'ipv4-prefix' or ../nlri-type = 'ipv6-prefix'";
569 augment "/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
570 case linkstate-routes-case {
571 container linkstate-routes {
572 list linkstate-route {
574 "Link-state information entry. Due to
575 the complexity of link-state information
576 and YANG limitations this is the top-level
577 object from contract perspective. It is
578 keyed by route-key, whose format is
579 internal to the implementation exposing
580 this information. As an explicit example
581 it can rely on information stored in the
582 entry's subtree, so the subtree MUST NOT
583 be modified by outside entities.
584 Augmentations can attach data, but must
585 be explicitly aware that such data, unlike
586 the data modeled directly here, does not
587 have any effects on keys, especially they
588 must not impact equality tests.";
592 "The sole function of this leaf
593 to act as the key in the list.
594 Its format does not form the
595 API contract of this model.";
601 type route-distinguisher;
612 container node-descriptors {
613 uses node-identifier;
617 container local-node-descriptors {
618 uses node-identifier;
620 container remote-node-descriptors {
621 uses node-identifier;
623 container link-descriptors {
624 uses link-identifier;
628 container advertising-node-descriptors {
629 uses node-identifier;
632 uses prefix-identifiers;
638 choice attribute-type {
640 container node-attributes {
645 container link-attributes {
650 container prefix-attributes {