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 |
|
apxtool command
Use the apxtool command in an OGFS session to create and manage APXs. The apxtool command is available in the Global Shell in the directory /opsw/bin/apxtool
.
For a tutorial on how to use the apxtool to create a web APX, see Tutorial: Creating a Web Application APX.
Syntax of apxtool
Invoke the APX tool from the OGFS command line as follows:
apxtool [-h | --help] {function} arguments
To obtain a complete list of commands and arguments supported by the APX tool, run apxtool from an OGSH command line with no arguments.
The APX Tool supports the following major functions:
Function |
Usage |
---|---|
|
Creates a new APX source directory and a new set of template files in the OGFS. Optionally registers the APX into SA. Registering assigns an APX ID and makes the name of your APX available to others (with appropriate permissions) using SA. See Creating a new APX - apxtool new for more information. |
|
Imports your APX files into the SA Library and creates a new version of your APX. Optionally registers the APX into SA. Registering assigns an APX ID and makes the name of your APX available to others (with appropriate permissions) using SA. See Importing an APX into SA - apxtool import for more information. |
|
Sets the current version of an APX in the SA Library. You can have multiple versions of an APX in SA, but only the current version can be executed. See Setting the current version of an APX - apxtool setcurrent for more information. |
|
Displays information about an APX. See Querying APX information - apxtool query for more information. |
|
Copies all of an APXs files from the SA Library to a separate set of files. |
|
Deletes an APX from the SA Library. |
Using short and long command options
Most of the options to the apxtool command accept a short form or a long form.
- The short form is a single hyphen and a character, for example, “
-t
“ and “-v
”. - The long format is two hyphens followed by a word, for example, “
--type
“ and “--view
“.
Some options require an argument following the option. For example, “-t webapp
“ and “-t details
“. Arguments can be specified in one of four formats, which are all equivalent. To illustrate, the following commands are equivalent and produce the same results:
apxtool query -t webapp apxtool query -twebapp apxtool query -tw apxtool query --type webapp apxtool query --type=webapp
Some options only require typing a minimum number of characters, enough to identify the option argument. For example, in the query function, the --view
option requires argument “list
“, “details
“, “versions
“. The following commands produce the same result:
apxtool query --view=details apxtool query --view=d apxtool query -vdetails apxtool query -vd
Creating a new APX - apxtool new
You can use the APX tool to create a new APX and optionally register the name of the APX into SA. This command creates a set of template files for an APX that you can modify. For information on the files that make up an APX, see APX files.
Usage
apxtool new [options] {src_dir}
where the src_dir
argument specifies the directory where the template files of the new APX are to be created. If this argument is omitted, the template files are placed into the current directory.
The following table lists the options for creating a new APX:
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
(Required) The APX type. Valid values are: script or webapp. For example, -ts for script APX, -tw for web APX. (A script APX is also known as a program APX.) |
|
(Required) The unique name of the APX. A unique name is a dot separated name that conforms to file system format. It must have at least one dot. Valid characters are: [a-zA-Z0-9_.]. |
|
(Optional) The display name of the APX in a folder. If a name is not specified, but a unique name is specified, the last part of the APX unique name is used as the display name. Note that this name must be unique within the specified folder. For example, if the unique name were com.hpe.sa.MyWebExt, the default display name would be MyWebExt. |
|
(Required) A brief description of an APX. If the description is a filename with the extension .txt, the file is assumed to be a text file and its content is used as the APX description. |
|
(Optional) Registers the name of the APX into the system. If you specify this option, you must also specify If you do not specify -r and -f with |
|
(Optional) The SA folder path where the APX will be registered. This can be a full path, partial path, absolute path, or relative path, as long as it can uniquely identify a specific folder. This option is only needed if If you do not specify -r and -f with |
|
(Optional) Suppresses output messages. |
|
(Optional) Suppresses confirmation prompts. |
Deleting an APX - apxtool delete
You can use the APX tool to delete an existing APX from the SA library.
Usage
apxtool delete [options]
The following table lists the options for deleting an APX:
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
(Required) APX type. Valid values are: script or webapp. For example -ts for script. |
|
(Optional) The object identifier of the desired APX. |
|
(Optional) The unique name of the APX. A unique name is a dot separated name that conforms to file system format. It must have at least one dot. Valid characters are: [a-zA-Z0-9_.]. |
|
(Optional) APX display name in a folder. |
|
(Optional) SA folder path. Path can be a full path, partial path, absolute, or relative, as long as it can uniquely identify a specific folder. |
|
(Optional) Suppresses output messages. |
|
(Optional) Suppresses confirmation prompts. |
Exporting an APX from SA - apxtool export
You can use the APX tool to export an APX. Export downloads a specific version of an APX source archive file and places the files into a directory or into a .zip archive file.
Usage
apxtool export [options] {target_dir}
where the argument target_dir is the directory into which the APX source archive file is copied or into which the APX source archive content is expanded, depending on whether or not the --archive option is specified. If omitted, the current directory is used.
The following table lists the options for exporting an APX.
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
(Required) APX type. Valid values are: |
|
(Optional) The object identifier of the desired APX. |
|
(Optional) The unique name of the APX. A unique name is a dot separated name that conforms to file system format. It must have at least one dot. Valid characters are: |
|
(Optional) APX display name in a folder. |
|
(Optional) SA folder path. Path can be a full path, partial path, absolute, or relative, as long as it can uniquely identify a specific folder. |
|
(Optional) This option specifies which APX version to download. If omitted, the current version is downloaded. |
|
If specified, export the APX source in its original source archive as a ZIP or JAR file. |
|
(Optional) Suppresses output messages. |
|
(Optional) Suppresses confirmation prompts. |
Importing an APX into SA - apxtool import
You can use the APX Tool to import APXs. Import publishes a new version of an APX and optionally sets this version as the current version. If the APX was has not been registered yet, this command also registers the APX.
Only the current version of an APX can be run. If you do not set the current version, the APX will not be runnable. You can set the current version with either apxtool import
or with apxtool setcurrent
. See Setting the current version of an APX - apxtool setcurrent for more information.
Usage
apxtool import [options] {apx_src}
where apx_src can be an archived APX source file with extension .zip or .jar or it can be the name of a directory containing the APX files to be published. apx_src may be a relative or absolute path. If omitted, the current directory is used. The specified directory or archive file must contain the directory APX-INF.
The following table lists the options that are available when importing an APX:
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
If specified, set the newly published version as the current version of an APX. |
|
The new version of this APX. This option must not be used if version_string is already specified in apx.cfg. If no version is specified, one will be assigned automatically. |
|
(Optional) SA folder path. Path can be a full path, partial path, absolute, or relative, as long as it can uniquely identify a specific folder. If you did not specify -r and -f with |
|
(Optional) Suppresses output messages. |
|
(Optional) Suppresses confirmation prompts. |
Querying APX information - apxtool query
You can use the APX Tool to get and view APX information. You can specify additional options to limit resulting APXs. Multiple occurrences of the same option form a logical OR expression. If no matching result is found, this command returns exit code 100.
Usage
apxtool query [options]
The following table lists the options that are available when querying APX information:
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
(Optional) Select one of the predefined views of the query results. Choices are list (default), -v list is a single line representation of APX basic information presented in tabular format. -v details is a multiple line representation of APX information. -v versions lists all APX versions. You would only need to specify enough characters for the view type; for example, -vd, is the same as -v details. If the |
|
(Optional) Specifies the type of APX to display. Valid values are: script or webapp or interface. The default is to display all types.
For example, |
|
(Optional) The object identifier of the desired APX. |
|
(Optional) The unique name of the APX. A unique name is a dot separated name that conforms to file system format. It must have at least one dot. Valid characters are: [a-zA-Z0-9_.]. |
|
(Optional) APX display name in a folder. |
|
(Optional) SA folder path. Path can be a full path, partial path, absolute, or relative, as long as it can uniquely identify a specific folder. |
|
(Optional) if specified, only query APX objects that have a current version set. |
|
(Optional) This advanced option allows you to specify custom display formatting for an APX listing. format_string is a string containing embedded tag names that are substituted with values at display time. Tag names must have a format of %(tag_name). Use the format string “__show_tags__” to display a list of all the supported tag names. |
|
(Optional) Displays the output in comma-separated values format. Ignored if the --format option is specified. |
|
(Optional) Suppresses extraneous output messages. |
Setting the current version of an APX - apxtool setcurrent
You can use the APX tool to set an APX version as the current version.
Only the current version of an APX can be run. If you do not set the current version, the APX will not be runnable. You can set the current version with either apxtool import
or with apxtool setcurrent
. See Importing an APX into SA - apxtool import for more information.
Usage
apxtool setcurrent [options] {version_str}
where the argument version_str is required to uniquely identify an existing version of an APX.
The following table lists the options that are available when setting an APX version:
Option |
Usage |
---|---|
|
Show this help message and exit. |
|
(Required) APX type. Valid values are: script, webapp. For example, -ts for script. |
|
(Optional) The object identifier of the desired APX. |
|
(Optional) APX unique name. A unique name is a dot separated name that conforms to file system format.It must have at least one dot. Valid characters are |
|
(Optional) APX display name in a folder. |
|
(Optional) SA folder path. Path can be a full path, partial path, absolute, or relative, as long as it can uniquely identify a specific folder. |
|
(Optional) Suppresses output messages. |
|
(Optional) Suppresses confirmation prompts. |
Error handling
The APX tool command conforms to the standard POSIX convention and returns 0 on success and a non-zero value for other errors. The APX tool sends normal output to STDOUT and errors and warnings to STDERR. When an error occurs, the APX tool typically returns a descriptive message to STDERR.
Error conditions are typically categorized as shown in the following table:
Return Code |
Description |
---|---|
0 |
Success |
1 |
Syntax or usage error |
2 |
Permission related error |
3 |
User canceled operation |
4 |
Runtime error |
There may be other undocumented exit codes. The only guarantee is that if the exit code is 0, the command completed its operation successfully.
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: