Request Handler Edit Tool (RHET) provides a simple graphical user interface for viewing, editing, and creating request handlers associated with requests. In the event no X display is available a command line version is invoked. This version is limited to simulation request handlers and requires access to a SAM v7 client.
RHET is written in python and should run on versions 2.3 or
later. RHET uses the Tk interface to python and hence depends on the
Tk tool kit being installed. All functions are keyboard accessible.
RHET is invoked as:
rhet.py [options] [reqid]
The options are optional as is the argument reqid, which is the
request id the handlers belong to.
The command line options available are given in the short and long
forms below:
| -x | --nox | - Force command line mode. |
| -r | --remote | - Enable remote mode, see below. |
| -h | --help | - Print succinct usage message. |
| -d | --debug | - Enable debug mode. |
| -v | --version | - Print version information on startup. |
There is no initialization file for RHET. However to operate in remote mode when running stand alone, the value of
settings['remote_daj'] must be set properly to the path
of the remote_daj script on the remote machine. This keyword
mapping can be set by editing its value near the top of the code.
Note that the remote_daj
value must end with the following characters between the double
quotes: " ''"
(i.e. space-single quote-single quote).
When RHET is invoked from the Dial-A-Job (DAJ) GUI it will use the DAJ initialization file value for the remote_daj setting. When RHET is run in local mode no initialization is necessary.
Remote mode allows RHET to function on a machine unable to setup SAM. When running stand alone, RHET remote mode is invoked by passing the option --remote or -r on the command line to rhet.py. When invoked from DAJ, RHET will use the mode in which DAJ is started. Remote mode requires password-less ssh entry to an account on a machine where SAM can be setup. The script remote_daj must be placed on the remote machine. A remote_daj template is available in the DAJ tarball. The location of the remote_daj script is specified in the RHET code (see Initialization above) if used stand alone or in the DAJ initialization file if invoked from DAJ. Commands are executed on the remote machine via ssh invocation of the remote_daj script.
The remote_daj script needs to be tailored to the system on which it resides. There are configuration variables in the script that can be modified to accomplish the tailoring. The only variable relevant for RHET is SETUPS_DIR which is the full path of the setups.sh script which defines the Fermilab products setup command. Its value defaults to ~products/etc. More information on remote mode, remote_daj, and DAJ can be found in the DAJ documentation.
Depending on connectivity and load remote commands may be executed
much more slowly than in local mode so patience on the part of the
user is required.
The request for which handler information is desired can be set by typing the request id into the entry box at the top of the RHET window next to the Go button. Typing the <return> key or activating the Go button will initiate the SAM query to retrieve the handler information.
The request handler Ids for the specified request are listed in the listbox on the left of the RHET window. Clicking on an id or typing the <return> key when the id is highlighted will display the attribute values of the handler in the entry boxes to the right.
When selecting a handler id from the listbox the handler attributes are display in the entry boxes to the right of the listbox. The attributes may be modified by editing the text in the entry boxes and activating the Store button. When editing an empty entry box means no change to the handler attribute value.
Activating this button will store the values in the attribute entry
boxes to the request handler with the selected id. An empty entry box
means no change to the handler attribute value.
New Button
Activating this button will create a new request handler for the
specified request. The newly created handler may subsequently be
modified by selecting the id and using the attribute entry boxes and
store button.
Help Button
Activating this button will display this RHET help page in a web
browser.
Status Panel
In the status panel at the bottom of the RHET window are displayed
status information and error messages.
To view a handler's attributes:
To modify a handler's attributes:
To create a new handler:
Allowed request handler status keywords are assigned, running,
complete, and terminated.