To execute one CLI command at a time, use the cr_cli tool. This tool invokes the CLI in single-line command mode.
Single-line command mode accepts one command at a time as input. Each command submitted must be complete, you are not interactively prompted for the next input parameter. When operating in this mode, the Command Line Execution Client does not maintain a command history.
cr_cli commands can be stored in a file and called from a shell script. This feature is useful for repetitive tasks such as running execution plans, comparisons, or populating hosts.
The interactive command-line mode uses the Jython interpreter as its shell. When operating in this mode, the CLI offers you these advantages:
You can take advantage of the command history that is stored by the shell.
You can call the provisioning software commands from a Jython script.
You can create more powerful scripts for complex, repetitive operations.
From a server where the CLI Client is installed, type the command.
./cr_cli -cmd subsystem.object.command -u user -p password |
From a server where the CLI Client and Jython are installed, start the CLI Jython Interpreter.
./cr_clij |
Include the following code at the beginning of your script.
from clui import * app=PyCLUI() app.execStr(CLI command) App.close() |
The assignment app=PyCLUI() calls the CLI. The App.close() call deletes the instance of this Jython class.