No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S600-E V200R012C00 NETCONF YANG API Reference

This document describes the NETCONF YANG API functions supported by the switch, including the data model and samples.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
PoE Management

PoE Management

This section describes the configuration model of PoE management and provides examples of XML packets.

Data Model

The configuration model files matching PoE management are huawei-poe.yang and huawei-time-range.yang.

Table 2-90  PoE configuration

Object

Description

Value Remarks

/ietf-interfaces:interfaces/interface/huawei-poe:poe/enable

Indicates that PoE is enabled.

The value is of the Boolean type:
  • true: PoE is enabled.
  • false: PoE is disabled.

NA

/ietf-interfaces:interfaces/interface/huawei-poe:poe/time-range

Indicates the policy used in the PoE power-off time range.

The value is a character string.

The value must be an existing time range name on the device.

NA

/huawei-time-range:time-ranges/time-range/vsys

Indicates the Vsys name.

The value is a character string.

NA

/huawei-time-range:time-ranges/time-range/name

Indicates the name of policy used in the PoE power-off time range.

The value is a string of 1 to 32 characters.

NA

/huawei-time-range:time-ranges/time-range/period-time/start

Indicates the start time of the PoE power-off time range.

The value is a character string.

NA

/huawei-time-range:time-ranges/time-range/period-time/end

Indicates the end time of the PoE power-off time range.

The value is a character string.

NA

huawei-time-range:time-ranges/time-range/period-time/weekday

Indicates the PoE power-off time range. The time range is from Monday to Sunday.

The value can be:
  • sunday
  • monday
  • tuesday:
  • wednesday
  • thursday
  • friday
  • saturday

NA

/ietf-interfaces:interfaces/interface/huawei-poe:poe/fast-on-enable

Indicates whether fast power-on is enabled for PoE ports.

The value is of the Boolean type:
  • true: enable
  • false: disable

NA

/ietf-interfaces:interfaces/interface/huawei-poe:poe/conformance-to-std Indicates the PoE power supply mode. The value is of the enumerated type:
  • ieee8023at: the IEEE 802.3at mode.
  • ieee8023bt: the IEEE 802.3bt mode.
  • ieee8023af: the IEEE 802.3af mode.
  • ieee8023bt-pre: the IEEE 802.3bt compatible mode.

NA

/ietf-interfaces:interfaces/interface/huawei-poe:poe/poweron-legacy-level Indicates whether non-standard PD compatibility is enabled for PoE ports. The value is of the Boolean type:
  • normal: indicates that non-standard PD compatibility is disabled by default.
  • legacy: indicates that poe legacy enable is enabled.
  • force: indicates that poe force-power is enabled.

NA

/huawei-board:boards/board/huawei-poe:poe/reserved-power Indicates the reserved power of a PoE device. The value is an integer that ranges from 0 to 100, in percentage. NA
/huawei-board:boards/board/huawei-poe:poe/high-inrush-enable Indicates whether allowing high inrush current during power-on is enabled.
The value is of the Boolean type:
  • true: enable
  • false: disable

NA

/huawei-poe:get-poe-power-state/port-name

Indicates the interface name specified during the display of PoE information.

The value is a character string.

NA

/huawei-poe:get-poe-power-state/slot-id

Indicates the slot ID specified during the display of PoE information.

The value is a character string.

If no interface and slot ID are specified, PoE information of all interfaces on the device is displayed.

/huawei-poe:get-poe-power-state/port-state/port-name

Indicates the interface name for which PoE information is displayed.

The value is a character string.

NA

/huawei-poe:get-poe-power-state/port-state/port-index

Indicates the interface index for which PoE information is displayed.

The value is an integer.

NA

/huawei-poe:get-poe-power-state/port-state/power-state

Indicates whether an interface is providing power.

The value is of the enumerated type:
  • On: The interface is providing power.
  • Off: The interface is not providing power.

NA

/huawei-poe:get-poe-power-state/port-state/enable

Indicates whether an interface has PoE enabled.

The value is of the Boolean type:
  • enable: The interface has PoE enabled.
  • disable: The interface does not have PoE enabled.

NA

/huawei-poe:get-poe-power-state/port-state/fast-on

Indicates whether an interface has fast power-on enabled.

