huawei-mstp

Multiple spanning tree protocol.

  • Version: 2019-04-23

    huawei-mstp@2019-04-23


    
      module huawei-mstp {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-mstp";
    
        prefix mstp;
    
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-vlan {
          prefix vlan;
        }
        import huawei-ethernet {
          prefix ethernet;
        }
        import huawei-l2vpn {
          prefix l2vpn;
        }
        import huawei-pub-type {
          prefix pub-type;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import huawei-extension {
          prefix ext;
        }
    
        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
          "Multiple spanning tree protocol.";
    
        revision "2019-04-23" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "mstp";
    
        typedef bpdu-filter-type {
          type enumeration {
            enum "disable" {
              value 1;
              description
                "Disable the BPDU filter function.";
            }
            enum "enable" {
              value 2;
              description
                "Enable the BPDU filter function.";
            }
            enum "default" {
              value 3;
              description
                "The default BPDU filter function.";
            }
          }
          description "BPDU filter type.";
        }
    
        typedef compliance-type {
          type enumeration {
            enum "auto" {
              value 1;
              description
                "Indicates that the MST BPDU format is self-adaptive.";
            }
            enum "dot1s" {
              value 2;
              description
                "Indicates that the MST BPDU format is standard IEEE 802.1s.";
            }
            enum "legacy" {
              value 3;
              description
                "Indicates that the MST BPDU format is proprietary.";
            }
          }
          description "MSTP BPDU format type.";
        }
    
        typedef edge-port-type {
          type enumeration {
            enum "disable" {
              value 1;
              description
                "Set a port as a non-edge port.";
            }
            enum "enable" {
              value 2;
              description
                "Set a port as an edge port.";
            }
            enum "default" {
              value 3;
              description "Default port.";
            }
          }
          description "Edge port type.";
        }
    
        typedef stp-mode {
          type enumeration {
            enum "stp" {
              value 0;
              description
                "Spanning tree protocol mode.";
            }
            enum "rstp" {
              value 2;
              description
                "Rapid spanning tree protocol mode.";
            }
            enum "mstp" {
              value 3;
              description
                "Multiple ppanning tree protocol mode.";
            }
            enum "vbst" {
              value 4;
              description
                "VLAN-Based spanning tree protocol mode.";
            }
          }
          description "STP mode.";
        }
    
        typedef path-cost-standard-type {
          type enumeration {
            enum "dot1d-1998" {
              value 1;
              description
                "IEEE 802.1D standard used to calculate the path cost.";
            }
            enum "dot1t" {
              value 2;
              description
                "IEEE 802.1T standard used to calculate the path cost.";
            }
            enum "legacy" {
              value 3;
              description
                "Huawei legacy standard used to calculate the path cost.";
            }
          }
          description "Path Cost Standard.";
        }
    
        typedef point-to-point-type {
          type enumeration {
            enum "force-true" {
              value 1;
              description
                "The link type is a point to point link.";
            }
            enum "force-false" {
              value 2;
              description
                "The link type is not a point to point link.";
            }
            enum "auto" {
              value 3;
              description
                "The spanning tree protocol detects automatically whether the port is connected to a point to point link.";
            }
          }
          description "The link type of a port.";
        }
    
        typedef port-state-type {
          type enumeration {
            enum "down" {
              value 1;
              description "Down status.";
            }
            enum "disabled" {
              value 2;
              description "Disabled status.";
            }
            enum "forwarding" {
              value 3;
              description "Forwarding status.";
            }
            enum "learning" {
              value 4;
              description "Learning status.";
            }
            enum "discarding" {
              value 5;
              description "Discarding status.";
            }
            enum "inactive" {
              value 6;
              description "Inactive status.";
            }
          }
          description
            "The type of STP port state.";
        }
    
        typedef protection-type {
          type enumeration {
            enum "none" {
              value 1;
              description "No protection.";
            }
            enum "loopback" {
              value 2;
              description "Loopback detection.";
            }
            enum "bpdu-root" {
              value 3;
              description
                "BPDU and root protection.";
            }
            enum "root" {
              value 4;
              description "Root protection.";
            }
            enum "bpdu" {
              value 5;
              description "BPDU protection.";
            }
            enum "loop" {
              value 6;
              description "Loop protection.";
            }
          }
          description "STP protection type.";
        }
    
        typedef port-role-type {
          type enumeration {
            enum "disabled" {
              value 1;
              description "Inactive port.";
            }
            enum "alternate" {
              value 2;
              description "Alternate port.";
            }
            enum "backup" {
              value 3;
              description "Backup port.";
            }
            enum "root" {
              value 4;
              description "Root port.";
            }
            enum "designated" {
              value 5;
              description "Designated port.";
            }
            enum "master" {
              value 6;
              description "Master Port.";
            }
          }
          description "STP port role.";
        }
    
        typedef root-type {
          type enumeration {
            enum "normal" {
              value 1;
              description
                "Configure a device as a normal root bridge of a spanning tree.";
            }
            enum "primary" {
              value 2;
              description
                "Configure a device as a primary root bridge of a spanning tree.";
            }
            enum "secondary" {
              value 3;
              description
                "Configure a device as a secondary root bridge of a spanning tree.";
            }
          }
          description "STP root type.";
        }
    
        typedef converge-mode {
          type enumeration {
            enum "fast" {
              value 1;
              description
                "Set MSTP aging mode to fast.";
            }
            enum "normal" {
              value 2;
              description
                "Set MSTP aging mode to normal.";
            }
          }
          description "MSTP converge mode.";
        }
    
        container mstp {
          description
            "Multiple spanning tree protocol.";
          container global {
            description
              "Configure MSTP global attributes.";
            leaf bpdu-filter {
              type boolean;
              default "false";
              description
                "Enable/disable to default configuration of the BPDU filter function.";
            }
    
            leaf edge-port {
              type boolean;
              default "false";
              description
                "Enable/disable default configuration of global edge port function.";
            }
    
            leaf bridge-address {
              type pub-type:mac-address {
                pattern
                  '[0-9a-f][02468ace][0-9a-f]{2}(-[0-9a-f]{4}){2}';
              }
              description "Bridge MAC address.";
            }
    
            leaf transmit-limit {
              type uint16 {
                range "1..255";
              }
              default "6";
              description
                "Maximum number of BPDUs allowed to be sent globally within a hello interval.";
            }
    
            leaf vstp-enable {
              type boolean;
              default "false";
              description
                "Enable/disable V-STP function.";
            }
          }  // container global
    
          container default-process {
            description
              "Configure default MSTP process.";
            leaf enable {
              type boolean;
              default "false";
              description
                "Enable/disable STP/RSTP/MSTP on a device.";
            }
    
            leaf bpdu-protection {
              type boolean;
              default "false";
              description
                "Enable/disable to configure BPDU protection on an edge port. This function prevents network flapping caused by attack packets.";
            }
    
            leaf flush-capability {
              type boolean;
              default "true";
              description
                "Enable/disable to flush capability on a switch.";
            }
    
            leaf max-hops {
              type uint16 {
                range "1..40";
              }
              default "20";
              description
                "Set the maximum hops of a spanning tree in an MST region.";
            }
    
            leaf mode {
              type stp-mode;
              default "mstp";
              description
                "Set an operation mode for the current MSTP process.";
            }
    
            leaf path-cost-standard {
              type path-cost-standard-type;
              default "dot1t";
              description
                "Set a standard for calculating the path cost.";
            }
    
            leaf tc-protection {
              type boolean;
              default "false";
              description
                "Enable/disable to configure the TC BPDU protection function for an MSTP process.";
            }
    
            leaf tc-protection-threshold {
              type uint32 {
                range "1..255";
              }
              default "1";
              description
                "Set the maximum number of TC BPDUs that the MSTP can handle.";
            }
    
            leaf tc-protection-interval {
              type uint16 {
                range "1..600";
              }
              units "s";
              description
                "Set the time the MSTP device takes to handle the maximum number of TC BPDUs and immediately refresh forwarding entries.";
            }
    
            leaf timer-factor {
              type uint8 {
                range "1..10";
              }
              default "3";
              description
                "Set a multiplier for the Hello timer. If a device does not receive BPDUs from an upstream device within the timeout period (timeout period = hello time x 3 x timer factor), the spanning tree is calculated again.";
            }
    
            leaf region-name {
              ext:dynamic-default;
              type string {
                length "1..32";
              }
              description
                "Configure an MST region name for a device.";
            }
    
            leaf revision-level {
              type uint16 {
                range "0..65535";
              }
              default "0";
              description
                "Configure a revision level for an MST region.";
            }
    
            leaf forward-delay {
              type uint16 {
                range "400..3000";
              }
              units "10 ms";
              must
                "(../forward-delay) mod 100 = 0";
              default "1500";
              description
                "Set the value of the forward delay. The step is 1000ms.";
            }
    
            leaf hello-time {
              type uint16 {
                range "100..1000";
              }
              units "10 ms";
              must "(../hello-time) mod 100 = 0";
              default "200";
              description
                "Set the interval at which BPDUs are sent. The step is 1000ms.";
            }
    
            leaf max-age {
              type uint16 {
                range "600..4000";
              }
              units "10 ms";
              must "(../max-age) mod 100 = 0";
              default "2000";
              description
                "Set the BPDU aging time on a port of a device. The step is 1000ms.";
            }
    
            leaf converge-mode {
              type converge-mode;
              default "normal";
              description
                "MSTP convergence mode.";
            }
    
            container default-instance {
              description "Configure instance.";
              leaf priority {
                when "../root-type='normal'";
                type uint32 {
                  range "0..61440";
                }
                must
                  "(../priority) mod 4096 = 0";
                default "32768";
                description
                  "Set the priority of a device in a spanning tree instance. The default step is 4096, that is, the device can have 16 priorities configured, such as 0, 4096, and 8192. A smaller value indicates a higher priority.";
              }
    
              leaf root-type {
                type root-type;
                default "normal";
                description
                  "Configure the current device as the root bridge of a spanning tree instance.";
              }
    
              leaf vlan-mapping {
                type pub-type:vlan-range;
                config false;
                description
                  "VLAN mappings in instance 0.";
              }
            }  // container default-instance
    
            container instances {
              description
                "List of configurations of process instance.";
              list instance {
                must
                  "(priority and priority!=32768) or (root-type and root-type!='normal') or vlan-mapping";
                key "id";
                description
                  "Configure process instance.";
                leaf id {
                  type uint32 {
                    range "1..4094";
                  }
                  description "Instance ID.";
                }
    
                leaf priority {
                  when "../root-type='normal'";
                  type uint32 {
                    range "0..61440";
                  }
                  must
                    "(../priority) mod 4096 = 0";
                  default "32768";
                  description
                    "Set the priority of a device in a spanning tree instance. The default step is 4096, that is, the device can have 16 priorities configured, such as 0, 4096, and 8192. A smaller value indicates a higher priority.";
                }
    
                leaf root-type {
                  type root-type;
                  default "normal";
                  description
                    "Configure the current device as the root bridge of a spanning tree instance.";
                }
    
                leaf vlan-mapping {
                  type pub-type:vlan-range;
                  must
                    "not(/vlan:vlan/vlan:instances/vlan:instance)";
                  description
                    "VLAN mappings in instance.";
                }
              }  // list instance
            }  // container instances
    
            container cist-info {
              config false;
              description "Statistics of stp.";
              leaf bridge-id {
                type string {
                  length "1..64";
                }
                description
                  "Common and internal spanning tree (CIST) bridge ID.";
              }
    
              leaf root-id {
                type string {
                  length "1..64";
                }
                description
                  "CIST root bridge ID.";
              }
    
              leaf erpc-cost {
                type uint32;
                description
                  "Cost of the external path from the switch to the CIST root bridge.";
              }
    
              leaf regroot-id {
                type string {
                  length "1..64";
                }
                description
                  "ID of the CIST region root bridge.";
              }
    
              leaf irpc-cost {
                type uint32;
                description
                  "Cost of the internal path from the switch to the CIST region root bridge.";
              }
    
              leaf active-hello-time {
                type uint16 {
                  range "1..10";
                }
                units "s";
                description
                  "BPDUs parameters hello-time is being used.";
              }
    
              leaf active-max-age {
                type uint16 {
                  range "6..40";
                }
                units "s";
                description
                  "BPDUs parameters max-age is being used.";
              }
    
              leaf active-forward-delay {
                type uint16 {
                  range "4..30";
                }
                units "s";
                description
                  "BPDUs parameters forward-delay is being used.";
              }
    
              leaf active-max-hops {
                type uint16 {
                  range "1..40";
                }
                description
                  "BPDUs parameters max-hops is being used.";
              }
    
              leaf root-port-id {
                type string {
                  length "1..32";
                }
                description
                  "ID of the CIST root port.";
              }
    
              leaf tc-tcn-receive-num {
                type uint32;
                description
                  "Number of received TC or TCN BPDUs.";
              }
    
              leaf tc-count-pre-hello {
                type uint32;
                description
                  "Number of TC BPDUs received each Hello time.";
              }
    
              leaf last-change-interval {
                type string {
                  length "1..128";
                }
                description
                  "Time past since the last topology changed.";
              }
    
              leaf tc-number {
                type uint32;
                description
                  "Number of topology changes.";
              }
    
              leaf is-topo-changed {
                type boolean;
                description
                  "Whether the topology is changed.";
              }
            }  // container cist-info
    
            container msti-infos {
              config false;
              description
                "List of STP msti-info.";
              list msti-info {
                key "instance-id";
                description
                  "Statistics of msti-info.";
                leaf instance-id {
                  type uint32 {
                    range "1..4094";
                  }
                  description "Instance ID.";
                }
    
                leaf bridge-id {
                  type string {
                    length "1..64";
                  }
                  description
                    "Common and internal spanning tree (CIST) bridge ID.";
                }
    
                leaf reg-root-id {
                  type string {
                    length "1..32";
                  }
                  description
                    "Region root bridge ID.";
                }
    
                leaf root-port-id {
                  type string {
                    length "1..32";
                  }
                  description
                    "ID of the CIST root port.";
                }
    
                leaf master-bridge {
                  type string {
                    length "1..64";
                  }
                  description
                    "ID of the bridge where the master interface resides.";
                }
    
                leaf irpc-cost {
                  type uint32;
                  description
                    "Cost of the internal path from the switch to the CIST region root bridge.";
                }
    
                leaf cost-to-master {
                  type uint32;
                  description
                    "Cost of the path from the switch to the bridge where the master interface resides.";
                }
    
                leaf tc-receive-num {
                  type uint32;
                  description
                    "Number of received TC BPDUs.";
                }
    
                leaf tc-count-pre-hello {
                  type uint32;
                  description
                    "Number of TC BPDUs received each Hello time.";
                }
    
                leaf last-change-interval {
                  type string {
                    length "1..128";
                  }
                  description
                    "Time past since the last topology changed.";
                }
    
                leaf last-change-occurred {
                  type string {
                    length "1..128";
                  }
                  description
                    "Last TC occurred.";
                }
    
                leaf tc-number {
                  type uint32;
                  description
                    "Number of topology changes.";
                }
    
                leaf is-topo-changed {
                  type boolean;
                  description
                    "Whether the topology is changed.";
                }
              }  // list msti-info
            }  // container msti-infos
    
            container interface-bpdu-statistics {
              config false;
              description
                "List of statistics about sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
              list interface-bpdu-statistic {
                key "instance-id port-name";
                description
                  "Statistics of sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                leaf instance-id {
                  type uint32 {
                    range "0..4094";
                  }
                  description "STP instance id.";
                }
    
                leaf port-name {
                  type leafref {
                    path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                  }
                  description "Port name.";
                }
    
                leaf tc-send {
                  type uint32;
                  description
                    "Statistics about sent TC BPDUs.";
                }
    
                leaf tc-receive {
                  type uint32;
                  description
                    "Statistics about receive TC BPDUs.";
                }
    
                leaf tc-discard {
                  type uint32;
                  description
                    "Statistics about discard TC BPDUs.";
                }
    
                leaf tcn-send {
                  type uint32;
                  description
                    "Statistics about sent TCN BPDUs.";
                }
    
                leaf tcn-receive {
                  type uint32;
                  description
                    "Statistics about receive TCN BPDUs.";
                }
    
                leaf tcn-discard {
                  type uint32;
                  description
                    "Statistics about discard TCN BPDUs.";
                }
              }  // list interface-bpdu-statistic
            }  // container interface-bpdu-statistics
    
            container pw-bpdu-statistics {
              config false;
              description
                "List of statistics about sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
              list pw-bpdu-statistic {
                key "instance-id pw-name vsi-name";
                description
                  "Statistics of sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                leaf instance-id {
                  type uint32 {
                    range "0..4094";
                  }
                  description "STP instance id.";
                }
    
                leaf pw-name {
                  type string {
                    length "1..63";
                  }
                  description "PW name.";
                }
    
                leaf vsi-name {
                  type string {
                    length "1..63";
                  }
                  description "VSI name.";
                }
    
                leaf tc-send {
                  type uint32;
                  description
                    "Statistics about sent TC BPDUs.";
                }
    
                leaf tc-receive {
                  type uint32;
                  description
                    "Statistics about receive TC BPDUs.";
                }
    
                leaf tc-discard {
                  type uint32;
                  description
                    "Statistics about discard TC BPDUs.";
                }
    
                leaf tcn-send {
                  type uint32;
                  description
                    "Statistics about sent TCN BPDUs.";
                }
    
                leaf tcn-receive {
                  type uint32;
                  description
                    "Statistics about receive TCN BPDUs.";
                }
    
                leaf tcn-discard {
                  type uint32;
                  description
                    "Statistics about discard TCN BPDUs.";
                }
              }  // list pw-bpdu-statistic
            }  // container pw-bpdu-statistics
          }  // container default-process
    
          container processs {
            description
              "List of MSTP processes.";
            list process {
              key "id";
              description
                "Configure MSTP process.";
              leaf id {
                type uint32 {
                  range "1..256";
                }
                description "MSTP process ID.";
              }
    
              leaf enable {
                type boolean;
                default "false";
                description
                  "Enable/disable STP/RSTP/MSTP on a device.";
              }
    
              leaf bpdu-protection {
                type boolean;
                default "false";
                description
                  "Enable/disable to configure BPDU protection on an edge port. This function prevents network flapping caused by attack packets.";
              }
    
              leaf flush-capability {
                type boolean;
                default "true";
                description
                  "Enable/disable to flush capability on a switch.";
              }
    
              leaf max-hops {
                type uint16 {
                  range "1..40";
                }
                default "20";
                description
                  "Set the maximum hops of a spanning tree in an MST region.";
              }
    
              leaf mode {
                type stp-mode;
                default "mstp";
                description
                  "Set an operation mode for the current MSTP process.";
              }
    
              leaf path-cost-standard {
                type path-cost-standard-type;
                default "dot1t";
                description
                  "Set a standard for calculating the path cost.";
              }
    
              leaf tc-protection {
                type boolean;
                default "false";
                description
                  "Enable/disable to configure the TC BPDU protection function for an MSTP process.";
              }
    
              leaf tc-protection-threshold {
                type uint32 {
                  range "1..255";
                }
                default "1";
                description
                  "Set the maximum number of TC BPDUs that the MSTP can handle.";
              }
    
              leaf tc-protection-interval {
                type uint16 {
                  range "1..600";
                }
                units "s";
                description
                  "Set the time the MSTP device takes to handle the maximum number of TC BPDUs and immediately refresh forwarding entries.";
              }
    
              leaf timer-factor {
                type uint8 {
                  range "1..10";
                }
                default "3";
                description
                  "Set a multiplier for the Hello timer. If a device does not receive BPDUs from an upstream device within the timeout period (timeout period = hello time x 3 x timer factor), the spanning tree is calculated again.";
              }
    
              leaf region-name {
                ext:dynamic-default;
                type string {
                  length "1..32";
                }
                description
                  "Configure an MST region name for a device.";
              }
    
              leaf revision-level {
                type uint16 {
                  range "0..65535";
                }
                default "0";
                description
                  "Configure a revision level for an MST region.";
              }
    
              leaf forward-delay {
                type uint16 {
                  range "400..3000";
                }
                units "10 ms";
                must
                  "(../forward-delay) mod 100 = 0";
                default "1500";
                description
                  "Set the value of the forward delay. The step is 1000ms.";
              }
    
              leaf hello-time {
                type uint16 {
                  range "100..1000";
                }
                units "10 ms";
                must
                  "(../hello-time) mod 100 = 0";
                default "200";
                description
                  "Set the interval at which BPDUs are sent. The step is 1000ms.";
              }
    
              leaf max-age {
                type uint16 {
                  range "600..4000";
                }
                units "10 ms";
                must "(../max-age) mod 100 = 0";
                default "2000";
                description
                  "Set the BPDU aging time on a port of a device. The step is 1000ms.";
              }
    
              leaf tc-notify {
                type boolean;
                default "false";
                description
                  "Enable/disable the TC notification function on the current MSTP process.";
              }
    
              leaf link-share-protect {
                type boolean;
                default "false";
                description
                  "Enable/disable to configure shared-link protection for an MSTP process.";
              }
    
              container default-instance {
                description
                  "Configure instance.";
                leaf priority {
                  when "../root-type='normal'";
                  type uint32 {
                    range "0..61440";
                  }
                  must
                    "(../priority) mod 4096 = 0";
                  default "32768";
                  description
                    "Set the priority of a device in a spanning tree instance. The default step is 4096, that is, the device can have 16 priorities configured, such as 0, 4096, and 8192. A smaller value indicates a higher priority.";
                }
    
                leaf root-type {
                  type root-type;
                  default "normal";
                  description
                    "Configure the current device as the root bridge of a spanning tree instance.";
                }
    
                leaf vlan-mapping {
                  type pub-type:vlan-range;
                  config false;
                  description
                    "VLAN mappings in instance 0.";
                }
              }  // container default-instance
    
              container instances {
                description
                  "List of configurations of process instance.";
                list instance {
                  must
                    "(priority and priority!=32768) or (root-type and root-type!='normal') or vlan-mapping";
                  key "id";
                  description
                    "Configure process instance.";
                  leaf id {
                    type uint32 {
                      range "1..4094";
                    }
                    description "Instance ID.";
                  }
    
                  leaf priority {
                    when "../root-type='normal'";
                    type uint32 {
                      range "0..61440";
                    }
                    must
                      "(../priority) mod 4096 = 0";
                    default "32768";
                    description
                      "Set the priority of a device in a spanning tree instance. The default step is 4096, that is, the device can have 16 priorities configured, such as 0, 4096, and 8192. A smaller value indicates a higher priority.";
                  }
    
                  leaf root-type {
                    type root-type;
                    default "normal";
                    description
                      "Configure the current device as the root bridge of a spanning tree instance.";
                  }
    
                  leaf vlan-mapping {
                    type pub-type:vlan-range;
                    must
                      "not(/vlan:vlan/vlan:instances/vlan:instance)";
                    description
                      "VLAN mappings in instance.";
                  }
                }  // list instance
              }  // container instances
    
              container cist-info {
                config false;
                description "Statistics of stp.";
                leaf bridge-id {
                  type string {
                    length "1..64";
                  }
                  description
                    "Common and internal spanning tree (CIST) bridge ID.";
                }
    
                leaf root-id {
                  type string {
                    length "1..64";
                  }
                  description
                    "CIST root bridge ID.";
                }
    
                leaf erpc-cost {
                  type uint32;
                  description
                    "Cost of the external path from the switch to the CIST root bridge.";
                }
    
                leaf regroot-id {
                  type string {
                    length "1..64";
                  }
                  description
                    "ID of the CIST region root bridge.";
                }
    
                leaf irpc-cost {
                  type uint32;
                  description
                    "Cost of the internal path from the switch to the CIST region root bridge.";
                }
    
                leaf active-hello-time {
                  type uint16 {
                    range "1..10";
                  }
                  units "s";
                  description
                    "BPDUs parameters hello-time is being used.";
                }
    
                leaf active-max-age {
                  type uint16 {
                    range "6..40";
                  }
                  units "s";
                  description
                    "BPDUs parameters max-age is being used.";
                }
    
                leaf active-forward-delay {
                  type uint16 {
                    range "4..30";
                  }
                  units "s";
                  description
                    "BPDUs parameters forward-delay is being used.";
                }
    
                leaf active-max-hops {
                  type uint16 {
                    range "1..40";
                  }
                  description
                    "BPDUs parameters max-hops is being used.";
                }
    
                leaf root-port-id {
                  type string {
                    length "1..32";
                  }
                  description
                    "ID of the CIST root port.";
                }
    
                leaf tc-tcn-receive-num {
                  type uint32;
                  description
                    "Number of received TC or TCN BPDUs.";
                }
    
                leaf tc-count-pre-hello {
                  type uint32;
                  description
                    "Number of TC BPDUs received each Hello time.";
                }
    
                leaf last-change-interval {
                  type string {
                    length "1..128";
                  }
                  description
                    "Time past since the last topology changed.";
                }
    
                leaf tc-number {
                  type uint32;
                  description
                    "Number of topology changes.";
                }
    
                leaf is-topo-changed {
                  type boolean;
                  description
                    "Whether the topology is changed.";
                }
              }  // container cist-info
    
              container msti-infos {
                config false;
                description
                  "List of STP msti-info.";
                list msti-info {
                  key "instance-id";
                  description
                    "Statistics of msti-info.";
                  leaf instance-id {
                    type uint32 {
                      range "1..4094";
                    }
                    description "Instance ID.";
                  }
    
                  leaf bridge-id {
                    type string {
                      length "1..64";
                    }
                    description
                      "Common and internal spanning tree (CIST) bridge ID.";
                  }
    
                  leaf reg-root-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "Region root bridge ID.";
                  }
    
                  leaf root-port-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "ID of the CIST root port.";
                  }
    
                  leaf master-bridge {
                    type string {
                      length "1..64";
                    }
                    description
                      "ID of the bridge where the master interface resides.";
                  }
    
                  leaf irpc-cost {
                    type uint32;
                    description
                      "Cost of the internal path from the switch to the CIST region root bridge.";
                  }
    
                  leaf cost-to-master {
                    type uint32;
                    description
                      "Cost of the path from the switch to the bridge where the master interface resides.";
                  }
    
                  leaf tc-receive-num {
                    type uint32;
                    description
                      "Number of received TC BPDUs.";
                  }
    
                  leaf tc-count-pre-hello {
                    type uint32;
                    description
                      "Number of TC BPDUs received each Hello time.";
                  }
    
                  leaf last-change-interval {
                    type string {
                      length "1..128";
                    }
                    description
                      "Time past since the last topology changed.";
                  }
    
                  leaf last-change-occurred {
                    type string {
                      length "1..128";
                    }
                    description
                      "Last TC occurred.";
                  }
    
                  leaf tc-number {
                    type uint32;
                    description
                      "Number of topology changes.";
                  }
    
                  leaf is-topo-changed {
                    type boolean;
                    description
                      "Whether the topology is changed.";
                  }
                }  // list msti-info
              }  // container msti-infos
    
              container interface-bpdu-statistics {
                config false;
                description
                  "List of statistics about sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                list interface-bpdu-statistic {
                  key "instance-id port-name";
                  description
                    "Statistics of sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                  leaf instance-id {
                    type uint32 {
                      range "0..4094";
                    }
                    description
                      "STP instance id.";
                  }
    
                  leaf port-name {
                    type leafref {
                      path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
                    }
                    description "Port name.";
                  }
    
                  leaf tc-send {
                    type uint32;
                    description
                      "Statistics about sent TC BPDUs.";
                  }
    
                  leaf tc-receive {
                    type uint32;
                    description
                      "Statistics about receive TC BPDUs.";
                  }
    
                  leaf tc-discard {
                    type uint32;
                    description
                      "Statistics about discard TC BPDUs.";
                  }
    
                  leaf tcn-send {
                    type uint32;
                    description
                      "Statistics about sent TCN BPDUs.";
                  }
    
                  leaf tcn-receive {
                    type uint32;
                    description
                      "Statistics about receive TCN BPDUs.";
                  }
    
                  leaf tcn-discard {
                    type uint32;
                    description
                      "Statistics about discard TCN BPDUs.";
                  }
                }  // list interface-bpdu-statistic
              }  // container interface-bpdu-statistics
    
              container pw-bpdu-statistics {
                config false;
                description
                  "List of statistics about sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                list pw-bpdu-statistic {
                  key "instance-id pw-name vsi-name";
                  description
                    "Statistics of sent and received topology change (TC) and topology change notification (TCN) BPDUs on interfaces.";
                  leaf instance-id {
                    type uint32 {
                      range "0..4094";
                    }
                    description
                      "STP instance id.";
                  }
    
                  leaf pw-name {
                    type string {
                      length "1..63";
                    }
                    description "PW name.";
                  }
    
                  leaf vsi-name {
                    type string {
                      length "1..63";
                    }
                    description "VSI name.";
                  }
    
                  leaf tc-send {
                    type uint32;
                    description
                      "Statistics about sent TC BPDUs.";
                  }
    
                  leaf tc-receive {
                    type uint32;
                    description
                      "Statistics about receive TC BPDUs.";
                  }
    
                  leaf tc-discard {
                    type uint32;
                    description
                      "Statistics about discard TC BPDUs.";
                  }
    
                  leaf tcn-send {
                    type uint32;
                    description
                      "Statistics about sent TCN BPDUs.";
                  }
    
                  leaf tcn-receive {
                    type uint32;
                    description
                      "Statistics about receive TCN BPDUs.";
                  }
    
                  leaf tcn-discard {
                    type uint32;
                    description
                      "Statistics about discard TCN BPDUs.";
                  }
                }  // list pw-bpdu-statistic
              }  // container pw-bpdu-statistics
            }  // list process
          }  // container processs
    
          container error-packet-statistic {
            config false;
            description
              "Operational state of displaying error packet information, including error packet statistics, packet contents and receiving time.";
            leaf time {
              type yang:date-and-time;
              description
                "Display the last time when error packets were received.";
            }
    
            leaf count {
              type uint32;
              description
                "Display the statistics about error packets received by MSTP.";
            }
    
            leaf content {
              type string {
                length "0..4500";
              }
              description
                "Display the contents of received error packets.";
            }
          }  // container error-packet-statistic
        }  // container mstp
    
        rpc defalut-process-mcheck {
          ext:node-ref "/mstp:mstp/mstp:default-process";
          description
            "Configure all ports bound to the default MSTP process to automatically switch back to the RSTP/MSTP mode.";
        }  // rpc defalut-process-mcheck
    
        rpc process-mcheck {
          ext:node-ref "/mstp:mstp/mstp:processs/mstp:process";
          description
            "Configure all ports bound to the current MSTP process to automatically switch back to the RSTP/MSTP mode.";
          input {
            leaf process-id {
              type leafref {
                path "/mstp:mstp/mstp:processs/mstp:process/mstp:id";
              }
              mandatory true;
              description "MSTP process ID.";
            }
          }
        }  // rpc process-mcheck
    
        rpc port-mcheck {
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute/mstp:mstp-attribute";
          ext:node-ref "/ifm:ifm/ifm:interfaces/ifm:interface/ethernet:ethernet/ethernet:main-interface/mstp:mstp-attribute";
          description
            "Configure the current port to automatically switch back to the RSTP/MSTP mode.";
          input {
            leaf if-name {
              type leafref {
                path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name";
              }
              mandatory true;
              description "Interface name.";
            }
          }
        }  // rpc port-mcheck
    
        rpc pw-mcheck {
          ext:node-ref "/l2vpn:l2vpn/l2vpn:instances/l2vpn:instance/l2vpn:vpls/l2vpn:ldp-signaling/l2vpn:pws/l2vpn:pw/mstp:mstp-attribute";
          description
            "Configure the current PW to automatically switch back to the RSTP/MSTP mode.";
          input {
            leaf vsi-name {
              type leafref {
                path "/l2vpn:l2vpn/l2vpn:instances/l2vpn:instance/l2vpn:name";
              }
              mandatory true;
              description "VSI name.";
            }
    
            leaf pw-name {
              type leafref {
                path "/l2vpn:l2vpn/l2vpn:instances/l2vpn:instance/l2vpn:vpls/l2vpn:ldp-signaling/l2vpn:pws/l2vpn:pw/l2vpn:name";
              }
              mandatory true;
              description "PW name.";
            }
          }
        }  // rpc pw-mcheck
    
        rpc set-default-process-bridge-diameter {
          ext:node-ref "/mstp:mstp/mstp:default-process";
          description
            "The device will automatically set proper values for hello time, forward delay, and max age based on the configured network diameter.";
          input {
            leaf bridge-diameter {
              type uint8 {
                range "2..7";
              }
              description "Bridge diameter.";
            }
          }
        }  // rpc set-default-process-bridge-diameter
    
        rpc unset-default-process-bridge-diameter {
          ext:node-ref "/mstp:mstp/mstp:default-process";
          description
            "The device will not automatically set proper values for hello time, forward delay, and max age based on the configured network diameter.";
        }  // rpc unset-default-process-bridge-diameter
    
        rpc set-process-bridge-diameter {
          ext:node-ref "/mstp:mstp/mstp:processs/mstp:process";
          description
            "The device will automatically set proper values for hello time, forward delay, and max age based on the configured network diameter.";
          input {
            leaf process-id {
              type leafref {
                path "/mstp:mstp/mstp:processs/mstp:process/mstp:id";
              }
              mandatory true;
              description "MSTP process ID.";
            }
    
            leaf bridge-diameter {
              type uint8 {
                range "2..7";
              }
              mandatory true;
              description "Bridge diameter.";
            }
          }
        }  // rpc set-process-bridge-diameter
    
        rpc unset-process-bridge-diameter {
          ext:node-ref "/mstp:mstp/mstp:processs/mstp:process";
          description
            "The device will not automatically set proper values for hello time, forward delay, and max age based on the configured network diameter.";
          input {
            leaf process-id {
              type leafref {
                path "/mstp:mstp/mstp:processs/mstp:process/mstp:id";
              }
              mandatory true;
              description "MSTP process ID.";
            }
          }
        }  // rpc unset-process-bridge-diameter
      }  // module huawei-mstp
    

© 2023 YumaWorks, Inc. All rights reserved.