namespace "urn:opendaylight:params:xml:ns:yang:bgp-rib";
prefix "rib";
- import bgp-types { prefix bgp-t; revision-date 2013-09-19; }
- import bgp-message { prefix bgp-msg; revision-date 2013-09-18; }
- import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-18; }
- import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
+ import bgp-message { prefix bgp-msg; revision-date 2013-09-19; }
+ import bgp-multiprotocol { prefix bgp-mp; revision-date 2013-09-19; }
+ import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
organization "Cisco Systems, Inc.";
contact "Robert Varga <rovarga@cisco.com>";
description
"This module contains the concept of a Routing Information Base,
- as defined by RFC4271.
+ as defined by RFC4271.
Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
reference "RFC4271";
}
- grouping route {
- container next-hop {
- uses bgp-t:next-hop;
- }
-
- container attributes {
- uses bgp-msg:path-attributes;
- }
- }
-
- grouping rib {
- list tables {
- uses bgp-mp:bgp-table-type;
- key "afi safi";
-
- leaf uptodate {
- type boolean;
- default false;
- }
-
- choice routes {
- list ipv4-routes {
- when "../../afi = ipv4";
-
- leaf prefix {
- type inet:ipv4-prefix;
- }
- key prefix;
-
- uses route;
- }
- list ipv6-routes {
- when "../../afi = ipv6";
-
- leaf prefix {
- type inet:ipv4-prefix;
- }
- key prefix;
-
- uses route;
- }
- case link-state {
- list link-state-links {
- // FIXME: fill this out
-
- uses route;
- }
- list link-state-nodes {
- // FIXME: fill this out
-
- uses route;
- }
- list link-state-ipv4-prefixes {
- // FIXME: fill this out
-
- uses route;
- }
- list link-state-ipv6-prefixes {
- // FIXME: fill this out
-
- uses route;
- }
- }
- }
- }
- }
-
- container loc-rib {
- config false;
- uses rib;
- }
-}
+ typedef rib-id {
+ type inet:uri;
+ }
+
+ typedef application-rib-id {
+ type inet:uri;
+ }
+
+ typedef peer-id {
+ description
+ "An abstract peer identifier. The protocol part identifies
+ the type of the peer. One well-known protocol is define, which
+ has the following format: bgp://1.2.3.4, where 1.2.3.4 is the
+ peer's BGP Identifier in IPv4 dotted-quad format.";
+ type inet:uri;
+ }
+
+ typedef peer-role {
+ type enumeration {
+ enum ebgp;
+ enum ibgp;
+ enum rr-client;
+ enum internal;
+ }
+ }
+
+ typedef simple-routing-policy {
+ type enumeration {
+ enum announce-none { description "Don't announce routes to this peer"; }
+ enum learn-none { description "Don't learn routes from this peer"; }
+ }
+ }
+
+ grouping route {
+ uses bgp-msg:path-attributes;
+ }
+
+ grouping rib {
+ list tables {
+ uses bgp-mp:bgp-table-type;
+ key "afi safi";
+
+ container attributes {
+ leaf uptodate {
+ type boolean;
+ default false;
+ }
+ }
+
+ choice routes {
+ // to be augmented
+ }
+ }
+ }
+
+ list application-rib {
+ config true;
+ leaf id {
+ type application-rib-id;
+ }
+ key id;
+
+ uses rib;
+ }
+
+ container bgp-rib {
+ list rib {
+ config false;
+
+ leaf id {
+ type rib-id;
+ }
+ key id;
+
+ list peer {
+ key peer-id;
+ leaf peer-id {
+ type peer-id;
+ }
+ leaf peer-role {
+ type peer-role;
+ mandatory true;
+ }
+ leaf simple-routing-policy {
+ type simple-routing-policy;
+ }
+ list supported-tables {
+ key "afi safi";
+ uses bgp-mp:bgp-add-path-table-type;
+ }
+ container adj-rib-in {
+ description "Routes as we have received them from the peer.";
+ uses rib;
+ }
+ container effective-rib-in {
+ description "Routes as processed by inbound policy.";
+ uses rib;
+ }
+ container adj-rib-out {
+ uses rib;
+ }
+ }
+
+ container loc-rib {
+ uses rib;
+ }
+ }
+ }
+}