Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command, Definition File and API Reference


4.3.1 Collecting information with the adapter command

If you create a user-created plug-in and retrieve information from a management target in JP1/IM - Manager (Intelligent Integrated Management Base), you need an adapter command together with the plug-in. You execute the adapter command only once. You execute the adapter command several times and cannot acquire information. In addition, the adapter command has a one-to-one relationship with the user-created plug-in.

The adapter command communicates with the Intelligent Integrated Management Base via the standard input and output. When started from the Intelligent Integrated Management Base, the adapter command sends a response to the Intelligent Integrated Management Base via the standard output.

Organization of this subsection

(1) Return values

The adapter command gives back the summary of an operation result as a return value.

Table 4‒3: Return values of the adapter command

No.

Return value

Description

1

0

Successful completion

2

1 to 49

These values are assigned to an error when a warning occurs. (For example, a failure to collect part of information)

3

50 to 99

These values are assigned to a temporary error of the operation that can be retried.

4

100 to 149

Invalid environment (such as an incorrect version)

5

150 to 199

Program error

You can also add a return value specific to the adapter command within the range of the return values. The details of an error at runtime of the adapter command must be returned separately via the standard error output.

(2) Execution directory

The directory where the adapter commands is located as the execution directory.

(3) Input/output

Arguments, the standard input, the standard output, and the standard error output are used for data communication between the adapter command and the Intelligent Integrated Management Base.

The standard input and standard output of the adapter command is made up of common header and data body. The data body contains the information passed from the adapter command to the Intelligent Integrated Management Base.

The format is as follows:

Common header<Line feed code (<CR><LF> or <LF>)>Data body

The structure of the header is shown below. The header is expressed in CSV format.

protocol-name,protocol-version,character-code,program-product-name

The following table lists the details of the header:

No.

Name

Data type

Value to be specified

1

protocol-name

string

JBSPGCMD

2

protocol-version

Specify the same version as the version of the adapter command settings file#.

Example

12000000

3

character-code

Specify one of the following character codes based on the execution environment of the adapter command:

  • 8859_1

  • SJIS

  • MS932

  • EUCJIS

  • UTF-8

  • GB18030

4

program-product-name

Specify the same value as the component identifier#.

If an error occurs during execution of the adapter command, the details are printed to the standard error output. Configure the details to be printed in ASCII characters.

(4) Notes

(5) Adapter command settings file

An adapter command settings file is used to specify the name of the file for the adapter command. The naming rule is as follows:

name-of-the-component-specified-for-Adapter_SID.conf
Example

When the name-of-the-component-specified-for-Adapter_SID is /VENDOR/TOOLA:

Adapter_VENDOR_TOOLA.conf

The adapter command settings file is located at:

In Windows:

JP1/Base-installation-folder\plugin\conf

In UNIX:

/opt/jp1base/plugin/conf

The table below lists the setting items of the adapter command settings file. Use a tab or white space character to separate a label and its value.

Table 4‒4: Setting items of the adapter command settings file

No.

Item

Label

Value to be specified

1

Version of the adapter command settings file

fileversion

12000000

2

Path to the adapter command

cmdpath

Specify the absolute path to the adapter command, including the command name. You do not have to enclose the path with double quotation marks or other characters.

3

Product that links with the adapter command

upperpp

/HITACHI/JP1/IM/DD

4

Type of the adapter command

componenttype

JDD_CONFINFO

The following shows a setting example of the adapter command settings file:

fileversion      12000000
cmdpath         C:\Program Files (x86)\Hitachi\jp1pc\bin\jp1getconfinfo.exe
upperpp         /HITACHI/JP1/IM/DD
componenttype   JDD_CONFINFO
Important
  • A single line can contain a maximum of 4,096 characters.

  • If there is more than one label with the same name, an error occurs.

  • If the required label is not specified, an error occurs.

  • If even a single error exists in the file, the file is no longer valid.

  • The file is terminated with the line feed character.

  • The file can contain ASCII characters only.

  • When you specify a label, a white space or tab character is not allowed at the beginning of the row.

  • Any row containing white space or tab characters only is ignored.