get_resource_values


This utility allows the command-line user (or a script) to find the values of resource keywords, following the OPUS rules for path file value substitution, environment variable substitution, and path indirection. This is not necessary for normal use. OPUS processes which use values from resource files will have this translation done automatically for them when they request (e.g. internal pollers) or are provided in their environment (e.g. external pollers) any such resource file values. This utility is provided as a simple means to debug or test a pipeline.

Usage: get_resource_values -p path -r resource_file [<keyword(s)>] [--verbose] [--help]

The path and resource file names arguments are required. If the program is given one or more resource keywords, their values are written to the stdout on individual lines. If no resource keyword is specified, all resource keyword/value pairs found are written.

Context

Inputs

Outputs

Exit Status

Qualifiers

-p

-r

--verbose

--help

Example 1

Find the translated values of all resource keywords for the "pypoller" task, given symbol values from the "quick" path. Prints each keyword/value pair to the terminal. Note how the symbol for OUTPATH, in the resource file as "success_dir", is translated to the actual path file value.

% get_resource_values -p quick -r pypoller

CLASS = ALL
DESCRIPTION = Example Python Internal Poller
DISPLAY_ORDER = 1
FILE_DIRECTORY1 = /home/joe/opus_test/quick/input/
FILE_ERROR.DANGLE = _bad
FILE_ERROR.DIRECTORY = /home/joe/opus_test/quick/error/
FILE_OBJECT1 = *.try
FILE_PROCESSING = _proc
FILE_RANK = 1
FILE_SUCCESS.DANGLE = _done
FILE_SUCCESS.DIRECTORY = /home/joe/opus_test/quick/input/
MINBLOCKS = 2000
OUTPATH = /home/joe/opus_test/quick/input/
POLLING_TIME = 10
PROCESS_NAME = pypoller
SYSTEM = SAMPLE
TASK = <pyintpoller.py -p $PATH_FILE -r pypoller>

Example 2

Same as the previous example except that now were are requesting a single value, the value of FILE_PROCESSING:

% get_resource_values -p quick -r pypoller FILE_PROCESSING

_proc

Example 3

Find a sub-class of resource keyword/value pairs. This example prints both items in the FILE_SUCCESS class of resource values:

% get_resource_values -p quick -r pypoller FILE_SUCCESS.

DANGLE = _done
DIRECTORY = /home/joe/opus_test/quick/input/