Package Ganga :: Package GPIDev :: Package Adapters :: Module StandardJobConfig :: Class StandardJobConfig
[hide private]
[frames] | no frames]

Class StandardJobConfig

source code

StandardJobConfig defines a standard input for many of the handlers: LSF, Localhost,LCG. It corresponds to a simplified JDL definition: specification of executable, arguments and input sandbox. Executable and arguments may be specified either as strings or File objects. In the second case they are automatically added to the input sandbox list.

If you modify attributes of the StandardJobConfig object after the initialization, the you should do processValues() which perfomes a validation of the attributes and updates internal cache which is used by getter methods.

Instance Methods [hide private]
 
__init__(self, exe=None, inputbox=[], args=[], outputbox=[], env={})
exe - executable string to be run on the worker node or a File object to be shipped as executable script to the worker node args - list of strings which are passed as arguments to the executable string or File objects which are automatically added to the sandbox inputbox - list of additional File or FileBuffer objects which go to the sandbox outputbox - list of additional files which should be returned by the sandbox env - environment to be set for execution of the job
source code
 
getSandboxFiles(self)
Get all input sandbox files
source code
 
getOutputSandboxFiles(self)
Get all output sandbox files.
source code
 
getExeString(self)
Get a string which should be used at the worker node to invoke an executable.
source code
 
getArgStrings(self)
Get a list of strings which correspond to the arguments to the executable on the worker node.
source code
 
getExeCmdString(self)
Get a command string including the quoted arguments which may be passed to os.system().
source code
 
processValues(self)
Process original exe,args and inputbox values and extract strings suitable for the further processing.
source code
Method Details [hide private]

__init__(self, exe=None, inputbox=[], args=[], outputbox=[], env={})
(Constructor)

source code 

exe - executable string to be run on the worker node or a File object to be shipped as executable script to the worker node args - list of strings which are passed as arguments to the executable string or File objects which are automatically added to the sandbox inputbox - list of additional File or FileBuffer objects which go to the sandbox outputbox - list of additional files which should be returned by the sandbox env - environment to be set for execution of the job

The constructor does processValues() automatically so the construction of the object may failed with exceptions raised by that method. Notes for derived classes:

  • this constructor should be called at the end of the derived constructor.
  • you may freely add new attributes as long as you they do not start with _

getOutputSandboxFiles(self)

source code 

Get all output sandbox files. The duplicates are removed.

getExeString(self)

source code 

Get a string which should be used at the worker node to invoke an executable. Note that this string does not necesserily have to be a file name on the worker node

getExeCmdString(self)

source code 

Get a command string including the quoted arguments which may be passed to os.system(). This method is provided for the convenience

processValues(self)

source code 

Process original exe,args and inputbox values and extract strings suitable for the further processing. If the exe property is a File then this method will check if it has executable attributes. You do not have to call this method unless you explicitly modify some of the original values.