Parameter |
Description |
Value |
---|---|---|
file-name |
Specifies the directory and file name of the Python script to be installed.
|
The value is a string of 4 to 64 case-insensitive characters without any spaces. The file name extension of a Python script file is .py. NOTE:
file-name cannot be set to the name of a built-in Python script file, including ConfigParser.py, copy_reg.py, locale.py, sre.py, Queue.py, decimal.py, macurl2path.py, sre_compile.py, StringIO.py, dis.py, modulefinder.py, sre_constants.py, UserDict.py, dummy_thread.py, ntpath.py, sre_parse.py, UserList.py, dummy_threading.py, nturl2path.py, stat.py, UserString.py, filecmp.py, numbers.py, string.py, __future__.py, fileinput.py, opcode.py, stringold.py, _abcoll.py, fnmatch.py, os.py, struct.py, _pyio.py, formatter.py, os2emxpath.py, subprocess.py, _strptime.py, fractions.py, pickle.py, sysconfig.py, _threading_local.py, functools.py, pkgutil.py, textwrap.py, _weakrefset.py, genericpath.py, platform.py, threading.py, abc.py, getopt.py, posixpath.py, token.py, argparse.py, getpass.py, pprint.py, tokenize.py, atexit.py, gettext.py, re.py, trace.py, base64.py, glob.py, repr.py, traceback.py, bisect.py, heapq.py, runpy.py, types.py, calendar.py, imputil.py, sched.py, user.py, codecs.py, inspect.py, sets.py, warnings.py, collections.py, io.py, shutil.py, weakref.py, contextlib.py, keyword.py, site.py, xmllib.py, copy.py, linecache.py, socket.py, _cli.py, _device.py, _frame.py, _route.py, _timer.py, _common.py, _environment.py, _iclog.py, _snmp.py, _trap.py, _context.py, _farg.py, _lldp.py, _terminal.py, and ops.py. |
destination directory |
Specifies the installation directory of a script. |
The value is a string of 1 to 64 case-insensitive characters without any spaces. If this parameter is not specified, the script will be installed in $_user. If this parameter is specified, the script will be installed in $_user/directory. If the directory name does not exist, a directory will be created. NOTE:
The total length of file-name and the installation directory of the script cannot exceed 118. The total length refers to the storage path + $_user + directory name + file name. The installation directory of the script cannot be huawei_pys. The depth of the path specified by directory cannot exceed three levels. |
Usage Scenario
OPS allows you to run the scripts you make. A script can be executed after the script assistant is configured. Before configuring a script assistant, install the script.
To check information about the scripts installed in $_user, run the dir (user view) command.
Precautions
# Install the script file config.py in the flash: root directory to the default flash:/$_user.
<HUAWEI> ops install file config.py
# Install the script file config.py in the flash: root directory to the specified flash:/$_user/user.
<HUAWEI> ops install file config.py destination user
# Install the script file config.py in the flash:/admin directory to the default flash:/$_user.
<HUAWEI> ops install file admin/config.py