module bgp-route-target-constrain { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:bgp:route:target:constrain"; prefix "bgp-route-target"; import bgp-types { prefix bgp-t; revision-date 2020-01-20; } import bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; } import bgp-rib { prefix bgp-rib; revision-date 2018-03-29; } import bmp-monitor { prefix bmp-mon; revision-date 2020-01-20; } import bgp-message { prefix bgp-msg; revision-date 2020-01-20; } import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import openconfig-routing-policy { prefix rpol; } import openconfig-bgp-policy { prefix bgp-pol; } import yang-ext { prefix ext; revision-date "2013-07-09"; } organization "AT&T Services, Inc."; contact "Claudio D. Gasparini "; description "This module contains the base data model of a BGP message. It rolls up the definitions contained in RFC4684. Copyright (c) 2018 AT&T Intellectual Property. 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-06-18 { description "Initial version"; } identity route-target-constrain-subsequent-address-family { description "SAFI 132 Route Target constrains"; reference "https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; base bgp-t:subsequent-address-family; } grouping route-target-constrain { reference "https://tools.ietf.org/html/rfc4684#page-8"; description "The Route Target constrains NLRI is carried in BGP [RFC4684] using BGP Multiprotocol Extensions [RFC4760] with an Address Family Identifier (AFI) of 1 (IPV4) and a Subsequent Address Family Identifier (SAFI) of 132 (ROUTE-TARGET)"; leaf origin-as { type inet:as-number; } choice route-target-constrain-choice { case route-target-constrain-default-case { uses bgp-t:route-target-constrain-default-route-grouping; } case route-target-constrain-route-case { uses bgp-t:route-target-extended-community-grouping; } case route-target-constrain-ipv4-route-case { uses bgp-t:route-target-ipv4-grouping; } case route-target-constrain-as-4-extended-community-case { uses bgp-t:as-4-route-target-extended-community-grouping; } mandatory true; } } grouping route-target-constrain-destination { list route-target-constrain-destination { uses route-target-constrain; uses bgp-msg:path-id-grouping; } } grouping route-target-constrain-routes { container route-target-constrain-routes { list route-target-constrain-route { key "route-key path-id"; uses bgp-rib:route; uses route-target-constrain; } } } augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" { case destination-route-target-constrain-advertized-case { container destination-route-target-constrain { uses route-target-constrain-destination; } } } augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" { case destination-route-target-constrain-withdrawn-case { container destination-route-target-constrain{ uses route-target-constrain-destination; } } } augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" { case route-target-constrain-routes-case { uses route-target-constrain-routes; } } augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" { case route-target-constrain-routes-case { uses route-target-constrain-routes; } } augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" { case route-target-constrain-routes-case { uses route-target-constrain-routes; } } augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" { case route-target-constrain-routes-case { uses route-target-constrain-routes; } } augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" { case route-target-constrain-routes-case { uses route-target-constrain-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 route-target-constrain-routes-case { uses route-target-constrain-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 route-target-constrain-routes-case { uses route-target-constrain-routes; } } augment /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:statements/rpol:statement/rpol:actions/bgp-pol:bgp-actions { ext:augment-identifier client-attribute-prepend; container client-attribute-prepend { presence "node is present in the config data to use the client attributes prepend action"; description "action to use attribute from advertized from a client(rfc4684)"; } } }