Execution services allow to create pvmanager services based on command-line execution. The service call will create a process from a given command-line, allows to map some arguments, and returns the result. This allows to gather data from the underlying os, IT infrastructure or anything that can be accessed through a script.
The support includes a general purpose "exec/run" service method that allows a generic command to be run. Other services can be created by writing xml files.
Here is an example of an XML file describing an exec service:
<?xml version="1.0" encoding="UTF-8"?>
<execService ver="1" name="execSample" description="A test service">
<method name="echo" description="A test script">
<command>echo You selected #string#</command>
<argument name="string" description="The string" type="VString"/>
<result name="result" description="The result"/>
<method name="script" description="My script">
<argument name="value" description="The value" type="VNumber"/>
<result name="result" description="The script result"/>
Each service method correspon to one command, with specific mappings. A service is a collection of different mehods.
||Version is required to be "1". Name and description of the
service are required
||List of methods must be provided
||Each method must have a name and a description
||The command correspond to the actual command passed to the
shell. Each command can have multiple arguments noted by #argName#. The
arguments are substituted right before execution, in the order they are
defined in the argument list.
||Arguments are optional. Each argument must have a name, a description and a type. Supported type include: VString, VNumber.|
||Result must include a name and a description. If the output can be parsed as a table, the service will return a VTable. Otherwise will return a VString.|