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

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
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).
System Configuration File

System Configuration File

Data Model

The data model file matching system startup and upgrade is huawei-device.yang.

Table 3-2073 Data model

Object

Description

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

Restarts the device (after a delay of 2 seconds). The value is of the Boolean type, and can be true or false.

huawei-device:set-factory-config-file/type

Sets the type of the factory default configuration file. The value is of the enumerated type and can be factory-default-config, factory-current-config, or factory-pre-config.

huawei-device:set-factory-config-file/file-name

Sets the name of the factory default configuration file. The value is a string of 1 to 128 case-sensitive characters without spaces.

huawei-device:restore-factory-config/input/keep-service-configuration

Saves the factory default configuration. The value is of the Boolean type, and can be true or false.

Restarting the Device

This section provides a sample of restarting the device.

Data Requirements
Table 3-2074 Restarting the device

Item

Data

Description

Whether the device restarts (after a delay of 2 seconds)

true

When receiving the specified packet, the device restarts after a delay of 2 seconds.

Request Example
<rpc message-id="60123dfb19564e2691afe95b31498743" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> 
 <restore-factory-config xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
  <enable>true</enable> 
 </restore-factory-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="60123dfb19564e2691afe95b31498743"> 
 <ok/> 
</rpc-reply>  

Specifying User-defined Configurations as Factory Settings

This section provides a sample of specifying user-defined configurations as factory settings.

Table 3-2075 Specifying user-defined configurations as factory settings

Operation

XPATH

edit-config:default

/huawei-device:set-factory-config-file/

Data Requirements
Table 3-2076 Specifying user-defined configurations as factory settings

Item

Data

Description

Name of the factory default configuration file

huawei.cfg

Configure the user-defined configuration file huawei.cfg as the factory default configuration file.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <edit-config> 
  <target> 
 <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config> 
 <set-factory-config-file xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <file-name xmlns:x="urn:huawei:params:xml:ns:yang:huawei-device">huawei.cfg</file-name> 
 </set-factory-config-file> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <ok/> 
</rpc-reply>  

Specifying Current Configurations as Factory Settings

This section provides a sample of specifying current configurations as factory settings.

Table 3-2077 Specifying current configurations as factory settings

Operation

XPATH

edit-config:default

/huawei-device:set-factory-config-file/

Data Requirements
Table 3-2078 Specifying current configurations as factory settings

Item

Data

Description

Type of the factory default configuration file

factory-current-config

Specify current configurations as factory settings.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <edit-config> 
  <target> 
 <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config> 
 <set-factory-config-file xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <type xmlns:x="urn:huawei:params:xml:ns:yang:huawei-device">factory-current-config</type> 
 </set-factory-config-file> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <ok/> 
</rpc-reply>  

Restoring Default Settings to Factory Settings

This section provides a sample of restoring default settings to factory settings.

Table 3-2079 Restoring default settings to factory settings

Operation

XPATH

edit-config: default

/huawei-device:set-factory-config-file/

Data Requirements
Table 3-2080 Restoring default settings to factory settings

Item

Data

Description

Type of factory configuration files

factory-default-config

Delete other configuration files from the device and use the default configuration file as the factory configuration file.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config> 
   <set-factory-config-file xmlns="urn:huawei:params:xml:ns:yang:huawei-device"> 
    <type xmlns:x="urn:huawei:params:xml:ns:yang:huawei-device">factory-default-config</type>
   </set-factory-config-file> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b"> 
 <ok/> 
</rpc-reply>  

Restoring the Pre-configuration to Factory Settings

This section provides a sample of restoring the pre-configuration to factory settings.

Table 3-2081 Restoring the pre-configuration to factory settings

Operation

XPATH

edit-config:default

/huawei-device:set-factory-config-file/

Data Requirements
Table 3-2082 Restoring the pre-configuration to factory settings

Item

Data

Description

Type of the factory default configuration file

factory-pre-config

Restore the pre-configuration to factory settings.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config>
   <set-factory-config-file xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
    <type xmlns:x="urn:huawei:params:xml:ns:yang:huawei-device">factory-pre-config</type>
   </set-factory-config-file>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="79a0a3dc-bd2a-49e8-92b9-145153f13b2b">
 <ok/>
</rpc-reply>   

Restoring to the Deployment Configuration

This section provides a sample of restoring to the deployment configuration.

Table 3-2083 Restoring to the deployment configuration

Operation

XPATH

edit-config:default

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

huawei-device:restore-factory-config/input/keep-service-configuration

Data Requirements
Table 3-2084 Restoring to the deployment configuration

Item

Data

Description

Whether to save the factory default configuration file

false

Restore the pre-configuration to factory settings.

Request Example
<rpc message-id="60123dfb19564e2691afe95b31498743" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
 <restore-factory-config xmlns="urn:huawei:params:xml:ns:yang:huawei-device">
  <input>
   <enable>true</enable>
   <keep-service-configuration>false</keep-service-configuration>
  </input>
 </restore-factory-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="60123dfb19564e2691afe95b31498743">
 <ok/>
</rpc-reply>  
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 8337

Downloads: 69

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