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.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/ietf-interfaces:interfaces/interface/huawei-poe:poe/enable |
Indicates that PoE is enabled. |
The value is of the Boolean type:
|
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:
|
NA |
/ietf-interfaces:interfaces/interface/huawei-poe:poe/conformance-to-std |
Indicates the PoE power supply mode. |
The value is of the enumerated type:
|
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:
|
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. |
NA |
/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:
|
NA |
/huawei-poe:get-poe-power-state/port-state/enable |
Indicates whether an interface has PoE enabled. |
The value is of the Boolean type:
|
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:
|
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:
|
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:
|
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:
|
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.
Operation |
XPATH |
---|---|
rpc |
/huawei-time-range:time-ranges/time-range/ |
Data requirement
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.
Operation |
XPATH |
---|---|
edit-config:create |
/ietf-interfaces:interfaces/interface/huawei-poe:poe/enable |
Data requirement
Item |
Data |
Description |
---|---|---|
PoE interface |
GigabitEthernet1/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>GigabitEthernet1/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 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.
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>1</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="1"]/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.
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>1</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="1"]/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.
Operation |
XPATH |
---|---|
get |
/huawei-poe:get-poe-power-state |
Data Requirements
Item |
Data |
Description |
---|---|---|
Interface name |
GigabitEthernet1/0/2 |
- |
<?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>GigabitEthernet1/0/2</huawei-poe:port-name> </huawei-poe:get-poe-power-state> </rpc>
<?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>GigabitEthernet1/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>
Item |
Data |
Description |
---|---|---|
Slot ID |
1 |
Display the PoE power supply status of all interfaces in the specified slot. |
<?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>1</huawei-poe:slot-id> </huawei-poe:get-poe-power-state> </rpc>
<?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>GigabitEthernet1/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>GigabitEthernet1/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>GigabitEthernet1/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>