The value is of the Boolean type:
  • enable: The interface has fast power-on enabled.
  • disable: The interface does not have fast power-on enabled.

NA

/huawei-poe:get-poe-power-state/port-state/priority

Indicates the power supply priority of an interface.

The value is of the enumerated type:
  • low: lowest priority
  • high: second highest priority
  • critical: highest priority

NA

/huawei-poe:get-poe-power-state/port-state/status

Indicates the power supply status of an interface.

The value is of the enumerated type:
  • detecting: The interface is in detecting state.
  • disabled: indicates that PoE is disabled on the interface.
  • powered: Power-on is complete.
  • overloaded: The power is overloaded.
  • power-ready: The interface is ready to provide power.
  • unstable-voltage: The interface voltage is unstable.
  • power-deny: The reference power is higher than the maximum output power of the interface.
  • classification-overcurrent: The current of the PD connected to the interface exceeds the threshold.
  • unknown-class: The class of the PD is unknown.
  • power-overcurrent: The current of the PD exceeds the maximum current of the interface.
  • poweron-fail: Power-on fails.
  • powering: The interface is providing power.
  • time-range-poweroff: The interface is in the power-off time range.
  • test-mode: The interface is in testing state.
  • legacy-disable: PD compatibility check is disabled.
  • class-mismatch: The power class does not match.
  • chip-fault: The chip of the interface fails.

NA

/huawei-poe:get-poe-power-state/port-state/legacy

Indicates whether PD compatibility check has been enabled on an interface.

The value is of the enumerated type:
  • 0: PD compatibility check has not been enabled on the interface.
  • 1: PD compatibility check has been enabled on the interface.

NA

/huawei-poe:get-poe-power-state/port-state/class

Indicates the class of the PD connected to an interface.

The value is an integer that ranges from 0 to 4.

NA

/huawei-poe:get-poe-power-state/port-state/reference-power

Indicates the reference power of an interface.

The value is an integer, in mW.

NA

/huawei-poe:get-poe-power-state/port-state/max-power

Indicates the maximum output power of an interface.

The value is an integer, in mW.

NA

/huawei-poe:get-poe-power-state/port-state/power

Indicates the current output power of an interface.

The value is an integer, in mW.

NA

/huawei-poe:get-poe-power-state/port-state/peak-power

Indicates the peak output power of an interface.

The value is an integer, in mW.

NA

/huawei-poe:get-poe-power-state/port-state/average-power

Indicates the average output power of an interface.

The value is an integer, in mW.

NA

/huawei-poe:get-poe-power-state/port-state/current

Indicates the output current of an interface.

The value is an integer, in mA.

NA

/huawei-poe:get-poe-power-state/port-state/voltage

Indicates the output voltage of an interface.

The value is an integer, in V.

NA

Configuring PoE Power-Off Time Range

This section describes how to configure the PoE power-off time range using the rpc method.

Table 2-91  Configuring PoE power-off time range

Operation

XPATH

rpc

/huawei-time-range:time-ranges/time-range/

Data requirement

Table 2-92  Configuring PoE power-off time range

Item

Data

Description

Name of the policy used in the power-off time range

timerangege0/0/2

-

Start time of the power-off time range

8:00

End time of the power-off time range

18:00

Power-off weekdays

Monday to Friday

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-time-range:time-ranges xmlns:hw-time-range="urn:huawei:params:xml:ns:yang:huawei-time-range">
        <hw-time-range:time-range>
          <hw-time-range:vsys>public</hw-time-range:vsys>
          <hw-time-range:name>timerangege0/0/2</hw-time-range:name>
          <hw-time-range:period-time>
            <hw-time-range:start>8:0:0</hw-time-range:start>
            <hw-time-range:end>18:0:0</hw-time-range:end>
            <hw-time-range:weekday>monday</hw-time-range:weekday>
            <hw-time-range:weekday>tuesday</hw-time-range:weekday>
            <hw-time-range:weekday>wednesday</hw-time-range:weekday>
            <hw-time-range:weekday>thursday</hw-time-range:weekday>
            <hw-time-range:weekday>friday</hw-time-range:weekday>
          </hw-time-range:period-time>
        </hw-time-range:time-range>
      </hw-time-range:time-ranges>
    </config>
  </edit-config>
</rpc>

Response example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
  <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring Power-off time range on the PoE Interface

This section describes how to configure PoE power-off time range on interfaces using the create method.

Table 2-93  Configuring Power-off time range on the PoE Interface

Operation

XPATH

edit-config:create

/ietf-interfaces:interfaces/interface/huawei-poe:poe/enable

Data requirement

Table 2-94  Configuring Power-off time range on the PoE Interface

Item

Data

Description

PoE interface

GigabitEthernet0/0/2

Ensure that this interface exists and has been configured on the device. For details about the configuration, see Configuring Basic Attributes of an Interface.

Power-off time range on the PoE interface

timerangege0/0/2

Ensure that the power-off time range has been configured on the device.Configuring PoE Power-Off Time Range.

Request example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="9" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>GigabitEthernet0/0/2</if:name>
            <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-poe:poe xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
            <huawei-poe:enable>true</huawei-poe:enable>
            <huawei-poe:time-range>timerangege0/0/2</huawei-poe:time-range>
          </huawei-poe:poe>
        </if:interface>
      </if:interfaces>
    </config>
  </edit-config>
</rpc>

Response example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="9">
  <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message>parse rpc config error.</error-message>
  </rpc-error>
</rpc-reply>

Configuring Non-Standard PD Compatibility for PoE Ports

This section provides a sample of configuring non-standard PD compatibility for PoE ports using the edit-config method.

Table 2-95  Configuring non-standard PD compatibility for PoE ports

Operation

XPATH

edit-config /ietf-interfaces:interfaces/interface/huawei-poe:poe/poweron-legacy-level

Data Requirements

Table 2-96  Configuring non-standard PD compatibility for PoE ports

Item

Data

Description

PoE port GigabitEthernet0/0/1 Configure forcible power supply for the PoE port.

Ensure that this interface exists and has been configured on the device. For details about the configuration, see Configuring Basic Attributes of an Interface.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <edit-config>
  <target>
   <running/>
  </target>
  <config>
   <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <if:interface>
     <if:name>GigabitEthernet0/0/1</if:name>
      <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
     <huawei-poe:poe xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
      <huawei-poe:poweron-legacy-level>force</huawei-poe:poweron-legacy-level>
     </huawei-poe:poe>
    </if:interface>
   </if:interfaces>
  </config>
 </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="1">
 <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="1">
 <rpc-error>
  <error-app-tag>-1</error-app-tag>
  <error-message>Service
process failed.</error-message>
  <error-info>Error on node /ietf-interfaces:interfaces/interface[name="GigabitEthernet0/0/1"]/huawei-poe:poe/poweron-legacy-level</error-info>
 </rpc-error>
</rpc-reply>

Configuring the Reserved Power for a PoE Device

This section provides a sample of configuring the reserved power for a PoE device using the edit-config method.

Table 2-97  Configuring the reserved PoE power

Operation

XPATH

edit-config /huawei-board:boards/board/huawei-poe:poe/reserved-power

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <edit-config>
  <target>
   <running/>
  </target>
  <config>
   <board:boards
xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
    <board:board>
     <board:name>0</board:name>
     <huawei-poe:poe
xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
      <huawei-poe:reserved-power>10</huawei-poe:reserved-power>
     </huawei-poe:poe>
    </board:board>
   </board:boards>
  </config>
 </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="5">
 <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="5">
 <rpc-error>
  <error-app-tag>-1</error-app-tag>
  <error-message>Service
process failed.</error-message>
  <error-info>Error on node /huawei-board:boards/board[name="0"]/huawei-poe:poe/reserved-power</error-info>
 </rpc-error>
</rpc-reply>

Allowing High Inrush Current

This section provides a sample of allowing high inrush current using the edit-config method.

Table 2-98  Allowing high inrush current

Operation

XPATH

edit-config /huawei-board:boards/board/huawei-poe:poe/high-inrush-enable

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <edit-config>
  <target>
   <running/>
  </target>
  <config>
   <board:boards
xmlns:board="urn:huawei:params:xml:ns:yang:huawei-board">
    <board:board>
     <board:name>0</board:name>
     <huawei-poe:poe
xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
      <huawei-poe:high-inrush-enable>true</huawei-poe:high-inrush-enable>
     </huawei-poe:poe>
    </board:board>
   </board:boards>
  </config>
 </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="6">
 <ok/>
