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).
Restoring the Factory Configuration

Restoring the Factory Configuration

This section describes the configuration model of restoring the factory configuration and provides examples of XML packets.

Data Model

The data model file matching factory configuration restoration is huawei-device.yang.

Table 2-69  Data model of factory configuration restoration

Object

Description

Value

Remarks

/huawei-device:restore-factory-config/enable

Delivers the factory configuration restoration operation.

The value is of the enumerated type:

true: Deliver the factory configuration restoration operation in one-click mode.

N/A

Restoring the Factory Configuration

This section provides a sample of restoring the factory configuration using the rpc method.

Table 2-70  Restoring the factory configuration

Operation

XPATH

rpc

/huawei-device:restore-factory-config/enable

Data requirement

Table 2-71  Delivering the factory configuration restoration operation in one-click mode

Item

Data

Description

Restoring the factory configuration

true

Delivering the factory configuration restoration operation in one-click mode.

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3537681e-dbfa-11e7-a47a-cc2cb373c439">
  <dev:restore-factory-config xmlns:dev="urn:huawei:params:xml:ns:yang:huawei-device">
    <dev:enable>true</dev:enable>
  </dev:restore-factory-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="3537681e-dbfa-11e7-a47a-cc2cb373c439">
  <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="3537681e-dbfa-11e7-a47a-cc2cb373c439">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>unknown-element</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-device:restore-factory-config/enable</error-path>
    <error-message>An unexpected element is present.(Invalid value "fasle" in "enable" element.).</error-message>
  </rpc-error>
</rpc-reply>
Translation
Download
Updated: 2018-09-01

Document ID: EDOC1100037962

Views: 6241

Downloads: 8

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