Skip to content
Snippets Groups Projects
Commit f6fc8b5f authored by Roy de Goei's avatar Roy de Goei
Browse files

Merge branch 'SDC-1647-use-macaroons-per-service-filter' into 'master'

SDC-1647: Add service_filter and use renamed macaroon value name for...

See merge request !387
parents 021b0615 eb1ada2f
No related branches found
No related tags found
1 merge request!387SDC-1647: Add service_filter and use renamed macaroon value name for...
Pipeline #105895 passed
...@@ -664,25 +664,29 @@ def add_plots(task, results, expand_image=False): ...@@ -664,25 +664,29 @@ def add_plots(task, results, expand_image=False):
plot_files = [] plot_files = []
# translate the path to a url for the original plots location # translate the path to a url for the original plots location
# the next four call shoulod use filter=task.service_filter BUT since juelich is no working
# the service_filter is incorrect and we can only use srm.grid.sara.nl
default_filter = "srm.grid.sara.nl"
try: try:
srm_to_url = Configuration.objects.get(key='dcache:srm_to_url').value srm_to_url = Configuration.objects.get(filter=default_filter, key='dcache:srm_to_url').value
except: except:
srm_to_url = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/ldv/::https://webdav.grid.surfsara.nl/" srm_to_url = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/ldv/::https://webdav.grid.surfsara.nl/"
# translate the path to a url for when the plots are moved by the archiver # translate the path to a url for when the plots are moved by the archiver
try: try:
srm_to_url_archive_disk = Configuration.objects.get(key='dcache:srm_to_url_archive_disk').value srm_to_url_archive_disk = Configuration.objects.get(filter=default_filter, key='dcache:srm_to_url_archive_disk').value
except: except:
srm_to_url_archive_disk = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/projects/::https://webdav.grid.surfsara.nl/projects/" srm_to_url_archive_disk = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/projects/::https://webdav.grid.surfsara.nl/projects/"
# retrieve the current tokens for both the original and archived locations # retrieve the current tokens for both the original and archived locations
try: try:
token_original = str(Configuration.objects.get(key='dcache:token').value) token_original = str(Configuration.objects.get(filter=default_filter, key='token:macaroon_disk_ldv').value)
except: except:
token_original = '' token_original = ''
try: try:
token_archive_disk = str(Configuration.objects.get(key='dcache:token_archive_disk').value) token_archive_disk = str(Configuration.objects.get(filter=default_filter, key='token:macaroon_disk_project').value)
except: except:
token_archive_disk = '' token_archive_disk = ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment