Link layer discovery protocol.
Version: 2021-01-07
module huawei-lldp { yang-version 1; namespace "urn:huawei:yang:huawei-lldp"; prefix lldp; import huawei-extension { prefix ext; } import huawei-ifm { prefix ifm; } import huawei-pub-type { prefix pub-type; } import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } import huawei-ip { prefix ip; } import huawei-ethernet { prefix ethernet; } import huawei-ifm-trunk { prefix ifm-trunk; } 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 layer discovery protocol."; revision "2021-01-07" { description "Change the position of the when condition under node sub-interface-lldp."; reference "Huawei private."; } revision "2020-10-10" { description "Add new node sub-interface-lldp."; reference "Huawei private."; } revision "2020-04-28" { description "Add when condition."; reference "Huawei private."; } revision "2020-04-27" { description "Change leaf node type."; reference "Huawei private."; } revision "2020-04-26" { description "Add new node mdn-status."; reference "Huawei private."; } revision "2020-04-16" { description "Add new node."; reference "Huawei private."; } revision "2020-03-13" { description "Modify description."; reference "Huawei private."; } revision "2020-02-27" { description "LLDP module YANG file."; reference "Huawei private."; } revision "2019-04-23" { description "Initial revision."; reference "Huawei private."; } ext:task-name "lldp"; typedef man-addr-if-sub-type { type enumeration { enum "other" { value 0; description "The if type of management address is other."; } enum "unknown" { value 1; description "The if type of management address is unknown."; } enum "if-index" { value 2; description "The if type of management address is if-index."; } enum "system-port-number" { value 3; description "The if type of management address is system-port-number."; } } description "The if type of management address."; } typedef dot3-mau-type { type enumeration { enum "dot3-mau-type-1000-base-sxhd" { value 25; description "The dot3 mau type is dot3-mau-type-1000-base-sxhd."; } enum "dot3-mau-type-1000-base-sxfd" { value 26; description "The dot3 mau type is dot3-mau-type-1000-base-sxfd."; } enum "dot3-mau-type-1000-base-cxhd" { value 27; description "The dot3 mau type is dot3-mau-type-1000-base-cxhd."; } enum "dot3-mau-type-1000-base-cxfd" { value 28; description "The dot3 mau type is dot3-mau-type-1000-base-cxfd."; } enum "dot3-mau-type-1000-base-thd" { value 29; description "The dot3 mau type is dot3-mau-type-1000-base-thd."; } enum "dot3-mau-type-1000-base-tfd" { value 30; description "The dot3 mau type is dot3-mau-type-1000-base-tfd."; } enum "dot3-mau-type-10gig-base-x" { value 31; description "The dot3 mau type is dot3-mau-type-10gig-base-x."; } enum "dot3-mau-type-10gig-base-lx4" { value 32; description "The dot3 mau type is dot3-mau-type-10gig-base-lx4."; } enum "dot3-mau-type-10gig-base-r" { value 33; description "The dot3 mau type is dot3-mau-type-10gig-base-r."; } enum "dot3-mau-type-10gig-base-er" { value 34; description "The dot3 mau type is dot3-mau-type-10gig-base-er."; } enum "dot3-mau-type-10gig-base-lr" { value 35; description "The dot3 mau type is dot3-mau-type-10gig-base-lr."; } enum "dot3-mau-type-10gig-base-sr" { value 36; description "The dot3 mau type is dot3-mau-type-10gig-base-sr."; } enum "dot3-mau-type-10gig-base-w" { value 37; description "The dot3 mau type is dot3-mau-type-10gig-base-w."; } enum "dot3-mau-type-10gig-base-ew" { value 38; description "The dot3 mau type is dot3-mau-type-10gig-base-ew."; } enum "dot3-mau-type-10gig-base-lw" { value 39; description "The dot3 mau type is dot3-mau-type-10gig-base-lw."; } enum "dot3-mau-type-10gig-base-sw" { value 40; description "The dot3 mau type is dot3-mau-type-10gig-base-sw."; } enum "unknown" { value 0; description "The dot3 mau type is other."; } enum "dot3-mau-type-aui" { value 1; description "The dot3 mau type is dot3-mau-type-aui."; } enum "dot3-mau-type-10-base-5" { value 2; description "The dot3 mau type is dot3-mau-type-10-base-5."; } enum "dot3-mau-type-foirl" { value 3; description "The dot3 mau type is dot3-mau-type-foirl."; } enum "dot3-mau-type-10-base-2" { value 4; description "The dot3 mau type is dot3-mau-type-10-base-2."; } enum "dot3-mau-type-10-base-t" { value 5; description "The dot3 mau type is dot3-mau-type-10-base-t."; } enum "dot3-mau-type-10-base-fp" { value 6; description "The dot3 mau type is dot3-mau-type-10-base-fp."; } enum "dot3-mau-type-10-base-fb" { value 7; description "The dot3 mau type is dot3-mau-type-10-base-fb."; } enum "dot3-mau-type-10-base-fl" { value 8; description "The dot3 mau type is dot3-mau-type-10-base-fl."; } enum "dot3-mau-type-10-base-36" { value 9; description "The dot3 mau type is dot3-mau-type-10-base-36."; } enum "dot3-mau-type-10-base-thd" { value 10; description "The dot3 mau type is dot3-mau-type-10-base-thd."; } enum "dot3-mau-type-10-base-tfd" { value 11; description "The dot3 mau type is dot3-mau-type-10-base-tfd."; } enum "dot3-mau-type-10-base-flhd" { value 12; description "The dot3 mau type is dot3-mau-type-10-base-flhd."; } enum "dot3-mau-type-10-base-flfd" { value 13; description "The dot3 mau type is dot3-mau-type-10-base-flfd."; } enum "dot3-mau-type-100-base-t4" { value 14; description "The dot3 mau type is dot3-mau-type-100-base-t4."; } enum "dot3-mau-type-100-base-txhd" { value 15; description "The dot3 mau type is dot3-mau-type-100-base-txhd."; } enum "dot3-mau-type-100-base-txfd" { value 16; description "The dot3 mau type is dot3-mau-type-100-base-txfd."; } enum "dot3-mau-type-100-base-fxhd" { value 17; description "The dot3 mau type is dot3-mau-type-100-base-fxhd."; } enum "dot3-mau-type-100-base-fxfd" { value 18; description "The dot3 mau type is dot3-mau-type-100-base-fxfd."; } enum "dot3-mau-type-100-base-t2hd" { value 19; description "The dot3 mau type is dot3-mau-type-100-base-t2hd."; } enum "dot3-mau-type-100-base-t2fd" { value 20; description "The dot3 mau type is dot3-mau-type-100-base-t2fd."; } enum "dot3-mau-type-1000-base-xhd" { value 21; description "The dot3 mau type is dot3-mau-type-1000-base-xhd."; } enum "dot3-mau-type-1000-base-xfd" { value 22; description "The dot3 mau type is dot3-mau-type-1000-base-xfd."; } enum "dot3-mau-type-1000-base-lxhd" { value 23; description "The dot3 mau type is dot3-mau-type-1000-base-lxhd."; } enum "dot3-mau-type-1000-base-lxfd" { value 24; description "The dot3 mau type is dot3-mau-type-1000-base-lxfd."; } enum "dot3-mau-type-40gig-base-kr4" { value 70; description "The dot3 mau type is dot3-mau-type-40gig-base-kr4."; } enum "dot3-mau-type-40gig-base-cr4" { value 71; description "The dot3 mau type is dot3-mau-type-40gig-base-cr4."; } enum "dot3-mau-type-40gig-base-sr4" { value 72; description "The dot3 mau type is dot3-mau-type-40gig-base-sr4."; } enum "dot3-mau-type-40gig-base-fr" { value 73; description "The dot3 mau type is dot3-mau-type-40gig-base-fr."; } enum "dot3-mau-type-40gig-base-lr4" { value 74; description "The dot3 mau type is dot3-mau-type-40gig-base-lr4."; } enum "dot3-mau-type-100gig-base-cr10" { value 75; description "The dot3 mau type is dot3-mau-type-100gig-base-cr10."; } enum "dot3-mau-type-100gig-base-sr10" { value 76; description "The dot3 mau type is dot3-mau-type-100gig-base-sr10."; } enum "dot3-mau-type-100gig-base-lr4" { value 77; description "The dot3 mau type is dot3-mau-type-100gig-base-lr4."; } enum "dot3-mau-type-100gig-base-er4" { value 78; description "The dot3 mau type is dot3-mau-type-100gig-base-er4."; } } description "Dot3 mau type."; } typedef admin-status { type enumeration { enum "tx-only" { value 1; description "Administrative status is tx only."; } enum "rx-only" { value 2; description "Administrative status is rx only."; } enum "tx-rx" { value 3; description "Administrative status is tx and rx."; } enum "disabled" { value 4; description "Administrative status is disabled."; } } description "Administrative status."; } typedef port-mode { type enumeration { enum "normal-mode" { value 0; description "Normal mode."; } enum "vlan-mode" { value 1; description "VLAN mode."; } } description "Port mode."; } typedef chassis-id-sub-type { type enumeration { enum "other" { value 0; description "Other extended retention."; } enum "chassis-component" { value 1; description "Chassis component."; } enum "interface-alias" { value 2; description "Interface alias."; } enum "port-component" { value 3; description "Interface component."; } enum "mac-address" { value 4; description "MAC address."; } enum "network-address" { value 5; description "Network address."; } enum "interface-name" { value 6; description "Interface name."; } enum "local" { value 7; description "Local name."; } } description "Chassis ID sub type."; } typedef management-address-type { type enumeration { enum "other" { value 0; description "The type of management address is other."; } enum "ipv4" { value 1; description "The type of management address is IPv4."; } enum "ipv6" { value 2; description "The type of management address is IPv6."; } enum "nsap" { value 3; description "The type of management address is NSAP."; } enum "hdlc" { value 4; description "The type of management address is HDLC."; } enum "bbn1822" { value 5; description "The type of management address is BBN1822."; } enum "mac" { value 6; description "The type of management address is MAC."; } enum "e163" { value 7; description "The type of management address is E163."; } enum "e164" { value 8; description "The type of management address is E164."; } enum "f69" { value 9; description "The type of management address is F69."; } enum "x121" { value 10; description "The type of management address is X121."; } enum "ipx" { value 11; description "The type of management address is IPX."; } enum "apple-talk" { value 12; description "The type of management address is APPLE-TALK."; } enum "decnet-iv" { value 13; description "The type of management address is DECNET-IV."; } enum "banyan-vines" { value 14; description "The type of management address is BANYAN-VINES."; } enum "e164-with-nsap" { value 15; description "The type of management address is E164-with-NSAP."; } enum "dns" { value 16; description "The type of management address is DNS."; } enum "distinguished-name" { value 17; description "The type of management address is distinguished-name."; } enum "as-number" { value 18; description "The type of management address is AS-NUMBER."; } enum "xtp-over-ipv4" { value 19; description "The type of management address is XTP-over-IPv4."; } enum "xtp-over-ipv6" { value 20; description "The type of management address is XTP-over-IPv6."; } enum "xtp-native-mode-xtp" { value 21; description "The type of management address is XTP-native-mode-XTP."; } enum "fibre-channel-wwpn" { value 22; description "The type of management address is fibre-channel-WWPN."; } enum "fibre-channel-wwn" { value 23; description "The type of management address is fibre-channel-WWN."; } enum "gwid" { value 24; description "The type of management address is GWID."; } } description "Management address type."; } typedef port-id-sub-type { type enumeration { enum "other" { value 0; description "The Port id sub type is other."; } enum "interface-alias" { value 1; description "The Port id sub type is interface-alias."; } enum "port-component" { value 2; description "The Port id sub type is port-component."; } enum "mac-address" { value 3; description "The Port id sub type is mac-address."; } enum "network-address" { value 4; description "The Port id sub type is network-address."; } enum "interface-name" { value 5; description "The Port id sub type is interface-name."; } enum "agent-circuit-id" { value 6; description "The Port id sub type is agent-circuit-id."; } enum "local" { value 7; description "The Port id sub type is local."; } } description "Port id sub type."; } typedef global-status { type enumeration { enum "enabled" { value 1; description "The global state is enabled."; } enum "disabled" { value 0; description "The global state is disabled."; } } description "Global status."; } typedef support-status { type enumeration { enum "yes" { value 1; description "The supoort state is yes."; } enum "no" { value 0; description "The supoort state is no."; } } description "Support status."; } typedef enable-status { type enumeration { enum "yes" { value 1; description "Yes."; } enum "no" { value 0; description "No."; } } description "Enable status."; } typedef mdn-global-status { type enumeration { enum "rx-only" { value 2; description "MDN status is rx-only."; } enum "disabled" { value 4; description "MDN status is disabled."; } } description "MDN global status."; } typedef system-capabilities-type { type enumeration { enum "other" { value 0; description "The system has capabilities other than those listed below."; } enum "repeater" { value 1; description "The system has repeater capability."; } enum "bridge" { value 2; description "The system has bridge capability."; } enum "wlan-access-point" { value 3; description "The system has WLAN access point capability."; } enum "router" { value 4; description "The system has router capability."; } enum "telephone" { value 5; description "The system has telephone capability."; } enum "docsis-cable-device" { value 6; description "The system has DOCSIS Cable Device capability."; } enum "station-only" { value 7; description "The system has only station capability and nothing else."; } } description "System capabilities type."; } typedef med-capabilities { type enumeration { enum "capabilities" { value 0; description "Enable the device to send the MED Capability TLV."; } enum "network-policy" { value 1; description "Enable the device to send the MED Network Policy TLV."; } enum "location" { value 2; description "Enable the device to send the MED Location Identification TLV."; } enum "extended-power-via-pse" { value 3; description "Enable the device to send the MED Extended Power via MDI-PSE TLV."; } enum "extended-power-via-pd" { value 4; description "Enable the device to send the MED Extended Power via MDI-PD TLV."; } enum "inventory" { value 5; description "Enable the device to send the MED Inventory TLV."; } enum "reserved" { value 6; description "Reserved."; } } description "LLDP-MED capabilities type."; } typedef med-device-type { type enumeration { enum "type-not-defined" { value 0; description "Type Not Defined."; } enum "endpoint-class-1" { value 1; description "Endpoint Class I."; } enum "endpoint-class-2" { value 2; description "Endpoint Class II."; } enum "endpoint-class-3" { value 3; description "Endpoint Class III."; } enum "network-connectivity" { value 4; description "Network Connectivity."; } enum "reserved" { value 5; description "Reserved."; } } description "LLDP-MED Device Type."; } typedef med-net-application-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "voice" { value 1; description "Voice."; } enum "voice-signaling" { value 2; description "Voice Signaling."; } enum "guest-voice" { value 3; description "Guest Voice."; } enum "guest-voice-signaling" { value 4; description "Guest Voice Signaling."; } enum "softphone-voice" { value 5; description "Softphone Voice."; } enum "video-conferencing" { value 6; description "Video Conferencing."; } enum "streaming-video" { value 7; description "Streaming Video."; } enum "video-signaling" { value 8; description "Video Signaling."; } } description "LLDP-MED network-policy Application Type."; } typedef med-net-unknown-policy-type { type enumeration { enum "defined" { value 0; description "Defined Policy."; } enum "unknown" { value 1; description "Unknown Policy."; } } description "LLDP-MED network-policy Unknown Policy Flag."; } typedef med-power-type { type enumeration { enum "pse" { value 0; description "PSE Device."; } enum "pd" { value 1; description "PD Device."; } enum "reserved" { value 2; description "Reserved."; } } description "Power type of the MED Extended Power-via-MDI TLV."; } typedef power-pse-source-type { type enumeration { enum "unknown" { value 0; description "Unknown."; } enum "primary" { value 1; description "Primary Power Source."; } enum "backup" { value 2; description "Backup Power Source."; } enum "reserved" { value 3; description "Reserved."; } } description "Type of the PSE power supply source."; } typedef med-power-pd-source-type { type enumeration { enum "unknown" { value 0; description "Unknown."; } enum "pse" { value 1; description "PSE."; } enum "local" { value 2; description "Local."; } enum "pse-and-local" { value 3; description "PSE and Local."; } } description "PD power supply source type of the MED Extended Power-via-MDI TLV."; } typedef power-priority-type { type enumeration { enum "unknown" { value 0; description "Unknown."; } enum "critical" { value 1; description "Critical."; } enum "high" { value 2; description "High."; } enum "low" { value 3; description "Low."; } enum "reserved" { value 4; description "Reserved."; } } description "Power priority."; } typedef dot3-power-format-type { type enumeration { enum "first-802.1ab-then-auto" { value 0; description "First packet is sent in 802.1ab mode, and subsequent packets are sent in adaptive mode."; } enum "802.1ab" { value 1; description "The 802.1ab mode."; } enum "802.3at" { value 2; description "The 802.3at mode."; } enum "802.3bt-draft" { value 3; description "The 802.3bt draft mode."; } enum "802.3bt-2018standard" { value 4; description "The 802.3bt 2018 standard mode."; } } description "Mode of IEEE 802.3 Power Via MDI TLV."; } typedef dot3-power-class-type { type enumeration { enum "pd" { value 0; description "Powered device."; } enum "pse" { value 1; description "Power sourcing equipment."; } } description "Power supply type of the Power Via MDI TLV."; } typedef dot3-pairs-control-type { type enumeration { enum "not-controlled" { value 0; description "Pair selection cannot be controlled."; } enum "controlled" { value 1; description "Pair selection can be controlled."; } } description "Whether pair selection can be controlled."; } typedef pse-power-pair-type { type enumeration { enum "signal" { value 1; description "Only the signal pairs are in use."; } enum "spare" { value 2; description "Only the spare pairs are in use."; } enum "unknown" { value 255; description "Unknown."; } } description "PSE power pairs that are in use."; } typedef local-pse-power-class-type { type enumeration { enum "class0" { value 0; description "Class 0."; } enum "class1" { value 1; description "Class 1."; } enum "class2" { value 2; description "Class 2."; } enum "class3" { value 3; description "Class 3."; } enum "class4" { value 4; description "Class 4."; } enum "class5" { value 5; description "Class 5."; } enum "class6" { value 6; description "Class 6."; } enum "class7" { value 7; description "Class 7."; } enum "class8" { value 8; description "Class 8."; } enum "unknown" { value 255; description "Unknown."; } } description "Local PSE power class."; } typedef power-dot3at-type { type enumeration { enum "type-2-pse" { value 0; description "Type 2 PSE."; } enum "type-2-pd" { value 1; description "Type 2 PD."; } enum "type-1-pse" { value 2; description "Type 1 PSE."; } enum "type-1-pd" { value 3; description "Type 1 PD."; } } description "802.3at power type."; } typedef remote-pse-power-class-type { type enumeration { enum "class0" { value 0; description "Class 0 PD."; } enum "class1" { value 1; description "Class 1 PD."; } enum "class2" { value 2; description "Class 2 PD."; } enum "class3" { value 3; description "Class 3 PD."; } enum "class4" { value 4; description "Class 4 PD."; } enum "class4-and-above" { value 99; description "Class 4 and above PD."; } enum "unknown" { value 255; description "Unknown."; } } description "Remote PSE power class."; } typedef dot3bt-draft-power-class-type { type enumeration { enum "class0" { value 0; description "Class 0."; } enum "class1" { value 1; description "Class 1."; } enum "class2" { value 2; description "Class 2."; } enum "class3" { value 3; description "Class 3."; } enum "class4" { value 4; description "Class 4."; } enum "class5" { value 5; description "Class 5."; } enum "class6" { value 6; description "Class 6."; } enum "class7" { value 7; description "Class 7."; } enum "class8" { value 8; description "Class 8."; } enum "reserved" { value 255; description "Reserved."; } } description "802.3bt draft power class."; } typedef dot3-power-pd-source-type { type enumeration { enum "unknown" { value 0; description "Unknown."; } enum "pse" { value 1; description "PSE."; } enum "reserved" { value 2; description "Reserved."; } enum "pse-and-local" { value 3; description "PSE and Local."; } } description "PD power supply source type."; } typedef dot3bt-draft-power-typex-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "type-1-pse" { value 2; description "Type 1 PSE."; } enum "type-1-pd" { value 3; description "Type 1 PD."; } enum "type-2-pse" { value 4; description "Type 2 PSE."; } enum "type-2-pd" { value 5; description "Type 2 PD."; } enum "type-3-pse" { value 6; description "Type 3 PSE."; } enum "type-3-single-pd" { value 7; description "Type 3 single-signature PD."; } enum "type-4-pse" { value 8; description "Type 4 PSE."; } enum "type-4-single-pd" { value 9; description "Type 4 single-signature PD."; } enum "type-3-dual-pd" { value 13; description "Type 3 dual-signature PD."; } enum "type-4-dual-pd" { value 15; description "Type 4 dual-signature PD."; } } description "802.3bt draft extended power type."; } typedef dot3-power-pair-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "alternative-a" { value 1; description "Alternative A."; } enum "alternative-b" { value 2; description "Alternative B."; } enum "both-alternatives" { value 3; description "Both Alternatives."; } } description "PSE extended power pairs."; } typedef autoclass-support-type { type enumeration { enum "not-support" { value 0; description "PSE does not support Autoclass."; } enum "support" { value 1; description "PSE supports Autoclass."; } } description "Whether PSE Autoclass is support."; } typedef autoclass-completed-type { type enumeration { enum "idle" { value 0; description "Autoclass idle."; } enum "completed" { value 1; description "Autoclass measurement completed."; } } description "Whether Autoclass is completed."; } typedef autoclass-request-type { type enumeration { enum "idle" { value 0; description "Autoclass idle."; } enum "requested" { value 1; description "PD requests Autoclass measurement."; } } description "Autoclass request."; } typedef pd-4pid-type { type enumeration { enum "not-support" { value 0; description "PD does not support powering of both modes."; } enum "support" { value 1; description "PD supports powering of both modes."; } } description "Whether the PD supports powering of both Modes simultaneously."; } typedef pd-load-type { type enumeration { enum "single-or-dual" { value 0; description "PD is single-signature or dual-signature and power demand on Mode A and Mode B are not electrically isolated."; } enum "dual" { value 1; description "PD is dual-signature and power demand on Mode A and Mode B are electrically isolated."; } } description "PD load."; } typedef pse-powering-status-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "2-pair" { value 1; description "2-pair powering."; } enum "4-pair-single" { value 2; description "4-pair powering single-signature PD."; } enum "4-pair-dual" { value 3; description "4-pair powering dual-signature PD."; } } description "PSE powering status."; } typedef pd-powered-status-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "single" { value 1; description "Powered single-signature PD."; } enum "2-pair-dual" { value 2; description "2-pair powered dual-signature PD."; } enum "4-pair-dual" { value 3; description "4-pair powered dual-signature PD."; } } description "PD powering status."; } typedef dual-signature-class-ext-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "class1" { value 1; description "Class 1."; } enum "class2" { value 2; description "Class 2."; } enum "class3" { value 3; description "Class 3."; } enum "class4" { value 4; description "Class 4."; } enum "class5" { value 5; description "Class 5."; } enum "single-pd-or-2pair-pse" { value 7; description "Single-signature PD or 2-pair only PSE."; } } description "Dual-signature power class ext."; } typedef dot3bt-std-class-ext-type { type enumeration { enum "reserved" { value 0; description "Reserved."; } enum "class1" { value 1; description "Class 1."; } enum "class2" { value 2; description "Class 2."; } enum "class3" { value 3; description "Class 3."; } enum "class4" { value 4; description "Class 4."; } enum "class5" { value 5; description "Class 5."; } enum "class6" { value 6; description "Class 6."; } enum "class7" { value 7; description "Class 7."; } enum "class8" { value 8; description "Class 8."; } enum "dual-signature-pd" { value 15; description "Dual-signature PD."; } } description "Extended power class."; } typedef dot3bt-std-type-ext-type { type enumeration { enum "type-3-pse" { value 0; description "Type 3 PSE."; } enum "type-4-pse" { value 1; description "Type 4 PSE."; } enum "type-3-single-pd" { value 2; description "Type 3 single-signature PD."; } enum "type-3-dual-pd" { value 3; description "Type 3 dual-signature PD."; } enum "type-4-single-pd" { value 4; description "Type 4 single-signature PD."; } enum "type-4-dual-pd" { value 5; description "Type 4 dual-signature PD."; } enum "reserved" { value 7; description "Reserved."; } } description "Extended power type."; } typedef legacy-power-capability-type { type enumeration { enum "af" { value 0; description "802.3af."; } enum "at" { value 1; description "802.3at."; } enum "bt-60" { value 2; description "802.3bt with the supply power being 60W."; } enum "bt-90" { value 3; description "802.3bt with the supply power being 90W."; } } description "Power capability."; } grouping chassis-id { description "Chassis ID."; leaf chassis-id-sub-type { type chassis-id-sub-type; description "Chassis type."; } leaf chassis-id { type string { length "1..765"; } description "Chassis ID."; } } // grouping chassis-id grouping port-id { description "Port ID."; leaf port-id-sub-type { type port-id-sub-type; description "Interface ID subtype."; } leaf port-id { type string { length "1..765"; } description "Interface ID."; } } // grouping port-id grouping port-description { description "Port description."; leaf port-description { type string { length "1..256"; } description "Interface description."; } } // grouping port-description grouping system-name { description "System name."; leaf system-name { type string { length "1..256"; } description "System name."; } } // grouping system-name grouping system-description { description "System description."; leaf system-description { type string { length "1..256"; } description "System description."; } } // grouping system-description grouping system-capabilities { description "System capabilities."; leaf system-capabilities-enabled { type string { length "1..90"; } description "System capabilities enabled."; } leaf system-capabilities-supported { type string { length "1..90"; } description "System capabilities supported."; } } // grouping system-capabilities grouping expired-time { description "Expired time."; leaf expired-time { type int32 { range "0..65535"; } units "s"; description "Expired time."; } } // grouping expired-time grouping port-vlan-id { description "Port VLAN ID."; leaf port-vlan-id { type int32 { range "0..4094"; } description "Interface VLAN ID, 0 means not supported."; } } // grouping port-vlan-id grouping protocol-identity { description "Port protocol."; leaf protocol-identity { type string { length "1..64"; } description "Protocol supported by the device."; } } // grouping protocol-identity grouping mac-physic { description "Information about mac/physic."; leaf auto-negotiation-supported { type support-status; description "Whether the interface supports auto-negotiation."; } leaf auto-negotiation-enabled { type enable-status; description "Whether auto-negotiation is enabled on the interface."; } leaf auto-negotiation-capability { type string { length "1..192"; } description "Auto-negotiation capability of the interface."; } leaf oper-mau-type { type dot3-mau-type; description "Operational MAU type."; } } // grouping mac-physic grouping link-aggregation { description "Link aggregation."; leaf link-aggregation-supported { type support-status; description "Whether the interface supports link aggregation."; } leaf link-aggregation-enabled { type enable-status; description "Whether link aggregation is enabled on the interface."; } leaf aggregation-port-id { type int32 { range "0..2147483647"; } description "If link aggregation is disabled, the value is 0."; } } // grouping link-aggregation grouping maximum-frame-size { description "Maximum frame size."; leaf maximum-frame-size { type int32 { range "0..65535"; } description "Maximum frame size supported by an interface."; } } // grouping maximum-frame-size grouping management-address { description "Management address."; container management-addresss { description "List of management addresses."; list management-address { key "type value length"; description "Statistics of management address."; leaf type { type management-address-type; description "Management address type."; } leaf value { type string { length "1..93"; } description "Management address."; } leaf length { type int32 { range "0..2147483647"; } description "Management address length."; } leaf if-sub-type { type man-addr-if-sub-type; description "Management address interface type."; } leaf if-id { type int32 { range "0..2147483647"; } description "Management address interface ID."; } leaf oid { type string { length "1..640"; } description "Management address OID."; } } // list management-address } // container management-addresss } // grouping management-address grouping local-protocol-vlan { description "Protocol VLAN of local LLDP interface."; leaf protocol-vlan-id { type int32 { range "0..4094"; } description "Protocol VLAN ID, 0 means not supported."; } leaf protocol-vlan-supported { type support-status; description "Whether the interface supports protocol VLAN."; } leaf protocol-vlan-enable { type enable-status; description "Whether protocol VLAN is enabled on the interface."; } } // grouping local-protocol-vlan grouping neighbor-protocol-vlans { description "Protocol VLANs of LLDP neighbors."; container protocol-vlans { description "List of protocol VLANs of LLDP neighbors."; list protocol-vlan { key "id"; description "Statistics of protocol VLAN of an LLDP neighbor."; leaf id { type int32 { range "0..4094"; } description "Protocol VLAN ID, 0 means not supported."; } leaf supported { type support-status; description "Whether the interface supports protocol VLAN."; } leaf enabled { type enable-status; description "Whether protocol VLAN is enabled on the interface."; } } // list protocol-vlan } // container protocol-vlans } // grouping neighbor-protocol-vlans grouping local-vlan-name { description "VLAN name."; leaf vlan-name-id { type int32 { range "1..4094"; } description "VLAN ID."; } leaf vlan-name { type string { length "1..33"; } description "VLAN name."; } } // grouping local-vlan-name grouping neighbor-vlan-names { description "VLAN names of LLDP neighbors."; container vlan-names { description "List of VLAN names of LLDP neighbors."; list vlan-name { key "id"; description "Statistics of VLAN name of an LLDP neighbor."; leaf id { type int32 { range "0..4094"; } description "VLAN ID, 0 means not supported."; } leaf value { type string { length "1..33"; } description "VLAN name."; } } // list vlan-name } // container vlan-names } // grouping neighbor-vlan-names grouping unknown-tlvs { description "Unknown tlvs."; container unknown-tlvs { description "List of unrecognized TLVs."; list unknown-tlv { key "type"; description "Statistics of unrecognized TLV."; leaf type { type int32 { range "9..126"; } description "Unrecognized TLV type."; } leaf info { type string { length "1..1600"; } description "Unrecognized TLV information."; } } // list unknown-tlv } // container unknown-tlvs } // grouping unknown-tlvs grouping unknown-organizationally-defined-tlvs { description "Unrecognized organizationally defined TLVs."; container unknown-organizationally-defined-tlvs { description "List of unrecognized organizationally defined TLVs."; list unknown-organizationally-defined-tlv { key "oui sub-type index"; description "Statistics of unrecognized organizationally defined TLV."; leaf oui { type string { length "1..12"; } description "OUI of an unrecognized organizationally defined TLV."; } leaf sub-type { type int32 { range "1..256"; } description "Subtype of an unrecognized organizationally defined TLV."; } leaf index { type int32 { range "0..2147483647"; } description "Index of an unrecognized organizationally defined TLV."; } leaf info { type string { length "1..1600"; } description "Information about an unrecognized organizationally defined TLV."; } } // list unknown-organizationally-defined-tlv } // container unknown-organizationally-defined-tlvs } // grouping unknown-organizationally-defined-tlvs grouping ddp-tlv { description "DDP TLVs."; container ddp-tlv { description "Statistics of information about neighbor DDP TLV."; leaf serial-number { type string { length "1..33"; } description "Neighbor serial number."; } leaf if-index { type uint32 { range "0..4294967295"; } description "IfIndex of neighbor DDP TLV enabled."; } leaf ipv4-address { type inet:ipv4-address-no-zone; description "Neighbor IP."; } leaf mac-address { type pub-type:mac-address { length "0..14"; pattern '[0-9a-fA-F]{4}(-[0-9a-fA-F]{4}){2}'; } description "Neighbor system MAC."; } } // container ddp-tlv } // grouping ddp-tlv grouping identity-tlv { description "Identity TLVs."; container identity-tlv { config false; description "Statistics of information about the identity TLV."; leaf identity { type string { length "1..508"; } description "Identity."; } } // container identity-tlv } // grouping identity-tlv grouping local-system-capabilities { description "System capabilities."; leaf-list system-capabilities-supported { type system-capabilities-type; description "Statistics of information about system capabilities supported."; } leaf-list system-capabilities-enabled { type system-capabilities-type; description "Statistics of information about system capabilities enabled."; } } // grouping local-system-capabilities grouping neighbor-common-info { description "Information about the neighbor common TLV, include basic TLV, IEEE 802.1 TLV and IEEE 802.3 TLV."; uses chassis-id; uses port-id; uses port-description; uses system-name; uses system-description; uses system-capabilities; uses expired-time; uses port-vlan-id; uses protocol-identity; uses mac-physic; uses link-aggregation; uses maximum-frame-size; leaf discovered-time { type yang:date-and-time; description "Time when the neighbor was discovered."; } uses management-address; uses neighbor-protocol-vlans; uses neighbor-vlan-names; uses unknown-tlvs; uses unknown-organizationally-defined-tlvs; } // grouping neighbor-common-info grouping med-capability-tlv { description "MED Capabilities TLV."; container capability { description "Statistics of information about the MED Capabilities TLV."; leaf-list capabilities { type med-capabilities; description "Statistics of information about MED Capabilities enabled."; } leaf device-type { type med-device-type; description "Device Type."; } } // container capability } // grouping med-capability-tlv grouping med-network-policy-tlvs { description "MED Network Policy TLVs."; container network-policys { description "List of MED Network Policy TLVs."; list network-policy { key "type"; description "Statistics of information about the MED Network Policy TLV."; leaf type { type med-net-application-type; description "Network Policy type."; } leaf unknown-policy { type med-net-unknown-policy-type; description "Unknown policy."; } leaf vlan-tagged { type boolean; description "VLAN tagged."; } leaf vlan-id { type uint16 { range "1..4094"; } description "VLAN ID."; } leaf cos { type uint8 { range "0..7"; } description "Layer 2 priority class of service (CoS)."; } leaf dscp { type uint8 { range "0..63"; } description "The differentiated services code point (DSCP) value."; } } // list network-policy } // container network-policys } // grouping med-network-policy-tlvs grouping med-extended-power-tlv { description "MED extended power TLV."; container extended-power { description "Statistics of information about the med extended power TLV."; leaf type { type med-power-type; description "This field indicates whether the LLDP-MED device transmitting the LLDPDU is a PSE or PD."; } leaf pse-source { type power-pse-source-type; description "This field indicates the power source being utilized by a PSE device."; } leaf pd-source { type med-power-pd-source-type; description "This field indicates the power source being utilized by a PD device."; } leaf priority { type power-priority-type; description "This field represents the priority of the PD type device to the power being supplied by the PSE type device, or the power priority associated with the PSE type device's port that is sourcing the power via MDI."; } leaf value { type string { length "1..10"; } description "This field indicates the total power in watts required by a PD device from a PSE device, or the total power a PSE device is capable of sourcing over a maximum length cable based on its current configuration."; } } // container extended-power } // grouping med-extended-power-tlv grouping dot1ab-power-mdi-support { description "This field should contain a bit-map of the MDI power capabilities and status."; leaf port-class { type dot3-power-class-type; description "Indicates whether the port is PSE or PD."; } leaf pse-support { type support-status; description "Indicates whether MDI power is supported."; } leaf pse-state { when "../pse-support = 'yes'"; type enable-status; description "Indicates whether MDI power is enabled."; } leaf pse-pairs-control-ability { type dot3-pairs-control-type; description "Indicates whether pair selection can be controlled."; } } // grouping dot1ab-power-mdi-support grouping local-power-tlv { description "Local IEEE 802.3 power TLV."; container power { description "Statistics of information about IEEE 802.3 power TLV."; uses dot1ab-power-mdi-support; leaf pse-pairs { type pse-power-pair-type; description "Indicates the pair that is powered."; } leaf classification { type local-pse-power-class-type; description "Indicates the required power level."; } leaf mode { type dot3-power-format-type; description "Local 802.3 power TLV mode."; } } // container power } // grouping local-power-tlv grouping remote-power-tlv { description "Remote IEEE 802.3 power TLV."; container power { description "Statistics of information about IEEE 802.3 power TLV."; uses dot1ab-power-mdi-support; leaf pse-pairs { type pse-power-pair-type; description "Indicates the pair that is powered."; } leaf classification { type remote-pse-power-class-type; description "Indicates the required power level."; } leaf type { type power-dot3at-type; description "Power type."; } leaf pd-source { type dot3-power-pd-source-type; description "PD power supply source."; } leaf pse-source { type power-pse-source-type; description "PSE power supply source."; } leaf priority { type power-priority-type; description "Power priority."; } leaf pd-requested-value { type string { length "1..10"; } description "This field should contain the PD's requested power value."; } leaf pse-allocated-value { type string { length "1..10"; } description "This field should contain the PSE's allocated power value."; } leaf pd-requested-mode-a-value { type string { length "1..10"; } description "Returns the PD requested power value for the Mode A pairset that was used by the remote system to compute the power value that it has currently allocated to the PD."; } leaf pd-requested-mode-b-value { type string { length "1..10"; } description "Returns the PD requested power value for the Mode B pairset that was used by the remote system to compute the power value that it has currently allocated to the PD."; } leaf pse-allocated-mode-a-value { type string { length "1..10"; } description "PSE allocated power value for the Mode A pairset received from the remote system."; } leaf pse-allocated-mode-b-value { type string { length "1..10"; } description "PSE allocated power value for the Mode B pairset received from the remote system."; } leaf pse-powering-status { type pse-powering-status-type; description "This field indicates the existing powering configuration."; } leaf pd-powered-status { type pd-powered-status-type; description "This field indicates the existing powered configuration of the PD."; } leaf pairsx { type dot3-power-pair-type; description "This field identifies the supported PSE Pinout Alternative."; } leaf class { type dot3bt-draft-power-class-type; description "Power class of 802.3bt draft."; } leaf class-ext-mode-a { type dual-signature-class-ext-type; description "Dual-signature power Class extended Mode A."; } leaf class-ext-mode-b { type dual-signature-class-ext-type; description "Dual-signature power Class extended Mode B."; } leaf class-ext { type dot3bt-std-class-ext-type; description "Extended Power Class of 802.3bt 2018 standard."; } leaf typex { type dot3bt-draft-power-typex-type; description "Whether the remote system is a PSE or a PD and which type it is."; } leaf type-ext { type dot3bt-std-type-ext-type; description "Indicates the extended type of the remote system."; } leaf pd-4pid { type pd-4pid-type; description "Whether the PD supports powering of both modes simultaneously."; } leaf pd-load { type pd-load-type; description "Whether the PD load is electrically isolated."; } leaf pse-max-available { type string { length "1..10"; } description "This field contains the highest power the PSE can grant."; } leaf pse-autoclass-support { type autoclass-support-type; description "When the power type is PSE, this field should be set to indicate if the PSE supports Autoclass over DLL."; } leaf autoclass-completed { type autoclass-completed-type; description "When the power type is PSE, this field should be set to indicate that the PSE has concluded the Autoclass measurement."; } leaf autoclass-request { type autoclass-request-type; description "When the power type is PD, this field can be set to 1 to request a Autoclass measurement by the PSE."; } leaf power-down { type boolean; description "When the power type is PD, this field may be set to indicate a request for power down."; } leaf power-down-time { type uint32; units "s"; description "This field controls the amount of time in seconds the PD is requesting to be unpowered."; } } // container power } // grouping remote-power-tlv grouping legacy-power-capability-tlv { description "Legacy power capability TLV."; container legacy-power-capability { description "Statistics of information about legacy power capability."; leaf-list capability { type legacy-power-capability-type; description "Operational data of power capability."; } leaf mode { type legacy-power-capability-type; description "Current work mode."; } } // container legacy-power-capability } // grouping legacy-power-capability-tlv container lldp { presence "Enables LLDP"; description "Link layer discovery protocol."; container global-attribute { description "Configure LLDP global attribute."; leaf message-transmission-interval { type int32 { range "5..32768"; } units "s"; must "../message-transmission-interval>=(../message-transmission-delay*4)"; default "30"; description "Interval at which LLDP messages are transmitted."; } leaf message-transmission-delay { type int32 { range "1..8192"; } units "s"; must "../message-transmission-interval>=(../message-transmission-delay*4)"; default "2"; description "Time between two successive LLDP messages."; } leaf message-transmission-hold-multiplier { type int32 { range "2..10"; } default "4"; description "Multiplier on the message transmission interval that determines the actual TTL value used in an LLDPDU."; } leaf restart-delay { type int32 { range "1..10"; } units "s"; default "2"; description "Delay from when LLDP interface status becomes disabled until re-initialization will be attempted."; } leaf trap-interval { type int32 { range "5..3600"; } units "s"; default "5"; description "LLDP trap notification interval."; } leaf fast-count { type int32 { range "1..8"; } default "4"; description "Number of rapidly transmitted LLDP messages."; } choice management-address-mode { description "Management address configuration mode."; case global-mode { description "Global configuration mode of management address configuration."; leaf managment-address { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ip:ipv4/ip:addresses/ip:address/ip:ip"; } description "IP address for network management, which must exist in the device."; } leaf management-address-ipv4-bind-if { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } description "To specify the IP address of an interface as the LLDP management address. The device uses the interface's IP address as the management address, if no management address has been configured. The bound interface must be an Ethernet interface, but Eth-Trunk interfaces cannot be bound."; } } // case global-mode case interface-mode { description "Interface configuration mode of management address configuration."; leaf management-address-if-mode { type empty; description "When the node is configured, the LLDP management address TLV carries the IP address of the local interface."; } } // case interface-mode } // choice management-address-mode leaf mdn-status { type mdn-global-status; default "disabled"; description "MDN status."; } leaf trap-enable { type global-status; default "disabled"; config false; description "Enable the LLDP neighbor change trap function."; } } // container global-attribute container local-info { config false; description "Statistics of information about local LLDP."; uses chassis-id; uses system-name; uses system-description; leaf up-time { type yang:date-and-time; description "Time when LLDP enabled."; } uses local-system-capabilities; uses management-address; } // container local-info } // container lldp augment /ifm:ifm/ifm:interfaces/ifm:interface { when "/lldp:lldp and ifm:class = 'main-interface'"; description "LLDP interface."; container lldp { description "Configure LLDP interfaces."; container session { description "Configure LLDP interface."; leaf admin-status { type admin-status; default "tx-rx"; description "LLDP enable status."; } leaf port-mode { when "not(../admin-status='disabled') and ../../../ifm:type !='Pos' and ../../../ifm:type !='FlexE-50G' and ../../../ifm:type !='FlexE-100G' and ../../../ifm:type !='FlexE-200GE' and ../../../ifm:type !='FlexE-50|100G' and ../../../ifm:type !='FlexE-400G' and ../../../ifm:type !='FlexE-10G'"; type port-mode; default "normal-mode"; description "LLDP port mode."; } container tlv-enable { when "not(../admin-status='disabled')"; description "Configure LLDP TLV."; leaf management-address { type boolean; default "true"; description "Enable/disable the device to send the management address TLV."; } leaf port-description { type boolean; default "true"; description "Enable/disable the device to send the interface description TLV."; } leaf system-capability { type boolean; default "true"; description "Enable/disable the device to send the system capability TLV."; } leaf system-description { type boolean; default "true"; description "Enable/disable the device to send the system description TLV."; } leaf system-name { type boolean; default "true"; description "Enable/disable the device to send the system name TLV."; } leaf port-vlan-id { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the interface VLAN ID TLV."; } leaf protocol-vlan-id-enable { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the protocol VLAN ID TLV."; } leaf protocol-vlan-id { when "(not(../protocol-vlan-id-enable='false')) and (../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type int32 { range "1..4094"; } description "The protocol VLAN ID is sent."; } leaf vlan-name-enable { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the VLAN name TLV."; } leaf vlan-name-id { when "(not(../vlan-name-enable='false')) and (../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type int32 { range "1..4094"; } description "The VLAN ID of the VLAN name TLV is sent."; } leaf protocol-identity { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "false"; description "Enable/disable the device to send the protocol identity TLV."; } leaf mac-physic { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the MAC/PHY TLV."; } leaf link-aggregation { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the link aggregation TLV."; } leaf max-frame-size { when "(../../../../ifm:type !='Pos') and (../../../../ifm:type !='FlexE-50G') and (../../../../ifm:type !='FlexE-100G') and (../../../../ifm:type !='FlexE-200GE') and (../../../../ifm:type !='FlexE-50|100G') and (../../../../ifm:type !='FlexE-400G') and (../../../../ifm:type !='FlexE-10G')"; type boolean; default "true"; description "Enable/disable the device to send the maximum frame size TLV."; } container power-tlv { description "Configure the LLDP IEEE 802.3 Power Via MDI TLV."; leaf power { type boolean; default "true"; description "Enable/disable the device to send the Power Via MDI TLV."; } leaf mode { type dot3-power-format-type; must "(current()!='802.3bt-draft') and (current()!='802.3bt-2018standard')"; default "first-802.1ab-then-auto"; description "Mode of IEEE 802.3 Power Via MDI TLV."; } } // container power-tlv leaf ddp { type boolean; default "false"; description "Enable/disable the device to send the DDP TLV."; } leaf identity { type boolean; default "false"; description "Enable/disable the device to send the identity TLV."; } container med-tlv { description "Configure LLDP MED TLV."; leaf capability { type boolean; must "(current()='false') or (../../mac-physic = 'true')"; default "true"; description "Enable/disable the device to send the MED Capability TLV."; } leaf network-policy { when "((../../../../../ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute) or (/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name = ifm-trunk:trunk/ifm-trunk:members/ifm-trunk:member[ifm-trunk:name=current()/../../../../../ifm:name]/../../../ifm:name]/ethernet:ethernet/ethernet:main-interface/ethernet:l2-attribute))"; type boolean; must "(current()='false') or (../capability='true')"; default "true"; description "Enable/disable the device to send the MED Network Policy TLV."; } choice network-policy-attribute { description "Configure MED Network Policy TLV."; case untag { description "Configure the telephone to send untagged voice traffic."; leaf untagged { when "../network-policy='true'"; type empty; description "Configure the telephone to send untagged voice traffic."; } } // case untag case voice-vlan { description "Configure the telephone to send voice traffic with VLAN tags."; leaf vlan-id { when "../network-policy='true'"; type uint16 { range "1..4094"; } description "VOICE VLAN ID."; } leaf cos { when "../vlan-id"; type uint8 { range "0..7"; } description "Layer 2 priority class of service (CoS)."; } leaf dscp { when "../vlan-id"; type uint8 { range "0..63"; } description "The differentiated services code point (DSCP) value."; } } // case voice-vlan } // choice network-policy-attribute leaf power-over-ethernet { type boolean; must "(current()='false') or (../capability = 'true')"; default "true"; description "Enable/disable the device to send the MED Extended Power Via MDI TLV."; } } // container med-tlv } // container tlv-enable container local-info { config false; description "Statistics of information about local LLDP."; uses port-id; uses port-description; uses port-vlan-id; uses local-protocol-vlan; uses local-vlan-name; uses protocol-identity; uses mac-physic; uses link-aggregation; uses maximum-frame-size; uses management-address; uses local-power-tlv; uses identity-tlv; container med-tlv { description "Statistics of information about the local MED TLVs."; uses med-network-policy-tlvs; uses med-extended-power-tlv; } // container med-tlv } // container local-info container neighbors { config false; description "List of information about LLDP neighbors."; list neighbor { key "index"; description "Statistics of information about an LLDP neighbor."; leaf index { type uint32 { range "0..4294967295"; } description "Neighbor index."; } uses neighbor-common-info; uses remote-power-tlv; uses ddp-tlv; uses identity-tlv; container med-tlv { description "Statistics of information about the MED TLVs."; uses med-capability-tlv; uses med-network-policy-tlvs; uses med-extended-power-tlv; } // container med-tlv uses legacy-power-capability-tlv; } // list neighbor } // container neighbors container statistics { config false; description "Statistics of information about LLDP interface."; leaf total-neighbors { type uint32 { range "0..4294967295"; } description "Total number of neighbors."; } leaf transmitted-frames { type uint32 { range "0..4294967295"; } description "Total number of transmitted frames."; } leaf received-frames { type uint32 { range "0..4294967295"; } description "Total number of received frames."; } leaf discarded-frames { type uint32 { range "0..4294967295"; } description "Total number of discarded frames."; } leaf error-frames { type uint32 { range "0..4294967295"; } description "Total number of error frames."; } leaf discarded-tlvs { type uint32 { range "0..4294967295"; } description "Total number of discarded TLVs."; } leaf unrecognized-tlvs { type uint32 { range "0..4294967295"; } description "Total number of unrecognized TLVs."; } leaf expired-neighbors { type uint32 { range "0..4294967295"; } description "Total number of expired neighbors."; } leaf transmitted-dcbx-tlvs { type uint32 { range "0..4294967295"; } description "Total number of transmitted DCBX TLVs."; } leaf received-dcbx-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received DCBX TLVs."; } leaf transmitted-med-tlvs { type uint32 { range "0..4294967295"; } description "Total number of transmitted MED TLVs."; } leaf received-med-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received MED TLVs."; } leaf received-network-card-id-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received Network Card ID TLVs."; } leaf last-cleared-time { type yang:date-and-time; description "Time when LLDP statistics were last cleared."; } } // container statistics } // container session } // container lldp } augment /ifm:ifm/ifm:interfaces/ifm:interface { description "LLDP sub-interface."; container sub-interface-lldp { when "/lldp:lldp and ../ifm:class = 'sub-interface' and ../ethernet:ethernet/ethernet:l3-sub-interface/ethernet:vlan-type-dot1q"; description "Configure LLDP sub-interfaces."; container session { must "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../ifm:parent-name]/lldp:lldp/lldp:session/lldp:port-mode='vlan-mode'"; presence "Enable sub interface lldp"; description "Configure LLDP sub-interface."; leaf admin-status { type admin-status; must "not(../admin-status='disabled')"; mandatory true; description "LLDP enable status."; } container tlv-enable { description "Configure LLDP TLV."; leaf management-address { type boolean; default "true"; description "Enable/disable the device to send the management address TLV."; } leaf port-description { type boolean; default "true"; description "Enable/disable the device to send the interface description TLV."; } leaf system-capability { type boolean; default "true"; description "Enable/disable the device to send the system capability TLV."; } leaf system-description { type boolean; default "true"; description "Enable/disable the device to send the system description TLV."; } leaf system-name { type boolean; default "true"; description "Enable/disable the device to send the system name TLV."; } } // container tlv-enable container local-info { config false; description "Statistics of information about local LLDP."; uses port-id; uses port-description; uses management-address; } // container local-info container neighbors { config false; description "List of information about LLDP neighbors."; list neighbor { key "index"; description "Statistics of information about an LLDP neighbor."; leaf index { type uint32 { range "0..4294967295"; } description "Neighbor index."; } uses neighbor-common-info; } // list neighbor } // container neighbors container statistics { config false; description "Statistics of information about LLDP sub-interface."; leaf total-neighbors { type uint32 { range "0..4294967295"; } description "Total number of neighbors."; } leaf transmitted-frames { type uint32 { range "0..4294967295"; } description "Total number of transmitted frames."; } leaf received-frames { type uint32 { range "0..4294967295"; } description "Total number of received frames."; } leaf discarded-frames { type uint32 { range "0..4294967295"; } description "Total number of discarded frames."; } leaf error-frames { type uint32 { range "0..4294967295"; } description "Total number of error frames."; } leaf discarded-tlvs { type uint32 { range "0..4294967295"; } description "Total number of discarded TLVs."; } leaf unrecognized-tlvs { type uint32 { range "0..4294967295"; } description "Total number of unrecognized TLVs."; } leaf expired-neighbors { type uint32 { range "0..4294967295"; } description "Total number of expired neighbors."; } leaf transmitted-dcbx-tlvs { type uint32 { range "0..4294967295"; } description "Total number of transmitted DCBX TLVs."; } leaf received-dcbx-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received DCBX TLVs."; } leaf transmitted-med-tlvs { type uint32 { range "0..4294967295"; } description "Total number of transmitted MED TLVs."; } leaf received-med-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received MED TLVs."; } leaf received-network-card-id-tlvs { type uint32 { range "0..4294967295"; } description "Total number of received Network Card ID TLVs."; } leaf last-cleared-time { type yang:date-and-time; description "Time when LLDP statistics were last cleared."; } } // container statistics } // container session } // container sub-interface-lldp } } // module huawei-lldp
© 2023 YumaWorks, Inc. All rights reserved.