Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- Server Automation Platform
SA CLI methods
End-users access SA through the SA Client. At times, advanced users need to access SA in a command-line environment to perform bulk operations or repetitive tasks on multiple servers. In SA, the command-line environment consists of the Global Shell (OGSH), Global File System (OGFS), and SA Command-Line Interface (CLI) methods.
To perform SA operations from the command line, you invoke the SA CLI methods from within an OGSH session. An SA CLI method is an executable in the OGFS that corresponds to a method in the SA API. When you run an SA CLI method, the underlying API method is invoked.
To understand this section, you should be familiar with the OGSH and the OGFS. For more information, see the OGSH in the Server Automation Using Guide on the HPE SSO portal.
For information on the oupload
and odownload
commands, see the OCLI 1.0 in the Server Automation Using Guide on the HPE SSO portal.
Method invocation
As shown in the following figure, when you invoke an SA CLI method in an OGSH session, the following operations occur:
- The OGSH parses the command and parameters you entered to determine the API method.
- The OGSH invokes the underlying API method.
- An authorization check verifies that the user has permission to perform this operation. SA then performs the operation.
- The API method passes the results back to the SA CLI method.
- The SA CLI method writes the return value to the
stdout
of the OGSH session. If an exception was thrown, the SA CLI method returns a non-zero status.
Overview of an SA CLI method invocation
Security
SA CLI methods use the same authentication and authorization mechanisms as the SA Client. When you start an OGSH session, SA authenticates your SA user. When you run an SA CLI method, authorization is performed. To run an SA CLI method successfully, your SA user must belong to a group that has the required permissions. For more information on security, see the Server Automation
Mapping between API and SA CLI methods
The OGFS represents SA objects as directory structures, object attributes as text files, and API methods as executables. These executables are the SA CLI methods. Every SA CLI method matches an underlying API method. The method name, parameters, and return value are the same for both types of methods.
For example, the setCustomer
API method has the following Java signature:
public void setCustomer(ServerRef self,
CustomerRef customer)...
In the OGFS, the corresponding SA CLI method has the following syntax:
setCustomer self:i=server-id customer:i=customer-id
Note that the parameter names, self
and customer
, are the same in both languages. (The :i
notations are called format specifiers, which are discussed later in this section.) In this example, the return type is void, so the SA CLI method does not write the result to the stdout
. For information on how SA CLI methods return strings that represent objects, see Return values .
Differences between SA CLI methods and Unix commands
Although you can run both Unix commands and SA CLI methods in the OGSH, SA CLI methods differ in several ways:
- Unlike many Unix commands, SA CLI methods do not read data from
stdin
. Therefore, you cannot insert an SA CLI method within a group of commands connected by pipes (|). (However, SA CLI methods do write tostdout
.) - Most Unix commands accept parameters as flags and values (for example,
ls -l /usr
). With SA CLI methods, command-line parameters are name-value pairs, joined by equal signs. - Unix commands are text based: They accept and return data as strings. In contrast, SA CLI methods can accept and return complex objects.
- With SA CLI methods, you can specify the format of the parameter and return values. Unix commands do not have an equivalent feature.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to hpe_sa_docs@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: