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 V200R011C10 NETCONF YANG API Reference

This document describes the NETCONF 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

Data Model

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

Table 2-81  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: that non-standard PD compatibility is disabled by default.
  • legacy: that poe legacy enable is enabled.
  • force: 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

Configuring PoE Power-Off Time Range

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

Table 2-82  Configuring PoE power-off time range

Operation

XPATH

rpc

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

Data requirement

Table 2-83  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-84  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-85  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:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift: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-86  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-87  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:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift: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-88  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-89  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>
Translation
Download
Updated: 2019-09-23

Document ID: EDOC1000178028

Views: 4896

Downloads: 0

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