module bgp-mvpn-ipv4 {
    yang-version 1;
    namespace "urn:opendaylight:params:xml:ns:yang:bgp:mvpn:ipv4";
    prefix "bgp-mvpn-ipv4";

    import bgp-mvpn { prefix mvpn; revision-date 2020-01-20; }
    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 bgp-multiprotocol { prefix bgp-mp; revision-date 2018-03-29; }

    revision 2018-04-17 {
        description "Initial version";
    }

    grouping mvpn-destination {
        list mvpn-destination {
            uses mvpn:mvpn;
            uses bgp-msg:path-id-grouping;
        }
    }

    grouping mvpn-routes-ipv4 {
        container mvpn-routes-ipv4 {
            uses mvpn:mvpn-routes;
        }
    }

    augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-reach-nlri/bgp-mp:advertized-routes/bgp-mp:destination-type" {
        case destination-mvpn-ipv4-advertized-case {
            container destination-mvpn {
                uses mvpn-destination;
            }
        }
    }

    augment "/bgp-msg:update/bgp-msg:attributes/bgp-mp:mp-unreach-nlri/bgp-mp:withdrawn-routes/bgp-mp:destination-type" {
        case destination-mvpn-ipv4-withdrawn-case {
            container destination-mvpn {
                uses mvpn-destination;
            }
        }
    }

    augment "/bgp-rib:application-rib/bgp-rib:tables/bgp-rib:routes" {
        case mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:loc-rib/bgp-rib:tables/bgp-rib:routes" {
        case mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-in/bgp-rib:tables/bgp-rib:routes" {
        case mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:effective-rib-in/bgp-rib:tables/bgp-rib:routes" {
        case mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    augment "/bgp-rib:bgp-rib/bgp-rib:rib/bgp-rib:peer/bgp-rib:adj-rib-out/bgp-rib:tables/bgp-rib:routes" {
        case mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    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 mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }

    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 mvpn-routes-ipv4-case {
            uses mvpn-routes-ipv4;
        }
    }
}