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).
Cloud-based Management

Cloud-based Management

This module describes how to configure PNP VLAN auto-negotiation and query PNP VLAN information.

Data Model

The data model files matching PNP VLAN auto-negotiation are huawei-pnp-management.yang and huawei-lldp.yang.

Table 2-124  PNP VLAN auto-negotiation

Object

Description

Value Remarks

/huawei-pnp-management:pnp-config/startup-vlan/send-enable

Indicates whether the function of transmitting the PNP VLAN to a downstream device is enabled.

The value is of the Boolean type:
  • true: The function of transmitting the PNP VLAN to a downstream device is enabled.
  • false: The function of transmitting the PNP VLAN to a downstream device is disabled.

The default value is false.

NA

/huawei-pnp-management:pnp-config/startup-vlan/receive-enable

Indicates whether a downstream device is enabled to receive the PNP VLAN negotiation packets sent by an upstream device.

The value is of the Boolean type:
  • true: A downstream device is enabled to receive the PNP VLAN negotiation packets sent by an upstream device.
  • false: A downstream device is disabled from receiving the PNP VLAN negotiation packets sent by an upstream device.

The default value is true.

NA

/huawei-pnp-management:pnp-config/startup-vlan/send-vlan-id

Configures a PNP VLAN ID.

The value is an integer that ranges from 1 to 4094.

By default, no PNP VLAN ID is configured.

NA

/ietf-interfaces:interfaces/interface/huawei-pnp-management:pnp/startup-link-aggregation/send-enable

Indicates whether the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device is enabled.

The value is of the Boolean type:
  • true: The function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device is enabled.
  • false: The function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device is disabled.

The default value is false.

NA

/ietf-interfaces:interfaces/interface/huawei-lldp:lldp/tlv/legacy/tlvs/enable

Indicates whether the function of sending LLDP packets containing PNP VLAN information to a downstream device is enabled.

The value is of the Boolean type:
  • true: The function of sending LLDP packets containing PNP VLAN information to a downstream device is enabled.
  • false: The function of sending LLDP packets containing PNP VLAN information to a downstream device is disabled.

The default value is true.

NA

/huawei-pnp-management:pnp-state/startup-vlan/receive-vlan-id

Indicates the PNP VLAN negotiated with an upstream device.

The value is an integer that ranges from 1 to 4094.

These objects are used to query information during a Get operation.

/huawei-pnp-management:pnp-state/uplinks/uplink/name

Indicates the interface connected to an upstream device.

The value is a character string, indicating an interface name.

/huawei-pnp-management:pnp-state/uplinks/uplink/lag-negotiation

Indicates whether an upstream device needs to auto-negotiate an Eth-Trunk.

The value is of the Boolean type:
  • true: The upstream device needs to auto-negotiate an Eth-Trunk.
  • false: The upstream device does not need to auto-negotiate an Eth-Trunk.

/huawei-pnp-management:pnp-state/uplinks/uplink/lacp-negotiation

Indicates whether an upstream device needs to auto-negotiate the LACP mode of an Eth-Trunk.

The value is of the Boolean type:
  • true: The upstream device needs to auto-negotiate the LACP mode of an Eth-Trunk.
  • false: The upstream device does not need to auto-negotiate the LACP mode of an Eth-Trunk.

/huawei-pnp-management:pnp-state/uplinks/uplink/assign-interface

Indicates the local device's physical member port added to an uplink Eth-Trunk interface.

The value is a character string, indicating an interface name.

Configuring PNP VLAN Auto-Negotiation

This section describes how to configure PNP VLAN auto-negotiation using the config method.

Table 2-125  Configuring PNP VLAN auto-negotiation

Operation

XPATH

edit-config:config

/huawei-pnp-management:pnp-config

/ietf-interfaces:interfaces/interface/huawei-pnp-management:pnp

/ietf-interfaces:interfaces/interface/huawei-lldp:lldp/tlv/legacy

Data Requirements 1

Table 2-126  Configuring PNP VLAN auto-negotiation

Item

Data

Description

Enabling the function of transmitting the PNP VLAN to a downstream device

true

-

Enabling a downstream device to receive the PNP VLAN negotiation packets sent by an upstream device

true

-

Configuring a PNP VLAN ID

3

A VLAN needs to be created first.

Enabling the function of sending LLDP packets containing PNP VLAN information to a downstream device

true

-

Enabling the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device

true

