huawei-ifm

Common interface management, which includes the public configuration of interfaces.

  • Version: 2021-10-11

    huawei-ifm@2021-10-11


    
      module huawei-ifm {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-ifm";
    
        prefix ifm;
    
        import huawei-pub-type {
          prefix pub-type;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import huawei-extension {
          prefix ext;
        }
        import huawei-network-instance {
          prefix ni;
        }
    
        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
          "Common interface management, which includes the public configuration of interfaces.";
    
        revision "2021-10-11" {
          description
            "Change HPGE interface to HP-GE interface.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-01-25" {
          description
            "Add the virtual-position condition.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-06-10" {
          description "Add units attribute.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-15" {
          description
            "Add must condition and revise description. Add leaf bandwidth-kbps.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-01-20" {
          description
            "Add must condition and revise description. Be compatible with code.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-01-15" {
          description
            "Delete redundant damping container.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-01-10" {
          description
            "Add the default case for the damping container.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-09-29" {
          description
            "Modify the damping container.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-08-22" {
          description
            "Add leaf pass-through-if, discontinuity-time and receive-unknown-protos-packet.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-04-15" {
          description "Reinitialize revision.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-04-10" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "interface-mgr";
    
        typedef port-type {
          type enumeration {
            enum "Ethernet" {
              value 0;
              description "Ethernet interface.";
            }
            enum "GigabitEthernet" {
              value 2;
              description
                "GigabitEthernet interface.";
            }
            enum "Eth-Trunk" {
              value 4;
              description "Eth-Trunk interface.";
            }
            enum "Ip-Trunk" {
              value 5;
              description "IP-Trunk interface.";
            }
            enum "Pos" {
              value 9;
              description "POS interface.";
            }
            enum "Tunnel" {
              value 14;
              description "Tunnel interface.";
            }
            enum "NULL" {
              value 18;
              description "Null interface.";
            }
            enum "LoopBack" {
              value 19;
              description "Loopback interface.";
            }
            enum "Vlanif" {
              value 15;
              description "VLANIF interface.";
            }
            enum "100GE" {
              value 20;
              description
                "100 GigabitEthernet interface.";
            }
            enum "200GE" {
              value 92;
              description
                "200 GigabitEthernet interface.";
            }
            enum "40GE" {
              value 23;
              description
                "40 GigabitEthernet interface.";
            }
            enum "MTunnel" {
              value 22;
              description "MTunnel interface.";
            }
            enum "10GE" {
              value 24;
              description
                "10 GigabitEthernet interface.";
            }
            enum "GEBrief" {
              value 25;
              description
                "GigabitEthernet interface.";
            }
            enum "MEth" {
              value 26;
              description
                "Management Ethernet interface.";
            }
            enum "IMEth" {
              value 79;
              description
                "Inner Management Ethernet interface.";
            }
            enum "Stack-Port" {
              value 27;
              description
                "Stack-port interface.";
            }
            enum "Sip" {
              value 28;
              description
                "System interconnect port.";
            }
            enum "Cpos" {
              value 10;
              description "CPOS controller.";
            }
            enum "E1" {
              value 30;
              description "E1 controller.";
            }
            enum "Serial" {
              value 8;
              description "Serial interface.";
            }
            enum "Mp-group" {
              value 31;
              description "MP-group interface.";
            }
            enum "Virtual-Ethernet" {
              value 6;
              description
                "Virtual-Ethernet interface.";
            }
            enum "VMEth" {
              value 33;
              description
                "Virtual management Ethernet interface.";
            }
            enum "Ima-group" {
              value 32;
              description "IMA-group interface.";
            }
            enum "Remote-Ap" {
              value 35;
              description
                "Virtual cluster access remote access point interface.";
            }
            enum "VBridge" {
              value 36;
              description
                "Virtual cluster access bridge interface.";
            }
            enum "Atm-Bundle" {
              value 37;
              description
                "ATM-Bundle interface.";
            }
            enum "Fiber-Channel" {
              value 38;
              description
                "Fiber-Channel interface.";
            }
            enum "Infiniband" {
              value 39;
              description
                "Infiniband interface.";
            }
            enum "Lmpif" {
              value 21;
              description "Lmpif interface.";
            }
            enum "T1" {
              value 41;
              description "T1 controller.";
            }
            enum "T3" {
              value 42;
              description "T3 controller.";
            }
            enum "Global-VE" {
              value 45;
              description "Global-VE interface.";
            }
            enum "VC4" {
              value 43;
              description "VC4 interface.";
            }
            enum "VC12" {
              value 44;
              description "VC12 interface.";
            }
            enum "Vbdif" {
              value 40;
              description "VBDIF interface.";
            }
            enum "Fabric-Port" {
              value 46;
              description
                "Fabric-Port interface.";
            }
            enum "E3" {
              value 48;
              description "E3 controller.";
            }
            enum "Otn" {
              value 55;
              description "OTN controller.";
            }
            enum "Vp" {
              value 49;
              description "VP interface.";
            }
            enum "DcnInterface" {
              value 50;
              description "DCN interface.";
            }
            enum "Cpos-Trunk" {
              value 51;
              description
                "Cpos-Trunk interface.";
            }
            enum "Pos-Trunk" {
              value 59;
              description "Pos-Trunk interface.";
            }
            enum "Trunk-Serial" {
              value 52;
              description
                "Trunk-Serial interface.";
            }
            enum "Global-Ima-Group" {
              value 57;
              description
                "Global-Ima-Group interface.";
            }
            enum "Global-Mp-Group" {
              value 53;
              description
                "Global-Mp-Group interface.";
            }
            enum "Gmpls-Uni" {
              value 63;
              description "GMPLS uni interface.";
            }
            enum "Wdm" {
              value 64;
              description "Wdm controller.";
            }
            enum "Nve" {
              value 65;
              description "NVE interface.";
            }
            enum "FCoE-Port" {
              value 67;
              description "FCoE-Port Interface.";
            }
            enum "Virtual-Template" {
              value 68;
              description
                "Virtual-Template Interface.";
            }
            enum "FC" {
              value 70;
              description "FC Interface.";
            }
            enum "4x10GE" {
              value 71;
              description
                "4x10 GigabitEthernet interface.";
            }
            enum "10x10GE" {
              value 72;
              description
                "10x10 GigabitEthernet interface.";
            }
            enum "3x40GE" {
              value 73;
              description
                "3x40 GigabitEthernet interface.";
            }
            enum "4x25GE" {
              value 74;
              description
                "4x25 GigabitEthernet interface.";
            }
            enum "25GE" {
              value 75;
              description
                "25 GigabitEthernet interface.";
            }
            enum "ATM" {
              value 11;
              description "Atm interface.";
            }
            enum "XGigabitEthernet" {
              value 91;
              description
                "XGigabitEthernet interface.";
            }
            enum "ServiceIf" {
              value 90;
              description "ServiceIf interface.";
            }
            enum "Virtual-ODUk" {
              value 94;
              description
                "Virtual-ODUk interface.";
            }
            enum "FlexE" {
              value 95;
              description "FlexE interface.";
            }
            enum "FlexE-200GE" {
              value 96;
              description
                "FlexE-200GE interface.";
            }
            enum "50|100GE" {
              value 101;
              description
                "50|100 GigabitEthernet interface.";
            }
            enum "50GE" {
              value 102;
              description
                "50 GigabitEthernet interface.";
            }
            enum "FlexE-50G" {
              value 103;
              description "FlexE-50G interface.";
            }
            enum "FlexE-100G" {
              value 104;
              description
                "FlexE-100G interface.";
            }
            enum "FlexE-50|100G" {
              value 105;
              description
                "FlexE-50|100G interface.";
            }
            enum "PW-VE" {
              value 88;
              description "PW-VE interface.";
            }
            enum "Virtual-Serial" {
              value 107;
              description
                "Virtual-Serial interface.";
            }
            enum "400GE" {
              value 108;
              description
                "400 GigabitEthernet interface.";
            }
            enum "VX-Tunnel" {
              value 89;
              description "VX-Tunnel interface.";
            }
            enum "HP-GE" {
              value 114;
              description "HP-GE interface.";
            }
            enum "FlexE-400G" {
              value 115;
              description
                "FlexE-400G interface.";
            }
            enum "Virtual-if" {
              value 116;
              description
                "Virtual-if interface.";
            }
            enum "Cellular" {
              value 117;
              description "Cellular interface.";
            }
            enum "MultiGE" {
              value 124;
              description "MultiGE interface.";
            }
            enum "FlexE-10G" {
              value 125;
              description "FlexE-10G interface.";
            }
            enum "OpticalAmplifier" {
              value 126;
              description
                "OpticalAmplifier interface.";
            }
          }
          description "Interface physical type.";
        }
    
        typedef router-type {
          type enumeration {
            enum "PtoP" {
              value 0;
              description "Point to point.";
            }
            enum "PtoMP" {
              value 1;
              description
                "Point to multi-point.";
            }
            enum "broadcast" {
              value 2;
              description "Broadcast.";
            }
            enum "NBMA" {
              value 3;
              description
                "Non-broadcast multi-access.";
            }
            enum "invalid" {
              value 255;
              description "None.";
            }
          }
          description "Interface router type.";
        }
    
        typedef network-layer-state {
          type enumeration {
            enum "ipv4-ipv6-up" {
              value 0;
              description
                "Administratively Up of IPv4 and IPv6 state.";
            }
            enum "ipv4-ipv6-down" {
              value 196608;
              description
                "Administratively Down of IPv4 and IPv6 state.";
            }
          }
          description
            "Interface network layer state type.";
        }
    
        typedef link-protocol {
          type enumeration {
            enum "ethernet" {
              value 0;
              description
                "The link protocol of the interface is Ethernet.";
            }
            enum "ppp" {
              value 1;
              description
                "The link protocol of the interface is PPP.";
            }
            enum "hdlc" {
              value 2;
              description
                "The link protocol of the interface is HDLC.";
            }
            enum "fr" {
              value 3;
              description
                "The link protocol of the interface is FR.";
            }
            enum "atm" {
              value 6;
              description
                "The link protocol of the interface is ATM.";
            }
            enum "tdm" {
              value 7;
              description
                "The link protocol of the interface is TDM.";
            }
          }
          description
            "Interface link portocol type.";
        }
    
        typedef port-status {
          type enumeration {
            enum "down" {
              value 0;
              description
                "The interface is in Down state.";
            }
            enum "up" {
              value 1;
              description
                "The interface is in Up state.";
            }
          }
          description "Interface status type.";
        }
    
        typedef service-type {
          type enumeration {
            enum "none" {
              value 0;
              description "None.";
            }
            enum "trunk-member" {
              value 2;
              description "Trunk member.";
            }
            enum "stack-member" {
              value 6;
              description "Stack member.";
            }
            enum "mp-member" {
              value 7;
              description "MP-Group member.";
            }
            enum "vbridge-member" {
              value 8;
              description "VBridge member.";
            }
            enum "ima-member" {
              value 9;
              description "IMA member.";
            }
            enum "bundle-member" {
              value 10;
              description "Bundle member.";
            }
            enum "fabric-member" {
              value 11;
              description "Fabric member.";
            }
            enum "lag-master-member" {
              value 12;
              description
                "Master member in a LAG.";
            }
            enum "lag-slave-member" {
              value 13;
              description
                "Slave member in a LAG.";
            }
            enum "cpos-trunk-member" {
              value 15;
              description "Cpos-Trunk member.";
            }
            enum "pos-trunk-member" {
              value 16;
              description "Pos-Trunk member.";
            }
            enum "global-mp-member" {
              value 17;
              description
                "Global-Mp-group member.";
            }
            enum "global-ima-member" {
              value 18;
              description
                "Global-Ima-group member.";
            }
          }
          description "Interface service type.";
        }
    
        typedef error-down-type {
          type enumeration {
            enum "bpdu-protection" {
              value 0;
              description "BPDU protection.";
            }
            enum "auto-defend" {
              value 1;
              description
                "Attack source tracing.";
            }
            enum "monitor-link" {
              value 2;
              description
                "The uplink of monitor-link group is down.";
            }
            enum "portsec-reached-limit" {
              value 65;
              description
                "Secure mac addresses have reached the upper limit.";
            }
            enum "storm-control" {
              value 66;
              description "Storm-control.";
            }
            enum "loopback-detect" {
              value 67;
              description "Loopback detect.";
            }
            enum "dual-active" {
              value 68;
              description "Dual-active.";
            }
            enum "mac-address-flapping" {
              value 69;
              description
                "Mac address flapping.";
            }
            enum "no-stack-link" {
              value 70;
              description "No-stack-link.";
            }
            enum "crc-statistics" {
              value 71;
              description "CRC statistics.";
            }
            enum "transceiver-power-low" {
              value 72;
              description
                "The transceiver power is low.";
            }
            enum "link-flap" {
              value 73;
              description "Link flapping.";
            }
            enum "l2-loop-occured" {
              value 74;
              description "L2 loop.";
            }
            enum "stack-member-exceed-limit" {
              value 75;
              description
                "The number of stack members exceeds the limit.";
            }
            enum "spine-member-exceed-limit" {
              value 76;
              description
                "The number of spine members exceeds the limit.";
            }
            enum "resource-mismatch" {
              value 77;
              description "Resource mismatch.";
            }
            enum "leaf-mstp" {
              value 78;
              description
                "Leaf port mstp disable.";
            }
            enum "m-lag" {
              value 79;
              description
                "M-LAG peer detect error.";
            }
            enum "fabric-uplink-threshold" {
              value 80;
              description
                "Fabric uplink less then threshold.";
            }
            enum "stack-config-conflict" {
              value 81;
              description
                "Stack config conflict.";
            }
            enum "spine-type-unsupported" {
              value 82;
              description
                "Spine type unsupported.";
            }
            enum "stack-packet-defensive" {
              value 83;
              description
                "Stack packet defensive.";
            }
            enum "forward-engine-buffer-failed" {
              value 85;
              description
                "Forward engine buffer failed.";
            }
            enum
              "forward-engine-interface-failed" {
              value 86;
              description
                "Forward engine interface failed.";
            }
            enum "fabric-link-failure" {
              value 87;
              description "Fabric link failure.";
            }
            enum "m-lag-consistency-check" {
              value 88;
              description
                "M-Lag consistency check failed.";
            }
            enum "pfc-deadlock" {
              value 89;
              description
                "PFC deadlock detect error.";
            }
          }
          description
            "Interface error down type.";
        }
    
        typedef class-type {
          type enumeration {
            enum "main-interface" {
              value 0;
              description "Main interface.";
            }
            enum "sub-interface" {
              value 1;
              description "Subinterface.";
            }
          }
          description "Interface class type.";
        }
    
        typedef encapsulation-type {
          type enumeration {
            enum "vlan-type" {
              value 0;
              description "VLAN type.";
            }
            enum "dot1q" {
              value 1;
              description "Dot1q.";
            }
            enum "qinq" {
              value 2;
              description "QinQ.";
            }
            enum "p2p" {
              value 3;
              description "P2P.";
            }
            enum "p2mp" {
              value 4;
              description "P2MP.";
            }
            enum "l2ve" {
              value 5;
              description "L2VE.";
            }
            enum "l3ve" {
              value 6;
              description "L3VE.";
            }
            enum "vlan-type-policy" {
              value 7;
              description "VLAN type policy.";
            }
            enum "dot1q-policy" {
              value 8;
              description "Dot1q policy.";
            }
            enum "stacking-policy" {
              value 9;
              description "Stacking policy.";
            }
            enum "untag-policy" {
              value 10;
              description "Untag policy.";
            }
            enum "qinq-mapping" {
              value 11;
              description "QinQ mapping.";
            }
            enum "l2vc" {
              value 12;
              description "L2VC.";
            }
            enum "l3vc" {
              value 13;
              description "L3VC.";
            }
            enum "evc-untag" {
              value 14;
              description "EvcUntag.";
            }
            enum "evc-dot1q" {
              value 15;
              description "EvcDot1q.";
            }
            enum "evc-qinq" {
              value 16;
              description "EvcQinq.";
            }
            enum "evc-default" {
              value 17;
              description "EvcDefault.";
            }
            enum "evc-dot1q-policy" {
              value 18;
              description "EvcDot1qPolicy.";
            }
            enum "ietf" {
              value 19;
              description "IETF.";
            }
            enum "nonstandard" {
              value 20;
              description "Nonstandard.";
            }
            enum "user-vlan" {
              value 21;
              description "User VLAN.";
            }
            enum "user-vlan-anyother" {
              value 22;
              description "User VLAN anyother.";
            }
            enum "qin-link" {
              value 23;
              description "Qinq link.";
            }
            enum "soft-gre-ve" {
              value 24;
              description "Soft gre ve.";
            }
            enum "l3ve-ter" {
              value 25;
              description "L3 ve terminal.";
            }
            enum "l3ve-acc" {
              value 26;
              description "L3 ve access.";
            }
            enum "invalid" {
              value 255;
              description "Invalid.";
            }
          }
          description "Encapsulated type.";
        }
    
        typedef statistic-mode {
          type enumeration {
            enum "interface-based" {
              value 1;
              description
                "Statistics are collected based on interfaces.";
            }
            enum "vlan-group-based" {
              value 2;
              description
                "Statistics are collected based on VLAN.";
            }
          }
          description
            "Interface statistic mode.";
        }
    
        typedef damp-level-type {
          type enumeration {
            enum "light" {
              value 0;
              description "Light weight.";
            }
            enum "middle" {
              value 1;
              description "Middle weight.";
            }
            enum "heavy" {
              value 2;
              description "Heavy weight.";
            }
          }
          description "Damp level type.";
        }
    
        typedef damp-status-type {
          type enumeration {
            enum "suppressed" {
              value 0;
              description
                "Dampening suppressed.";
            }
            enum "unsuppressed" {
              value 1;
              description
                "Dampening unsuppressed.";
            }
          }
          description "Damp status type.";
        }
    
        typedef link-quality-grade-type {
          type enumeration {
            enum "good" {
              value 0;
              description
                "The link quality is good with no bit-error.";
            }
            enum "high" {
              value 1;
              description
                "The link quality is high.";
            }
            enum "middle" {
              value 2;
              description
                "The link quality is middle.";
            }
            enum "low" {
              value 4;
              description
                "The link quality is low.";
            }
          }
          description "Link quality grade type.";
        }
    
        container ifm {
          description
            "Common interface management. It includes the public configuration of interfaces.";
          container global {
            description
              "Configure globally configured attributes.";
            leaf statistic-interval {
              type uint32 {
                range "10..600";
              }
              units "s";
              must
                "(../statistic-interval) mod 10 = 0";
              default "300";
              description
                "Set the interval at which global flow statistics are collected.";
            }
    
            leaf ipv4-ignore-primary-sub {
              type boolean;
              default "false";
              description
                "Enable/disable the function of ignoring primary/secondary of IPv4 address type. All secondary addresses must be deleted before this function is enabled.";
            }
    
            leaf sub-interface-link-trap-enable {
              type boolean;
              default "true";
              description
                "Enable/disable the trap function on all Sub-interface.";
            }
    
            container ipv4-conflict-enable {
              must
                "../ipv4-ignore-primary-sub='false'";
              presence
                "Enable/disable IPv4 conflict function.";
              description
                "Enable/disable ip conflict function.";
              leaf preempt-enable {
                type boolean;
                default "false";
                description
                  "Enable/disable IPv4 address conflict preemption.";
              }
            }  // container ipv4-conflict-enable
    
            container ipv6-conflict-enable {
              presence
                "Enable/disable IPv6 conflict function.";
              description
                "Enable/disable IPv6 conflict function.";
              leaf preempt-enable {
                type boolean;
                default "false";
                description
                  "Enable/disable IPv6 address conflict preemption.";
              }
            }  // container ipv6-conflict-enable
          }  // container global
    
          container damp {
            presence
              "Enable/disable suppression on interfaces' physical status flappings.";
            description
              "Enable/disable suppression on interfaces' physical status flappings.";
            leaf tx-off {
              type boolean;
              default "false";
              description
                "Enable/disable interfaces from sending signals if the interfaces' physical status flappings are suppressed.";
            }
    
            choice level {
              default "auto";
              description
                "Interface physical status damping level.";
              case auto {
                description
                  "Auto damping level.";
                container auto {
                  description
                    "Configure an auto suppression level.";
                  leaf level {
                    type damp-level-type;
                    default "light";
                    description
                      "Auto damping level.";
                  }
                }  // container auto
              }  // case auto
    
              case manual {
                description
                  "Manual damping level.";
                container manual {
                  description
                    "Configure a manual suppression level.";
                  leaf suppress {
                    type uint32 {
                      range "1..20000";
                    }
                    must
                      "(../suppress>../reuse)";
                    mandatory true;
                    description
                      "1000 times of suppress threshold.";
                  }
    
                  leaf reuse {
                    type uint32 {
                      range "1..20000";
                    }
                    must
                      "(../reuse<../suppress)";
                    mandatory true;
                    description
                      "1000 times of reuse threshold.";
                  }
    
                  leaf max-suppress-time {
                    type uint16 {
                      range "1..255";
                    }
                    units "s";
                    mandatory true;
                    description
                      "Max suppress time.";
                  }
    
                  leaf half-life-period {
                    type uint16 {
                      range "1..60";
                    }
                    units "s";
                    mandatory true;
                    description
                      "Half life time.";
                  }
                }  // container manual
              }  // case manual
            }  // choice level
          }  // container damp
    
          container auto-recovery-times {
            description
              "List of automatic recovery time configuration.";
            list auto-recovery-time {
              key "error-down-type";
              description
                "Configure automatic recovery time.";
              leaf error-down-type {
                type error-down-type;
                description
                  "Cause of the error-down event.";
              }
    
              leaf time-value {
                type uint32 {
                  range "30..86400";
                }
                units "s";
                mandatory true;
                description
                  "Delay for the status transition from down to up.";
              }
            }  // list auto-recovery-time
          }  // container auto-recovery-times
    
          container interfaces {
            description
              "List of configuring information on an interface.";
            list interface {
              key "name";
              description
                "Configure information on an interface. Physical, NULL, Virtual-if, and Virtual-Template0 interfaces cannot be created or deleted.";
              leaf name {
                type pub-type:if-name;
                description
                  "The textual name of the interface. It should be the name of the interface as assigned by the local device. It should be suitable for use in commands which entered at the device's 'console'. This might be a text name, such as 'NULL0', depending on the interface naming syntax of the device.";
              }
    
              leaf class {
                ext:operation-exclude "update";
                ext:dynamic-default;
                ext:support-filter "true";
                type class-type;
                description
                  "Identify a main interface or a sub-interface.";
              }
    
              leaf type {
                ext:operation-exclude "update";
                ext:dynamic-default;
                ext:support-filter "true";
                type port-type;
                description
                  "Type of an interface. Interfaces include physical and logical interfaces.";
              }
    
              leaf parent-name {
                ext:operation-exclude "update";
                ext:dynamic-default;
                when "../class='sub-interface'";
                type leafref {
                  path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                }
                description
                  "Name of the main interface. For example, Ethernet0/1/0.";
              }
    
              leaf number {
                ext:operation-exclude "update";
                ext:dynamic-default;
                type string {
                  length "1..63";
                  pattern
                    '(\d+/\d+/\d+/\d+)|(\d+/\d+/\d+)|(\d+/\d+)|(\d+)|(\d+/\d+/\d+[:]\d+)|(\d+/\d+/\d+[:]\d+[:]\d+[:]\d+)|(\d+/\d+/\d+/\d+[:]\d+)|(\d+/\d+/\d+/\d+[:]\d+[:]\d+[:]\d+)|(\d+/\d+/\d+/\d+/\d+[:]\d+)|(\d+/\d+[:]\d+)';
                }
                description
                  "Number of an interface. For example,1, 0/1/0, or 2:1.";
              }
    
              leaf description {
                type string {
                  length "1..242";
                }
                description
                  "Description of an interface.";
              }
    
              leaf admin-status {
                ext:dynamic-default;
                type port-status;
                description
                  "Administrative status of an interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf link-protocol {
                ext:dynamic-default;
                type link-protocol;
                description
                  "Link protocol. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf router-type {
                ext:operation-exclude "update";
                ext:dynamic-default;
                type router-type;
                description
                  "Route attribute of an interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf clear-ip-df {
                type boolean;
                default "false";
                description
                  "Enable/disable a device to forcibly fragment IP packets on an outbound interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf link-up-down-trap-enable {
                type boolean;
                default "true";
                description
                  "Enable/disable the trap function on an interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf statistic-enable {
                ext:dynamic-default;
                type boolean;
                description
                  "Enable/disable the statistics function on an interface. The default value of this node varies according to different interface types. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf statistic-mode {
                type statistic-mode;
                must
                  "../statistic-mode = 'interface-based' or (../l2-mode-enable = 'true' and ../statistic-enable = 'true')";
                default "interface-based";
                description
                  "Mode of statistics collection. Capabilities supported by this node vary according to interface types.";
              }
    
              choice bandwidth-type {
                description
                  "Configure the bandwidth of an interface.";
                case bandwidth-mbps {
                  description
                    "Configure the bandwidth of an interface.";
                  leaf bandwidth {
                    type uint32 {
                      range "1..1000000";
                    }
                    units "Mbit/s";
                    description
                      "Configure the bandwidth of an interface. Capabilities supported by this node vary according to interface types.";
                  }
                }  // case bandwidth-mbps
    
                case bandwidth-kbps {
                  description
                    "Configure the bandwidth of an interface.";
                  leaf bandwidth-kbps {
                    type uint32 {
                      range "1..1000000";
                    }
                    units "kbit/s";
                    description
                      "Configure the bandwidth of an interface. Capabilities supported by this node vary according to interface types.";
                  }
                }  // case bandwidth-kbps
              }  // choice bandwidth-type
    
              leaf mtu {
                ext:dynamic-default;
                type uint32 {
                  range "0..64000";
                }
                units "Byte";
                description
                  "Maximum transmission unit of an interface.
    Special explanation:
    Range: The server may restrict the allowed values for this leaf, depending on the interface types.
    Capabilities supported by this node vary according to interface types.";
              }
    
              leaf spread-mtu-flag {
                type boolean;
                default "false";
                description
                  "Enable/disable the function of spreading the MTU value of main interface to subinterface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf statistic-interval {
                type uint32 {
                  range "10..600";
                }
                units "s";
                must
                  "(../statistic-interval) mod 10 = 0";
                description
                  "Interval at which flow statistics are collected on an interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf vrf-name {
                type leafref {
                  path "/ni:network-instance/ni:instances/ni:instance/ni:name";
                }
                default "_public_";
                description
                  "Name of a VPN instance. It uniquely identifies a VPN instance. The VRF name of the DCN interface cannot be created, modified, or deleted.";
              }
    
              leaf l2-mode-enable {
                ext:operation-exclude "update";
                type boolean;
                default "false";
                description
                  "Enable/disable the function of creating an L2 Sub-interface. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf down-delay-time {
                when
                  "../type='Eth-Trunk' and ../class='main-interface'";
                type uint32 {
                  range "0..1000";
                }
                units "ms";
                must
                  "(../down-delay-time) mod 100 = 0";
                default "0";
                description
                  "Specify down-delay-time value in milliseconds.";
              }
    
              leaf mac-address {
                type pub-type:mac-address {
                  length "0..255";
                }
                description
                  "Config MAC Address. Constraints on MAC address configuration varies according to interfaces. Capabilities supported by this node vary according to interface types.";
              }
    
              leaf index {
                type uint32;
                config false;
                description
                  "Index of an interface.";
              }
    
              leaf position {
                type string {
                  length "1..256";
                }
                config false;
                description
                  "Position of an interface. For example, 0/1/0. Data can be queried only on physical interfaces.";
              }
    
              leaf aggregation-name {
                type pub-type:if-name;
                config false;
                description
                  "Name of an aggregation interface.";
              }
    
              leaf is-l2-switch {
                type boolean;
                default "false";
                config false;
                description
                  "To identify a layer2 switch port.";
              }
    
              leaf vs-name {
                type string {
                  length "1..50";
                }
                config false;
                description
                  "Name of a VS to which an interface belongs.";
              }
    
              leaf l2-switch-port-index {
                type uint32;
                config false;
                description
                  "L2 switch port index of an interface.";
              }
    
              leaf service-type {
                type service-type;
                config false;
                description
                  "Type of a member interface.";
              }
    
              leaf encapsulation-type {
                type encapsulation-type;
                config false;
                description
                  "Effective encapsulation type.";
              }
    
              leaf network-layer-status {
                type network-layer-state;
                default "ipv4-ipv6-up";
                description
                  "Network-layer status of an interface.";
              }
    
              leaf protocol-up-delay-time {
                ext:dynamic-default;
                type uint32 {
                  range "0..7200";
                }
                units "s";
                description
                  "Specify the protocol up-delay-time value in seconds.";
              }
    
              container control-flap {
                presence
                  "Enable/disable flapping control on an interface.";
                description
                  "Enable/disable flapping control on an interface.";
                leaf suppress {
                  type uint32 {
                    range "1..20000";
                  }
                  must
                    "(../suppress>../reuse) and ((../suppress<../ceiling))";
                  default "2000";
                  description
                    "Suppression threshold on an interface. The value must be greater than the reusing threshold and smaller than the suppression upper limit.";
                }
    
                leaf reuse {
                  type uint32 {
                    range "1..20000";
                  }
                  must "(../reuse<../suppress)";
                  default "750";
                  description
                    "Reusing threshold of an interface. The value must be smaller than the suppression threshold.";
                }
    
                leaf ceiling {
                  type uint32 {
                    range "1001..20000";
                  }
                  must
                    "(../ceiling>../suppress)";
                  default "6000";
                  description
                    "Maximum suppression value on an interface. The value should be greater than the damping suppression threshold.";
                }
    
                leaf decay-ok {
                  type uint32 {
                    range "1..900";
                  }
                  units "s";
                  default "54";
                  description
                    "The penalty value of an Up interface attenuates to 1/2.";
                }
    
                leaf decay-ng {
                  type uint32 {
                    range "1..900";
                  }
                  units "s";
                  default "54";
                  description
                    "The penalty value of a Down interface attenuates to 1/2.";
                }
    
                leaf control-flap-count {
                  type uint32;
                  config false;
                  description
                    "Status suppression count of an interface.";
                }
              }  // container control-flap
    
              container trap-threshold {
                description
                  "Configure the trap threshold.";
                leaf input-rising-rate {
                  type uint32 {
                    range "1..100";
                  }
                  units "%";
                  must
                    "not (../input-rising-rate and ../input-resume-rate and ../input-rising-rate<../input-resume-rate)";
                  default "100";
                  description
                    "Input bandwidth usage trap threshold.";
                }
    
                leaf input-resume-rate {
                  type uint32 {
                    range "1..100";
                  }
                  units "%";
                  must
                    "not (../input-rising-rate and ../input-resume-rate and ../input-rising-rate<../input-resume-rate)";
                  default "100";
                  description
                    "Input bandwidth usage resume threshold.";
                }
    
                leaf output-rising-rate {
                  type uint32 {
                    range "1..100";
                  }
                  units "%";
                  must
                    "not (../output-rising-rate and ../output-resume-rate and ../output-rising-rate<../output-resume-rate)";
                  default "100";
                  description
                    "Output bandwidth usage trap threshold.";
                }
    
                leaf output-resume-rate {
                  type uint32 {
                    range "1..100";
                  }
                  units "%";
                  must
                    "not (../output-rising-rate and ../output-resume-rate and ../output-rising-rate<../output-resume-rate)";
                  default "100";
                  description
                    "Output bandwidth usage resume threshold.";
                }
              }  // container trap-threshold
    
              choice damping {
                default "ignore-damp";
                description
                  "Damp function for single interface.";
                case ignore-damp {
                  description
                    "Ignore global damp function.";
                  container ignore-damp {
                    description
                      "Configure an interface to ignore the global damp-interface function.";
                    leaf ignore-global-damp {
                      type boolean;
                      default "false";
                      description
                        "Enable/disable an interface to ignore the global damp-interface function.";
                    }
                  }  // container ignore-damp
                }  // case ignore-damp
    
                case damp {
                  description
                    "Single interface status suppression.";
                  container damp {
                    presence
                      "Enable/disable suppression on an interface's physical status flappings.";
                    description
                      "Enable/disable suppression on an interface's physical status flappings.";
                    leaf tx-off {
                      type boolean;
                      default "false";
                      description
                        "Enable/disable an interface suppressed due to status flapping from sending signals.";
                    }
    
                    choice level {
                      default "auto";
                      description
                        "Interface physical status damping level.";
                      case auto {
                        description
                          "Auto damping level.";
                        container auto {
                          description
                            "Configure an auto suppression level.";
                          leaf level {
                            type damp-level-type;
                            default "light";
                            description
                              "Auto damping level.";
                          }
                        }  // container auto
                      }  // case auto
    
                      case manual {
                        description
                          "Manual damping level.";
                        container manual {
                          description
                            "Configure a manual suppression level.";
                          leaf suppress {
                            type uint32 {
                              range "1..20000";
                            }
                            must
                              "(../suppress>../reuse)";
                            mandatory true;
                            description
                              "1000 times of suppress threshold.";
                          }
    
                          leaf reuse {
                            type uint32 {
                              range "1..20000";
                            }
                            must
                              "(../reuse<../suppress)";
                            mandatory true;
                            description
                              "1000 times of reuse threshold.";
                          }
    
                          leaf max-suppress-time {
                            type uint16 {
                              range "1..255";
                            }
                            units "s";
                            mandatory true;
                            description
                              "Max suppress time.";
                          }
    
                          leaf half-life-period {
                            type uint16 {
                              range "1..60";
                            }
                            units "s";
                            mandatory true;
                            description
                              "Half life time.";
                          }
                        }  // container manual
                      }  // case manual
                    }  // choice level
                  }  // container damp
                }  // case damp
              }  // choice damping
    
              container damp-state {
                config false;
                description
                  "Operational state of interface suppression information.";
                leaf suppress-status {
                  type damp-status-type;
                  description
                    "Interface status suppression state.";
                }
    
                leaf suppress {
                  type uint32 {
                    range "1..20000";
                  }
                  description
                    "1000 times of suppress threshold.";
                }
    
                leaf reuse {
                  type uint32 {
                    range "1..20000";
                  }
                  description
                    "1000 times of reuse threshold.";
                }
    
                leaf max-suppress-time {
                  type uint16 {
                    range "1..255";
                  }
                  units "s";
                  description
                    "Max suppress time.";
                }
    
                leaf half-life-period {
                  type uint16 {
                    range "1..60";
                  }
                  units "s";
                  description "Half life time.";
                }
    
                leaf damp-reuse-time {
                  type uint16 {
                    range "0..255";
                  }
                  units "s";
                  description
                    "Damping reuse time.";
                }
    
                leaf current-penalty {
                  type uint32;
                  description
                    "1000 times of current penalty.";
                }
    
                leaf max-penalty {
                  type uint32;
                  description
                    "1000 times of max penalty.";
                }
              }  // container damp-state
    
              container dynamic {
                config false;
                description
                  "Operational state of interfaces.";
                leaf oper-status {
                  type port-status;
                  description
                    "Running status of an interface.";
                }
    
                leaf physical-status {
                  type port-status;
                  description
                    "Physical status of an interface.";
                }
    
                leaf link-status {
                  type port-status;
                  description
                    "Link status of an interface.";
                }
    
                leaf mtu {
                  type uint32;
                  units "Byte";
                  description
                    "Dynamic MTU of an interface.";
                }
    
                leaf bandwidth {
                  type pub-type:band-width;
                  description
                    "Bandwidth of an interface.";
                }
    
                leaf ipv4-status {
                  type port-status;
                  description
                    "IPv4 Protocol status of an interface.";
                }
    
                leaf ipv6-status {
                  type port-status;
                  description
                    "IPv6 protocol status of an interface.";
                }
    
                leaf is-control-flap-damp {
                  type boolean;
                  description
                    "Status suppression of an interface.";
                }
    
                leaf mac-address {
                  type pub-type:mac-address {
                    length "1..14";
                  }
                  description
                    "MAC address of an interface.";
                }
    
                leaf line-protocol-up-time {
                  type yang:date-and-time;
                  description
                    "Last line protocol up time.";
                }
    
                leaf is-offline {
                  type boolean;
                  description
                    "Whether an interface is offline.";
                }
    
                leaf link-quality-grade {
                  type link-quality-grade-type;
                  description
                    "Interface link quality grade.";
                }
    
                leaf sub-if-counts {
                  type uint32;
                  description
                    "Number of sub-interfaces on this interface.";
                }
              }  // container dynamic
    
              container mib-statistics {
                config false;
                description
                  "Interface statistics.";
                leaf receive-byte {
                  type uint64;
                  units "Byte";
                  description
                    "Number of bytes received on an interface.";
                }
    
                leaf send-byte {
                  type uint64;
                  units "Byte";
                  description
                    "Number of bytes sent on an interface.";
                }
    
                leaf receive-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of packets received on an interface.";
                }
    
                leaf send-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of packets sent on an interface.";
                }
    
                leaf receive-unicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of unicast packets received on an interface.";
                }
    
                leaf receive-multicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of multicast packets received on an interface.";
                }
    
                leaf receive-broad-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of broadcast packets received on an interface.";
                }
    
                leaf send-unicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of unicast packets sent on an interface.";
                }
    
                leaf send-multicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of multicast packets sent on an interface.";
                }
    
                leaf send-broad-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of broadcast packets sent on an interface.";
                }
    
                leaf receive-error-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of error packets received on an interface.";
                }
    
                leaf receive-drop-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received packets discarded on an interface.";
                }
    
                leaf send-error-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of error packets sent on an interface.";
                }
    
                leaf send-drop-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent packets discarded on an interface.";
                }
              }  // container mib-statistics
    
              container common-statistics {
                config false;
                description
                  "Interface statistics.";
                leaf stati-interval {
                  type uint32 {
                    range "10..600";
                  }
                  units "s";
                  default "300";
                  description
                    "Current interval at which interface flow statistics are collected.";
                }
    
                leaf in-byte-rate {
                  type uint64;
                  units "Byte/s";
                  description
                    "Rate at which bytes are received within the interval.";
                }
    
                leaf in-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate at which bits are received within the interval.";
                }
    
                leaf in-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate at which packets are received within the interval.";
                }
    
                leaf in-use-rate {
                  type string {
                    length "1..50";
                  }
                  description
                    "Input bandwidth usage within the interval.";
                }
    
                leaf out-byte-rate {
                  type uint64;
                  units "Byte/s";
                  description
                    "Rate at which bytes are sent within the interval.";
                }
    
                leaf out-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate at which bits are sent within the interval.";
                }
    
                leaf out-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate at which packets are sent within the interval.";
                }
    
                leaf out-use-rate {
                  type string {
                    length "1..50";
                  }
                  description
                    "Output bandwidth usage within the interval.";
                }
    
                leaf receive-byte {
                  type uint64;
                  units "Byte";
                  description
                    "Number of received bytes, which can be cleared.";
                }
    
                leaf send-byte {
                  type uint64;
                  units "Byte";
                  description
                    "Number of sent bytes, which can be cleared.";
                }
    
                leaf receive-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received packets, which can be cleared.";
                }
    
                leaf send-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent packets, which can be cleared.";
                }
    
                leaf receive-unicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received unicast packets, which can be cleared.";
                }
    
                leaf receive-multicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received multicast packets, which can be cleared.";
                }
    
                leaf receive-broad-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received broadcast packets, which can be cleared.";
                }
    
                leaf send-unicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent unicast packets, which can be cleared.";
                }
    
                leaf send-multicast-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent multicast packets, which can be cleared.";
                }
    
                leaf send-broad-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent broadcast packets, which can be cleared.";
                }
    
                leaf receive-error-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received error packets, which can be cleared.";
                }
    
                leaf receive-drop-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of received discarded packets, which can be cleared.";
                }
    
                leaf send-error-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent error packets, which can be cleared.";
                }
    
                leaf send-drop-packet {
                  type uint64;
                  units "packet";
                  description
                    "Number of sent discarded packets, which can be cleared.";
                }
    
                leaf send-unicast-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of unicast bits sent on an interface.";
                }
    
                leaf receive-unicast-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of unicast bits received on an interface.";
                }
    
                leaf send-multicast-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of multicast bits sent on an interface.";
                }
    
                leaf receive-multicast-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of multicast bits received on an interface.";
                }
    
                leaf send-broad-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of broadcast bits sent on an interface.";
                }
    
                leaf receive-broad-bit {
                  type uint64;
                  units "bit";
                  description
                    "Number of broadcast bits received on an interface.";
                }
    
                leaf send-unicast-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of unicast bits sent on an interface.";
                }
    
                leaf receive-unicast-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of unicast bits received on an interface.";
                }
    
                leaf send-multicast-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of multicast bits sent on an interface.";
                }
    
                leaf receive-multicast-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of multicast bits received on an interface.";
                }
    
                leaf send-broad-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of broadcast bits sent on an interface.";
                }
    
                leaf receive-broad-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate of broadcast bits received on an interface.";
                }
    
                leaf send-unicast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of unicast packets sent on an interface.";
                }
    
                leaf receive-unicast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of unicast packets received on an interface.";
                }
    
                leaf send-multicast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of multicast packets sent on an interface.";
                }
    
                leaf receive-multicast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of multicast packets received on an interface.";
                }
    
                leaf send-broadcast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of broadcast packets sent on an interface.";
                }
    
                leaf receive-broadcast-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate of broadcast packets received on an interface.";
                }
              }  // container common-statistics
    
              container error-down {
                config false;
                description
                  "Information about the interface in the error-down state, including the interface name, cause of the error-down event, delay for the transition from down to up, and remaining time for the up state.";
                leaf cause {
                  type error-down-type;
                  description
                    "Cause of the error-down event.";
                }
    
                leaf recovery-time {
                  type uint32 {
                    range "0..86400";
                  }
                  units "s";
                  description
                    "Delay for the transition from down to up.";
                }
    
                leaf remainder-time {
                  type uint32 {
                    range "0..86400";
                  }
                  units "s";
                  description
                    "The remaining time for the up event.";
                }
              }  // container error-down
    
              container virtual-position {
                config false;
                description
                  "Operational state of the interface's virtual position.";
                leaf vnfc-name {
                  type string {
                    length "1..31";
                  }
                  description
                    "Virtualized network function component (VNFC) name.";
                }
    
                leaf board-id {
                  type uint32;
                  description
                    "Virtual board ID.";
                }
    
                leaf port-id {
                  type uint32;
                  description "Virtual Port ID.";
                }
              }  // container virtual-position
    
              container tunnel-protocol {
                description
                  "Configure tunnel protocol.
    Special explanation:
    Constraint: If a tunnel is locked, all configurations of the tunnel cannot be deleted or modified.";
                choice type {
                  description
                    "Tunnel interface link layer encapsulation protocol type.";
                }  // choice type
              }  // container tunnel-protocol
    
              container vlanif-attribute {
                description
                  "Configure VLANIF attribute.";
                choice band-width-type {
                  default "band-width-mbps";
                  description
                    "VLANIF interface bandwidth.";
                  case band-width-mbps {
                    description
                      "VLANIF interface bandwidth with mbps.";
                    leaf band-width {
                      type uint32 {
                        range "1..1000000";
                      }
                      units "Mbit/s";
                      default "1000";
                      description
                        "VLANIF interface bandwidth.";
                    }
                  }  // case band-width-mbps
    
                  case band-width-kbps {
                    description
                      "VLANIF interface bandwidth with kbps.";
                    leaf band-width-kbps {
                      type uint32 {
                        range "1..1000000";
                      }
                      units "kbit/s";
                      description
                        "VLANIF interface bandwidth with kbps.";
                    }
                  }  // case band-width-kbps
                }  // choice band-width-type
    
                leaf damping-time {
                  type uint16 {
                    range "0..20";
                  }
                  units "s";
                  default "0";
                  description
                    "Delay time after which a VLANIF interface goes down.";
                }
              }  // container vlanif-attribute
    
              container ipv4 {
                description
                  "Configure IPv4 addresses.";
                choice address {
                  description
                    "The IPv4 address can be specified as negotiated or unnumbered or ordinarily address.";
                  case common-address {
                    description
                      "Configure address.";
                    container addresses {
                      must
                        "count(address)=0 or count(address[type='main'])=1";
                      description
                        "List of common addresses. The IPv4 address of the DCN interface cannot be created, modified, or deleted.";
                      list address {
                        key "ip";
                        description
                          "Configure IPv4 address.";
                        leaf ip {
                          type inet:ipv4-address-no-zone;
                          description
                            "IPv4 address.";
                        }
    
                        leaf mask {
                          type ipv4-netmask;
                          mandatory true;
                          description
                            "IPv4 address mask.";
                        }
    
                        leaf type {
                          type ipv4-address-config-type;
                          mandatory true;
                          description
                            "IPv4 address type.";
                        }
                      }  // list address
                    }  // container addresses
                  }  // case common-address
    
                  case unnumbered-address {
                    description
                      "Unnumbered address.";
                    container unnumbered-address {
                      description
                        "Configure unnumbered interface. The address borrowing relationship of the DCN interface cannot be created, modified, or deleted.";
                      leaf unnumbered-if-name {
                        type leafref {
                          path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                        }
                        mandatory true;
                        description
                          "Name of an unnumbered interface.";
                      }
                    }  // container unnumbered-address
                  }  // case unnumbered-address
    
                  case negotiate-address {
                    description
                      "Negotiate address.";
                    container negotiation-address {
                      description
                        "Configure negotiate address.";
                      leaf negotiation-type {
                        type negotiation-type;
                        mandatory true;
                        description
                          "Enable negotiation address on interface.";
                      }
                    }  // container negotiation-address
                  }  // case negotiate-address
                }  // choice address
    
                container state {
                  config false;
                  description
                    "Operational state of IPv4 addresses.";
                  container addresses {
                    description
                      "List of addresses.";
                    list address {
                      key "ip";
                      description
                        "Operational state of IPv4 address.";
                      leaf ip {
                        type inet:ipv4-address-no-zone;
                        description
                          "IPv4 address.";
                      }
    
                      leaf mask {
                        type ipv4-netmask;
                        description
                          "IPv4 address mask.";
                      }
    
                      leaf type {
                        type ipv4-address-state-type;
                        description
                          "IPv4 address type.";
                      }
    
                      leaf is-block {
                        type boolean;
                        description
                          "IPv4 address is blocked or not.";
                      }
                    }  // list address
                  }  // container addresses
    
                  container gateways {
                    config false;
                    description
                      "List of gateway addresses.";
                    list gateway {
                      key "gateway";
                      description
                        "Operational state of gateway addresses.";
                      leaf gateway {
                        type inet:ipv4-address;
                        description
                          "Gateway of interface.";
                      }
                    }  // list gateway
                  }  // container gateways
                }  // container state
              }  // container ipv4
    
              container ipv6 {
                presence
                  "Enable/disable the IPv6 capability on an interface.";
                description
                  "Enable/disable the IPv6 capability on an interface.";
                leaf mtu6 {
                  ext:dynamic-default;
                  type uint32 {
                    range "0..50000";
                  }
                  units "Byte";
                  description
                    "IPv6 maximum transmission unit of an interface.
    Special explanation:
    Range: The server may restrict the allowed values for this leaf, depending on the interface's type.";
                }
    
                leaf spread-mtu-flag {
                  type boolean;
                  default "false";
                  description
                    "Enable/disable the function of spreading the IPv6 MTU of main interface to subinterface.";
                }
    
                leaf auto-link-local {
                  type boolean;
                  default "false";
                  description
                    "Enable/disable an interface with the auto linklocal address function.";
                }
    
                choice address {
                  description
                    "IPv6 address configurations.";
                  case common-address {
                    description
                      "Configure address.";
                    container addresses {
                      description
                        "List of IPv6 addresses.";
                      list address {
                        key "ip";
                        description
                          "Configure IPv6 address.";
                        leaf ip {
                          type inet:ipv6-address-no-zone;
                          description
                            "IPv6 address.";
                        }
    
                        leaf prefix-length {
                          type uint32 {
                            range "1..128";
                          }
                          mandatory true;
                          description
                            "Length of the IPv6 address prefix.";
                        }
    
                        leaf type {
                          type ipv6-address-config-type;
                          mandatory true;
                          description
                            "IPv6 address type.";
                        }
    
                        leaf algorithm-type {
                          type ipv6-address-algorithm-type;
                          must
                            "(../type='global' and (../algorithm-type='none' or ../algorithm-type='cga' or ../algorithm-type='eui64') ) or (../type='link-local' and (../algorithm-type='none' or ../algorithm-type='cga') ) or (../type='anycast' and ../algorithm-type='none')";
                          default "none";
                          description
                            "Address algorithm type.";
                        }
                      }  // list address
                    }  // container addresses
                  }  // case common-address
                }  // choice address
    
                container nd-prefixs {
                  must
                    "(count(nd-prefix)> 0 and /ni:network-instance/ni:instances/ni:instance[ni:name=current()/../../ifm:vrf-name]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv6-unicast']) or (count(nd-prefix)= 0)";
                  description
                    "List of nd prefix.";
                  list nd-prefix {
                    key "prefix";
                    description
                      "Configure nd prefix.";
                    leaf prefix {
                      type inet:ipv6-address-no-zone;
                      description
                        "IPv6 address of the prefix.";
                    }
    
                    leaf prefix-len {
                      type int32 {
                        range "0..128";
                      }
                      mandatory true;
                      description
                        "Length of the prefix address.";
                    }
    
                    leaf valid-lifetime {
                      type uint32 {
                        range "0..4294967295";
                      }
                      units "s";
                      must
                        "(../valid-lifetime>=../preferred-lifetime)";
                      mandatory true;
                      description
                        "Valid life time.";
                    }
    
                    leaf preferred-lifetime {
                      type uint32 {
                        range "0..4294967295";
                      }
                      units "s";
                      must
                        "(../preferred-lifetime<=../valid-lifetime)";
                      mandatory true;
                      description
                        "Preferred life time.";
                    }
    
                    leaf auto-flag {
                      type boolean;
                      default "true";
                      description
                        "Enable/disable the autonomous address-configuration.";
                    }
    
                    leaf on-link-flag {
                      type boolean;
                      default "true";
                      description
                        "Enable/disable the on-link flag.";
                    }
                  }  // list nd-prefix
                }  // container nd-prefixs
    
                container state {
                  config false;
                  description
                    "Operational state of IPv6 addresses.";
                  leaf mtu6 {
                    type uint32 {
                      range "0..50000";
                    }
                    units "Byte";
                    description
                      "IPv6 maximum transmission unit of an interface.
    Special explanation:
    Range: The server may restrict the allowed values for this leaf, depending on the interface's type.";
                  }
    
                  container addresses {
                    description
                      "List of IPv6 addresses.";
                    list address {
                      key "ip";
                      description
                        "Operational state of IPv6 addresses.";
                      leaf ip {
                        type inet:ipv6-address-no-zone;
                        description
                          "IPv6 address.";
                      }
    
                      leaf prefix-length {
                        type uint32 {
                          range "1..128";
                        }
                        description
                          "Length of the IPv6 address prefix.";
                      }
    
                      leaf type {
                        type ipv6-address-state-type;
                        description
                          "IPv6 address type.";
                      }
    
                      leaf algorithm-type {
                        type ipv6-address-algorithm-type;
                        description
                          "Address algorithm type.";
                      }
    
                      leaf collision-count {
                        type uint8 {
                          range "0..3";
                        }
                        description
                          "Number of IPv6 address collisions.";
                      }
    
                      leaf is-block {
                        type boolean;
                        description
                          "IPv6 address is blocked or not.";
                      }
    
                      leaf status {
                        type ipv6-status-type;
                        description
                          "IPv6 address status.";
                      }
                    }  // list address
                  }  // container addresses
                }  // container state
              }  // container ipv6
    
              container ethernet {
                description
                  "Configure ethernet interface.";
                container main-interface {
                  when
                    "../../ifm:class='main-interface'";
                  description
                    "Configure main-interface attribute.";
                  leaf vlan-swap {
                    type enable-type;
                    default "disable";
                    description
                      "Enable or disable VLAN tag swapping.";
                  }
    
                  leaf qinq-protocol {
                    type pub-type:hex-binary {
                      length "1..6";
                      pattern
                        '(0x)[6-9a-f][0-9a-f]{2,3}';
                    }
                    default "0x8100";
                    description "Ethernet type.";
                  }
    
                  container encapsulation {
                    when "not(../l2-attribute)";
                    description
                      "Configure ethernet tag attribute.";
                    leaf pvid {
                      type uint16 {
                        range "0..4094";
                      }
                      description
                        "L3 port defalut VLAN ID.";
                    }
                  }  // container encapsulation
    
                  container l2-attribute {
                    presence
                      "Enables portswitch";
                    description
                      "Configure interface Layer 2 attribute.";
                    leaf link-type {
                      type link-type;
                      default "hybrid";
                      description "Link type.";
                    }
    
                    leaf pvid {
                      when
                        "../link-type!='trunk'";
                      type leafref {
                        path "/vlan:vlan/vlan:vlans/vlan:vlan/vlan:id";
                      }
                      must
                        "/vlan:vlan/vlan:vlans/vlan:vlan[vlan:id=current()]/vlan:type!='super'";
                      description
                        "Default VLAN ID.";
                    }
    
                    leaf trunk-vlans {
                      when
                        "../link-type='trunk' or ../link-type='hybrid'";
                      type pub-type:vlan-range;
                      description
                        "List of VLANs that are allowed to pass.";
                    }
    
                    leaf erps-auto-vlans {
                      type pub-type:vlan-range;
                      config false;
                      description
                        "List of VLANs created when the port is added to ERPS ring.";
                    }
    
                    leaf untag-vlans {
                      when
                        "../link-type='hybrid'";
                      type pub-type:vlan-range;
                      description
                        "List of untagged VLANs that are allowed to pass.";
                    }
    
                    leaf untag-discarding {
                      type boolean;
                      default "false";
                      description
                        "Enable/disable discard untagged packets.";
                    }
    
                    container vlan-stackings {
                      when
                        "../link-type='trunk' or ../link-type='hybrid'";
                      description
                        "List of VLAN stacking.";
                      list vlan-stacking {
                        must
                          "ce-default or trans-vlans";
                        key "stacking-vlan";
                        unique "ce-default";
                        description
                          "Configure VLAN stacking.";
                        leaf stacking-vlan {
                          type leafref {
                            path "/vlan:vlan/vlan:vlans/vlan:vlan/vlan:id";
                          }
                          must
                            "/vlan:vlan/vlan:vlans/vlan:vlan[vlan:id=current()]/vlan:type!='super'";
                          description
                            "VLAN ID in the outer VLAN tag after VLAN stacking is performed.";
                        }
    
                        leaf ce-default {
                          type empty;
                          must
                            "not(../../../pvid)";
                          description
                            "Add a VLAN tag to received untagged packets.";
                        }
    
                        leaf trans-vlans {
                          type pub-type:vlan-range;
                          description
                            "List of VLAN IDs of received packets. VLANs are used to control traffic access. Only one VLAN can be configured on an interface and all its sub-interfaces.";
                        }
                      }  // list vlan-stacking
                    }  // container vlan-stackings
    
                    container vlan-stacking-remarks {
                      when
                        "../link-type='trunk' or ../link-type='hybrid'";
                      description
                        "List of VLAN stacking with remark.";
                      list vlan-stacking-remark {
                        key "vlan-begin vlan-end";
                        description
                          "Configure VLAN stacking interface with remark 8021p.";
                        leaf vlan-begin {
                          type uint16 {
                            range "1..4094";
                          }
                          description
                            "The beginning VLAN before stacking.";
                        }
    
                        leaf vlan-end {
                          type uint16 {
                            range "1..4094";
                          }
                          description
                            "The end VLAN before stacking.";
                        }
    
                        leaf stack-vlan {
                          type uint16 {
                            range "1..4094";
                          }
                          mandatory true;
                          description
                            "The VLAN after stacking.";
                        }
    
                        leaf remark-8021p {
                          type uint16 {
                            range "0..7";
                          }
                          mandatory true;
                          description
                            "IEEE 802.1P encapsulation.";
                        }
                      }  // list vlan-stacking-remark
                    }  // container vlan-stacking-remarks
    
                    container vlan-mappings {
                      when
                        "../link-type='trunk' or ../link-type='hybrid'";
                      description
                        "List of VLAN mapping configuration.";
                      list vlan-mapping {
                        key "mapping-vlan";
                        description
                          "Configure VLAN mapping interface.";
                        leaf mapping-vlan {
                          type leafref {
                            path "/vlan:vlan/vlan:vlans/vlan:vlan/vlan:id";
                          }
                          description
                            "VLAN ID in the VLAN tag after VLAN mapping is performed.";
                        }
    
                        leaf trans-vlans {
                          type pub-type:vlan-range;
                          mandatory true;
                          description
                            "List of VLAN IDs in VLAN tags before VLAN mapping is performed.";
                        }
                      }  // list vlan-mapping
                    }  // container vlan-mappings
    
                    container vlan-mapping-remarks {
                      when
                        "../link-type='trunk' or ../link-type='hybrid'";
                      description
                        "List of VLAN mapping with remark.";
                      list vlan-mapping-remark {
                        key "vlan-begin vlan-end";
                        description
                          "Configure VLAN mapping interface with remark 8021p.";
                        leaf vlan-begin {
                          type uint16 {
                            range "1..4094";
                          }
                          description
                            "The beginning VLAN before mapping.";
                        }
    
                        leaf vlan-end {
                          type uint16 {
                            range "1..4094";
                          }
                          description
                            "The end VLAN before mapping.";
                        }
    
                        leaf mapping-vlan {
                          type uint16 {
                            range "1..4094";
                          }
                          mandatory true;
                          description
                            "The VLAN after mapping.";
                        }
    
                        leaf remark-8021p {
                          type uint16 {
                            range "0..7";
                          }
                          mandatory true;
                          description
                            "IEEE 802.1P encapsulation.";
                        }
                      }  // list vlan-mapping-remark
                    }  // container vlan-mapping-remarks
    
                    container statistics-enable-vlans {
                      description
                        "Configure VLAN statistics collection enable.";
                      leaf vlans {
                        type pub-type:vlan-range;
                        description
                          "VLAN list. The specified VLAN must have been added to an interface.";
                      }
                    }  // container statistics-enable-vlans
    
                    container port-isolate-groups {
                      description
                        "List of port isolate groups.";
                      list port-isolate-group {
                        key "group-id";
                        description
                          "Configure port isolate group.";
                        leaf group-id {
                          type int32 {
                            range "1..64";
                          }
                          description
                            "Group ID.";
                        }
                      }  // list port-isolate-group
                    }  // container port-isolate-groups
                  }  // container l2-attribute
                }  // container main-interface
    
                container l3-sub-interface {
                  when
                    "../../ifm:class='sub-interface'";
                  description
                    "Configure l3 sub-interface attribute.";
                  container vlan-groups {
                    description
                      "List of sub-interface VLAN group.";
                    list vlan-group {
                      key "id";
                      description
                        "Configure sub-interface VLAN group.";
                      leaf id {
                        type uint8 {
                          range "1..16";
                        }
                        description
                          "Specified VLAN group ID.";
                      }
    
                      leaf mode {
                        ext:operation-exclude "update" {
                          when "(../../../qinq-termination/qinq-vids/qinq-vid/group-id[.=current()/../id]) or (../../../dot1q-termination/dot1q-vlans/dot1q-vlans-group/group-id[.=current()/../id]) or (../../../dot1q-termination/dot1q-vlans-policy/policy-vlan-groups/policy-vlan-group/group-id[.=current()/../id]) or (../../../qinq-mapping/mapping-vids/mapping-vid/group-id[.=current()/../id]) or (../../../qinq-stacking/stacking-vid/group-id[.=current()/../id]) or (../../../stacking-policy/policy-vlan-groups/policy-vlan-group/group-id[.=current()/../id])";
                          description "The mode cannot be modified after the VLAN group is referenced.";
                        }
                        type group-mode-type;
                        default "single";
                        description
                          "Include single and multiple modes. The mode cannot be modified after being referenced.";
                      }
    
                      leaf statistic-enable {
                        type boolean;
                        default "false";
                        description
                          "Enable/disable VLAN group-based QinQ packet statistics.";
                      }
    
                      leaf description {
                        type string {
                          length "1..31";
                        }
                        description
                          "VLAN group description.";
                      }
                    }  // list vlan-group
                  }  // container vlan-groups
    
                  choice flow-type {
                    description
                      "Specify an encapsulation type. After an encapsulation type is specified, it cannot be changed to another encapsulation type. In addition, it can not be deleted if a service has been configured in the same interface. If an encapsulation type fails to be specified, see the error message to determine the failure cause.";
                    case vlan-type {
                      description
                        "Configuration of VLAN-type dot1q.";
                      container vlan-type-dot1q {
                        presence
                          "Vlan type dot1q.";
                        description
                          "Configure VLAN-type dot1q.";
                        leaf vlan-type-vid {
                          type uint16 {
                            range "1..4094";
                          }
                          mandatory true;
                          description
                            "VLAN ID of the VLAN sub-interface;";
                        }
                      }  // container vlan-type-dot1q
                    }  // case vlan-type
    
                    case dot1q-termination {
                      description
                        "Configuration of dot1q termination.";
                      container dot1q-termination {
                        must
                          "not(dot1q-vlans/dot1q-vlans-group or dot1q-vlans/dot1q-vlans/vlan-list) or not(dot1q-vlans-policy/policy-vlans/policy-vlan or dot1q-vlans-policy/policy-vlan-groups/policy-vlan-group)";
                        presence
                          "Dot1q termination.";
                        description
                          "Configure dot1q termination.";
                        leaf tag {
                          ext:operation-exclude "update";
                          type tag-type;
                          must
                            "(../tag='none' or ../tag='rt-protocol')";
                          mandatory true;
                          description
                            "Tag type.";
                        }
    
                        leaf arp-broadcast-enable {
                          type boolean;
                          default "false";
                          description
                            "Enable/disable ARP broadcast.";
                        }
    
                        container dot1q-vlans {
                          description
                            "List of dot1q termination configuration. When tag-type is rt-protocol, this node can only configure one VLAN.";
                          list dot1q-vlans-group {
                            key "group-id";
                            description
                              "Configure dot1q termination.";
                            leaf group-id {
                              type leafref {
                                path "../../../../vlan-groups/vlan-group/id";
                              }
                              description
                                "Specified VLAN group ID.";
                            }
    
                            leaf vlan-list {
                              type pub-type:vlan-range;
                              mandatory true;
                              description
                                "Dot1q termination VLAN ID list.";
                            }
                          }  // list dot1q-vlans-group
    
                          container dot1q-vlans {
                            presence
                              "dot1q vlans.";
                            description
                              "Configure dot1q termination.";
                            leaf vlan-list {
                              type pub-type:vlan-range;
                              mandatory true;
                              description
                                "Dot1q termination VLAN ID list. The VLAN in VLAN-list can not exist in the VLAN-list of dot1q-VLANs-group.";
                            }
                          }  // container dot1q-vlans
                        }  // container dot1q-vlans
    
                        container dot1q-vlans-policy {
                          must
                            "(../tag!='rt-protocol') or (not(policy-vlans/policy-vlan) or not(policy-vlan-groups/policy-vlan-group))";
                          description
                            "Configure VLAN policy encapsulation list.";
                          container policy-vlans {
                            must
                              "../../tag!='rt-protocol' or (count(../policy-vlans/policy-vlan)<=1)";
                            description
                              "List of sub-interface policy VLAN.";
                            list policy-vlan {
                              key "vlan-id-begin vlan-id-end";
                              description
                                "Apply sub-interface policy.";
                              leaf vlan-id-begin {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                description
                                  "Start VLAN ID in the user packet.";
                              }
    
                              leaf vlan-id-end {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                must
                                  "(../vlan-id-end>=../vlan-id-begin)";
                                must
                                  "../../../../tag!='rt-protocol' or (../vlan-id-end=../vlan-id-begin)";
                                description
                                  "End VLAN ID in the user packet.";
                              }
    
                              leaf policy-type {
                                ext:operation-exclude "update";
                                type policy-type;
                                mandatory true;
                                description
                                  "Policy type.";
                              }
    
                              leaf value-8021p {
                                when
                                  "../policy-type='8021p'";
                                type pub-type:id-range {
                                  pattern
                                    '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                                }
                                mandatory true;
                                description
                                  "802.1p policy value.";
                              }
    
                              leaf dscp-values {
                                when
                                  "../policy-type='dscp'";
                                type pub-type:id-range {
                                  pattern
                                    '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                                }
                                mandatory true;
                                description
                                  "DSCP policy value.";
                              }
                            }  // list policy-vlan
                          }  // container policy-vlans
    
                          container policy-vlan-groups {
                            must
                              "../../tag!='rt-protocol' or (count(../policy-vlan-groups/policy-vlan-group)<=1)";
                            description
                              "List of sub-interface policy VLAN with gorup.";
                            list policy-vlan-group {
                              key "group-id vlan-id-begin vlan-id-end";
                              description
                                "Apply sub-interface policy.";
                              leaf group-id {
                                type leafref {
                                  path "../../../../../vlan-groups/vlan-group/id";
                                }
                                description
                                  "Specified VLAN group ID.";
                              }
    
                              leaf vlan-id-begin {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                description
                                  "Start VLAN ID in the user packet.";
                              }
    
                              leaf vlan-id-end {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                must
                                  "(../vlan-id-end>=../vlan-id-begin)";
                                must
                                  "../../../../tag!='rt-protocol' or (../vlan-id-end=../vlan-id-begin)";
                                description
                                  "End VLAN ID in the user packet.";
                              }
    
                              leaf policy-type {
                                ext:operation-exclude "update";
                                type policy-type;
                                mandatory true;
                                description
                                  "Policy type.";
                              }
    
                              leaf value-8021p {
                                when
                                  "../policy-type='8021p'";
                                type pub-type:id-range {
                                  pattern
                                    '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                                }
                                mandatory true;
                                description
                                  "802.1p policy value.";
                              }
    
                              leaf dscp-values {
                                when
                                  "../policy-type='dscp'";
                                type pub-type:id-range {
                                  pattern
                                    '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                                }
                                mandatory true;
                                description
                                  "DSCP policy value.";
                              }
                            }  // list policy-vlan-group
                          }  // container policy-vlan-groups
                        }  // container dot1q-vlans-policy
    
                        container vrrps {
                          description
                            "Configure dot1q VRRP list. VLAN-id must be configured on the interface.";
                          list vrrp {
                            key "vlan-id";
                            max-elements 1;
                            description
                              "Configure dot1q VRRP entry.";
                            leaf vlan-id {
                              type uint32 {
                                range "1..4094";
                              }
                              description
                                "Specified VLAN ID.";
                            }
                          }  // list vrrp
                        }  // container vrrps
    
                        container pwtag {
                          must
                            "not(../dot1q-vlans-policy)";
                          presence
                            "PW tag configuration";
                          description
                            "Configure the P-Tag of the packets in the PW with VLAN.";
                          leaf tag-vid-mode {
                            type pw-tag-mode;
                            must
                              "(../tag-vid-mode='user-define' or ../tag-vid-mode='outer-vlan')";
                            mandatory true;
                            description
                              "Vid mode of pwtag.";
                          }
    
                          leaf tag-vid {
                            when
                              "(../tag-vid-mode='user-define')";
                            type uint16 {
                              range "1..4094";
                            }
                            mandatory true;
                            description
                              "User-defined VLAN ID.";
                          }
    
                          leaf tag-8021p-mode {
                            type pw-tag-mode;
                            must
                              "(../tag-8021p-mode!='inner-vlan')";
                            default "null";
                            description
                              "802.1p mode of pwtag.";
                          }
    
                          leaf tag-8021p-value {
                            when
                              "(../tag-8021p-mode='user-define')";
                            type uint8 {
                              range "0..7";
                            }
                            mandatory true;
                            description
                              "User-defined 802.1p value.";
                          }
                        }  // container pwtag
                      }  // container dot1q-termination
                    }  // case dot1q-termination
    
                    case qinq-termination {
                      description
                        "Configuration of QinQ termination.";
                      container qinq-termination {
                        presence
                          "QinQ termination.";
                        description
                          "Configure QinQ termination.";
                        leaf tag {
                          ext:operation-exclude "update";
                          type tag-type;
                          mandatory true;
                          description
                            "Tag type, include local switching, rt-protocol and none type, this value can not be merged.";
                        }
    
                        leaf arp-broadcast-enable {
                          type boolean;
                          default "false";
                          description
                            "Enable/disable ARP broadcast.";
                        }
    
                        container remark-8021p {
                          when "../qinq-vids";
                          must
                            "(remark-type='precedence' and precedence-value) or (remark-type!='precedence') or not(remark-type)";
                          description
                            "Configure 802.1p mapping.";
                          leaf remark-type {
                            type remark-type;
                            default
                              "trust-pe-8021p";
                            description
                              "Trust the 802.1p in the outer VLAN tag, inner VLAN tag, or user-defined precedence.";
                          }
    
                          leaf precedence-value {
                            when
                              "../remark-type='precedence'";
                            type uint8 {
                              range "0..7";
                            }
                            description
                              "User-defined 802.1p value.";
                          }
                        }  // container remark-8021p
    
                        container symmetry-mode {
                          description
                            "Configure symmetry mode.";
                          leaf symmetry-type {
                            ext:operation-exclude "update" {
                              when "../../qinq-vids/qinq-vid";
                              description "Symmetry-type cannot be updated when qinq-vids is configured.";
                            }
                            type symmetry-type;
                            must
                              "../../tag='none' or ../symmetry-type='asymmetry' or ../symmetry-type='symmetry'";
                            default "asymmetry";
                            description
                              "Symmetry type.";
                          }
    
                          leaf user-mode {
                            when
                              "../symmetry-type='symmetry'";
                            type enable-type;
                            default "disable";
                            description
                              "Enable or disable the user mode.";
                          }
                        }  // container symmetry-mode
    
                        container qinq-vids {
                          must
                            "(../tag!='rt-protocol' or (count(../qinq-vids/qinq-vid)<=1))";
                          description
                            "List of QinQ termination configuration.";
                          list qinq-vid {
                            must
                              "(ce-vlan-end>=ce-vlan-begin) and (pe-vlan-end>=pe-vlan-begin)";
                            must
                              "((../../tag!='rt-protocol') or ((ce-vlan-end=ce-vlan-begin and pe-vlan-end=pe-vlan-begin)))";
                            key "pe-vlan-begin pe-vlan-end ce-vlan-begin ce-vlan-end";
                            description
                              "Configure QinQ termination.";
                            leaf pe-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start outer VLAN ID.";
                            }
    
                            leaf pe-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End outer VLAN ID.";
                            }
    
                            leaf ce-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start inner VLAN ID.";
                            }
    
                            leaf ce-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End inner VLAN ID.";
                            }
    
                            leaf group-id {
                              ext:operation-exclude "create|delete|update";
                              type leafref {
                                path "../../../../vlan-groups/vlan-group/id";
                              }
                              description
                                "Specified VLAN group ID. The group-id cannot be modified after the qinq-vid is created.";
                            }
                          }  // list qinq-vid
                        }  // container qinq-vids
    
                        container pwtag {
                          presence
                            "PW tag configuration";
                          description
                            "Configure the P-Tag of the packets in the PW with VLAN.";
                          leaf tag-vid-mode {
                            type pw-tag-mode;
                            must
                              "(../tag-vid-mode!='null')";
                            mandatory true;
                            description
                              "Vid mode of pwtag.";
                          }
    
                          leaf tag-vid {
                            when
                              "(../tag-vid-mode='user-define')";
                            type uint16 {
                              range "1..4094";
                            }
                            mandatory true;
                            description
                              "User-defined VLAN ID.";
                          }
    
                          leaf tag-8021p-mode {
                            type pw-tag-mode;
                            default "null";
                            description
                              "802.1p mode of pwtag.";
                          }
    
                          leaf tag-8021p-value {
                            when
                              "(../tag-8021p-mode='user-define')";
                            type uint8 {
                              range "0..7";
                            }
                            mandatory true;
                            description
                              "User-defined 802.1p value.";
                          }
                        }  // container pwtag
                      }  // container qinq-termination
                    }  // case qinq-termination
    
                    case qinq-stacking {
                      description
                        "Configuration of QinQ stacking.";
                      container qinq-stacking {
                        must
                          "not(../../../ip:ipv6)";
                        must
                          "not(../../../ip:ipv4/ip:addresses/ip:address)";
                        must
                          "not(../../../ip:ipv4/ip:unnumbered-address/ip:unnumbered-if-name)";
                        must
                          "../../../ifm:vrf-name='_public_'";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:user-vlan-any)";
                        presence
                          "qinq-stacking type";
                        description
                          "Enable/disable QinQ stacking configuration list.";
                        leaf pe-vid {
                          type uint16 {
                            range "1..4094";
                          }
                          description
                            "Outer VLAN ID.";
                        }
    
                        list stacking-vid {
                          must
                            "(vlan-id-end>=vlan-id-begin)";
                          key "vlan-id-begin vlan-id-end";
                          description
                            "Apply QinQ stacking configuration policy.";
                          leaf vlan-id-begin {
                            type uint16 {
                              range "1..4094";
                            }
                            description
                              "QinQ stacking outside VLAN.";
                          }
    
                          leaf vlan-id-end {
                            type uint16 {
                              range "1..4094";
                            }
                            description
                              "QinQ stacking inside VLAN.";
                          }
    
                          leaf group-id {
                            type leafref {
                              path "../../../vlan-groups/vlan-group/id";
                            }
                            must
                              "count(../../../vlan-groups/vlan-group/id)=1";
                            description
                              "Specified VLAN group ID.";
                          }
                        }  // list stacking-vid
                      }  // container qinq-stacking
                    }  // case qinq-stacking
    
                    case qinq-mapping {
                      description
                        "Configuration of QinQ mapping.";
                      container qinq-mapping {
                        must
                          "not(../../../ip:ipv6)";
                        must
                          "not(../../../ip:ipv4/ip:addresses/ip:address)";
                        must
                          "not(../../../ip:ipv4/ip:unnumbered-address/ip:unnumbered-if-name)";
                        must
                          "../../../ifm:vrf-name='_public_'";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:user-vlan-any)";
                        presence
                          "qinq-mapping type";
                        description
                          "Configure QinQ mapping.";
                        container mapping-vids {
                          description
                            "List of QinQ mapping VLAN ID.";
                          list mapping-vid {
                            key "vlan-id";
                            unique "mapping-vlan-id";
                            description
                              "Configure QinQ mapping.";
                            leaf vlan-id {
                              type uint16 {
                                range "1..4094";
                              }
                              must
                                "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:qinq-mapping/ethernet:mapping-vids/ethernet:mapping-vid[ethernet:vlan-id=current()])";
                              must
                                "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../../../../ifm:parent-name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/ethernet:pvid[.=current()])";
                              must
                                "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:vlan-type-dot1q/ethernet:vlan-type-vid[.=current()])";
                              must
                                "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:vlan-type-policy/ethernet:vlan-type-vid[.=current()])";
                              description
                                "VLAN ID.";
                            }
    
                            leaf mapping-vlan-id {
                              ext:operation-exclude "update";
                              type uint16 {
                                range "1..4094";
                              }
                              must
                                "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:qinq-mapping/ethernet:mapping-vids/ethernet:mapping-vid[ethernet:mapping-vlan-id=current()])";
                              mandatory true;
                              description
                                "VLAN ID after VLAN mapping is performed.";
                            }
    
                            leaf group-id {
                              ext:operation-exclude "create|delete|update";
                              type leafref {
                                path "../../../../vlan-groups/vlan-group/id";
                              }
                              description
                                "Specified VLAN group ID.";
                            }
                          }  // list mapping-vid
                        }  // container mapping-vids
                      }  // container qinq-mapping
                    }  // case qinq-mapping
    
                    case vlan-type-policy {
                      description
                        "Configuration of VLAN-type dot1q policy.";
                      container vlan-type-policy {
                        must
                          "not(../vlan-groups/vlan-group)";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:user-vlan-any)";
                        presence
                          "Vlan type dot1q policy.";
                        description
                          "Configure VLAN-type dot1q policy.";
                        leaf vlan-type-vid {
                          ext:operation-exclude "update";
                          type uint16 {
                            range "1..4094";
                          }
                          must
                            "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../../ifm:parent-name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/ethernet:pvid[.=current()/../vlan-type-vid])";
                          must
                            "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:vlan-type-dot1q/ethernet:vlan-type-vid[.=current()/../vlan-type-vid])";
                          must
                            "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../../ifm:parent-name]/ethernet:ethernet/ethernet:l2-sub-interface/ethernet:qinqs/ethernet:qinq-vids/ethernet:qinq-vid[ethernet:pe-vlan-id=current()/../vlan-type-vid])";
                          mandatory true;
                          description
                            "VLAN ID of the VLAN sub-interface.";
                        }
    
                        leaf policy-type {
                          ext:operation-exclude "update";
                          type policy-type;
                          mandatory true;
                          description
                            "Policy type.";
                        }
    
                        leaf value-8021p {
                          when
                            "../policy-type='8021p'";
                          type pub-type:id-range {
                            pattern
                              '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                          }
                          mandatory true;
                          description
                            "802.1p policy value.";
                        }
    
                        leaf dscp-values {
                          when
                            "../policy-type='dscp'";
                          type pub-type:id-range {
                            pattern
                              '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                          }
                          mandatory true;
                          description
                            "DSCP policy value.";
                        }
                      }  // container vlan-type-policy
                    }  // case vlan-type-policy
    
                    case qinq-stacking-policy {
                      description
                        "Configuration of qinq stacking policy.";
                      container stacking-policy {
                        must
                          "(policy-vlan-groups/policy-vlan-group) or (policy-vlans/policy-vlan)";
                        presence
                          "qinq-stacking policy type.";
                        description
                          "Configure VLAN policy encapsulation list.";
                        container policy-vlans {
                          description
                            "List of sub-interface policy VLAN.";
                          list policy-vlan {
                            key "vlan-id-begin vlan-id-end";
                            description
                              "Apply sub-interface policy.";
                            leaf vlan-id-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start VLAN ID in the user packet.";
                            }
    
                            leaf vlan-id-end {
                              type uint16 {
                                range "1..4094";
                              }
                              must
                                "(../vlan-id-end>=../vlan-id-begin)";
                              description
                                "End VLAN ID in the user packet.";
                            }
    
                            leaf policy-type {
                              ext:operation-exclude "update";
                              type policy-type;
                              mandatory true;
                              description
                                "Policy type.";
                            }
    
                            leaf value-8021p {
                              when
                                "../policy-type='8021p'";
                              type pub-type:id-range {
                                pattern
                                  '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                              }
                              mandatory true;
                              description
                                "802.1p policy value.";
                            }
    
                            leaf dscp-values {
                              when
                                "../policy-type='dscp'";
                              type pub-type:id-range {
                                pattern
                                  '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                              }
                              mandatory true;
                              description
                                "DSCP policy value.";
                            }
                          }  // list policy-vlan
                        }  // container policy-vlans
    
                        container policy-vlan-groups {
                          description
                            "List of sub-interface policy VLAN with gorup.";
                          list policy-vlan-group {
                            key "group-id vlan-id-begin vlan-id-end";
                            description
                              "Apply sub-interface policy.";
                            leaf group-id {
                              type leafref {
                                path "../../../../vlan-groups/vlan-group/id";
                              }
                              description
                                "Specified VLAN group ID.";
                            }
    
                            leaf vlan-id-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start VLAN ID in the user packet.";
                            }
    
                            leaf vlan-id-end {
                              type uint16 {
                                range "1..4094";
                              }
                              must
                                "(../vlan-id-end>=../vlan-id-begin)";
                              description
                                "End VLAN ID in the user packet.";
                            }
    
                            leaf policy-type {
                              ext:operation-exclude "update";
                              type policy-type;
                              mandatory true;
                              description
                                "Policy type.";
                            }
    
                            leaf value-8021p {
                              when
                                "../policy-type='8021p'";
                              type pub-type:id-range {
                                pattern
                                  '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                              }
                              mandatory true;
                              description
                                "802.1p policy value.";
                            }
    
                            leaf dscp-values {
                              when
                                "../policy-type='dscp'";
                              type pub-type:id-range {
                                pattern
                                  '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                              }
                              mandatory true;
                              description
                                "DSCP policy value.";
                            }
                          }  // list policy-vlan-group
                        }  // container policy-vlan-groups
                      }  // container stacking-policy
                    }  // case qinq-stacking-policy
    
                    case untag-policy {
                      description
                        "Configuration of untag policy.";
                      container untag-policy {
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/ethernet:pvid)";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:user-vlan-any)";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l2-sub-interface/ethernet:default)";
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../ifm:name]/ip:ipv6)";
                        must
                          "count(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:untag-policy)<=8";
                        must
                          "count(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:parent-name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:l3-sub-interface/ethernet:untag-policy[ethernet:policy-type='default'])<=1";
                        presence "Untag policy.";
                        description
                          "Configure untag.";
                        leaf policy-type {
                          ext:operation-exclude "update";
                          type policy-type;
                          must
                            "../policy-type='dscp' or (../policy-type='default' and not (/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../../ifm:parent-name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/ethernet:vlan-stackings/ethernet:vlan-stacking/ethernet:ce-default))";
                          mandatory true;
                          description
                            "Policy type.";
                        }
    
                        leaf dscp-values {
                          when
                            "../policy-type='dscp'";
                          type pub-type:id-range {
                            pattern
                              '((6[0-3]|[1-5][0-9]|[0-9])?(-(6[0-3]|[1-5][0-9]|[0-9]))?(,((6[0-3]|[1-5][0-9]|[0-9])(-(6[0-3]|[1-5][0-9]|[0-9]))?))*)|((([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\)))?(,(([\+|\-](6[0-3]|[1-5][0-9]|[0-9]))|([\+|\-]\((6[0-3]|[1-5][0-9]|[0-9])-(6[0-3]|[1-5][0-9]|[0-9])\))))*)';
                          }
                          mandatory true;
                          description
                            "DSCP policy value. The dscp-values ranges of different sub-interfaces on the same main interface cannot overlap.";
                        }
                      }  // container untag-policy
                    }  // case untag-policy
    
                    case user-vlan-comm {
                      description
                        "User VLAN common configuration.";
                      container user-vlan-common {
                        description
                          "Configure user VLAN QinQ.";
                        container user-vlan-qinqs {
                          description
                            "List of user VLAN QinQ configuration.";
                          list user-vlan-qinq {
                            must
                              "((pe-vlan-end>=pe-vlan-begin) and (ce-vlan-end>=ce-vlan-begin))";
                            key "pe-vlan-begin pe-vlan-end ce-vlan-begin ce-vlan-end";
                            description
                              "Configure user VLAN QinQ.";
                            leaf pe-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start outer VLAN ID.";
                            }
    
                            leaf pe-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End outer VLAN ID.";
                            }
    
                            leaf ce-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start inner VLAN ID.";
                            }
    
                            leaf ce-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End inner VLAN ID.";
                            }
                          }  // list user-vlan-qinq
    
                          container descriptions {
                            description
                              "List of user VLAN description.";
                            list description {
                              key "pe-vlan-id ce-vlan-id";
                              description
                                "Configure description of user VLAN.";
                              leaf pe-vlan-id {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                description
                                  "Outer VLAN ID.";
                              }
    
                              leaf ce-vlan-id {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                description
                                  "Inner VLAN ID.";
                              }
    
                              leaf description {
                                type string {
                                  length
                                    "1..128";
                                }
                                mandatory true;
                                description
                                  "Description of the user VLAN.";
                              }
                            }  // list description
                          }  // container descriptions
                        }  // container user-vlan-qinqs
    
                        container user-vlan-dot1q {
                          presence
                            "User VLAN dot1q type";
                          description
                            "Configure user VLAN dot1q.";
                          leaf vlan-list {
                            type pub-type:vlan-range;
                            mandatory true;
                            description
                              "User VLAN dot1q VLAN ID list.";
                          }
    
                          container descriptions {
                            description
                              "List of user VLAN dot1q description.";
                            list description {
                              key "vlan-id";
                              description
                                "Configure user VLAN dot1q description.";
                              leaf vlan-id {
                                type uint16 {
                                  range
                                    "1..4094";
                                }
                                description
                                  "VLAN ID.";
                              }
    
                              leaf description {
                                type string {
                                  length
                                    "1..128";
                                }
                                mandatory true;
                                description
                                  "Description of the user VLAN.";
                              }
                            }  // list description
                          }  // container descriptions
                        }  // container user-vlan-dot1q
                      }  // container user-vlan-common
                    }  // case user-vlan-comm
    
                    case user-vlan-any {
                      description
                        "User VLAN any configuration.";
                      container user-vlan-any {
                        presence
                          "User VLAN any configuration";
                        description
                          "Enable/disable user VLAN any configuration.";
                      }  // container user-vlan-any
                    }  // case user-vlan-any
                  }  // choice flow-type
                }  // container l3-sub-interface
    
                container l2-sub-interface {
                  when
                    "../../ifm:l2-mode-enable='true'";
                  description
                    "Configure l2 sub interface attribute.";
                  leaf local-switch {
                    type enable-type;
                    default "disable";
                    description
                      "Enable/disable local switching on a sub-interface for QinQ VLAN tag termination.";
                  }
    
                  choice flow-type {
                    description
                      "Encapsulation type.";
                    case default {
                      description
                        "Default encapsulation.";
                      container default {
                        presence
                          "flow type is default.";
                        description
                          "Configure default encapsulation.";
                      }  // container default
                    }  // case default
    
                    case untag {
                      description
                        "Untag encapsulation.";
                      container untag {
                        must
                          "not(/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../../ifm:parent-name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/ethernet:vlan-stackings/ethernet:vlan-stacking/ethernet:ce-default)";
                        presence
                          "flow type is untag.";
                        description
                          "Configure untag encapsulation.";
                      }  // container untag
                    }  // case untag
    
                    case dot1q {
                      description
                        "Dot1q encapsulation.";
                      container dot1q {
                        presence
                          "flow type is flowDot1q.";
                        description
                          "Configure dot1q encapsulation list.";
                        choice policy {
                          description
                            "Dot1q encapsulation.";
                          case no-policy {
                            description
                              "Dot1q encapsulation without policy.";
                            container vlans {
                              description
                                "Configure VLAN encapsulation list.";
                              leaf vlan-list {
                                type pub-type:vlan-range;
                                description
                                  "VLAN list.";
                              }
                            }  // container vlans
                          }  // case no-policy
    
                          case policy {
                            description
                              "Dot1q encapsulation with policy.";
                            container policy-vlans {
                              description
                                "List of VLAN policy encapsulation.";
                              list policy-vlan {
                                must
                                  "vlan-id-end>=vlan-id-begin";
                                key "vlan-id-begin vlan-id-end";
                                description
                                  "Apply VLAN encapsulation policy.";
                                leaf vlan-id-begin {
                                  type uint16 {
                                    range
                                      "1..4094";
                                  }
                                  description
                                    "Start VLAN ID in the user packet.";
                                }
    
                                leaf vlan-id-end {
                                  type uint16 {
                                    range
                                      "1..4094";
                                  }
                                  description
                                    "End VLAN ID in the user packet.";
                                }
    
                                leaf dot1q-8021p {
                                  type pub-type:id-range {
                                    length
                                      "1..31";
                                    pattern
                                      '(([0-7])?(-([0-7]))?(,(([0-7])(-([0-7]))?))*)|((([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\)))?(,(([\+|\-]([0-7]))|([\+|\-]\(([0-7])-([0-7])\))))*)';
                                  }
                                  mandatory
                                    true;
                                  description
                                    "User-defined 802.1p priority value.";
                                }
                              }  // list policy-vlan
                            }  // container policy-vlans
                          }  // case policy
                        }  // choice policy
                      }  // container dot1q
                    }  // case dot1q
    
                    case qinq {
                      description
                        "Qinq encapsulation.";
                      container qinqs {
                        presence
                          "flow type is flowQinq.";
                        description
                          "Configure QinQ encapsulation list.";
                        container qinq-vids {
                          description
                            "List of QinQ encapsulation.";
                          list qinq-vid {
                            must
                              "not(../../qinq-vid-ce-default/pe-vlan-list)";
                            key "pe-vlan-id";
                            description
                              "Configure QinQ encapsulation.";
                            leaf pe-vlan-id {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Outer VLAN ID.";
                            }
    
                            leaf ce-vlan-list {
                              type pub-type:vlan-range;
                              mandatory true;
                              description
                                "CE VLAN ID list.";
                            }
                          }  // list qinq-vid
                        }  // container qinq-vids
    
                        container qinq-vid-ce-default {
                          description
                            "Configure QinQ encapsulation. The CE VLAN ID is not specified.";
                          leaf pe-vlan-list {
                            type pub-type:vlan-range;
                            must
                              "not(../../qinq-vids/qinq-vid)";
                            description
                              "PE VLAN ID list.";
                          }
                        }  // container qinq-vid-ce-default
    
                        container qinq-with-pe-segments {
                          description
                            "List of QinQ encapsulation with PE VLAN segment.";
                          list qinq-with-pe-segment {
                            must
                              "((pe-vlan-end>pe-vlan-begin) and (ce-vlan-end>=ce-vlan-begin))";
                            key "pe-vlan-begin pe-vlan-end ce-vlan-begin ce-vlan-end";
                            description
                              "Configure QinQ encapsulation with PE VLAN segment.";
                            leaf pe-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start outer VLAN ID.";
                            }
    
                            leaf pe-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End outer VLAN ID.";
                            }
    
                            leaf ce-vlan-begin {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "Start inner VLAN ID.";
                            }
    
                            leaf ce-vlan-end {
                              type uint16 {
                                range "1..4094";
                              }
                              description
                                "End inner VLAN ID.";
                            }
                          }  // list qinq-with-pe-segment
                        }  // container qinq-with-pe-segments
                      }  // container qinqs
                    }  // case qinq
                  }  // choice flow-type
    
                  container flow-action {
                    presence "flow action";
                    description
                      "Configure packet rewriting information. If the interface is bound to a BD, this node cannot be modified.";
                    leaf action-type {
                      type action-type;
                      must
                        "(../action-type='push1-layer' ) or (../../dot1q and (../action-type='pop-outer' or ../action-type='map-offset-increase' or ../action-type='map-1-to-1' or ../action-type='map-1-to-2' or ../action-type='push2-layer' or ../action-type='map-offset-decrease' or ../action-type='map-single-outbound') ) or (../../qinqs and not(../../qinqs/qinq-vid-ce-default/pe-vlan-list) and ../action-type!='push2-layer') or (../../qinqs/qinq-vid-ce-default/pe-vlan-list and ../action-type!='pop-double' and ../action-type!='map-2-to-1' and ../action-type!='map-2-to-2' and ../action-type!='push2-layer') or (../../untag and (../action-type='push2-layer')) or not(../../default or ../../dot1q or ../../qinqs or ../../untag)";
                      mandatory true;
                      description
                        "Specify a traffic action type.";
                    }
    
                    leaf out-vlan-id {
                      when
                        "../action-type='map-1-to-1' or ../action-type='map-1-to-2' or ../action-type='map-2-to-1' or ../action-type='map-2-to-2' or ../action-type='push1-layer' or ../action-type='push2-layer'";
                      type uint32 {
                        range "1..4094";
                      }
                      mandatory true;
                      description
                        "Modified outer VLAN ID.";
                    }
    
                    leaf inner-vlan-id {
                      when
                        "../action-type='map-1-to-2' or ../action-type='map-2-to-2' or ../action-type='push2-layer'";
                      type uint32 {
                        range "1..4094";
                      }
                      mandatory true;
                      description
                        "Modified inner VLAN ID.";
                    }
    
                    leaf outer-8021p {
                      when
                        "../action-type='map-1-to-1' or ../action-type='map-1-to-2' or ../action-type='map-2-to-1' or ../action-type='map-2-to-2' or ../action-type='push1-layer' or ../action-type='push2-layer'";
                      type uint8 {
                        range "0..7";
                      }
                      description
                        "Modified outer 802.1p.";
                    }
    
                    leaf inner-8021p {
                      when
                        "../action-type='map-1-to-2' or ../action-type='map-2-to-2' or ../action-type='push2-layer'";
                      type uint8 {
                        range "0..7";
                      }
                      description
                        "Modified inner 802.1p.";
                    }
    
                    leaf offset-value {
                      when
                        "../action-type='map-offset-decrease' or ../action-type='map-offset-increase'";
                      type uint16 {
                        range "1..4093";
                      }
                      mandatory true;
                      description
                        "Offset value of the modified VLAN.";
                    }
                  }  // container flow-action
                }  // container l2-sub-interface
              }  // container ethernet
    
              container bfd {
                description "Configure BFD.";
                leaf enable-trunk-crc-bit-error {
                  when
                    "../../ifm:type='Eth-Trunk' or ../../ifm:type='Ip-Trunk'";
                  type empty;
                  description
                    "Enable bit error detection.";
                }
    
                leaf enable-trigger-if-down {
                  type empty;
                  description
                    "Enable BFD trigger interface down.";
                }
              }  // container bfd
    
              container routing {
                description
                  "Configure parameters for the route management module.";
                container static-routing {
                  description
                    "Configure parameters for the static route module.";
                  container ldp-sync {
                    presence
                      "Configure the interval for waiting for the establishment of an LDP session when the static route is inactive.";
                    description
                      "Configure the interval for waiting for the establishment of an LDP session when the static route is inactive.";
                    choice set-timer {
                      mandatory true;
                      description
                        "Set the interval for waiting for the establishment of an LDP session when the static route is inactive.";
                      case hold-down-times {
                        description
                          "Set the interval for waiting for the establishment of an LDP session when the static route is inactive.";
                        leaf hold-down-time {
                          type uint32 {
                            range "0..65535";
                          }
                          units "s";
                          description
                            "Set the interval for waiting for the establishment of an LDP session when the static route is inactive.";
                        }
                      }  // case hold-down-times
    
                      case infinite {
                        description
                          "Enable/disable the function of ensuring that the timer never expires.";
                        leaf infinite-enable {
                          type empty;
                          description
                            "Enable/disable the function of ensuring that the timer never expires. With this function enabled, static routes become active only when an LDP session is established.";
                        }
                      }  // case infinite
                    }  // choice set-timer
                  }  // container ldp-sync
                }  // container static-routing
              }  // container routing
            }  // list interface
          }  // container interfaces
    
          container static-dimension-ranges {
            config false;
            description
              "List of interface dimensionality.";
            list static-dimension-range {
              key "type";
              description
                "Statistics of Interface dimensionality.";
              leaf type {
                type port-type;
                must "../type='Tunnel'";
                description "Interface type.";
              }
    
              leaf chassis-range {
                type string {
                  length "0..63";
                }
                description
                  "The range of chassis.";
              }
    
              leaf slot-range {
                type string {
                  length "0..63";
                }
                description "The range of slot.";
              }
    
              leaf card-range {
                type string {
                  length "0..63";
                }
                description "The range of card.";
              }
    
              leaf port-range {
                type string {
                  length "0..63";
                }
                description "The range of port.";
              }
            }  // list static-dimension-range
          }  // container static-dimension-ranges
    
          container ipv4-interface-count {
            config false;
            description
              "Statistics of interfaces supporting IPv4 address configuration.";
            leaf physical-up-count {
              type uint32;
              description
                "Number of IPv4 interfaces that are in the physical up state.";
            }
    
            leaf physical-down-count {
              type uint32;
              description
                "Number of IPv4 interfaces that are in the physical down state.";
            }
    
            leaf protocol-up-count {
              type uint32;
              description
                "Number of IPv4 interfaces that are in the protocol up state.";
            }
    
            leaf protocol-down-count {
              type uint32;
              description
                "Number of IPv4 interfaces that are in the protocol down state.";
            }
          }  // container ipv4-interface-count
    
          container remote-interfaces {
            config false;
            description
              "List of statistics of remote interfaces.";
            list remote-interface {
              key "name";
              description
                "Statistics of remote interfaces.";
              leaf name {
                type pub-type:if-name;
                description
                  "Name of a remote interface.";
              }
    
              leaf index {
                type uint32;
                description
                  "Index of a remote interface.";
              }
    
              container remote-statistics-state {
                config false;
                description
                  "Statistics of remote interfaces.";
                leaf last-cleared-time {
                  type pub-type:time;
                  description
                    "Last time when statistics about remote interfaces were cleared.";
                }
    
                leaf in-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate at which bits are received.";
                }
    
                leaf in-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate at which packets are received.";
                }
    
                leaf in-peak-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Peak rate at which bits are received.";
                }
    
                leaf in-peak-bit-rate-record-time {
                  type pub-type:time;
                  description
                    "Time when the peak bit receive rate is reached.";
                }
    
                leaf out-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Rate at which bits are sent.";
                }
    
                leaf out-packet-rate {
                  type uint64;
                  units "pps";
                  description
                    "Rate at which packets are sent.";
                }
    
                leaf out-peak-bit-rate {
                  type uint64;
                  units "bit/s";
                  description
                    "Peak rate at which bits are sent.";
                }
    
                leaf out-peak-bit-rate-record-time {
                  type pub-type:time;
                  description
                    "Time when the peak bit send rate is reached.";
                }
    
                leaf in-use-rate {
                  type string {
                    length "1..50";
                  }
                  description
                    "Received bandwidth usage.";
                }
    
                leaf out-use-rate {
                  type string {
                    length "1..50";
                  }
                  description
                    "Sent bandwidth usage.";
                }
              }  // container remote-statistics-state
            }  // list remote-interface
          }  // container remote-interfaces
        }  // container ifm
    
        rpc reset-if-counters-by-name {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:common-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Clear statistics based on the interface name. For example, Ethernet0/1/0.";
            }
          }
        }  // rpc reset-if-counters-by-name
    
        rpc reset-if-counters-by-type {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:common-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf if-type {
              type port-type;
              mandatory true;
              description
                "To clear the statistics by the type of interface.";
            }
          }
        }  // rpc reset-if-counters-by-type
    
        rpc reset-if-counters-all {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:common-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf all-if {
              type boolean;
              mandatory true;
              description
                "Enable/disable the function of clearing interfaces' statistics.";
            }
          }
        }  // rpc reset-if-counters-all
    
        rpc reset-if-mib-counters-by-name {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:mib-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Clear statistics based on the interface name. For example, Ethernet0/1/0.";
            }
          }
        }  // rpc reset-if-mib-counters-by-name
    
        rpc reset-if-mib-counters-by-type {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:mib-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf if-type {
              type port-type;
              mandatory true;
              description
                "To clear the statistics by the type of interface.";
            }
          }
        }  // rpc reset-if-mib-counters-by-type
    
        rpc reset-if-mib-counters-all {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:mib-statistics";
          description
            "Clear statistics of interfaces.";
          input {
            leaf all-if {
              type boolean;
              mandatory true;
              description
                "Enable/disable the function of clearing interfaces' statistics.";
            }
          }
        }  // rpc reset-if-mib-counters-all
    
        rpc reset-if-control-flap-penalty {
          description
            "Clear the penalty value of an interface and remove the suppression on the interface.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Name of the interface. For example, Ethernet0/1/0.";
            }
          }
        }  // rpc reset-if-control-flap-penalty
    
        rpc reset-if-control-flap-counts {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:control-flap/ifm:control-flap-count";
          description
            "Clear the number of flapping control times.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Name of the interface. For example, Ethernet0/1/0.";
            }
          }
        }  // rpc reset-if-control-flap-counts
    
        rpc reset-remote-if-counters {
          ext:node-ref "/ifm:ifm/ifm:remote-interfaces/ifm:remote-interface/ifm:remote-statistics-state";
          description
            "Clear remote interface statistics.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Interface name of clear remote interface statistics.";
            }
          }
        }  // rpc reset-remote-if-counters
    
        rpc restart-if {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:admin-status";
          description "Restart interface.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description
                "Interface name of the restart interface.";
            }
          }
        }  // rpc restart-if
      }  // module huawei-ifm
    

© 2023 YumaWorks, Inc. All rights reserved.