huawei-mvpn

A model for Multicast Virtual Private Network (MVPN).

  • Version: 2021-08-05

    huawei-mvpn@2021-08-05


    
      module huawei-mvpn {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-mvpn";
    
        prefix mvpn;
    
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-l3vpn {
          prefix l3vpn;
        }
        import huawei-pub-type {
          prefix pub-type;
        }
        import huawei-routing-policy {
          prefix rtp;
        }
        import huawei-l3-multicast {
          prefix l3mc;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-acl {
          prefix acl;
        }
        import huawei-mpls {
          prefix mpls;
        }
        import huawei-mpls-te {
          prefix mpls-te;
        }
        import huawei-bier {
          prefix bier;
        }
        import huawei-srv6 {
          prefix srv6;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
    Bantian, Longgang
    Shenzhen 518129
    People's Republic of China
    Website: http://www.huawei.com
    Email: support@huawei.com";
    
        description
          "A model for Multicast Virtual Private Network (MVPN).";
    
        revision "2021-08-05" {
          description
            "Add signal-format leaf fot Src-dt. Add multicast-sid case for src-dt-sid. Add node rosen-global. Delete some nodes that not supported. Modify the design for switch-group.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-07-25" {
          description
            "Modify some restriction for bier-entropy-mode. The when condition of bier-entropy-mode is deleted.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-03-30" {
          description
            "Nodes related to NG MVPN over BIER6 are added. Modify the xpath of leafref for ad-import-policy-name. Modify the design of ipmsi-infos.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-01-16" {
          description
            "Added configurable nodes related to IPv6 NG MVPN FRR. A must clause was deleted for is-c-multicast-frr. Modify the type of frr-acl-name.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-12-17" {
          description
            "Modify some restriction for NG MVPN S-PMSI tunnel. The value range of spmsi-tnl-detect-delay is modified.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-21" {
          description
            "Modify bier leaf node type to leafref. Add units for some nodes. Modify some restriction for bier node. Modify description. Add dynamic default value for per-item-tunnel-limit.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-04" {
          description
            "Change rsvp-te-p2mp-template leaf node type to leafref.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-12-18" {
          description
            "Change relative node for bier tunnel.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-11-20" {
          description
            "Change container information to ipmsi-infos.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-05-06" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "mvpn";
    
        typedef addr-family-type {
          type enumeration {
            enum "ipv4-unicast" {
              value 1;
              description "IPv4 address family.";
            }
            enum "ipv6-unicast" {
              value 2;
              description "IPv6 address family.";
            }
          }
          description "Address family.";
        }
    
        typedef signaling-mode {
          type enumeration {
            enum "invalid" {
              value 0;
              description
                "Invalid signaling mode.";
            }
            enum "BGP" {
              value 2;
              description "BGP signaling mode.";
            }
          }
          description "MVPN signal type.";
        }
    
        typedef tunnel-mode {
          type enumeration {
            enum "p2mp-te" {
              value 3;
              description "P2MP TE tunnel.";
            }
            enum "p2mp-mldp" {
              value 4;
              description "P2MP mLDP tunnel.";
            }
            enum "bier" {
              value 7;
              description "BIER tunnel.";
            }
            enum "bier-ipv6" {
              value 8;
              description "BIER IPv6 tunnel.";
            }
          }
          description "MVPN tunnel type.";
        }
    
        typedef src-dt-address-type {
          type enumeration {
            enum "srv6-locator" {
              value 1;
              description
                "Src-dt addresses using SRv6 locator.";
            }
          }
          description
            "The src-dt addresses type.";
        }
    
        typedef src-dt-signal-format {
          type enumeration {
            enum "msid" {
              value 1;
              description
                "Multicast service identifier.";
            }
          }
          description "Src-dt signal format.";
        }
    
        typedef auto-discovery-type {
          type enumeration {
            enum "none" {
              value 0;
              description
                "The A-D mode is disabled.";
            }
            enum "MDT" {
              value 1;
              description
                "The A-D mode is Multicast Distribution Tree (MDT).";
            }
          }
          description "Auto-Discovery Mode.";
        }
    
        typedef vpn-target-type {
          type enumeration {
            enum "export-extcommunity" {
              value 2;
              description
                "Extended community attribute carried in routes sent from an outbound interface to the destination VPN.";
            }
            enum "import-extcommunity" {
              value 3;
              description
                "Extended community attribute used to accept routes carrying the specified extended community attribute.";
            }
          }
          description "VPN target type.";
        }
    
        typedef rpt-spt-mode {
          type enumeration {
            enum "none" {
              value 0;
              description
                "PIM SM shared tree is not supported.";
            }
            enum "spt-mode" {
              value 1;
              description "SPT-only mode.";
            }
            enum "rpt-spt-mode" {
              value 2;
              description "RPT-SPT mode.";
            }
          }
          description
            "The mode of PIM SM shared tree.";
        }
    
        typedef umh-type {
          type enumeration {
            enum "unicast" {
              value 0;
              description
                "Unicast route preferred.";
            }
            enum "highest-ip" {
              value 1;
              description "Highest IP address.";
            }
          }
          description
            "Select upstream multicast hop.";
        }
    
        typedef bier-entropy-mode {
          type enumeration {
            enum "sg-hash" {
              value 1;
              description
                "SG hash entropy mode of MVPN BIER.";
            }
          }
          description "MVPN BIER entropy mode.";
        }
    
        typedef bit-string-length {
          type enumeration {
            enum "64-bit" {
              value 1;
              description "64-bit BitString.";
            }
            enum "128-bit" {
              value 2;
              description "128-bit BitString.";
            }
            enum "256-bit" {
              value 3;
              description "256-bit BitString.";
            }
          }
          description
            "Enumerated values of the BitString length.";
        }
    
        grouping tunnel-sg-info-type {
          description
            "PMSI tunnel and (S, G) entry state.";
          container tunnels {
            config false;
            description
              "List of PMSI tunnel state.";
            list tunnel {
              key "address";
              description "PMSI tunnel state.";
              leaf address {
                type inet:ip-address-no-zone;
                description
                  "Tunnel node address.";
              }
    
              leaf role {
                type string {
                  length "0..15";
                }
                description
                  "Role of a tunnel node.";
              }
            }  // list tunnel
          }  // container tunnels
    
          container sgs {
            config false;
            description
              "List of (S, G) entry state.";
            list sg {
              key "source-addr group-addr";
              description "(S, G) entry state.";
              leaf source-addr {
                type inet:ip-address-no-zone;
                description "Source address.";
              }
    
              leaf group-addr {
                type inet:ip-address-no-zone;
                description "Group address.";
              }
            }  // list sg
          }  // container sgs
        }  // grouping tunnel-sg-info-type
    
        grouping bier-tunnel-sg-info-type {
          description
            "PMSI BIER tunnel and (S, G) entry state.";
          container root-leafs {
            config false;
            description
              "List of PMSI tunnel node.";
            list root-leaf {
              key "address";
              description
                "Operational data of PMSI tunnel node.";
              leaf address {
                type inet:ip-address-no-zone;
                description
                  "Tunnel node address.";
              }
    
              leaf role {
                type string {
                  length "0..15";
                }
                description
                  "Role of a tunnel node.";
              }
    
              leaf bfr-id {
                type uint16 {
                  range "1..65535";
                }
                description
                  "BFR-ID of a BIER tunnel node.";
              }
    
              leaf bfr-prefix {
                type inet:ip-address-no-zone;
                description
                  "BFR prefix of a BIER tunnel node.";
              }
            }  // list root-leaf
          }  // container root-leafs
    
          container sgs {
            config false;
            description "List of (S, G) entry.";
            list sg {
              key "source-addr group-addr";
              description
                "Statistics of (S, G) entry.";
              leaf source-addr {
                type inet:ip-address-no-zone;
                description "Source address.";
              }
    
              leaf group-addr {
                type inet:ip-address-no-zone;
                description "Group address.";
              }
            }  // list sg
          }  // container sgs
        }  // grouping bier-tunnel-sg-info-type
    
        container mvpn {
          description
            "Configure global MVPN configurations.";
          container globals {
            description
              "List of global MVPN configuration.";
            list global {
              key "address-family";
              description
                "Configure global MVPN.";
              leaf address-family {
                type addr-family-type;
                description
                  "IPv4 or IPv6 address family.";
              }
    
              leaf mvpn-id {
                type inet:ip-address-no-zone;
                mandatory true;
                description
                  "Specify MVPN ID, IP address mode.";
              }
    
              leaf enable-inter-area-segmented {
                when
                  "../address-family='ipv4-unicast'";
                type boolean;
                default "false";
                description
                  "Enable/disable segmented tunnels globally on the ABR.";
              }
    
              leaf apply-explicit-null-label {
                when
                  "../address-family='ipv6-unicast'";
                type boolean;
                default "false";
                description
                  "Enable/disable IPv6 explicit null to apply label.";
              }
            }  // list global
          }  // container globals
    
          container ipv6-underlay-globals {
            description
              "List of IPv6 underlay global MVPN configuration.";
            list ipv6-underlay-global {
              key "address-family";
              description
                "Configure IPv6 underlay global MVPN.";
              leaf address-family {
                type addr-family-type;
                description
                  "IPv4 or IPv6 address family.";
              }
    
              leaf mvpn-id {
                type inet:ipv6-address-no-zone;
                mandatory true;
                description
                  "Specify IPv6 underlay MVPN ID, IPv6 address mode.";
              }
            }  // list ipv6-underlay-global
          }  // container ipv6-underlay-globals
    
          container rosen-global {
            description
              "Configure global Rosen MVPN configurations.";
            container source-interface {
              when
                "/ni:network-instance/ni:instances/ni:instance[ni:name='_public_']/l3mc:multicast/l3mc:ipv4";
              description
                "Configure default interface whose IP address is used as the default IP address of an MTI.";
              leaf source-interface-name {
                type leafref {
                  path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                }
                must
                  "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name='_public_'";
                description
                  "Name of the public network interface whose IP address is used as the default IP address of an MTI.";
              }
            }  // container source-interface
          }  // container rosen-global
        }  // container mvpn
    
        augment /ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af {
          when
            "../../ni:name!='_public_' and ((./l3vpn:type='ipv4-unicast' and ../../l3mc:multicast/l3mc:ipv4) or (./l3vpn:type='ipv6-unicast' and ../../l3mc:multicast/l3mc:ipv6))";
          description
            "Add MVPN configuration to the L3VPN module.";
          container mvpn {
            description
              "Configure MVPN in the instance.";
            leaf mvpn-id {
              when
                "../../l3vpn:type='ipv4-unicast'";
              type inet:ip-address-no-zone;
              description
                "Specify MVPN ID, IP address mode.";
            }
    
            choice mvpn-type {
              description "MVPN type.";
              case ng-mvpn {
                description "NG MVPN.";
                container ng {
                  must
                    "(../../l3vpn:type='ipv4-unicast' and (../mvpn:mvpn-id or /mvpn:mvpn/mvpn:globals/mvpn:global[mvpn:address-family=current()/../../l3vpn:type]/mvpn:mvpn-id or /mvpn:mvpn/mvpn:ipv6-underlay-globals/mvpn:ipv6-underlay-global[mvpn:address-family=current()/../../l3vpn:type]/mvpn:mvpn-id)) or (../../l3vpn:type='ipv6-unicast' and (/mvpn:mvpn/mvpn:globals/mvpn:global[mvpn:address-family=current()/../../l3vpn:type]/mvpn:mvpn-id or /mvpn:mvpn/mvpn:ipv6-underlay-globals/mvpn:ipv6-underlay-global[mvpn:address-family=current()/../../l3vpn:type]/mvpn:mvpn-id))";
                  must
                    "./is-inter-as='false' or ./inter-area-seg-enable='false'";
                  must
                    "./is-ipv6-underlay='false' or ./inter-area-seg-enable='false'";
                  presence "mvpn enable";
                  description
                    "Enable/disable NG-MVPN in the instance.";
                  leaf signaling-mode {
                    type signaling-mode;
                    default "invalid";
                    description
                      "Signaling mode.";
                  }
    
                  leaf is-sender-site {
                    type boolean;
                    default "false";
                    description
                      "Enable/disable the function of specifying the current PE as a sender PE.";
                  }
    
                  leaf is-ipv6-underlay {
                    type boolean;
                    must
                      "../is-ipv6-underlay='false' or /mvpn:mvpn/mvpn:ipv6-underlay-globals/mvpn:ipv6-underlay-global[mvpn:address-family=current()/../../../l3vpn:type]";
                    default "false";
                    description
                      "Enable/disable the IPv6 underlay of the MVPN.";
                  }
    
                  choice src-dt-address {
                    description
                      "The src-dt address of BIER IPv6 underlay for current MVPN.";
                    case srv6-locator {
                      description
                        "SRv6 locator.";
                      container srv6-locator {
                        must
                          "../is-sender-site='true' and ../is-ipv6-underlay='true'";
                        description
                          "Configure SRv6 locator.";
                        leaf locator {
                          type leafref {
                            path "/ni:network-instance/ni:instances/ni:instance/srv6:srv6/srv6:locators/srv6:locator/srv6:name";
                          }
                          mandatory true;
                          description
                            "The SRv6 locator of src-dt-sid.";
                        }
    
                        leaf src-dt-sid {
                          type inet:ipv6-address-no-zone;
                          mandatory true;
                          description
                            "Src-dt-sid for MVPN.";
                        }
    
                        leaf auto-sid {
                          type boolean;
                          must
                            "../auto-sid='false'";
                          default "false";
                          description
                            "Enable/disable the automatic configuration of Src-dt-sid.";
                        }
    
                        leaf signal-format {
                          type src-dt-signal-format;
                          description
                            "Src-dt signal format of the sender PE.";
                        }
                      }  // container srv6-locator
                    }  // case srv6-locator
                  }  // choice src-dt-address
    
                  leaf rpt-spt-mode {
                    type rpt-spt-mode;
                    default "none";
                    description "*G mode.";
                  }
    
                  leaf is-inter-as {
                    type boolean;
                    default "false";
                    description
                      "Enable/disable the function of specifying the current PE as a auto-discovery inter-as PE.";
                  }
    
                  leaf is-c-multicast-frr {
                    type boolean;
                    default "false";
                    description
                      "Enable/disable FRR.";
                  }
    
                  leaf frr-acl-name {
                    when
                      "../../../l3vpn:type='ipv4-unicast' and ../is-c-multicast-frr='true'";
                    type acl:acl4-identity;
                    must
                      "/acl:acl/acl:groups/acl:group[acl:identity=current()] or /acl:acl/acl:groups/acl:group[acl:number=number(current())]";
                    must
                      "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
                    description
                      "Configure an IPv4 FRR policy. If no ACL is specified, all (S, G) entries take effect.";
                  }
    
                  leaf frr-acl-name6 {
                    when
                      "../../../l3vpn:type='ipv6-unicast' and ../is-c-multicast-frr='true'";
                    type leafref {
                      path "/acl:acl/acl:group6s/acl:group6/acl:identity";
                    }
                    must
                      "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'";
                    description
                      "Configure an IPv6 FRR policy. If no ACL is specified, all (S, G) entries take effect.";
                  }
    
                  leaf frr-flow-based-acl-name {
                    when
                      "../../../l3vpn:type='ipv4-unicast' and ../is-c-multicast-frr='true'";
                    type leafref {
                      path "/acl:acl/acl:groups/acl:group/acl:identity";
                    }
                    must
                      "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
                    description
                      "Configure a flow-based IPv4 FRR policy. If no ACL is specified, all (S, G) entries do not take effect.";
                  }
    
                  leaf frr-flow-based-acl-name6 {
                    when
                      "../../../l3vpn:type='ipv6-unicast' and ../is-c-multicast-frr='true'";
                    type leafref {
                      path "/acl:acl/acl:group6s/acl:group6/acl:identity";
                    }
                    must
                      "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'";
                    description
                      "Configure a flow-based IPv6 FRR policy. If no ACL is specified, all (S, G) entries do not take effect.";
                  }
    
                  leaf is-compatible-draft {
                    type boolean;
                    default "false";
                    description
                      "Enable/disable a device to use the packet encapsulation format defined in the draft.";
                  }
    
                  leaf is-export-msdp {
                    when
                      "../../../l3vpn:type='ipv4-unicast'";
                    type boolean;
                    default "false";
                    description
                      "Enable/disable a device to export source active to MSDP.";
                  }
    
                  leaf is-import-msdp {
                    when
                      "../../../l3vpn:type='ipv4-unicast'";
                    type boolean;
                    default "false";
                    description
                      "Enable/disable a device to import source active from MSDP.";
                  }
    
                  leaf spmsi-tnl-detect-delay {
                    type uint16 {
                      range "3..65535";
                    }
                    units "s";
                    default "5";
                    description
                      "The delay in tunnel detection.";
                  }
    
                  leaf rpt-prune-delay {
                    type uint16 {
                      range "0..1800";
                    }
                    units "s";
                    default "60";
                    description
                      "The delay of RPT pruning.";
                  }
    
                  leaf inter-area-seg-enable {
                    type boolean;
                    must
                      "(../inter-area-seg-enable='false' and ../../../l3vpn:type='ipv6-unicast') or ../../../l3vpn:type='ipv4-unicast'";
                    default "false";
                    description
                      "Enable/disable intra-area segmented tunnels.";
                  }
    
                  leaf umh-select-type {
                    type umh-type;
                    default "unicast";
                    description
                      "Configure UMH select type.";
                  }
    
                  leaf bier-entropy-mode {
                    type bier-entropy-mode;
                    description
                      "Configure BIER entropy mode.";
                  }
    
                  leaf ipmsi-to-spmsi-switch-immediately {
                    type boolean;
                    default "false";
                    description
                      "Enable/disable ipmsi to spmsi switch immediately.";
                  }
    
                  container route-targets {
                    description
                      "List of MVPN route-targets.";
                    list route-target {
                      key "rt-type rt-value";
                      description
                        "Configure a multicast route-target.";
                      leaf rt-type {
                        type vpn-target-type;
                        description "RT type.";
                      }
    
                      leaf rt-value {
                        type string {
                          length "3..21";
                        }
                        description
                          "The available MVPN target formats are as follows:
    - 16-bit AS number:32-bit user-defined number, for example, 1:3. An AS number ranges from 0 to 65535, and a user-defined number ranges from 0 to 4294967295. The AS number and user-defined number cannot be both 0s. That is, a VPN target cannot be 0:0.
    - 32-bit IP address:16-bit user-defined number, for example, 192.168.122.15:1. The IP address ranges from 0.0.0.0 to 255.255.255.255, and the user-defined number ranges from 0 to 65535.";
                      }
                    }  // list route-target
                  }  // container route-targets
    
                  container extranet-rpfs {
                    when
                      "../../../l3vpn:type='ipv4-unicast'";
                    description
                      "List of extranet select-RPF.";
                    list extranet-rpf {
                      key "group-addr group-addr-mask-length";
                      max-elements 16;
                      description
                        "Configure extranet select-RPF.";
                      leaf group-addr {
                        type inet:ipv4-address-no-zone {
                          pattern
                            '(22[4-9]|23\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}';
                        }
                        description
                          "Multicast group address. The value ranges from 224.0.0.0 to 239.255.255.255.";
                      }
    
                      leaf group-addr-mask-length {
                        type uint32 {
                          range "4..32";
                        }
                        description
                          "Mask length of a multicast group address.";
                      }
    
                      leaf src-vrf-name {
                        type leafref {
                          path "/ni:network-instance/ni:instances/ni:instance/ni:name";
                        }
                        must
                          "(../../../../../../../ni:name!=current() and (../mvpn:src-vrf-name='_public_' or /ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']/mvpn:mvpn/mvpn:ng))";
                        mandatory true;
                        description
                          "RPF source VPN instance.";
                      }
                    }  // list extranet-rpf
                  }  // container extranet-rpfs
    
                  container ipmsi-tunnel {
                    must
                      "not(../spmsi-tunnels/spmsis/star-star) and not(../spmsi-tunnels/spmsis/star-grps/star-grp)";
                    must
                      "not(./tunnel-mode) or ./tunnel-mode!='bier' or (./sub-domain-id and ./bsl)";
                    must
                      "not(./tunnel-mode) or ./tunnel-mode!='bier-ipv6' or (./sub-domain-id-ipv6 and ./bsl-ipv6)";
                    must
                      "not(./tunnel-mode) or (./tunnel-mode!='bier' and ./tunnel-mode!='p2mp-mldp' and ./tunnel-mode!='p2mp-te') or (../../mvpn:mvpn-id or /mvpn:mvpn/mvpn:globals/mvpn:global[mvpn:address-family=current()/../../../l3vpn:type]/mvpn:mvpn-id)";
                    must
                      "not(./tunnel-mode) or ./tunnel-mode!='bier-ipv6' or ../srv6-locator";
                    presence "ipmsi-tunnel";
                    description
                      "Enable/disable I-PMSI in the instance. Default MDT or I-PMSI configuration and operational state information.";
                    leaf tunnel-mode {
                      type tunnel-mode;
                      description "Tunnel mode.";
                    }
    
                    choice tunnel-attribute {
                      description
                        "I-PMSI tunnel attributes configuration.";
                      case rsvp-te-p2mp {
                        when
                          "tunnel-mode='p2mp-te'";
                        description
                          "RSVP TE P2MP tunnel.";
                        leaf rsvp-te-p2mp-template {
                          type leafref {
                            path "/mpls:mpls/mpls-te:te/mpls-te:p2mp-templates/mpls-te:p2mp-template/mpls-te:name";
                          }
                          description
                            "RSVP TE P2MP tunnel template.";
                        }
                      }  // case rsvp-te-p2mp
    
                      case bier {
                        when
                          "tunnel-mode='bier' and ../../../l3vpn:type='ipv4-unicast'";
                        description
                          "BIER underlay.";
                        leaf sub-domain-id {
                          type leafref {
                            path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                          }
                          must
                            "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv4-unicast']";
                          must
                            "../../inter-area-seg-enable='false' and ../../is-inter-as='false'";
                          description
                            "Sub-domain ID of BIER.";
                        }
    
                        leaf bsl {
                          type leafref {
                            path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id]/bier:encapsulations/bier:encapsulation/bier:bsl";
                          }
                          description
                            "BitString length of BIER.";
                        }
                      }  // case bier
    
                      case bier-ipv6 {
                        when
                          "tunnel-mode='bier-ipv6'";
                        description
                          "BIER IPv6 underlay.";
                        leaf sub-domain-id-ipv6 {
                          type leafref {
                            path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                          }
                          must
                            "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv6-unicast']";
                          must
                            "../../inter-area-seg-enable='false'";
                          description
                            "Sub-domain ID of BIER IPv6.";
                        }
    
                        leaf bsl-ipv6 {
                          type leafref {
                            path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id-ipv6]/bier:encapsulations/bier:encapsulation/bier:bsl";
                          }
                          description
                            "BitString length of BIER IPv6.";
                        }
                      }  // case bier-ipv6
                    }  // choice tunnel-attribute
                  }  // container ipmsi-tunnel
    
                  container ipmsi-infos {
                    config false;
                    description "I-PMSI state.";
                    container te-tunnels {
                      description
                        "List of I-PMSI TE tunnel state.";
                      list te-tunnel {
                        key "te-p2mp-id te-tunnel-id te-extend-tunnel-id";
                        description
                          "I-PMSI TE tunnel state.";
                        leaf te-p2mp-id {
                          type pub-type:hex-binary;
                          description
                            "P2MP ID of the P2MP tunnel.";
                        }
    
                        leaf te-tunnel-id {
                          type uint32;
                          description
                            "ID of the P2MP tunnel.";
                        }
    
                        leaf te-extend-tunnel-id {
                          type inet:ip-address-no-zone;
                          description
                            "P2MP extended tunnel interface ID.";
                        }
    
                        uses tunnel-sg-info-type;
                      }  // list te-tunnel
                    }  // container te-tunnels
    
                    container ldp-tunnels {
                      description
                        "List of I-PMSI LDP tunnel state.";
                      list ldp-tunnel {
                        key "ldp-route-addr opaque-value";
                        description
                          "I-PMSI LDP tunnel state.";
                        leaf ldp-route-addr {
                          type inet:ip-address-no-zone;
                          description
                            "IP address of the root of a P2MP LSP.";
                        }
    
                        leaf opaque-value {
                          type string {
                            length "1..255";
                          }
                          description
                            "P2MP LSP ID.";
                        }
    
                        uses tunnel-sg-info-type;
                      }  // list ldp-tunnel
                    }  // container ldp-tunnels
    
                    container bier-tunnels {
                      description
                        "List of I-PMSI BIER tunnel.";
                      list bier-tunnel {
                        key "tunnel-id root-ip";
                        description
                          "Operational state of I-PMSI BIER tunnel.";
                        leaf tunnel-id {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "Tunnel ID.";
                        }
    
                        leaf root-ip {
                          type inet:ip-address-no-zone;
                          description
                            "Root IP address.";
                        }
    
                        leaf vpn-label {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "MPLS label.";
                        }
    
                        leaf sub-domain-id {
                          type uint16 {
                            range "0..255";
                          }
                          description
                            "Sub-domain ID.";
                        }
    
                        uses bier-tunnel-sg-info-type;
                      }  // list bier-tunnel
                    }  // container bier-tunnels
    
                    container bier-ipv6-tunnels {
                      description
                        "List of I-PMSI BIER IPv6 tunnel.";
                      list bier-ipv6-tunnel {
                        key "tunnel-id root-ip";
                        description
                          "Operational state of I-PMSI BIER tunnel.";
                        leaf tunnel-id {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "Tunnel ID.";
                        }
    
                        leaf root-ip {
                          type inet:ip-address-no-zone;
                          description
                            "Root IP address.";
                        }
    
                        choice src-dt-sid {
                          description
                            "Src-dt SID.";
                          case multicast-sid {
                            description
                              "Multicast service identifier attribute.";
                            leaf multicast-sid {
                              type inet:ipv6-address-no-zone;
                              description
                                "Src-dt SID.";
                            }
    
                            leaf prefix-len {
                              type uint8;
                              description
                                "Prefix length.";
                            }
    
                            leaf msid-len {
                              type uint8;
                              description
                                "MSID length.";
                            }
                          }  // case multicast-sid
    
                          case prefix-sid {
                            description
                              "Prefix-sid attribute.";
                            leaf prefix-sid {
                              type inet:ipv6-address-no-zone;
                              description
                                "Src-dt SID.";
                            }
                          }  // case prefix-sid
                        }  // choice src-dt-sid
    
                        leaf sub-domain-id {
                          type uint16 {
                            range "0..255";
                          }
                          description
                            "Sub-domain ID.";
                        }
    
                        uses bier-tunnel-sg-info-type;
                      }  // list bier-ipv6-tunnel
                    }  // container bier-ipv6-tunnels
                  }  // container ipmsi-infos
    
                  container spmsi-tunnels {
                    presence "spmsi-tunnels";
                    description
                      "Enable/disable S-PMSI tunnel in the instance. S-PMSI tunnel configuration and operational state information.";
                    leaf switch-delay-time {
                      type uint8 {
                        range "3..60";
                      }
                      units "s";
                      default "5";
                      description
                        "The delay for switching from the I-PMSI to the S-PMSI.";
                    }
    
                    leaf switch-back-holddown-time {
                      type uint16 {
                        range "0..180";
                      }
                      units "s";
                      default "60";
                      description
                        "The delay for switching back from the S-PMSI to the I-PMSI.";
                    }
    
                    leaf spmsi-tunnel-withdraw-delay-time {
                      type uint16 {
                        range "5..20";
                      }
                      units "s";
                      default "5";
                      description
                        "The delay for withdrawing the SPMSI.";
                    }
    
                    container spmsis {
                      description
                        "Configure NG SPMSI switch policy.";
                      container star-star {
                        when
                          "../../../../../l3vpn:type='ipv4-unicast'";
                        must
                          "not(../star-grps/star-grp) and not(../../../ipmsi-tunnel)";
                        presence
                          "spmsi group star-star policy";
                        description
                          "Enable/disable (*, *) S-PMSI swicth policy.";
                        leaf tunnel-mode {
                          type tunnel-mode;
                          must
                            "../tunnel-mode!='p2mp-te' or ../rsvp-te-p2mp-template";
                          must
                            "../tunnel-mode!='bier' or (../sub-domain-id and ../bsl)";
                          must
                            "../tunnel-mode!='bier-ipv6' or (../sub-domain-id-ipv6 and ../bsl-ipv6)";
                          must
                            "../tunnel-mode!='bier-ipv6' or ../../../../srv6-locator";
                          must
                            "(../tunnel-mode!='bier' and ../tunnel-mode!='p2mp-mldp' and ../tunnel-mode!='p2mp-te') or (../../../../../mvpn:mvpn-id or /mvpn:mvpn/mvpn:globals/mvpn:global[mvpn:address-family=current()/../../../../../../l3vpn:type]/mvpn:mvpn-id)";
                          mandatory true;
                          description
                            "Tunnel mode.";
                        }
    
                        choice tunnel-attribute {
                          description
                            "S-PMSI tunnel attributes configuration.";
                          case rsvp-te-p2mp {
                            when
                              "tunnel-mode='p2mp-te'";
                            description
                              "RSVP TE P2MP tunnel.";
                            leaf rsvp-te-p2mp-template {
                              type leafref {
                                path "/mpls:mpls/mpls-te:te/mpls-te:p2mp-templates/mpls-te:p2mp-template/mpls-te:name";
                              }
                              description
                                "RSVP TE P2MP tunnel template.";
                            }
                          }  // case rsvp-te-p2mp
    
                          case bier {
                            when
                              "tunnel-mode='bier'";
                            description
                              "BIER tunnel.";
                            leaf sub-domain-id {
                              type leafref {
                                path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                              }
                              must
                                "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv4-unicast']";
                              must
                                "../../../../inter-area-seg-enable='false' and ../../../../is-inter-as='false'";
                              description
                                "S-PMSI BIER sub-domain ID.";
                            }
    
                            leaf bsl {
                              type leafref {
                                path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id]/bier:encapsulations/bier:encapsulation/bier:bsl";
                              }
                              description
                                "S-PMSI BIER BitString length.";
                            }
                          }  // case bier
    
                          case bier-ipv6 {
                            when
                              "tunnel-mode='bier-ipv6'";
                            description
                              "BIER IPv6 tunnel.";
                            leaf sub-domain-id-ipv6 {
                              type leafref {
                                path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                              }
                              must
                                "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv6-unicast']";
                              must
                                "../../../../inter-area-seg-enable='false'";
                              description
                                "S-PMSI BIER IPv6 sub-domain ID.";
                            }
    
                            leaf bsl-ipv6 {
                              type leafref {
                                path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id-ipv6]/bier:encapsulations/bier:encapsulation/bier:bsl";
                              }
                              description
                                "S-PMSI BIER IPv6 BitString length.";
                            }
                          }  // case bier-ipv6
                        }  // choice tunnel-attribute
                      }  // container star-star
    
                      container star-grps {
                        when
                          "../../../../../l3vpn:type='ipv4-unicast'";
                        description
                          "List of (*, G) S-PMSI switch policys.";
                        list star-grp {
                          must
                            "not(../../star-star) and not(../../../../ipmsi-tunnel)";
                          must
                            "./tunnel-mode!='p2mp-te' or ./rsvp-te-p2mp-template";
                          must
                            "./tunnel-mode!='bier' or (./sub-domain-id and ./bsl)";
                          must
                            "./tunnel-mode!='bier-ipv6' or (./sub-domain-id-ipv6 and ./bsl-ipv6)";
                          must
                            "./tunnel-mode!='bier-ipv6' or ../../../../srv6-locator";
                          must
                            "(./tunnel-mode!='bier' and ./tunnel-mode!='p2mp-mldp' and ./tunnel-mode!='p2mp-te') or (../../../../../mvpn:mvpn-id or /mvpn:mvpn/mvpn:globals/mvpn:global[mvpn:address-family=current()/../../../../../../l3vpn:type]/mvpn:mvpn-id)";
                          key "group-addr group-mask-length";
                          description
                            "Apply (*, G) S-PMSI switch policy.";
                          leaf group-addr {
                            type inet:ip-address-no-zone;
                            description
                              "Start address of the IPv4 group address range in private network.";
                          }
    
                          leaf group-mask-length {
                            type uint8 {
                              range "4..32";
                            }
                            description
                              "Group mask length for the IPv4 group address range in private network.";
                          }
    
                          leaf tunnel-mode {
                            type tunnel-mode;
                            mandatory true;
                            description
                              "Tunnel mode.";
                          }
    
                          leaf per-item-tunnel-limit {
                            ext:dynamic-default {
                              ext:default-value "16" {
                                when "../tunnel-mode='p2mp-te' or ../tunnel-mode='p2mp-mldp'";
                                description "The default value of p2mp-te or p2mp-mldp tunnel.";
                              }
                              ext:default-value "256" {
                                when "../tunnel-mode!='p2mp-te' and ../tunnel-mode!='p2mp-mldp'";
                                description "The default value of other tunnel.";
                              }
                            }
                            type uint32 {
                              range "1..8192";
                            }
                            description
                              "Maximum number of S-PMSI tunnels allowed per S-PMSI configuration item per MVPN instance.";
                          }
    
                          choice tunnel-attribute {
                            description
                              "S-PMSI tunnel attributes configuration.";
                            case rsvp-te-p2mp {
                              when
                                "tunnel-mode='p2mp-te'";
                              description
                                "RSVP TE P2MP tunnel.";
                              leaf rsvp-te-p2mp-template {
                                type leafref {
                                  path "/mpls:mpls/mpls-te:te/mpls-te:p2mp-templates/mpls-te:p2mp-template/mpls-te:name";
                                }
                                description
                                  "RSVP TE P2MP tunnel template.";
                              }
                            }  // case rsvp-te-p2mp
    
                            case bier {
                              when
                                "tunnel-mode='bier'";
                              description
                                "BIER tunnel.";
                              leaf sub-domain-id {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                                }
                                must
                                  "../../../../../inter-area-seg-enable='false' and ../../../../../is-inter-as='false'";
                                must
                                  "not(../../star-grp[sub-domain-id!=current()])";
                                must
                                  "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv4-unicast']";
                                description
                                  "S-PMSI BIER sub-domain ID.";
                              }
    
                              leaf bsl {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id]/bier:encapsulations/bier:encapsulation/bier:bsl";
                                }
                                must
                                  "not(../../star-grp[bsl!=current()])";
                                description
                                  "S-PMSI BIER BitString length.";
                              }
                            }  // case bier
    
                            case bier-ipv6 {
                              when
                                "tunnel-mode='bier-ipv6'";
                              description
                                "BIER IPv6 tunnel.";
                              leaf sub-domain-id-ipv6 {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                                }
                                must
                                  "../../../../../inter-area-seg-enable='false'";
                                must
                                  "not(../../star-grp[sub-domain-id-ipv6!=current()])";
                                must
                                  "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv6-unicast']";
                                description
                                  "S-PMSI BIER IPv6 sub-domain ID.";
                              }
    
                              leaf bsl-ipv6 {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id-ipv6]/bier:encapsulations/bier:encapsulation/bier:bsl";
                                }
                                must
                                  "not(../../star-grp[bsl-ipv6!=current()])";
                                description
                                  "S-PMSI BIER BitString length.";
                              }
                            }  // case bier-ipv6
                          }  // choice tunnel-attribute
                        }  // list star-grp
                      }  // container star-grps
    
                      container src-grps {
                        description
                          "List of (S, G) S-PMSI switch policys.";
                        list src-grp {
                          must
                            "../../star-star or ../../../../ipmsi-tunnel";
                          must
                            "./tunnel-mode!='p2mp-te' or ./rsvp-te-p2mp-template";
                          must
                            "./tunnel-mode!='bier' or (./sub-domain-id and ./bsl)";
                          must
                            "./tunnel-mode!='bier-ipv6' or (./sub-domain-id-ipv6 and ./bsl-ipv6)";
                          key "group-addr group-mask-length source-addr source-mask-length";
                          description
                            "Apply (S, G) S-PMSI switch policy.";
                          leaf group-addr {
                            type inet:ip-address-no-zone;
                            description
                              "Start address of the IP group address range in private net.";
                          }
    
                          leaf group-mask-length {
                            type uint8 {
                              range "4..128";
                            }
                            description
                              "Group mask length for the IP group address range in private net. In the case of an IPv4 address family, the value ranges from 4 to 32. In the case of an IPv6 address family, the value ranges from 8 to 128.";
                          }
    
                          leaf source-addr {
                            type inet:ip-address-no-zone;
                            description
                              "Start address of the IP source address range in private net.";
                          }
    
                          leaf source-mask-length {
                            type uint8 {
                              range "0..128";
                            }
                            description
                              "Source mask length for the IP source address range in private net. In the case of an IPv4 address family, the value ranges from 0 to 32. In the case of an IPv6 address family, the value ranges from 0 to 128.";
                          }
    
                          leaf tunnel-mode {
                            type tunnel-mode;
                            must
                              "(../tunnel-mode!='p2mp-te' and ../tunnel-mode!='p2mp-mldp') or (../../../star-star/tunnel-mode='p2mp-te' or ../../../star-star/tunnel-mode='p2mp-mldp' or ../../../../../ipmsi-tunnel/tunnel-mode='p2mp-te' or ../../../../../ipmsi-tunnel/tunnel-mode='p2mp-mldp')";
                            must
                              "(../tunnel-mode!='bier') or ((../../../star-star/tunnel-mode and ../../../star-star/tunnel-mode='bier') or (../../../../../ipmsi-tunnel/tunnel-mode and ../../../../../ipmsi-tunnel/tunnel-mode='bier'))";
                            must
                              "(../tunnel-mode!='bier-ipv6') or ((../../../star-star/tunnel-mode and ../../../star-star/tunnel-mode='bier-ipv6') or (../../../../../ipmsi-tunnel/tunnel-mode and ../../../../../ipmsi-tunnel/tunnel-mode='bier-ipv6'))";
                            mandatory true;
                            description
                              "Tunnel mode.";
                          }
    
                          leaf switch-threshold {
                            type uint32 {
                              range "0..4194304";
                            }
                            units "kbit/s";
                            default "0";
                            description
                              "Multicast packet rate threshold for triggering the switching from the I-PMSI to the S-PMSI.";
                          }
    
                          leaf per-item-tunnel-limit {
                            ext:dynamic-default {
                              ext:default-value "16" {
                                when "../tunnel-mode='p2mp-te' or ../tunnel-mode='p2mp-mldp'";
                                description "The default value of p2mp-te or p2mp-mldp tunnel.";
                              }
                              ext:default-value "256" {
                                when "../tunnel-mode!='p2mp-te' and ../tunnel-mode!='p2mp-mldp'";
                                description "The default value of other tunnel.";
                              }
                            }
                            type uint32 {
                              range "1..8192";
                            }
                            description
                              "Maximum number of S-PMSI tunnels allowed per S-PMSI configuration item per MVPN instance.";
                          }
    
                          choice tunnel-attribute {
                            description
                              "S-PMSI tunnel attributes configuration.";
                            case rsvp-te-p2mp {
                              when
                                "tunnel-mode='p2mp-te'";
                              description
                                "RSVP TE P2MP tunnel.";
                              leaf rsvp-te-p2mp-template {
                                type leafref {
                                  path "/mpls:mpls/mpls-te:te/mpls-te:p2mp-templates/mpls-te:p2mp-template/mpls-te:name";
                                }
                                description
                                  "RSVP TE P2MP tunnel template.";
                              }
                            }  // case rsvp-te-p2mp
    
                            case bier {
                              when
                                "tunnel-mode='bier' and ../../../../../../l3vpn:type='ipv4-unicast'";
                              description
                                "BIER tunnel.";
                              leaf sub-domain-id {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                                }
                                must
                                  "../../../../../inter-area-seg-enable='false' and ../../../../../is-inter-as='false'";
                                must
                                  "../../../star-star[sub-domain-id=current()] or ../../../../../ipmsi-tunnel[sub-domain-id=current()]";
                                must
                                  "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv4-unicast']";
                                description
                                  "S-PMSI BIER sub-domain ID.";
                              }
    
                              leaf bsl {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id]/bier:encapsulations/bier:encapsulation/bier:bsl";
                                }
                                must
                                  "../../../star-star[bsl=current()] or ../../../../../ipmsi-tunnel[bsl=current()]";
                                description
                                  "S-PMSI BIER BitString length.";
                              }
                            }  // case bier
    
                            case bier-ipv6 {
                              when
                                "tunnel-mode='bier-ipv6'";
                              description
                                "BIER IPv6 tunnel.";
                              leaf sub-domain-id-ipv6 {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain/bier:sub-domain-id";
                                }
                                must
                                  "../../../../../inter-area-seg-enable='false'";
                                must
                                  "../../../star-star[sub-domain-id-ipv6=current()] or ../../../../../ipmsi-tunnel[sub-domain-id-ipv6=current()]";
                                must
                                  "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()][bier:address-family='ipv6-unicast']";
                                description
                                  "S-PMSI BIER IPv6 sub-domain ID.";
                              }
    
                              leaf bsl-ipv6 {
                                type leafref {
                                  path "/bier:bier/bier:sub-domains/bier:sub-domain[bier:sub-domain-id=current()/../sub-domain-id-ipv6]/bier:encapsulations/bier:encapsulation/bier:bsl";
                                }
                                must
                                  "../../../star-star[bsl-ipv6=current()] or ../../../../../ipmsi-tunnel[bsl-ipv6=current()]";
                                description
                                  "S-PMSI BIER IPv6 BitString length.";
                              }
                            }  // case bier-ipv6
                          }  // choice tunnel-attribute
                        }  // list src-grp
                      }  // container src-grps
                    }  // container spmsis
                  }  // container spmsi-tunnels
    
                  container spmsis {
                    config false;
                    description
                      "Operational state of S-PMSI.";
                    container te-tunnels {
                      description
                        "List of S-PMSI TE tunnel state.";
                      list te-tunnel {
                        key "te-p2mp-id te-tunnel-id te-extend-tunnel-id";
                        description
                          "S-PMSI TE tunnel state.";
                        leaf te-p2mp-id {
                          type pub-type:hex-binary;
                          description
                            "P2MP ID of the P2MP tunnel.";
                        }
    
                        leaf te-tunnel-id {
                          type uint32;
                          description
                            "ID of the P2MP tunnel.";
                        }
    
                        leaf te-extend-tunnel-id {
                          type inet:ip-address-no-zone;
                          description
                            "P2MP extended tunnel interface ID.";
                        }
    
                        uses tunnel-sg-info-type;
                      }  // list te-tunnel
                    }  // container te-tunnels
    
                    container ldp-tunnels {
                      description
                        "List of S-PMSI LDP tunnel state.";
                      list ldp-tunnel {
                        key "ldp-route-addr opaque-value";
                        description
                          "S-PMSI LDP tunnel state.";
                        leaf ldp-route-addr {
                          type inet:ip-address-no-zone;
                          description
                            "IP address of the root of a P2MP LSP.";
                        }
    
                        leaf opaque-value {
                          type string {
                            length "1..255";
                          }
                          description
                            "P2MP LSP ID.";
                        }
    
                        uses tunnel-sg-info-type;
                      }  // list ldp-tunnel
                    }  // container ldp-tunnels
    
                    container bier-tunnels {
                      description
                        "List of S-PMSI BIER tunnel.";
                      list bier-tunnel {
                        key "tunnel-id root-ip";
                        description
                          "Operational state of S-PMSI BIER tunnel.";
                        leaf tunnel-id {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "Tunnel ID.";
                        }
    
                        leaf root-ip {
                          type inet:ip-address-no-zone;
                          description
                            "Root IP address.";
                        }
    
                        leaf vpn-label {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "MPLS label.";
                        }
    
                        leaf sub-domain-id {
                          type uint16 {
                            range "0..255";
                          }
                          description
                            "Sub-domain ID.";
                        }
    
                        uses bier-tunnel-sg-info-type;
                      }  // list bier-tunnel
                    }  // container bier-tunnels
    
                    container bier-ipv6-tunnels {
                      description
                        "List of S-PMSI BIER IPv6 tunnel.";
                      list bier-ipv6-tunnel {
                        key "tunnel-id root-ip";
                        description
                          "Operational state of S-PMSI BIER tunnel.";
                        leaf tunnel-id {
                          type uint32 {
                            range
                              "0..4294967295";
                          }
                          description
                            "Tunnel ID.";
                        }
    
                        leaf root-ip {
                          type inet:ip-address-no-zone;
                          description
                            "Root IP address.";
                        }
    
                        choice src-dt-sid {
                          description
                            "Src-dt SID.";
                          case multicast-sid {
                            description
                              "Multicast service identifier attribute.";
                            leaf multicast-sid {
                              type inet:ipv6-address-no-zone;
                              description
                                "Src-dt SID.";
                            }
    
                            leaf prefix-len {
                              type uint8;
                              description
                                "Prefix length.";
                            }
    
                            leaf msid-len {
                              type uint8;
                              description
                                "MSID length.";
                            }
                          }  // case multicast-sid
    
                          case prefix-sid {
                            description
                              "Prefix-sid attribute.";
                            leaf prefix-sid {
                              type inet:ipv6-address-no-zone;
                              description
                                "Src-dt SID.";
                            }
                          }  // case prefix-sid
                        }  // choice src-dt-sid
    
                        leaf sub-domain-id {
                          type uint16 {
                            range "0..255";
                          }
                          description
                            "Sub-domain ID.";
                        }
    
                        uses bier-tunnel-sg-info-type;
                      }  // list bier-ipv6-tunnel
                    }  // container bier-ipv6-tunnels
                  }  // container spmsis
                }  // container ng
              }  // case ng-mvpn
    
              case rosen-mvpn {
                when
                  "../l3vpn:type='ipv4-unicast'";
                description "Rosen MVPN.";
                container rosen {
                  description
                    "Configure Rosen MVPN.";
                  container extranet-rpfs {
                    description
                      "List of extranet select-RPF.";
                    list extranet-rpf {
                      key "group-addr group-addr-mask-length";
                      max-elements 16;
                      description
                        "Configure extranet select-RPF.";
                      leaf group-addr {
                        type inet:ipv4-address-no-zone {
                          pattern
                            '(22[4-9]|23\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}';
                        }
                        description
                          "Multicast group address. The value ranges from 224.0.0.0 to 239.255.255.255.";
                      }
    
                      leaf group-addr-mask-length {
                        type uint32 {
                          range "4..32";
                        }
                        description
                          "Mask length of a multicast group address.";
                      }
    
                      leaf src-vrf-name {
                        type leafref {
                          path "/ni:network-instance/ni:instances/ni:instance/ni:name";
                        }
                        must
                          "(../../../../../../../ni:name!=current() and (../mvpn:src-vrf-name = '_public_' or /ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']/l3vpn:route-distinguisher or /ni:network-instance/ni:global/ni:route-distinguisher-auto-ip))";
                        mandatory true;
                        description
                          "RPF source VPN instance.";
                      }
                    }  // list extranet-rpf
                  }  // container extranet-rpfs
    
                  container share-group {
                    presence
                      "config share group";
                    description
                      "Enable/disable multicast-domain share-group.";
                    leaf address {
                      type inet:ip-address-no-zone;
                      mandatory true;
                      description
                        "Default MDT or I-PMSI group address for SM mode.";
                    }
    
                    leaf mtunnel-number {
                      type uint32 {
                        range "0..4095";
                      }
                      must
                        "(../ip-address and ../ip-mask-length) or not(../ip-address or ../ip-mask-length)";
                      mandatory true;
                      description "MTI ID.";
                    }
    
                    choice mtunnel-ip-configuration {
                      description
                        "Mtunnel IP configuration.";
                      case use-exist-interface-ip {
                        description
                          "Use IP of an exist interface.";
                        leaf unnumbered-if-name {
                          type leafref {
                            path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                          }
                          must
                            "../../../../../../ni:name=/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name";
                          must
                            "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='LoopBack'";
                          description
                            "Interface whose IP address is used as the default IP address of an MTI.";
                        }
                      }  // case use-exist-interface-ip
    
                      case specify-mtunnel-ip {
                        description
                          "Specify an IP.";
                        leaf ip-address {
                          type inet:ipv4-address-no-zone;
                          description
                            "MTI IP address.";
                        }
    
                        leaf ip-mask-length {
                          type uint32 {
                            range "0..32";
                          }
                          description
                            "Mask length of the MTI IP address.";
                        }
                      }  // case specify-mtunnel-ip
                    }  // choice mtunnel-ip-configuration
                  }  // container share-group
    
                  container switch-group {
                    when "../mvpn:share-group";
                    description
                      "Configure Switch-MDT.";
                    leaf switch-delay-time {
                      type uint32 {
                        range "3..60";
                      }
                      units "s";
                      default "5";
                      description
                        "The delay for switching from the Share-MDT to the Switch-MDT.";
                    }
    
                    leaf switch-back-holddown-time {
                      type uint32 {
                        range "0..512";
                      }
                      units "s";
                      default "60";
                      description
                        "The delay for switching back from the Switch-MDT to the Share-MDT.";
                    }
    
                    leaf is-reuse-log {
                      type boolean;
                      default "false";
                      description
                        "Enable/disable the function to record switch-group address reuse information.";
                    }
    
                    container group {
                      presence
                        "configure switch group";
                      description
                        "Enable/disable swicth group policy in MDT.";
                      leaf pool-addr {
                        type inet:ipv4-address-no-zone {
                          pattern
                            '(22[5-9]|23\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}|224(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[1-9]))(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){2}|224\.0(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|[1-9]))(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))';
                        }
                        mandatory true;
                        description
                          "Indicates the start IP address of the switch-group-pool.";
                      }
    
                      leaf pool-mask-length {
                        type uint8 {
                          range "24..32";
                        }
                        mandatory true;
                        description
                          "Specifies the mask length of the switch-group-pool.";
                      }
    
                      leaf acl-name {
                        type acl:acl4-identity;
                        must
                          "/acl:acl/acl:groups/acl:group[acl:number=number(current())]/acl:type='advance' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
                        description
                          "Specifies an ACL policy for filtering (S, G) entries that take effect in a switch-group-pool. If no value is specified, the switch-group-pool takes effect for all (S, G) entries.";
                      }
    
                      leaf threshold-value {
                        type uint32 {
                          range "0..4194304";
                        }
                        default "0";
                        description
                          "Indicates the multicast packet rate threshold for triggering the switchover from the Share-MDT to the Switch-MDT.";
                      }
                    }  // container group
                  }  // container switch-group
    
                  container attributes {
                    description
                      "Configure Rosen MVPN attributes.";
                    leaf auto-discovery-mode {
                      when
                        "../../mvpn:share-group";
                      type auto-discovery-type;
                      default "none";
                      description "A-D mode.";
                    }
    
                    leaf is-switch-without-register {
                      when
                        "../../mvpn:share-group";
                      type boolean;
                      default "false";
                      description
                        "Enable/disable the source PE from sending register packets to the RP to establish the SPT on the public network before the switch-group address is used to encapsulate VPN data.";
                    }
    
                    leaf ad-import-policy-name {
                      when
                        "../auto-discovery-mode='MDT'";
                      type leafref {
                        path "/rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:name";
                      }
                      description
                        "AD route-policy.";
                    }
    
                    leaf source-interface-name {
                      type leafref {
                        path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                      }
                      must
                        "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name='_public_'";
                      description
                        "Name of the public network interface whose IP address is used as the default IP address of an MTI.";
                    }
                  }  // container attributes
                }  // container rosen
              }  // case rosen-mvpn
            }  // choice mvpn-type
          }  // container mvpn
        }
      }  // module huawei-mvpn
    

© 2023 YumaWorks, Inc. All rights reserved.