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 |
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>