Namespaces | |
namespace | examples |
Data Structures | |
struct | BaseException |
Base exception wrap. More... | |
struct | AuthenticationException |
Generic Authentication problem. More... | |
struct | AuthorizationException |
Client is not authorized to perform the required operation. More... | |
struct | InvalidArgumentException |
One or more of the given input parameters is not valid. More... | |
struct | GetQuotaManagementException |
Quota management is not active on the WM. More... | |
struct | NoSuitableResourcesException |
No resources matching job requirements have been found. More... | |
struct | JobUnknownException |
The provided job has not been registered to the system. More... | |
struct | OperationNotAllowedException |
Current job status does not allow requested operation. More... | |
struct | ServerOverloadedException |
Server is too busy. More... | |
struct | ProxyFileException |
Proxy file errors. More... | |
struct | GrstDelegationException |
Error during delegation operations with Gridsite methods (grstXXXX) - since 1.2.0. More... | |
struct | GenericException |
Generic problem. More... | |
struct | NodeStruct |
Used to define the the structure of a dag the name of the node might be NULL for the first instance (if it's representing the dag itself) while all the children have to be properly initialised. More... | |
struct | JobIdApi |
Used to define the jobid hierarchy of a job or a dag. More... | |
struct | VOProxyInfoStructType |
Used as a member of ProxyInfoStructType. More... | |
struct | ProxyInfoStructType |
Used for describing all proxy parameters. More... | |
struct | ProxyReqStruct |
struct | JobStatusStructType |
struct | ConfigContext |
Used to configure non-default properties such as:. More... | |
Functions | |
Exceptions | |
BaseException * | createWmpException (BaseException *b_ex, const std::string &method, const std::string &description) |
Creates a BaseException object. | |
WMProxy Submission services | |
JobIdApi | jobRegister (const std::string &jdl, const std::string &delegationId, ConfigContext *cfs=NULL) |
Registers a job for submission.The unique identifier assigned to the job is returned to the client. | |
JobIdApi | jobRegisterJSDL (std::ifstream &jsdlFile, const std::string &delegationId, ConfigContext *cfs=NULL) |
Registers a job for submission.The unique identifier assigned to the job is returned to the client. | |
JobIdApi | jobSubmit (const std::string &jdl, const std::string &delegationId, ConfigContext *cfs=NULL) |
Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager. | |
JobIdApi | jobSubmitJSDL (std::ifstream &jsdlFile, const std::string &delegationId, ConfigContext *cfs=NULL) |
Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager. | |
void | jobStart (const std::string &jobid, ConfigContext *cfs=NULL) |
Triggers the submission of a previously registered job. | |
WMProxy Job operation services | |
void | jobCancel (const std::string &jobid, ConfigContext *cfs=NULL) |
Sends cancellation request for a previously submitted job identified by its JobId. | |
void | jobPurge (const std::string &jobid, ConfigContext *cfs=NULL) |
Removes from the WM managed space all files related to the job identified by the jobId provided as input. | |
std::vector< std::pair < std::string, long > > | jobListMatch (const std::string &jdl, const std::string &delegationId, ConfigContext *cfs=NULL) |
Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank. | |
std::vector< std::pair < std::string, long > > | jobListMatchJSDL (std::ifstream &jsdlFile, const std::string &delegationId, ConfigContext *cfs=NULL) |
Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank. | |
WMProxy Info retrieval services | |
std::string | getVersion (ConfigContext *cfs=NULL) |
Retrieve the service version information. | |
long | getMaxInputSandboxSize (ConfigContext *cfs=NULL) |
Returns the maximum Input sandbox size (in bytes) that a user can count on for a job submission if using the space managed by the WM. | |
std::vector< std::string > | getTransferProtocols (ConfigContext *cfs) |
Returns a list with the available transfer protocols on the WMProxy server. | |
std::vector< std::string > | getSandboxDestURI (const std::string &jobid, ConfigContext *cfs=NULL, const std::string &protocol="") |
Returns a list of destination URI's associated to the job (identified by the jobId provided as input) where the job input sandbox files can be uploaded by the client. | |
std::vector< std::pair < std::string,std::vector < std::string > > > | getSandboxBulkDestURI (std::string jobid, ConfigContext *cfs=NULL, const std::string &protocol="") |
Returns a list of destination URI's associated to the job and its children in case of DAG's and collections, where the job input sandbox files can be uploaded by the client on the WMS node. | |
std::pair< long, long > | getFreeQuota (ConfigContext *cfs=NULL) |
std::pair< long, long > | getTotalQuota (ConfigContext *cfs=NULL) |
Returns the remaining free part of available user disk quota (in bytes). | |
std::vector< std::pair < std::string, long > > | getOutputFileList (const std::string &jobid, ConfigContext *cfs=NULL, const std::string &protocol="") |
Retrieves the list of URIs where the output files created during job execution have been stored in the WM managed space and the corresponding sizes in bytes. | |
std::string | getJDL (const std::string &jobid, const JdlType &jdlType, ConfigContext *cfs=NULL) |
Returns the JDL string which identifier is the input JobId. | |
WMProxy Perusal services | |
void | enableFilePerusal (const std::string &jobid, const std::vector< std::string > &files, ConfigContext *cfs=NULL) |
Enables file perusal functionalities if not disabled with the specific jdl attribute during job register operation. | |
std::vector< std::string > | getPerusalFiles (const std::string &jobid, const std::string &file, const bool &allchunks, ConfigContext *cfs=NULL, const std::string &protocol="") |
Gets the URIs of perusal files generated during job execution for the specified file file. | |
WMProxy Templates creation services | |
std::string | getJobTemplate (int type, const std::string &executable, const std::string &arguments, const std::string &requirements, const std::string &rank, ConfigContext *cfs=NULL) |
Creates a valid template ready for submission for a job. | |
std::string | getDAGTemplate (NodeStruct dependencies, const std::string &requirements, const std::string &rank, ConfigContext *cfs=NULL) |
Creates a valid template ready for submission for a DAG. | |
std::string | getCollectionTemplate (int jobNumber, const std::string &requirements, const std::string &rank, ConfigContext *cfs=NULL) |
Creates a valid template JDL for a collection of jobs. | |
std::string | getIntParametricJobTemplate (std::vector< std::string > attributes, int parameters, int start, int step, const std::string &requirements, const std::string &rank, ConfigContext *cfs=NULL) |
Creates a valid template JDL for a parametric job. | |
std::string | getStringParametricJobTemplate (std::vector< std::string >attributes, std::vector< std::string > parameters, const std::string &requirements, const std::string &rank, ConfigContext *cfs=NULL) |
Creates a valid template JDL for a parametric job. | |
WMProxy Certificates manipulation/info retrieval services | |
std::string | getProxyReq (const std::string &delegationId, ConfigContext *cfs=NULL) |
Generates a proxy certificate in PEM format with Base64 encoding. | |
std::string | grst1GetProxyReq (const std::string &delegationId, ConfigContext *cfs=NULL) |
Generates a proxy certificate in PEM format with Base64 encoding. | |
std::string | grstGetProxyReq (const std::string &delegationId, ConfigContext *cfs=NULL) |
ProxyReqStruct | getNewProxyReq (ConfigContext *cfs) |
Generates a proxy certificate in PEM format with Base64 encoding that is associated to a server side generated sting identifier (delegation ID) This method must be followed by a putProxy call. | |
std::string | getDelegationVersion (ConfigContext *cfs) |
Returns the version number of the delegation services. | |
std::string | getDelegationInterfaceVersion (ConfigContext *cfs) |
Returns the version number of the delegation interface. | |
int | getProxyTerminationTime (const std::string &delegationId, ConfigContext *cfs) |
Returns the time left of the delegated proxy that is identified by the "delegatioId" string. | |
void | proxyDestroy (const std::string &delegationId, ConfigContext *cfs) |
Sends a request for removing of delegated proxy that is identified by the "delegatioId" string. | |
std::string | renewProxyReq (const std::string &delegationId, ConfigContext *cfs) |
Sends a request for renewal of delegated proxy that is identified by the "delegatioId" string. | |
void | putProxy (const std::string &delegationId, const std::string &request, ConfigContext *cfs=NULL) |
Associates the current proxy certificate file with a previously created delegation id.This method must be called after a getProxyReq call This method remains to keep compatibility with the version 1.0.0 of WMProxy servers, but it will be soon deprecated. | |
void | grst1PutProxy (const std::string &delegationId, const std::string &request, ConfigContext *cfs=NULL) |
Associates the current proxy certificate file with a previously created delegation id.This method must be called after a getProxyReq call This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service. | |
void | grstPutProxy (const std::string &delegationId, const std::string &request, ConfigContext *cfs=NULL) |
ProxyInfoStructType * | getDelegatedProxyInfo (const std::string &delegationId, ConfigContext *cfs=NULL) |
Returns the Delegated Proxy information identified by the delegationId string. | |
ProxyInfoStructType * | getJobProxyInfo (const std::string &jobId, ConfigContext *cfs=NULL) |
Returns the information related to the proxy used to submit a job that identified by its JobId. | |
Enumeration | |
| |
enum | JdlType { ORIGINAL, REGISTERED } |
Used to specify the JdlType, whether is original or registered. More... | |
enum | jobtype { JOBTYPE_NORMAL = 1, JOBTYPE_PARAMETRIC = 2, JOBTYPE_INTERACTIVE = 4, JOBTYPE_MPICH = 8, JOBTYPE_PARTITIONABLE = 16, JOBTYPE_CHECKPOINTABLE = 32 } |
Used to specify the jobtype. More... | |
void | setServerAuthentication (ConfigContext *cfs, bool auth) |
Checks if CA verification has been disabled by user. |
Used to specify the JdlType, whether is original or registered.
Used to specify the jobtype.
multiple jobtype can be specified togheter by the bitwise (|) or operation
BaseException* glite::wms::wmproxyapi::createWmpException | ( | BaseException * | b_ex, | |
const std::string & | method, | |||
const std::string & | description | |||
) |
Creates a BaseException object.
b_ex | pointer to an exception object | |
method | the name of the method throwing the exception | |
description | the description of the fault |
void glite::wms::wmproxyapi::enableFilePerusal | ( | const std::string & | jobid, | |
const std::vector< std::string > & | files, | |||
ConfigContext * | cfs = NULL | |||
) |
Enables file perusal functionalities if not disabled with the specific jdl attribute during job register operation.
Calling this operation, the user enables perusal for job identified by jobId, for files specified with fileList. After this operation, the URIs of perusal files generated during job execution can be retrieved by calling the getPerusalFiles service An empty fileList disables perusal. This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.
jobid | the string with the job identifier | |
files | vector with the list of filenames to be enabled | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
BaseException | Any other error occurred | |
OperationNotAllowedException | perusal was disabled with the specific jdl attribute. |
std::string glite::wms::wmproxyapi::getCollectionTemplate | ( | int | jobNumber, | |
const std::string & | requirements, | |||
const std::string & | rank, | |||
ConfigContext * | cfs = NULL | |||
) |
Creates a valid template JDL for a collection of jobs.
jobNumber | The number of jobs to be created for the collection | |
requirements | A string representing the expression describing the requirements (which is an attribute of boolean type) for all the jobs in the collection | |
rank | A string representing the expression for the rank (which is an attribute of double type) for all the jobs in the collection | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | one or more of the provided input parameters is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getDAGTemplate | ( | NodeStruct | dependencies, | |
const std::string & | requirements, | |||
const std::string & | rank, | |||
ConfigContext * | cfs = NULL | |||
) |
Creates a valid template ready for submission for a DAG.
dependencies | The dependency structure of the dag: each node must list all the nodes that depends on it. | |
requirements | A string representing the expression describing the requirements (which is an attribute of boolean type) for all the nodes of the dag | |
rank | A string representing the expression for the rank (which is an attribute of double type) for all the nodes of the dag | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | one or more of the provided input parameters is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
ProxyInfoStructType* glite::wms::wmproxyapi::getDelegatedProxyInfo | ( | const std::string & | delegationId, | |
ConfigContext * | cfs = NULL | |||
) |
Returns the Delegated Proxy information identified by the delegationId string.
delegationId | The id of the delegation created previously (by a getProxyReq call) | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
DelegationException | If the request failed | |
AuthenticationFaultException | : a generic authentication problem occured. | |
AuthorizationFaultException | : the client is not authorized to perform this operation. | |
InvalidArgumentFaultException | : the given delegation id is not valid. | |
GenericFaultException | : another problem occured. | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getDelegationInterfaceVersion | ( | ConfigContext * | cfs | ) |
Returns the version number of the delegation interface.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getDelegationVersion | ( | ConfigContext * | cfs | ) |
Returns the version number of the delegation services.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
std::pair<long, long> glite::wms::wmproxyapi::getFreeQuota | ( | ConfigContext * | cfs = NULL |
) |
std::string glite::wms::wmproxyapi::getIntParametricJobTemplate | ( | std::vector< std::string > | attributes, | |
int | parameters, | |||
int | start, | |||
int | step, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
ConfigContext * | cfs = NULL | |||
) |
Creates a valid template JDL for a parametric job.
attributes | All the attributes containing a reference to a parameter. Multiple attributes can be specified toghegher through the bitwise '|' operator ( as specified in attribute) | |
parameters | The number of different parameters to be created | |
start | The starting point where to begin to parametrise (default value is 0) | |
step | The step between one parameter and the next one among param_start (default value is 1) | |
requirements | A string representing the expression describing all the Job requirements (which is an attribute of boolean type) | |
rank | A string representing the expression for the rank (which is an attribute of double type) of the resource | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | one or more of the provided input parameters is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getJDL | ( | const std::string & | jobid, | |
const JdlType & | jdlType, | |||
ConfigContext * | cfs = NULL | |||
) |
Returns the JDL string which identifier is the input JobId.
jobid | the identifier of the job | |
jdlType | the type of the JDL to be retrieved (either ORIGINAL or REGISTERED) | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationFaultException | : a generic authentication problem occured. | |
AuthorizationFaultException | : the client is not authorized to perform this operation | |
InvalidArgumentFaultException | : the given delegation id is not valid. | |
GenericFaultException | : another problem occured. | |
BaseException | Any other error occurred |
ProxyInfoStructType* glite::wms::wmproxyapi::getJobProxyInfo | ( | const std::string & | jobId, | |
ConfigContext * | cfs = NULL | |||
) |
Returns the information related to the proxy used to submit a job that identified by its JobId.
This operation needs that a valid proxy (identified by an id string -delegationId string-) has been previously delegated to the endpoint.
jobId | the identifier of the job | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
DelegationException | If the request failed | |
AuthenticationFaultException | : a generic authentication problem occured. | |
AuthorizationFaultException | : the client is not authorized to perform this operation. | |
InvalidArgumentFaultException | : the given delegation id is not valid. | |
JobUnknownException | The provided jobId has not been registered to the system | |
GenericFaultException | : another problem occured. | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getJobTemplate | ( | int | type, | |
const std::string & | executable, | |||
const std::string & | arguments, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
ConfigContext * | cfs = NULL | |||
) |
Creates a valid template ready for submission for a job.
type | The jobtype of the job. Multiple jobtype can be specified toghether through the bitwise '|' operator | |
executable | The name of the executable to be executed | |
arguments | The arguments needed by the executable (empty string if not necessary) | |
requirements | A string representing the expression describing the requirements (which is an attribute of boolean type) for the job | |
rank | A string representing the expression for the rank (which is an attribute of double type) for the job | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | one or more of the provided input parameters is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
long glite::wms::wmproxyapi::getMaxInputSandboxSize | ( | ConfigContext * | cfs = NULL |
) |
Returns the maximum Input sandbox size (in bytes) that a user can count on for a job submission if using the space managed by the WM.
This is a static value in the WM configuration (on a job-basis) set by the VO administrator
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
ProxyReqStruct glite::wms::wmproxyapi::getNewProxyReq | ( | ConfigContext * | cfs | ) |
Generates a proxy certificate in PEM format with Base64 encoding that is associated to a server side generated sting identifier (delegation ID) This method must be followed by a putProxy call.
This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
std::vector<std::pair<std::string , long> > glite::wms::wmproxyapi::getOutputFileList | ( | const std::string & | jobid, | |
ConfigContext * | cfs = NULL , |
|||
const std::string & | protocol = "" | |||
) |
Retrieves the list of URIs where the output files created during job execution have been stored in the WM managed space and the corresponding sizes in bytes.
It can only be applied for files of the Output Sandbox that are managed by the WM (i.e. not specified as URI in the JDL).
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters | |
jobid | The string identification of the job | |
protocol | string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols operation. Possible standard values are: "all" to get URIs with all available protocols; "default" to get URIs with the server default protocol not mandatory, default value is "all") |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
OperationNotAllowedException | The current job status does not allow performing of the requested operation. | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::vector<std::string> glite::wms::wmproxyapi::getPerusalFiles | ( | const std::string & | jobid, | |
const std::string & | file, | |||
const bool & | allchunks, | |||
ConfigContext * | cfs = NULL , |
|||
const std::string & | protocol = "" | |||
) |
Gets the URIs of perusal files generated during job execution for the specified file file.
If allChunks is set to true all perusal URIs will be returned; also the URIs already requested with a previous getPerusalFiles operation. Default value is false. Perusal files have to be presiuosly enabled by calling the enableFilePerusal service This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.
jobid | the string with the job identifier | |
allchunks | boolean value to specify when to get all chuncks | |
jobid | the string with the job identifier | |
file | the name of the perusal file be enabled | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters | |
protocol | string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols operation. Possible standard values are: "all" to get URIs with all available protocols; "default" to get URIs with the server default protocol not mandatory, default value is "all") |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
OperationNotAllowedException | perusal was disabled with the specific jdl attribute | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getProxyReq | ( | const std::string & | delegationId, | |
ConfigContext * | cfs = NULL | |||
) |
Generates a proxy certificate in PEM format with Base64 encoding.
This method must be followed by a putProxy call This method remains to keep compatibility with the version 1.0.0 of WMProxy servers, but it will be soon deprecated. The version of the server can be retrieved by calling the getVersion service
delegationId | The id of the delegation to be created | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
int glite::wms::wmproxyapi::getProxyTerminationTime | ( | const std::string & | delegationId, | |
ConfigContext * | cfs | |||
) |
Returns the time left of the delegated proxy that is identified by the "delegatioId" string.
If an empty string is provided as input for delegationID, proxy with default identifier is ocnsidered.
delegationID | the identifier string of the delegated proxy (empty string for the default proxy) | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
std::vector< std::pair<std::string ,std::vector<std::string > > > glite::wms::wmproxyapi::getSandboxBulkDestURI | ( | std::string | jobid, | |
ConfigContext * | cfs = NULL , |
|||
const std::string & | protocol = "" | |||
) |
Returns a list of destination URI's associated to the job and its children in case of DAG's and collections, where the job input sandbox files can be uploaded by the client on the WMS node.
The job is identified by the jobId provided as input (the parent jobid for DAG's and collections). The locations are created in the storage managed by the WM and the corresponding URI is returned to the operation caller if no problems has been arised during creation. Files of the job input sandbox that have been referenced in the JDL as relative or absolute paths are expected to be found in the returned location when the job lands on the CE. Note that the WM service only provides a the URI of a location where the job input sandbox files can be stored but does not perform any file transfer. File upload is indeed responsibility of the client (through the GridFTP service available on the WMS node). The user can also specify in the JDL the complete URI of files that are stored on a GridFTP server (e.g. managed by her organisation); those files will be directly downloaded (by the JobWrapper) on the WN where the job will run without transiting on the WM machine. The same applies to the output sandbox files list, i.e. the user can specify in the JDL the complete URIs for the files of the output sandbox; those files will be directly uploaded (by the JobWrapper) from the WN to the specified GridFTP servers without transiting on the WMS machine.
jobid | The string identification of the job | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters | |
protocol | string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols operation. Possible standard values are: "all" to get URIs with all available protocols; "default" to get URIs with the server default protocol not mandatory, default value is "all") |
AuthenticationException | An authentication problem occurred | |
AuthorizationExceptionBaseException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::vector<std::string> glite::wms::wmproxyapi::getSandboxDestURI | ( | const std::string & | jobid, | |
ConfigContext * | cfs = NULL , |
|||
const std::string & | protocol = "" | |||
) |
Returns a list of destination URI's associated to the job (identified by the jobId provided as input) where the job input sandbox files can be uploaded by the client.
The location is created in the storage managed by the WM (if needed) and the corresponding URI is returned to the operation caller if no problems has been arised during creation. Files of the job input sandbox that have been referenced in the JDL as relative or absolute paths are expected to be found in the returned location when the job lands on the CE.
jobid | The string identification of the job | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters | |
protocol | string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols operation. Possible standard values are: "all" to get URIs with all available protocols; "default" to get URIs with the server default protocol not mandatory, default value is "all") |
AuthenticationException | An authentication problem occurred | |
AuthorizationExceptionBaseException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::getStringParametricJobTemplate | ( | std::vector< std::string > | attributes, | |
std::vector< std::string > | parameters, | |||
const std::string & | requirements, | |||
const std::string & | rank, | |||
ConfigContext * | cfs = NULL | |||
) |
Creates a valid template JDL for a parametric job.
attributes | All the attributes that contains reference to a parameter. Multiple attributes can be specified toghegher through the bitwise '|' operator ( as specified in attribute) | |
parameters | A vector containing all the parameters | |
requirements | A string representing the expression describing all the Job requirements (which is an attribute of boolean type) | |
rank | A string representing the expression for the rank (which is an attribute of double type) of the resource | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | one or more of the provided input parameters is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::pair<long, long> glite::wms::wmproxyapi::getTotalQuota | ( | ConfigContext * | cfs = NULL |
) |
Returns the remaining free part of available user disk quota (in bytes).
The fault GetQuotaManagementFault is returned if the quota management is not active.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
QuotaManagementException | Quota management is not active on the WM | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::vector<std::string> glite::wms::wmproxyapi::getTransferProtocols | ( | ConfigContext * | cfs | ) |
Returns a list with the available transfer protocols on the WMProxy server.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
AuthorizationExceptionBaseException | The user is not authorized to perform this operation | |
GenericException | A generic problem occurred |
std::string glite::wms::wmproxyapi::getVersion | ( | ConfigContext * | cfs = NULL |
) |
Retrieve the service version information.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
GenericException | A generic problem occurred | |
BaseException | any other error occurred |
std::string glite::wms::wmproxyapi::grst1GetProxyReq | ( | const std::string & | delegationId, | |
ConfigContext * | cfs = NULL | |||
) |
Generates a proxy certificate in PEM format with Base64 encoding.
This method must be followed by a putProxy call. This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.
delegationId | The id of the delegation to be created | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::grst1PutProxy | ( | const std::string & | delegationId, | |
const std::string & | request, | |||
ConfigContext * | cfs = NULL | |||
) |
Associates the current proxy certificate file with a previously created delegation id.This method must be called after a getProxyReq call This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.
delegationId | The id of the delegation created previously (by a getProxyReq call) | |
request | The string request got by a previous call of a getProxyReq | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
DelegationException | If the request failed | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::grstGetProxyReq | ( | const std::string & | delegationId, | |
ConfigContext * | cfs = NULL | |||
) |
void glite::wms::wmproxyapi::grstPutProxy | ( | const std::string & | delegationId, | |
const std::string & | request, | |||
ConfigContext * | cfs = NULL | |||
) |
void glite::wms::wmproxyapi::jobCancel | ( | const std::string & | jobid, | |
ConfigContext * | cfs = NULL | |||
) |
Sends cancellation request for a previously submitted job identified by its JobId.
If the job is still managed by the WM then it is removed from the WM tasks queue. If the job has been already sent to the CE, the WM simply forwards the request to the CE. For suspending/releasing and sending signals to a submitted job the user has to check that the job has been scheduled to a CE and access directly the corresponding operations made available by the CE service.
jobid | The string identification of the job | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
OperationNotAllowedException | The current job status does not allow performing of the requested operation. | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::vector<std::pair<std::string , long> > glite::wms::wmproxyapi::jobListMatch | ( | const std::string & | jdl, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank.
The fault NoSuitableResourcesFault is returned if there are no resources matching job constraints.
jdl | the job description string | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::vector<std::pair<std::string , long> > glite::wms::wmproxyapi::jobListMatchJSDL | ( | std::ifstream & | jsdlFile, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank.
The fault NoSuitableResourcesFault is returned if there are no resources matching job constraints.
jsdl | The JSDL file stream that represents the job | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::jobPurge | ( | const std::string & | jobid, | |
ConfigContext * | cfs = NULL | |||
) |
Removes from the WM managed space all files related to the job identified by the jobId provided as input.
It can only be applied for job related files that are managed by the WM. E.g. Input/Output sandbox files that have been specified in the JDL through a URI will be not subjected to this management.
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters | |
jobid | The string identification of the job |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
OperationNotAllowedException | The current job status does not allow performing of the requested operation. | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
JobIdApi glite::wms::wmproxyapi::jobRegister | ( | const std::string & | jdl, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Registers a job for submission.The unique identifier assigned to the job is returned to the client.
This operation only registers the job and assigns it with an identifier. The processing of the job (matchmaking, scheduling etc.) within the WM is not started. The job is "held" by the system in the "Registered" status until the jobStart operation is called. Between the two calls the client can perform all preparatory actions needed by the job to run (e.g. the registration of input data, the upload of the job input sandbox files etc); especially those actions requiring the specification of the job identifier. The service supports registration (and consequently submission) of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs. The description is always provided through a single JDL description. When a clients requests for registration of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs); the operation returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs.
jdl | The JDL string representation of the job | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL expression is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
JobIdApi glite::wms::wmproxyapi::jobRegisterJSDL | ( | std::ifstream & | jsdlFile, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Registers a job for submission.The unique identifier assigned to the job is returned to the client.
This operation only registers the job and assigns it with an identifier. The processing of the job (matchmaking, scheduling etc.) within the WM is not started. The job is "held" by the system in the "Registered" status until the jobStart operation is called. Between the two calls the client can perform all preparatory actions needed by the job to run (e.g. the registration of input data, the upload of the job input sandbox files etc); especially those actions requiring the specification of the job identifier. The service supports registration (and consequently submission) of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs. The description is always provided through a single JDL description. When a clients requests for registration of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs); the operation returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs.
jsdl | The JSDL file stream that represents the job | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL expression is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::jobStart | ( | const std::string & | jobid, | |
ConfigContext * | cfs = NULL | |||
) |
Triggers the submission of a previously registered job.
It starts the actual processing of the registered job within the Workload Manager. It is assumed that when this operation is called, all the work preparatory to the job (e.g. input sandbox upload, registration of input data to the Data Management service etc.) has been completed by the client.
Here follows an example of the sequence of operations to be performed for submitting a job:
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used | |
jobid | the string identification of the job (returned by jobRegister method) |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given jobId expression is not valid | |
JobUnknownException | The provided jobId has not been registered to the system | |
OperationNotAllowedException | The current job status does not allow performing of the requested operation. | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
JobIdApi glite::wms::wmproxyapi::jobSubmit | ( | const std::string & | jdl, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager.
The unique identifier assigned to the job is returned to the client. Usage of this operation (instead of jobRegister + jobStart) is indeed recommended when the job identifier is not needed prior to its submission (e.g. jobs without input sandbox or with a sandbox entirely available on a GridFTP server managed by the client or her organisation). The service supports submission of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs; the description is always provided through a single JDL description. When a clients requests for submission of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs), the operations returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs. This operation needs that a valid proxy (identified by an id string -delegationId string-) has been previously delegated to the endpoint.
jdl | The JDL string representation of the job | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL expression is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
JobIdApi glite::wms::wmproxyapi::jobSubmitJSDL | ( | std::ifstream & | jsdlFile, | |
const std::string & | delegationId, | |||
ConfigContext * | cfs = NULL | |||
) |
Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager.
The unique identifier assigned to the job is returned to the client. Usage of this operation (instead of jobRegister + jobStart) is indeed recommended when the job identifier is not needed prior to its submission (e.g. jobs without input sandbox or with a sandbox entirely available on a GridFTP server managed by the client or her organisation). The service supports submission of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs; the description is always provided through a single JDL description. When a clients requests for submission of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs), the operations returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs. This operation needs that a valid proxy (identified by an id string -delegationId string-) has been previously delegated to the endpoint.
jsdl | The JSDL file stream that represents the job | |
delegationId | The id string used to identify a previously delegated proxy | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL default parameters are used |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
InvalidArgumentException | If the given JDL expression is not valid | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::proxyDestroy | ( | const std::string & | delegationId, | |
ConfigContext * | cfs | |||
) |
Sends a request for removing of delegated proxy that is identified by the "delegatioId" string.
If an empty string is provided as input for delegationID, proxy with default identifier is ocnsidered.
delegationID | the identifier string of the delegated proxy (empty string for the default proxy) | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::putProxy | ( | const std::string & | delegationId, | |
const std::string & | request, | |||
ConfigContext * | cfs = NULL | |||
) |
Associates the current proxy certificate file with a previously created delegation id.This method must be called after a getProxyReq call This method remains to keep compatibility with the version 1.0.0 of WMProxy servers, but it will be soon deprecated.
The version of the server can be retrieved by calling the getVersion service
delegationId | The id of the delegation created previously (by a getProxyReq call) | |
request | The string request got by a previous call of a getProxyReq | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
AuthenticationException | An authentication problem occurred | |
AuthorizationException | The user is not authorized to perform this operation | |
GenericException | A generic problem occurred | |
BaseException | Any other error occurred |
std::string glite::wms::wmproxyapi::renewProxyReq | ( | const std::string & | delegationId, | |
ConfigContext * | cfs | |||
) |
Sends a request for renewal of delegated proxy that is identified by the "delegatioId" string.
If an empty string is provided as input for delegationID, proxy with default identifier is ocnsidered.
delegationID | the identifier string of the delegated proxy (empty string for the default proxy) | |
cfs | Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters |
BaseException::DelegationException | If the request failed | |
BaseException | Any other error occurred |
void glite::wms::wmproxyapi::setServerAuthentication | ( | ConfigContext * | cfs, | |
bool | auth | |||
) |
Checks if CA verification has been disabled by user.