Database Reference
In-Depth Information
The verbs are named in a way that leaves little doubt as to what they do. Some of the names are short, such as
login and start_agent , and some very long, such as update_monitoring_creds_from_agent and
list_target_privilege_delegation_settings . This nomenclature has the benefit of making it relatively easy to
remember verbs as well as making it easy to look up a verb based on its functionality.
Modes
EM CLI is invoked in one of three different modes. The mode is the method of using EM CLI. The decision to use one
mode over another depends on the purpose and scope of the task.
Command-line
Prior to version 12.1.0.3, EM CLI operated in just one mode—command-line. In command-line mode, EM CLI
executes one verb per invocation of the emcli executable. There is no subshell or programming interface for
EM CLI in command-line mode. Any scripting of EM CLI needs to be done with a shell that can call individual EM CLI
commands and process the output.
Interactive
With the release of version 12.1.0.3, EM CLI now includes the classic command-line mode as well as interactive and
scripting modes. Interactive mode allows EM CLI to be invoked as a subshell of whatever terminal is being used.
When EM CLI is running in interactive mode, the prompt changes to a custom Python prompt:
cd $OMS_HOME/bin
./emcli
emcli>
Scripting
Scripting mode does not have a subshell or a prompt. In fact, it is very similar to command-line mode, except that its
invocation allows as its first parameter a script written in the Python-compatible programming language. This script
is then executed as if the commands were typed into interactive mode. EM CLI in scripting mode is invoked one time
but unlike while in command-line mode, the full functionality of the Python programming language can be used to
do everything for which a shell is required in command-line mode. In addition, scripting mode invokes EM CLI in its
native form, which makes things like parsing the output of commands much easier and more efficient, especially with
the use of JSON.
Help!
EM CLI has built-in help functionality. Getting a general list of available verbs for command-line mode is as
simple as executing EM CLI with the verb help . Be prepared for a large amount of data if you are not qualifying the
command with additional parameters. If you need additional information on a particular verb, add the verb as the
second parameter.
To use help in interactive mode, the help functionality is called by using a Python function called help() .
The help() function requires only one parameter—the help topic. The help topic can be a verb function as well as
certain verb function parameters. Be aware that there are help topics included in interactive mode that don't exist
 
Search WWH ::




Custom Search