module bgp-rib { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:bgp-rib"; prefix "rib"; import bgp-message { prefix bgp-msg; revision-date 2020-01-20; } import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } import ietf-inet-types { prefix inet; revision-date 2013-07-15; } organization "Cisco Systems, Inc."; contact "Robert Varga "; description "This module contains the concept of a Routing Information Base, as defined by RFC4271. Copyright (c)2013 Cisco Systems, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html"; revision "2018-03-29" { description "Add support for add-path for all afi/safi."; } revision "2017-12-07" { description "Add support for add-path in base BGP NLRI."; } revision "2013-09-25" { description "Initial revision."; reference "RFC4271"; } 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; } } grouping route { uses bgp-msg:path-id-grouping; leaf route-key { description "The sole function of this leaf to act as the key in the list. Its format does not form the API contract of this model."; type string; } 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; } 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 { augment tables/attributes { leaf llgr-stale { type empty; description "Presence indicates that all routes in this table are to be treated as having LLGR_STALE community attached to them"; } } } } container effective-rib-in { description "Routes as processed by inbound policy."; uses rib; } container adj-rib-out { uses rib; } } container loc-rib { uses rib; } } } }