This section includes the following topics:
- Usage of CLI Utility
- Input to CLI Utility
- Where to run CLI Utility
- Authenticate to CLI Utility
- Error reporting
- Installation packages
Usage of CLI utility
CLI is a command line utility that allows you to perform operations on the Precise product. Using CLI you can create scripts to automate Precise related operations.
Input to CLI Utility
CLI receives its input from command line arguments and/or from parameters files. CLI input can be provided as arguments, for example, to provide server name:
./infra/bin/psin_cli.sh -server <my_server>
In some cases CLI input can be provided as parameters. In such cases, you can provide the parameters in CLI argument or as parameters file. For example, to provide server name parameter, you can use any one of the following:
./infra/bin/psin_cli.sh -parameter server=my_server
or
./infra/bin/psin_cli.sh -parametersfile input.xml
Where input.xml contains:
<parameters>
<parameter name="server" value="my_server"/>
</parameters>
For all sections (unless otherwise stated), the maximum length of a parameter string is 256 characters and only integer values can be used for numeric parameters.
Where to run CLI utility
CLI should be executed on the main Precise FocalPoint (unless otherwise stated). Always run CLI from Precise root (Precise installation folder on the server).
Authenticate to CLI utility
Most CLI actions require authentication.
To authenticate using CLI you can use the clear text password:
- Windows. infra\bin\psin_cli.bat -i3-user admin -i3-clear-password admin ...
- UNIX. ./infra/bin/psin_cli.sh -i3-user admin -i3-clear-password admin ...
or use encrypted password:
- Windows. /infra\bin\psin_cli.bat -i3-user admin -i3-encrypted-password _EncryptI3_A_1_81AD2B0309 ...
- UNIX. ./infra/bin/psin_cli.sh -i3-user admin -i3-encrypted-password _EncryptI3_A_1_81AD2B0309 ...
Table 1 Authenticate to CLI
Element | Description |
---|---|
i3-user | The Precise user name used for authentication. Mandatory: Yes |
i3-encrypted-password | Values: The encrypted password used for authentication of the user specified in -i3-user argument. For more information, see Encrypt command. Mandatory: Yes Alternatively the i3-clear-password can be used, allowing you to specify a clear password instead of an encrypted string. |
Error reporting
All Precise CLI utility commands return the following return codes:
- 0 The requested operation finished successfully.
- 1 The requested operation encountered errors.
In addition, the CLI prints an error report to STDOUT/STDERR
.
- Informative errors are printed with prefix: "Informative message"
- Errors related to the CLI operation are printed to log
~i3/logs/infra.cli.log
Installation packages
When running CLI on the server with the main Precise FocalPoint, you should verify that the Precise download is accessible on the server.
CLI automatically copies required installation files from the Precise download using the installation-cd-path parameter specified as part of the installation parameters.
If you are running CLI from a server which is not the main Precise FocalPoint server, verify that one of the options below are correct:
- Precise download is accessible to the Precise FocalPoint process on the Precise FocalPoint server (notice that in Windows, Precise FocalPoint service cannot access network share).
- You have copied all files from the
Precise v9.6 download/I3/distribution
folder to the installed main Precise FocalPoint under folder<precise_root>\products\i3fp\distribution_source\installer
.
If you want to prevent CLI from copying files, you can copy the files yourself to the server and extract them. Note that this is not the recommended method of work.
For a list of required installation packages per each component, see About the installation files.