Grid Community Toolkit  6.2.1705709074 (tag: v6.2.20240202)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
globus_gram_job_manager_rsl.c File Reference

Job Manager RSL Manipulations. More...

#include "globus_gram_job_manager.h"
#include "globus_rsl_assist.h"
#include <string.h>

Functions

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...
 
int globus_gram_job_manager_rsl_eval_one_attribute (globus_gram_jobmanager_request_t *request, char *attribute, char **value)
 
int globus_gram_job_manager_rsl_attribute_get_string_value (globus_rsl_t *rsl, const char *attribute, const char **value_ptr)
 
int globus_gram_job_manager_rsl_attribute_get_boolean_value (globus_rsl_t *rsl, const char *attribute, globus_bool_t *value_ptr)
 
int globus_gram_job_manager_rsl_attribute_get_int_value (globus_rsl_t *rsl, const char *attribute, int *value_ptr)
 

Detailed Description

Job Manager RSL Manipulations.

Function Documentation

int globus_gram_job_manager_rsl_attribute_get_boolean_value ( globus_rsl_t *  rsl,
const char *  attribute,
globus_bool_t value_ptr 
)

Search the RSL tree for an attribute and return its boolean value

Parameters
rslRSL tree to search
attributeAttribute name to search for
value_ptrPointer to set to the value of this attribute.
Return values
GLOBUS_SUCCESSSuccess.
GLOBUS_GRAM_PROTOCOL_ERROR_UNDEFINED_ATTRIBUTE;Attribute not found.
GLOBUS_GRAM_PROTOCOL_ERROR_BAD_RSLValue is non-literal or has a non-boolean value.
int globus_gram_job_manager_rsl_attribute_get_int_value ( globus_rsl_t *  rsl,
const char *  attribute,
int *  value_ptr 
)

Search the RSL tree for an attribute and return its integer value

Parameters
rslRSL tree to search
attributeAttribute name to search for
value_ptrPointer to set to the value of this attribute.
Return values
GLOBUS_SUCCESSSuccess.
GLOBUS_GRAM_PROTOCOL_ERROR_UNDEFINED_ATTRIBUTE;Attribute not found.
GLOBUS_GRAM_PROTOCOL_ERROR_BAD_RSLValue is non-literal or has a non-int value.
int globus_gram_job_manager_rsl_attribute_get_string_value ( globus_rsl_t *  rsl,
const char *  attribute,
const char **  value_ptr 
)

Search the RSL tree for an attribute and return its single value

Parameters
rslRSL tree to search
attributeAttribute name to search for
value_ptrPointer to set to the value of this attribute. Must not be freed by the caller. Will be set to NULL if the attribute is not present or does not have a literal string value.
Return values
GLOBUS_SUCCESSSuccess.
GLOBUS_GRAM_PROTOCOL_ERROR_UNDEFINED_ATTRIBUTEAttribute not found.
int globus_gram_job_manager_rsl_eval_one_attribute ( globus_gram_jobmanager_request_t *  request,
char *  attribute,
char **  value 
)

Evaluate RSL substitutions for a single RSL attribute

Evaluates the value of the named RSL attribute. If it is present, and the evaluation succeeds, then the value parameter is modified to contain a copy of the newly-evaluated value of the attribute.

Parameters
requestThe request containing the RSL tree to evaluate.
attributeThe name of the attribute to evaluate.
valueA pointer to a char * which will be filled with a copy of the evaluated value of the RSL attribute. If the attribute is not found, or an error occurs, this will be set to NULL.
Return values
GLOBUS_SUCCESSThe RSL attribute is present and has evaluated successfully.
GLOBUS_GRAM_PROTOCOL_ERROR_BAD_RSLThe RSL is not a boolean tree containing attributes.
GLOBUS_GRAM_PROTOCOL_ERROR_EVALUATION_FAILEDThe RSL attribute is present but some RSL substitution could not be evaluated for that attribute.