CLI-Script and CLI-Shell
Overview
The cli-script and cli-shell feature provides command automation and system command execution within the OcNOS command-line interface.
The cli-script function supports creation of script files that contain configuration mode and execution mode commands. These scripts can be executed in execution mode to apply the defined commands and store the resulting configuration on the system.
The cli-shell function enables execution of Linux bash commands directly from execution mode through the CLI.
Feature Characteristics
|
•
|
Supports creation of cli-script files using the cli-script file-name command. |
|
•
|
Accepts configuration mode and execution mode commands as script input. |
|
•
|
Supports execution control through delay and message commands. |
|
•
|
Provides configurable behavior for error handling during script execution. |
|
•
|
Allows execution of linux bash commands using the exec-shell linux command interface. |
|
•
|
Stores cli-script files persistently on the file system. |
Benefits
|
•
|
Enables automation of operational and configuration workflows. |
|
•
|
Simplifies application of repetitive or grouped configuration changes. |
|
•
|
Reduces manual configuration effort and execution time. |
|
•
|
Provides controlled access to system-level commands from the CLI. |
Limitations
|
•
|
Editing an existing cli-script is not supported through the CLI. |
|
•
|
Modifying a script requires deleting and recreating the cli-script file. |
|
•
|
Built-in linux shell commands are not supported through the exec-shell interface. |
|
•
|
Improper use of cli-shell commands may affect system stability. |