Content-type: text/html
import gfalthr
( string version ) gfal_version ()
( int returncode, gfal_internal gfal, string errmsg ) gfal_init ( dict req )
( int returncode, gfal_internal gfal, int srm_reqid, listOfInt srm_fileids, string srmv2_reqtoken ) gfal_get_ids ( gfal_internal gfal )
( int returncode, gfal_internal gfal, listOfDict filestatuses ) gfal_get_results ( gfal_internal gfal )
(void) gfal_internal_free ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_deletesurls ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_get ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_getstatus ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_ls ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_prestage ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_pin ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_prestagestatus ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_release ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_set_xfer_done ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_set_xfer_running ( gfal_internal gfal )
( int returncode, gfal_internal gfal, string errmsg ) gfal_turlsfromsurls ( gfal_internal gfal )
First of all, you have to create a request, in which you will be able to set your parameters :
import gfal
gfalreq = {}
gfalreq["surls"] = ["srm://lxdpm102.cern.ch/dpm/cern.ch/home/dteam/file.test"]
...
To see the meaning of each parameter, have a look to the documentation of gfal_init_python(3). Once, you have set all the desired parameters in this request, you have to generate the internal gfal object like this :
returnCode, gfalObj, errMsg = gfal.gfal_init (gfalreq)
DO NOT MODIFY this object by hand. If you need other parameters, just make a new request and run gfal_init again on it.
Then, you just have to pass this internal object gfalObj to gfal functions :
returnCode, gfalObj, errMsg = gfal.gfal_turlsfromsurls (gfalObj)
Finally, you have to call a specific function to get the results :
returnCode, gfalObj, statuses = gfal.gfal_get_results (gfalObj)
It is recommended to keep the same 'gfal_internal' object for making requests on same SURLs.
Once the 'gfal_internal' object is not needed anymore, it must be freed:
gfal.gfal_internal_free (gfalObj);