module bgp-mvpn { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:bgp:mvpn"; prefix "bgp-mvpn"; import bgp-types { prefix bgp-t; revision-date 2020-01-20; } import ietf-inet-types { prefix inet; revision-date 2013-07-15; } import pmsi-tunnel { prefix pmsi; revision-date 2020-01-20; } import yang-ext { prefix ext; revision-date "2013-07-09"; } import network-concepts { prefix netc; revision-date 2013-11-25; } 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 RFC6513, RFC6514, RFC6515. 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 2020-01-20 { description "Update to use -no-zone-adresses"; } revision 2018-04-17 { description "Initial version"; } identity mcast-vpn-subsequent-address-family { description "SAFI 5 MCAST-VPN"; reference "https://www.iana.org/assignments/safi-namespace/safi-namespace.xhtml"; base bgp-t:subsequent-address-family; } typedef nlri-type { reference "https://tools.ietf.org/html/rfc6514#section-4"; type enumeration { enum intra-as-i-pmsi-a-d { value 1; } enum inter-as-i-pmsi-a-d { value 2; } enum s-pmsi-a-d { value 3; } enum leaf-a-d { value 4; } enum source-active-a-d { value 5; } enum shared-tree-join { value 6; } enum source-tree-join { value 7; } } } grouping source-as-grouping { leaf source-as { type inet:as-number; mandatory true; } } grouping multicast-source-rd-grouping { uses bgp-t:route-distinguisher-grouping; leaf multicast-source { type inet:ip-address-no-zone; mandatory true; } } grouping multicast-group-opaque-grouping { choice multicast-group { case c-g-address-case { leaf c-g-address { type inet:ip-address-no-zone; } } case ldp-mp-opaque-value-case { container ldp-mp-opaque-value { uses pmsi:opaque; } } } } grouping intra-as-i-pmsi-a-d-grouping { container intra-as-i-pmsi-a-d { description "https://tools.ietf.org/html/rfc6514#section-4.1"; uses bgp-t:route-distinguisher-grouping; uses bgp-t:orig-route-ip-grouping; } } grouping inter-as-i-pmsi-a-d-grouping { container inter-as-i-pmsi-a-d { description "https://tools.ietf.org/html/rfc6514#section-4.2"; uses bgp-t:route-distinguisher-grouping; uses source-as-grouping; } } grouping s-pmsi-a-d-grouping { container s-pmsi-a-d { description "https://tools.ietf.org/html/rfc6514#section-4.3"; uses multicast-source-rd-grouping; uses multicast-group-opaque-grouping; uses bgp-t:orig-route-ip-grouping; } } grouping leaf-a-d-grouping { container leaf-a-d { description "https://tools.ietf.org/html/rfc6514#section-4.4"; choice leaf-a-d-route-key { case inter-as-i-pmsi-a-d-case { uses inter-as-i-pmsi-a-d-grouping; } case s-pmsi-a-d-case { uses s-pmsi-a-d-grouping; } mandatory true; } uses bgp-t:orig-route-ip-grouping; } } grouping source-active-a-d-grouping { container source-active-a-d { description "https://tools.ietf.org/html/rfc6514#section-4.5"; uses multicast-source-rd-grouping; leaf multicast-group { type inet:ip-address-no-zone; mandatory true; } } } grouping c-multicast-grouping { container c-multicast { description "https://tools.ietf.org/html/rfc6514#section-4.6"; uses multicast-source-rd-grouping; uses source-as-grouping; uses multicast-group-opaque-grouping; } } grouping mvpn { reference "https://tools.ietf.org/html/rfc6514#section-4"; description "The MCAST-VPN NLRI is carried in BGP [RFC4271] using BGP Multiprotocol Extensions [RFC4760] with an Address Family Identifier (AFI) of 1 or 2 and a Subsequent AFI (SAFI) of MCAST-VPN."; choice mvpn-choice { case intra-as-i-pmsi-a-d-case { uses intra-as-i-pmsi-a-d-grouping; } case inter-as-i-pmsi-a-d-case { uses inter-as-i-pmsi-a-d-grouping; } case s-pmsi-a-d-case { uses s-pmsi-a-d-grouping; } case leaf-a-d-case { uses leaf-a-d-grouping; } case source-active-a-d-case { uses source-active-a-d-grouping; } case shared-tree-join-case { container shared-tree-join { uses c-multicast-grouping; } } case source-tree-join-case { container source-tree-join { uses c-multicast-grouping; } } mandatory true; } } grouping pe-distinguisher-labels-attribute { container pe-distinguisher-labels-attribute { list pe-distinguisher-label-attribute { leaf pe-address { type inet:ip-address-no-zone; mandatory true; } leaf mpls-label { type netc:mpls-label; mandatory true; } } } } grouping bgp-rib-route { uses pmsi:bgp-rib-route { augment "attributes" { ext:augment-identifier pe-distinguisher-labels-attribute-augmentation; uses pe-distinguisher-labels-attribute; } } } grouping mvpn-bgp-rib-route { uses mvpn; uses bgp-rib-route; } grouping mvpn-routes { list mvpn-route { key "route-key path-id"; uses mvpn-bgp-rib-route; } } }