</rpc-reply>

Sample of failed response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="6">
 <rpc-error>
  <error-app-tag>-1</error-app-tag>
  <error-message>Service
process failed.</error-message>
  <error-info>Error on node /huawei-board:boards/board[name="0"]/huawei-poe:poe/high-inrush-enable</error-info>
 </rpc-error>
</rpc-reply>

Displaying PoE Power Supply Status

This section provides a sample of obtaining the PoE power supply status using the get method.

Table 2-99  Displaying PoE power supply status

Operation

XPATH

get

/huawei-poe:get-poe-power-state

Data Requirements

Table 2-100  Displaying PoE power supply status based on interfaces

Item

Data

Description

Interface name

GigabitEthernet0/0/2

-

Request Example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <huawei-poe:get-poe-power-state xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
    <huawei-poe:port-name>GigabitEthernet0/0/2</huawei-poe:port-name>
  </huawei-poe:get-poe-power-state>
</rpc>
Response Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <data>
    <get-poe-power-state xmlns="urn:huawei:params:xml:ns:yang:huawei-poe">
      <ports-state>
        <port-state>
          <port-name>GigabitEthernet0/0/2</port-name>
          <port-index>8</port-index>
          <power-state>off</power-state>
          <enable>enable</enable>
          <fast-on>disable</fast-on>
          <priority>low</priority>
          <status>detecting</status>
          <legacy>0</legacy>
          <class>0</class>
          <reference-power>0</reference-power>
          <max-power>30000</max-power>
          <power>0</power>
          <peak-power>0</peak-power>
          <average-power>0</average-power>
          <current>0</current>
          <voltage>0</voltage>
        </port-state>
      </ports-state>
    </get-poe-power-state>
  </data>
</rpc-reply>
Table 2-101  Displaying PoE power supply status based on slot IDs

Item

Data

Description

Slot ID

0

Display the PoE power supply status of all interfaces in the specified slot.

Request Example
<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <huawei-poe:get-poe-power-state xmlns:huawei-poe="urn:huawei:params:xml:ns:yang:huawei-poe">
    <huawei-poe:slot-id>0</huawei-poe:slot-id>
  </huawei-poe:get-poe-power-state>
</rpc>
Response Example
<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <data>
    <get-poe-power-state xmlns="urn:huawei:params:xml:ns:yang:huawei-poe">
      <ports-state>
        <port-state>
          <port-name>GigabitEthernet0/0/1</port-name>
          <port-index>7</port-index>
          <power-state>off</power-state>
          <enable>disable</enable>
          <fast-on>disable</fast-on>
          <priority>low</priority>
          <status>disabled</status>
          <legacy>0</legacy>
          <class>0</class>
          <reference-power>0</reference-power>
          <max-power>30000</max-power>
          <power>0</power>
          <peak-power>0</peak-power>
          <average-power>0</average-power>
          <current>0</current>
          <voltage>0</voltage>
        </port-state>
        <port-state>
          <port-name>GigabitEthernet0/0/2</port-name>
          <port-index>8</port-index>
          <power-state>off</power-state>
          <enable>enable</enable>
          <fast-on>disable</fast-on>
          <priority>low</priority>
          <status>detecting</status>
          <legacy>0</legacy>
          <class>0</class>
          <reference-power>0</reference-power>
          <max-power>30000</max-power>
          <power>0</power>
          <peak-power>0</peak-power>
          <average-power>0</average-power>
          <current>0</current>
          <voltage>0</voltage>
        </port-state>
        <port-state>
          <port-name>GigabitEthernet0/0/3</port-name>
          <port-index>9</port-index>
          <power-state>off</power-state>
          <enable>enable</enable>
          <fast-on>disable</fast-on>
          <priority>low</priority>
          <status>detecting</status>
          <legacy>0</legacy>
          <class>0</class>
          <reference-power>0</reference-power>
          <max-power>30000</max-power>
          <power>0</power>
          <peak-power>0</peak-power>
          <average-power>0</average-power>
          <current>0</current>
          <voltage>0</voltage>
        </port-state>
        ............
      </ports-state>
    </get-poe-power-state>
  </data>
</rpc-reply>
Translation
Download
Updated: 2018-09-01

Document ID: EDOC1100037962

Views: 7245

Downloads: 8

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next