-

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>
      <huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <huawei-vlan:vlan>
          <huawei-vlan:id>3</huawei-vlan:id>
        </huawei-vlan:vlan>
      </huawei-vlan:vlans>
          <huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <huawei-pnp-management:startup-vlan>
          <huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
          <huawei-pnp-management:receive-enable>true</huawei-pnp-management:receive-enable>
          <huawei-pnp-management:send-vlan-id>3</huawei-pnp-management:send-vlan-id>
        </huawei-pnp-management:startup-vlan>
      </huawei-pnp-management:pnp-config>
           <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
        <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-lldp:lldp xmlns:huawei-lldp="urn:huawei:params:xml:ns:yang:huawei-lldp">
            <huawei-lldp:tlv>
              <huawei-lldp:legacy>
                <huawei-lldp:tlvs>
                  <huawei-lldp:type>huawei-lldp:tlv-legacy-pnp</huawei-lldp:type>
                  <huawei-lldp:enable>true</huawei-lldp:enable>
                </huawei-lldp:tlvs>
              </huawei-lldp:legacy>
            </huawei-lldp:tlv>
          </huawei-lldp:lldp>
        </if:interface>
     <if:interface>
          <if:name>Eth-Trunk1</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-pnp-management:pnp xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management">
            <huawei-pnp-management:startup-link-aggregation>
              <huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
            </huawei-pnp-management:startup-link-aggregation>
          </huawei-pnp-management:pnp>
        </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>The VLAN is not created.</error-message>
    <error-info>Error on node /huawei-pnp-management:pnp-config/startup-vlan/send-vlan-id</error-info>
  </rpc-error>
</rpc-reply> 

Data Requirements 2

Table 2-127  Changing a PNP VLAN ID

Item

Data

Description

PNP VLAN ID

4

Change the PNP VLAN ID from 3 to 4.

Replacement Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">
        <huawei-vlan:vlan>
          <huawei-vlan:id>4</huawei-vlan:id>
        </huawei-vlan:vlan>
      </huawei-vlan:vlans>
        <huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="replace">
        <huawei-pnp-management:startup-vlan>
          <huawei-pnp-management:send-vlan-id>4</huawei-pnp-management:send-vlan-id>
        </huawei-pnp-management:startup-vlan>
      </huawei-pnp-management:pnp-config>
    </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="2">
  <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="2">
  <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>

Data Requirements 3

Table 2-128  Deleting the PNP VLAN auto-negotiation configuration

Item

Data

Description

Enabling the function of transmitting the PNP VLAN to a downstream device

true

-

Enabling a downstream device to receive the PNP VLAN negotiation packets sent by an upstream device

true

Configuring a PNP VLAN ID

4

Enabling the function of sending LLDP packets containing PNP VLAN information to a downstream device

true

Enabling the function of transmitting the flag indicating whether to establish an Eth-Trunk to a downstream device

true

Deletion 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>
      <huawei-vlan:vlans xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <huawei-vlan:vlan xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
          <huawei-vlan:id>4</huawei-vlan:id>
        </huawei-vlan:vlan>
      </huawei-vlan:vlans>
           <huawei-pnp-management:pnp-config xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
        <huawei-pnp-management:startup-vlan>
          <huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
          <huawei-pnp-management:receive-enable>true</huawei-pnp-management:receive-enable>
          <huawei-pnp-management:send-vlan-id>4</huawei-pnp-management:send-vlan-id>
        </huawei-pnp-management:startup-vlan>
      </huawei-pnp-management:pnp-config>
           <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces" xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete">
        <if:interface>
          <if:name>GigabitEthernet0/0/5</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-lldp:lldp xmlns:huawei-lldp="urn:huawei:params:xml:ns:yang:huawei-lldp">
            <huawei-lldp:tlv>
              <huawei-lldp:legacy>
                <huawei-lldp:tlvs>
                  <huawei-lldp:type>huawei-lldp:tlv-legacy-pnp</huawei-lldp:type>
                  <huawei-lldp:enable>true</huawei-lldp:enable>
                </huawei-lldp:tlvs>
              </huawei-lldp:legacy>
            </huawei-lldp:tlv>
          </huawei-lldp:lldp>
        </if:interface>
     <if:interface>
          <if:name>Eth-Trunk3</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-pnp-management:pnp xmlns:huawei-pnp-management="urn:huawei:yang:huawei-pnp-management">
            <huawei-pnp-management:startup-link-aggregation>
              <huawei-pnp-management:send-enable>true</huawei-pnp-management:send-enable>
            </huawei-pnp-management:startup-link-aggregation>
          </huawei-pnp-management:pnp>
        </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-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>

Querying PNP VLAN Auto-Negotiation Information

This section provides a sample of querying PNP VLAN auto-negotiation information using the get method.

Table 2-129  Querying PNP VLAN auto-negotiation information

Operation

XPATH

get

/huawei-pnp-management:pnp-state

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get>
    <filter type="subtree">
      <pnpm:pnp-state xmlns:pnpm="urn:huawei:yang:huawei-pnp-management"/>
    </filter>
  </get>
</rpc>

Response Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
  <data>
    <pnp-state xmlns="urn:huawei:yang:huawei-pnp-management">
      <startup-vlan>
        <receive-vlan-id>100</receive-vlan-id>
      </startup-vlan>
      <uplinks>
        <uplink>
          <name>Eth-Trunk0</name>
          <lag-negotiation>true</lag-negotiation>
          <lacp-negotiation>true</lacp-negotiation>
          <assign-interface>GigabitEthernet0/0/10</assign-interface>
          <assign-interface>GigabitEthernet0/0/12</assign-interface>
        </uplink>
      </uplinks>
    </pnp-state>
  </data>
</rpc-reply>
Translation
Download
Updated: 2018-09-01

Document ID: EDOC1100037962

Views: 6273

Downloads: 8

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