public:lta_tricks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
public:lta_tricks [2023-06-15 19:37] Yan Grangepublic:lta_tricks [2023-07-17 08:51] (current) Robbie Luijben
Line 399: Line 399:
  
 Also note that some functions are not supported in the new LTA stager. The states that a request can be in have been simplified. As such, there is no need for these functions anymore. Upon use, they will display an error stating that the function is deprecated. Please look at the ''stager_access.py''  file for more information. Also note that some functions are not supported in the new LTA stager. The states that a request can be in have been simplified. As such, there is no need for these functions anymore. Upon use, they will display an error stating that the function is deprecated. Please look at the ''stager_access.py''  file for more information.
 +
 +==== Functionality ====
 +
 +For a description of what the user can do, we list here the functions that are available.
 +
 +**stage(surls)** \\ It takes in a list of surls, queues a staging request for those urls, and outputs the ID of the request.
 +
 +**get_status(stageid)** \\ It tells the user if a request is queued, in progress or finished (success). Possible statuses: "new", "scheduled", "in progress", "aborted", "failed", "partial success", "success", "on hold"
 +
 +**abort(stageid)** \\ It allows users to end a staging request.
 +
 +**get_surls_online(stageid)** \\ It gives a list of the surls that have been staged for the relative request. The list is updated whenever a new surl comes on line.
 +
 +**get_srm_token(stageid)** \\ The srm token is useful to interact directly with the SRM site through GRID/SRM tools.
 +
 +**reschedule(stageid)** \\ If a request failed, it can be rescheduled.
 +
 +**get_progress()** \\ No input needed. It returns the statuses of all the requests owned by the user.
 +
 +Below is an example of how to use this:
 +<code>
 +> python
 +Python 2.7.10 (default, Oct 23 2015, 19:19:21)
 +[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
 +Type "help", "copyright", "credits" or "license" for more information.>>> import stager_access as sa
 +
 +2016-11-24 16:39:55.865000 stager_access: Parsing user credentials from /Users/renting/.stagingrc
 +2016-11-24 16:39:55.865111 stager_access: Creating proxy>>> sa.prettyprint(sa.get_progress())
 +
 ++ 12227
 +  - File count   ->     100
 +  - Files done      ->     40
 +  - Flagged abort      ->     false
 +  - Location      ->     fz-juelich
 +  - Percent done      ->     40
 +  - Status      ->     on hold
 +  - User id      ->     1919
 +
 +</code>
  
  
  • Last modified: 2023-06-15 19:37
  • by Yan Grange