This section provides a sample of configuring the power supply mode for PoE ports using the edit-config method.
Operation |
XPATH |
---|---|
edit-config | /ietf-interfaces:interfaces/interface/huawei-poe:poe/conformance-to-std |
Data Requirements
Item |
Data |
Description |
---|---|---|
PoE port | GigabitEthernet0/0/1 | Set the power supply mode of the PoE port to 802.3af. 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="3" 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:conformance-to-std>ieee8023af</huawei-poe:conformance-to-std> </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="3"> <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="3"> <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/conformance-to-std</error-info> </rpc-error> </rpc-reply>