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 06:22] – [Python Module for Staging] Robbie Luijbenpublic:lta_tricks [2023-07-17 08:51] (current) Robbie Luijben
Line 377: Line 377:
 The python interaction with the LTA catalog can be complemented with the use of a specific module developed to give users more control over their staging requests. The python interaction with the LTA catalog can be complemented with the use of a specific module developed to give users more control over their staging requests.
  
-Current released version 2.0 ([[https://git.astron.nl/astron-sdc/lofar_stager_api|master branch]]) is to be used with the new LTA stager (stageit), it is not backwards compatible with the old LTA stager. Older versions of this script (i.e., 1.7 and older) have become obsolete. Please see **"Version 2.0 usage notes"** listed below for documentation (or check the README file in the repository linked above).+Current released version 2.0 ([[http://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0|tagged on master branch]]) is to be used with the new LTA stager (stageit), it is not backwards compatible with the old LTA stager. Older versions of this script (i.e., 1.7 and older) have become obsolete. Please see **"Version 2.0 usage notes"**  listed below for documentation (or check the README file in the repository linked above).
  
   * User documentation for __//stageit //__  can be found at: [[https://support.astron.nl/confluence/display/SDCP/User+documentation|https://support.astron.nl/confluence/display/SDCP/User+documentation]]   * User documentation for __//stageit //__  can be found at: [[https://support.astron.nl/confluence/display/SDCP/User+documentation|https://support.astron.nl/confluence/display/SDCP/User+documentation]]
   * Version 2.0 release can be found at: [[https://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0|https://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0]]   * Version 2.0 release can be found at: [[https://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0|https://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0]]
- 
  
 ==== Version 2.0 usage notes ==== ==== Version 2.0 usage notes ====
  
-The module is made available [[https://git.astron.nl/astron-sdc/lofar_stager_api|here]] (master branch). Simply checkout the master branch and use the script. Please see the last note in the list below with regards to required dependencies.+The module is made available [[http://git.astron.nl/astron-sdc/lofar_stager_api/-/releases/2.0|here]] (tagged on master branch). Simply checkout the tagged commit and use the script. Please see the last note in the list below with regards to required dependencies.
  
 __Notes:__ __Notes:__
  
-   * You need an access token to the stageit api. Please refer to the user guide linked above to sign up and login to stageit. After logging in, a token can be obtained in one of two ways:+  * You need an access token to the stageit api. Please refer to the user guide linked above to sign up and login to stageit. After logging in, a token can be obtained in one of two ways:
       * Visit [[https://sdc.astron.nl/stageit/api/staging/get-token|https://sdc.astron.nl/stageit/api/staging/get-token]]       * Visit [[https://sdc.astron.nl/stageit/api/staging/get-token|https://sdc.astron.nl/stageit/api/staging/get-token]]
       * From anywhere in the application, click on your account name in the top right to access your profile. From your profile page, click the "Request token" button to receive a token.       * From anywhere in the application, click on your account name in the top right to access your profile. From your profile page, click the "Request token" button to receive a token.
Line 401: Line 400:
 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 ====
-==== Version 1.7 usage notes ==== +
- +
-The module is made available **[[https://git.astron.nl/astron-sdc/lofar_stager_api/-/releases|here]]** and its functions are mostly self-explanatory. Simply checkout release 1.7 and use the script. +
- +
-**Alternatively to the .awe/Environment.cfg described above, user credentials can also be provided via a file ~/.stagingrc with credentials of your Lofar account**, similar to ./wgetrc: +
-<code> +
- +
-  user=XXX +
-  password=YYY +
- +
-</code>+
  
 For a description of what the user can do, we list here the functions that are available. For a description of what the user can do, we list here the functions that are available.
  
-**stage(surls)** \\ +**stage(surls)** \\ It takes in a list of surls, queues a staging request for those urls, and outputs the ID of the request.
-It takes in a list of surls, queues a staging request for those urls, and outputs the ID of the request.+
  
-**get_status(stageid)** \\ +**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"
-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)** \\ +**abort(stageid)** \\ It allows users to end a staging request.
-It allows users to end a staging request.+
  
-**get_surls_online(stageid)** \\ +**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.
-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)** \\ +**get_srm_token(stageid)** \\ The srm token is useful to interact directly with the SRM site through GRID/SRM tools.
-The srm token is useful to interact directly with the SRM site through GRID/SRM tools.+
  
-**reschedule(stageid)** \\ +**reschedule(stageid)** \\ If a request failed, it can be rescheduled.
-If a request failed, it can be rescheduled.+
  
-**get_progress()** \\ +**get_progress()** \\ No input needed. It returns the statuses of all the requests owned by the user.
-No input needed. It returns the statuses of all the requests owned by the user.+
  
 Below is an example of how to use this: Below is an example of how to use this:
- +<code> 
-<code>> python+> python
 Python 2.7.10 (default, Oct 23 2015, 19:19:21) 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 [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Line 448: Line 429:
  
 + 12227 + 12227
-  - File count      ->     100+  - File count   ->     100
   - Files done      ->     40   - Files done      ->     40
   - Flagged abort      ->     false   - Flagged abort      ->     false
  • Last modified: 2023-06-15 06:22
  • by Robbie Luijben