Link-heartbeat is the way of detecting the link quality by sending heart packets between two devices.
Version: 2020-04-22
module huawei-link-heartbeat { yang-version 1; namespace "urn:huawei:yang:huawei-link-heartbeat"; prefix link-heartbeat; import huawei-ifm { prefix ifm; } 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 "Link-heartbeat is the way of detecting the link quality by sending heart packets between two devices."; revision "2020-04-22" { description "Initial revision."; reference "Huawei private."; } ext:task-name "forwarding"; typedef state { type enumeration { enum "init" { value 0; description "Indicates that link-heartbeat status is initial."; } enum "normal" { value 1; description "Indicates that link-heartbeat status is normal."; } enum "approach" { value 2; description "Indicates that link-heartbeat status is approach."; } enum "diagnose" { value 3; description "Indicates that link-heartbeat status is diagnose."; } } description "Link-heartbeat state type."; } typedef state-flag { type enumeration { enum "normal" { value 0; description "Indicates that link-heartbeat state is normal."; } enum "alarm" { value 1; description "Indicates that link-heartbeat state is alarm."; } } description "Link-heartbeat state flag type."; } typedef port-ready { type enumeration { enum "not-ready" { value 0; description "A port is not ready to send packets."; } enum "ready" { value 1; description "A port is ready to send packets."; } } description "Link-heartbeat state flag type."; } container link-heartbeat { config false; description "Link-heartbeat is the way of detecting the link quality by sending heart packets between two devices."; container interfaces { description "List of the link-heartbeat query on the local interface."; list interface { key "if-name"; description "Operational data of the link-heartbeat query on the local interface."; leaf if-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } description "Specifies the name of the interface enabled with link-heartbeat."; } leaf member-if-name { when "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name = current()/../if-name]/ifm:type = 'Eth-Trunk' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name = current()/../if-name]/ifm:type = 'Ip-Trunk'"; type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } description "Indicates the sending packet interface name for link-heartbeat."; } leaf detect-status { type state; description "Indicates the link-heartbeat detect status."; } leaf send-packet-num { type uint16; units "packet"; description "Indicates the send number of packets."; } leaf rcv-packet-num { type uint16; units "packet"; description "Indicates the receive number of packets."; } leaf loss-alarm { type state-flag; description "Indicates whether the alarm of loss packets occurs."; } leaf modify-alarm { type state-flag; description "Indicates whether the alarm of modify packets occurs."; } leaf port-ready { type port-ready; description "Whether a port is ready to send packets."; } leaf port-ready-reason { type string { length "1..100"; } description "Indicates the reason of a port is ready or not ready."; } } // list interface } // container interfaces } // container link-heartbeat } // module huawei-link-heartbeat
© 2023 YumaWorks, Inc. All rights reserved.