8.6.6 listservices (outputting the list of services or service templates)
Description
This command outputs the CSV-formatted list of the services or service templates registered in JP1/AO.
You can output the list of the services, including the vendor name and version number, or of the service templates. Note that debug services are not output.
Syntax
listservices /output {services | servicetemplates} /file output-file-path [/encoding {UTF-8 | Shift_JIS}] /user user-ID {/password password | /passwordfile password-file-path}
Arguments
- /output {services | servicetemplates}
-
This option specifies which information is output in the list.
-
services
Outputs the list of services.
-
servicetemplates
Outputs the list of service templates.
-
- /file output-file-path
-
This option specifies the absolute or relative path to the output file. An error occurs if the specified file exists.
- /encoding {UTF-8 | Shift_JIS}
-
This option specifies the encoding of the output file. If this option is omitted, the default encoding of the OS is used.
- /user user-ID
-
This option specifies the user ID for JP1/AO.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are half-width alphanumeric characters, !, #, $, %, &, ', (, ), *, +, -, ., =, @, \, ^, _, and |.
This option is not case sensitive.
- /password password
-
This option specifies the password of the user indicated by the /user option.
You must specify either this option or the /passwordfile option. If both options are specified, or if neither are specified, then you will get an error.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are the same as those for the /user option.
- /passwordfile password-file-path
-
This option specifies the absolute or relative path to the password file for the user specified in the /user option. You can create a password file by using the encryptpassword command.
You must specify either this option or the /password option. If both options are specified, or if neither are specified, then you will get an error.
Output format
The output items are output in CSV format in a single line per service or service template.
The values for each output item are enclosed in double quotation marks ("). Any double quotation mark (") contained in the value is escaped with another one added in front of the mark.
Type of output information |
Output item |
Description |
---|---|---|
List of services |
Name |
Service name |
Description |
Description |
|
Category |
Category name |
|
Resource Group |
Resource group |
|
Service Template |
Service template name |
|
Vendor |
Vendor name |
|
Version |
Service version |
|
Configuration Type# |
Configuration type |
|
List of service templates |
Name |
Service template name |
Service ID |
Service template ID |
|
Description |
Description |
|
Version |
Service template version |
|
Category |
Category name |
|
Vendor |
Vendor name |
|
Vendor ID |
Vendor ID |
|
Configuration Type# |
Configuration type |
- #
-
The configuration type is output only if the Admin or Develop role for the target resource groups has been set from the user group that the user belongs to.
The following list shows some examples of file outputs.
-
For the list of services
"Name","Description","Category","Resource Group","Service Template","Vendor","Version" "Remote command execution","The service executes the commands on the remote target server.","OS_Operations/Basic","All Resources","Remote command execution","Hitachi, Ltd","01.00.00" "Virtual server migration","The service migrates multiple virtual servers on a VMware vSphere environment.","VM_Operations/Management","All Resources","Virtual server migration","Hitachi, Ltd","01.00.00"
-
For the list of service templates
"Name","Service ID","Description","Version","Category","Vendor","Vendor ID" "JP1/AJS jobnet execution registration","JP1AJSJobnetEntry","The template performs execution registration of JP1/AJS jobnet.","01.00.00","JP1_Operations/Management","Hitachi, Ltd","com.hitachi.software.dna.cts.jp1" "JP1/AJS and JP1/Base logging","getJP1AJSandJP1BaseLog","The template obtains JP1/AJS and JP1/Base logs.","01.00.00","JP1_Operations/Troubleshoot","Hitachi, Ltd","com.hitachi.software.dna.cts.jp1"
Located in
JP1/AO-installation-folder\bin
Execute permission
Execute the command as a user with Administrator permissions for the OS.
To output a list of services, the Admin, Develop, Modify, or Submit role must be set for the target resource groups from the user group that the user who executes the command belongs to. The command does not output a list of services for any resource groups for which none of these roles are set.
To output a list of service templates, the Admin, Develop, or Modify role must be set for the target resource groups from the user group that the user who executes the command belongs to.
Return code
The following table lists the return codes from the command.
Return code |
Description |
---|---|
0 |
The command succeeded. |
1 |
The argument is invalid. |
2 |
The command execution has been interrupted. |
3 |
The service status is invalid. |
4 |
One of the other commands is running. |
5 |
Communication failed. |
6 |
Authentication failed. |
7 |
An invalid path is specified. |
8 |
The file with the same name already exists in the output path. |
9 |
The specified path does not exist. |
10 |
The specified path is not accessible. |
12 |
An invalid encoding is specified. |
13 |
Outputting the file failed. |
14 |
You do not have permission to execute the command. |
160 |
Obtaining the list of services failed. |
161 |
Obtaining the list of service templates failed. |
255 |
The command execution has been interrupted due to an error other than the above. |
Example
The following commands show examples of how to use the command for each case.
-
To output the list of registered services to a file in default encoding of the OS:
listservices /output services /file list01 /user user01 /password pass01
-
To output the list of registered service templates to a file in UTF-8 encoding:
listservices /output servicetemplates /file list02 /encoding UTF-8 /user user02 /password pass02
Related topic