Hitachi

Job Management Partner 1 Version 10 Job Management Partner 1/Automatic Operation GUI, Command, and API Reference


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.

Table 8‒6: Output format of the lists of services and service templates

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.

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.

Related topic