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).
OPS

OPS

NOTE:

The AR1220, AR1220V, AR1220W, AR1220VW, and AR1220L do not support OPS.

Data Model

The data model file matching OPS is huawei-ops.yang.

Table 3-2246 Data model

Object

Description

/huawei-ops:installOpsApplication/fileName

Indicates the name of the OPS script file to be installed. The value is a string of 1 to 64 case-sensitive characters without spaces. The file name extension of a Python script is .py.

NOTE:

fileName cannot be set to the file name of a built-in Python script, including the following: cli.py, context.py, environment.py, farg.py, frame.py, iclog.py, interface.py, nqa.py, ops.py, route.py, snmp.py, spr.py, terminal.py, timer.py, trap.py, site.py, os.py, posixpath.py, stat.py, genericpath.py, warnings.py, linecache.py, types.py, UserDict.py, _abcoll.py, abc.py, _weakrefset.py, copy_reg.py, traceback.py, sysconfig.py, re.py, sre_compile.py, sre_parse.py, sre_constants.py, getopt.py, io.py, _pyio.py, __builtin__.py, __main__.py, _ast.py, _codecs.py, _ops.py, _sre.py, _symtable.py, _warnings.py, _weakref.py, errno.py, exceptions.py, gc.py, imp.py, marshal.py, posix.py, pwd.py, signal.py, sys.py, thread.py, xxsubtype.py, and zipimport.py.

/huawei-ops:uninstallOpsApplication/fileName

Indicates the name of the OPS script file to be uninstalled. The value is a string of 1 to 64 case-sensitive characters without spaces and can contain the file path.

If a script file in a specified installation directory needs to be deleted, the file name is directory/filename, where directory specifies the script installation directory.

/huawei-ops:ops/assistant/scriptAssistants/scriptAssistant/name

Indicates an assistant name, namely, a Python script name for an assistant. The value is a string of 1 to 118 case-sensitive characters without spaces. The file name extension of a Python script is .py.

NOTE:

This parameter cannot be set to the file name of a built-in Python script, including the following: cli.py, context.py, environment.py, farg.py, frame.py, iclog.py, interface.py, nqa.py, ops.py, route.py, snmp.py, spr.py, terminal.py, timer.py, trap.py, site.py, os.py, posixpath.py, stat.py, genericpath.py, warnings.py, linecache.py, types.py, UserDict.py, _abcoll.py, abc.py, _weakrefset.py, copy_reg.py, traceback.py, sysconfig.py, re.py, sre_compile.py, sre_parse.py, sre_constants.py, getopt.py, io.py, _pyio.py, __builtin__.py, __main__.py, _ast.py, _codecs.py, _ops.py, _sre.py, _symtable.py, _warnings.py, _weakref.py, errno.py, exceptions.py, gc.py, imp.py, marshal.py, posix.py, pwd.py, signal.py, sys.py, thread.py, xxsubtype.py, and zipimport.py.

/huawei-ops:ops/assistant/scriptAssistants/scriptAssistant/shutdown

Indicates disables the maintenance assistant function. The value is of the Boolean type and can be true or false. The value true indicates that the maintenance assistant function is disenabled, whereas the value false indicates that the maintenance assistant function is enabled. By default, the maintenance assistant function is enabled.

OPS Script Installation and Uninstallation

Installing an OPS Script

This section provides a sample of installing an OPS script.

Table 3-2247 Installing an OPS script

Operation

XPATH

edit-config:default

/huawei-ops:installOpsApplication/fileName

Data Requirements
Table 3-2248 Installing an OPS script

Item

Data

Description

Name of the OPS script file to be installed

config.py

Install the OPS script named config.py to the device.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">        
 <installOpsApplication xmlns="urn:huawei:params:xml:ns:yang:huawei-ops">            
  <fileName>config.py</fileName>        
 </installOpsApplication>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> 
  <ok/> 
</rpc-reply> 
Uninstalling an OPS Script

This section provides a sample of uninstalling an OPS script.

Table 3-2249 Uninstalling an OPS script

Operation

XPATH

edit-config:default

/huawei-ops:uninstallOpsApplication/fileName

Data Requirements
Table 3-2250 Uninstalling an OPS script

Item

Data

Description

Name of the OPS script file to be uninstalled

config.py

Uninstall the OPS script named config.py.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> 
 <uninstallOpsApplication xmlns="urn:huawei:params:xml:ns:yang:huawei-ops"> 
  <fileName>config.py</fileName> 
 </uninstallOpsApplication>
</rpc>
Response Example

Sample of successful response

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

OPS Assistant Installation and Uninstallation

Installing an OPS Assistant

This section provides a sample of installing an OPS assistant.

Table 3-2251 Installing an OPS assistant

Operation

XPATH

edit-config:default

/huawei-ops:ops/assistant/scriptAssistants/scriptAssistant/name

Data Requirements
Table 3-2252 Installing an OPS assistant

Item

Data

Description

Assistant name

config.py

Configure an assistant for the script config.py.

Disable the maintenance assistant function

false

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <ops xmlns="urn:huawei:params:xml:ns:yang:huawei-ops">
    <assistant>
     <scriptAssistants>
      <scriptAssistant>
       <name>config.py</name>
       <shutdown>false</shutdown>
      </scriptAssistant>
     </scriptAssistants>
    </assistant>
   </ops>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a"> 
  <ok/> 
</rpc-reply> 
Uninstalling an OPS Assistant

This section provides a sample of uninstalling an OPS assistant.

Table 3-2253 Uninstalling an OPS assistant

Operation

XPATH

edit-config:default

/huawei-ops:uninstallOpsApplication/fileName

Data Requirements
Table 3-2254 Uninstalling an OPS assistant

Item

Data

Description

Name of the assistant to be uninstalled

config.py

Uninstall an assistant for the script config.py.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_446de75a3e3244338e34ab6a215fa64a">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <ops xmlns="urn:huawei:params:xml:ns:yang:huawei-ops" xc:operation="remove">
    <assistant>
     <scriptAssistants>
      <scriptAssistant>
       <name>config.py</name>
      </scriptAssistant>
     </scriptAssistants>
    </assistant>
   </ops>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

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

Document ID: EDOC1100022096

Views: 8230

Downloads: 69

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