Python API: samgridBatchAdmin v8_1_5
samgridBatchAdmin.addCommandResult()

Just having some fun...
This is the python interface to the command 'samgridBatchAdmin add command result'.
Command Description:

Add a possible outcome of a command from the given batch adapter in 
the station configuration. Command outcomes are defined by their 
exit type, output string and optional outcomde description.
The output string may contain one or more predefined templates:

  ['%__USER_PROJECT__', '%__USER_SCRIPT__', '%__USER_SCRIPT_ARGS__', '%__USER_JDF__', '%__USER_JOB_OUTPUT__', '%__USER_JOB_ERROR__', '%__USER_JOB_OUTPUT_DIR__', '%__USER_JOB_OUTPUT_FILE__', '%__USER_JOB_ERROR_FILE__', '%__USER_NUMBER_OF_JOBS__', '%__USER_NAME__', '%__USER_APPLICATION_TYPE__', '%__USER_PREEMPTION__', '%__BATCH_JOB_ID__', '%__BATCH_JOB_STATUS__', '%__BATCH_JOB_NAME__', '%__BATCH_QUEUE__', '%__BATCH_FLAGS__', '%__BATCH_HOST__', '%__UNIX_PROCESS_ID__', '%__UNIX_HOST__', '%__OTHER_STRING__'] 

For example, one might add the following result for the job submission
command in the xyz's station pbs adapter:

  samgridBatchAdmin add command result
    --command-type='job submission command'
    --command-output='%__BATCH_JOB_ID__.%__BATCH_HOST__' 
    --exit-status='0'
    --description='Successful job submission'
    --adapter='pbs'
    --station='xyz'

For more examples, as well as for a full description of available 
templates, please see the SAM Batch Adapter documentation.


Python Usage:
	from SamgridBatchAdmin import samgridBatchAdmin
	result = samgridBatchAdmin.addCommandResult(...)

Return value: 

Arguments are passed as keyword-value pairs, as in:
	 myfunc(arg1='myarg', arg2='anotherarg', d=1)

Argument Keyword Description:
	(*) indicates that this keyword is required
	>>> indicates that either the API object or the CLI equivalent (<<<) is required
====================================================================================================================================
    KEYWORD                    DATA TYPE            DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------
(*) adapter                    string               batch adapter name
(*) commandOutput              string               command output string
(*) commandType                string               command type string
    d                          SamBoolean           debug flag
    description                string               description string
(*) exitStatus                 int                  command exit status
(*) station                    string               station name
    v                          SamBoolean           verbose flag
====================================================================================================================================

Environment Defaults:
	station = os.environ['SAM_STATION']



See Also: