Hitachi

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


6.4.13 Specifying Output Filter

This section describes how to store the standard output of a command or script in an output property.

By defining a PCRE-compliant regular expression in the Output Filter field, you can extract character strings from the standard output and standard error output of a command or script, and store them in the output property of a plug-in.

Important
  • The parts grouped by parentheses are extracted by the regular expression.

  • If you specify multiple groups in the regular expression, only values that match the first group are stored in the output property of the plug-in.

  • If the regular expression applies to multiple value ranges, only the first range of values is stored in the output property of the plug-in. Multiple value ranges cannot be stored in an output property.

  • If you specify "(.*)", You can extract the character string from the beginning to the line feed of the character string including the line feed, such as the execution result of any command.

The following describes how to specify a regular expression that stores the standard output of a command or script in an output property:

When you specify an output filter in this way, the value immediately following DATE= in standard output is stored in the output property output01.

To store the return value of a script in an output property, define the plug-in and create a script as follows: