Job Manager RSL Utilities.
More...
|
globus_rsl_t * | globus_gram_job_manager_rsl_merge (globus_rsl_t *base_rsl, globus_rsl_t *override_rsl) |
| Merge two sets of RSL relations. More...
|
|
globus_bool_t | globus_gram_job_manager_rsl_attribute_exists (globus_rsl_t *rsl, const char *attribute) |
| Attribute exists in an RSL. More...
|
|
int | globus_gram_rsl_add_output (globus_gram_jobmanager_request_t *request, globus_rsl_t *rsl, const char *attribute, const char *value) |
| Add an output attribute to an RSL. More...
|
|
int | globus_gram_rsl_add_stream_out (globus_gram_jobmanager_request_t *request, globus_rsl_t *rsl, const char *source, const char *destination) |
| Add a stage out value to the RSL. More...
|
|
int | globus_gram_job_manager_rsl_env_add (globus_rsl_t *ast_node, const char *var, const char *value) |
| Add an environment variable to the job RSL. More...
|
|
int | globus_gram_job_manager_rsl_remove_attribute (globus_rsl_t *rsl, char *attribute) |
| Remove an RSL attribute. More...
|
|
Job Manager RSL Utilities.
globus_bool_t globus_gram_job_manager_rsl_attribute_exists |
( |
globus_rsl_t * |
rsl, |
|
|
const char * |
attribute |
|
) |
| |
Attribute exists in an RSL.
Check to see if an RSL attribute exists in the given RSL.
- Parameters
-
rsl | RSL parse tree to search |
attribute | Attribute name to search for. |
- Return values
-
GLOBUS_TRUE | Attribute exists in the RSL. |
GLOBUS_FALSE | Attribute does not exist in the RSL. |
int globus_gram_job_manager_rsl_env_add |
( |
globus_rsl_t * |
ast_node, |
|
|
const char * |
var, |
|
|
const char * |
value |
|
) |
| |
Add an environment variable to the job RSL.
This function adds a single environment variable to the job RSL. If there is no environment relation in the RSL, then one is added. Both the variable name and value are copied into the RSL, so the original values passed in may be static strings or pointers to data which is freed or overwritten once this function returns.
- Parameters
-
ast_node | A pointer to the RSL tree to update. This should point to the root of the rsl tree (the boolean &) on the invocation of the function, but will point to various relations in the RSL as it calls itself recursively. |
var | A pointer to a string containing the variable to be added to the RSL. No checking is done to see if this environment variable is already defined in the RSL. This will be duplicated and inserted into the RSL. |
value | The value of the environment variable named var. This will be duplicated and inserted into the RSL. |
- Return values
-
0 | The environment variable was added to the RSL. |
1 | The ast_node points to a relation other than an environment relation |
2 | The ast_node points to some unexpected part of the RSL. |
- Todo:
- Remove old values of var if it is already in the RSL's environment attribute's value.
globus_rsl_t* globus_gram_job_manager_rsl_merge |
( |
globus_rsl_t * |
base_rsl, |
|
|
globus_rsl_t * |
override_rsl |
|
) |
| |
Merge two sets of RSL relations.
Create a new RSL consisting of the merging of the base_rsl and override_rsl. The result after completion is one RSL containing all of the relations from the base_rsl and the override_rsl with any conflicting definitions resolved by the override_rsl winning. The base_rsl and override_rsl are unmodified in this process.
int globus_gram_job_manager_rsl_remove_attribute |
( |
globus_rsl_t * |
rsl, |
|
|
char * |
attribute |
|
) |
| |
Remove an RSL attribute.
Remove an RSL attribute from and RSL tree.
- Parameters
-
rsl | The RSL parse tree to modify |
attribute | The name of the attribute to remove from the RSL. The attribute and it's values will be freed. |
- Return values
-
GLOBUS_SUCCESS | Success |
GLOBUS_GRAM_PROTOCOL_ERROR_BAD_RSL | Bad RSL |
int globus_gram_rsl_add_output |
( |
globus_gram_jobmanager_request_t * |
request, |
|
|
globus_rsl_t * |
rsl, |
|
|
const char * |
attribute, |
|
|
const char * |
value |
|
) |
| |
Add an output attribute to an RSL.
This function modifies the rsl parameter, adding a new relation of the form: attribute = ( value ) This function assumes that the specified attribute is not present in the RSL when called. Unlike the globus_rsl library, this function copies the attribute and value strings as needed to keep it so the RSL can be freed by calling globus_rsl_free_recursive().
- Parameters
-
request | Job request |
rsl | RSL to modify |
attribute | Attribute (either stdout or stderr) |
value | Local output path |
- Return values
-
GLOBUS_SUCCESS | Success |
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED | Malloc failed |
int globus_gram_rsl_add_stream_out |
( |
globus_gram_jobmanager_request_t * |
request, |
|
|
globus_rsl_t * |
rsl, |
|
|
const char * |
source, |
|
|
const char * |
destination |
|
) |
| |
Add a stage out value to the RSL.
Creates a new entry in the RSL's filestreamout value list for the given (source, destination) pair. If the RSL does not contain filestageout, it is added; otherwise, the new pair is prepended to the existing list.
- Parameters
-
request | Job request |
rsl | RSL to modify |
source | Source URL |
destination | Destination URL |
- Return values
-
GLOBUS_SUCCESS | Success |
GLOBUS_GRAM_PROTOCOL_ERROR_MALLOC_FAILED | Malloc failed |