[email protected] Maven / Gradle / Ivy
module bgp-inet {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:bgp-inet";
prefix "bgp-inet";
import bgp-rib { prefix bgp-rib; revision-date 2017-12-07; }
import bgp-multiprotocol { prefix bgp-mp; revision-date 2017-12-07; }
import ietf-inet-types { prefix inet; revision-date 2013-07-15; }
import bgp-message { prefix bgp-msg; revision-date 2017-12-07; }
import bmp-monitor { prefix bmp-mon; revision-date 2017-12-07; }
organization "Cisco Systems, Inc.";
contact "Dana Kutenicsova ";
description
"This module contains the concept of IPv4 and IPv6 routes,
split from bgp-rib and bgp-multiprotocol models.
Copyright (c)2015 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 "2017-12-07" {
description "Add support for add-path in base BGP NLRI.";
}
revision "2015-03-05" {
description
"Initial revision.";
}
grouping ipv6-prefix {
leaf prefix {
type inet:ipv6-prefix;
}
uses bgp-msg:path-id-grouping;
}
grouping ipv4-prefixes {
container destination-ipv4 {
list ipv4-prefixes {
uses bgp-msg:ipv4-prefix-and-path-id;
}
}
}
grouping ipv6-prefixes {
container destination-ipv6 {
list ipv6-prefixes {
uses ipv6-prefix;
}
}
}
grouping ipv4-routes {
container ipv4-routes {
list ipv4-route {
uses bgp-msg:ipv4-prefix-and-path-id;
key "prefix path-id";
uses bgp-rib:route;
}
}
}
grouping ipv6-bgp-prefix-sid-tlv {
reference "https://tools.ietf.org/html/draft-ietf-idr-bgp-prefix-sid-02#section-4.2";
leaf process-ipv6-head-ability {
description "S flag position 0. If set then it means that the BGP speaker is capable of processing the
IPv6 Segment Routing Header.";
type boolean;
default "true";
}
}
grouping ipv6-routes {
container ipv6-routes {
list ipv6-route {
uses ipv6-prefix;
key "prefix path-id";
uses bgp-rib:route {
augment "attributes/bgp-prefix-sid/bgp-prefix-sid-tlvs/bgp-prefix-sid-tlv" {
case ipv6-sid-tlv {
uses ipv6-bgp-prefix-sid-tlv;
}
}
}
}
}
}
augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
case destination-ipv4-case {
when "../../afi = ipv4";
uses ipv4-prefixes;
}
case destination-ipv6-case {
when "../../afi = ipv6";
uses ipv6-prefixes;
}
}
augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
case destination-ipv4-case {
when "../../afi = ipv4";
uses ipv4-prefixes;
}
case destination-ipv6-case {
when "../../afi = ipv6";
uses ipv6-prefixes;
}
}
augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
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" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
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" {
case ipv4-routes-case {
uses ipv4-routes;
}
case ipv6-routes-case {
uses ipv6-routes;
}
}
augment "/bgp-msg:update/bgp-msg:attributes/bgp-msg:bgp-prefix-sid/bgp-msg:bgp-prefix-sid-tlvs/bgp-msg:bgp-prefix-sid-tlv" {
case ipv6-sid-tlv {
uses ipv6-bgp-prefix-sid-tlv;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy