1. Description
The fields of the action are:
name |
Used to name the command execution. The name must start with an alphabetic or underscore character, and be followed by one or more alphanumeric or underscore characters. Names cannot contain spaces. |
description |
A description of the execution purpose |
workloadKey |
An unique identifier for the workload |
action |
http://www.n3phele.com/executecommand |
inputFiles |
Describes the input files needed for the command execution. See 2. Specifying files for details |
inputParameters |
A list of input parameters describing the nature of the created virtual machine. See 3. Input Parameters for details. |
outputFiles |
Describes the output files generated by the command execution. See 2. Specifying files for details |
2. Specifying files
field name |
type |
definition |
name |
string |
unique file identifier. This entry matches the associated file definition entry in the command inputFiles section |
description |
string |
describes the file contents |
filename |
string |
the local filesystem relative path and filename of the file |
optional |
boolean |
specifies if the file may be optionally available. Always false for output files, may be true or false for input files. |
3. Input Parameters
The input parameters specify the details of the command to be executed as follows:
parameter name |
type |
definition |
dependency |
list |
list of dependencies for the action. defaults to an empty list |
command |
string |
shell command. Defaults to "echo no command specified" |
stdin |
string |
task execution stdin |
agentUser |
secret |
username for authenticated access to the vm agent |
agentPassword |
secret |
password for authenticated access to the vm agent |
agentBaseUrl |
string |
url for access to the vm agent |
4. Output Parameters
The output parameters give information about the command execution as follows:
parameter name |
type |
definition |
stdout |
string |
task execution stdout |
stderr |
string |
task execution stderr |
exitCode |
long |
operating system process exitcode. Note that a non-zero exit code denotes task failure, and will cause n3phele to abort processing. Useful as a dependency for successful task execution |
|
Figure 1. Example
"name":"copyit", "description":"copy files", "workloadKey":"copyit", "action":"http://www.n3phele.com/executecommand", "inputFiles":{ "name":"input", "description":"Input file", "filename":"input.file", "optional":"false" }, "inputParameters":[ { "name":"command", "description":"Shell command", "type":"String", "value":"cp input.file output.file; ls -l input.file output.file" }, { "name":"agentBaseUrl", "type":"String", "value":"$<fileCopier.agentBaseUrl>" }, { "name":"agentUser", "type":"String", "value":"$<fileCopier.agentUser>" }, { "name":"agentPassword", "type":"String", "value":"$<fileCopier.agentPassword>" } ], "outputFiles":{ "name":"output", "description":"Output file", "filename":"output.file", "optional":"false" }
|
|
|