Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Developer's Guide 


6.4.4 Method for specifying scripts

You can set a script for each OS to create plug-ins that match the OS on the operation target device. You can define a script or command that exists and can be executed on the operation target device.

You can re-register the script file that has already been registered. The existing file is overwritten when the file is re-registered.

Difference between the methods for specifying scripts

You can specify a script by attaching a script file that has been created, or by directly entering the script. The differences between these two methods is described below.

When Attachment is selected:

If you use zip format, you can register a script composed of multiple files or multiple folders.

Note that compressed files with zip extension are renamed when you save plug-ins in the JP1/AO server. The file name is changed to windows.zip, aix.zip, hpux.zip, linux.zip, or solaris.zip, depending on the OS. You can download the file you registered by selecting Attachment, to the terminal on which you perform JP1/AO operations via a Web browser. If you directly enter a script, you cannot download the script file you defined.

When Type in is selected:

In the Edit Remote Command dialog box, directly enter the content of the script you want to execute on the operation target device. You can define a script or command that exists and can be executed on the operation target device. In this case, you can define only one script file. The character set and linefeed code for the script to be saved are fixed depending on the OS on the operation target device.

Therefore, if you want to register a script file composed of multiple files or if you want to set any character set and linefeed code you want, select Attachment.

The following table describes the differences in character sets and linefeed codes that are set and how to register files, between the settings for Script specification method.

Table 6‒14: Difference between the methods of setting scripts

Item

When Attachment is selected

When Type in is selected

Windows

AIX, HP-UX, Linux, and Solaris

Windows

AIX, HP-UX, Linux, and Solaris

Registration of a file

Can be registered.

Can be registered.

Registration of multiple files

Can be registered.

Cannot be registered.

Character set for the script to be saved

The character set for the registration file is set.

The default character set for the OS on the JP1/AO server

UTF-8

Linefeed code for the script to be saved

The linefeed code for the registration file is set.

CR+LF

LF

Notes on creating script files

Note the following when you create a script file:

Tip

For details about the setting of return values when a command or script is executed, see 6.4.9 Return values of content plug-ins.