Skip to content
Snippets Groups Projects
Commit 80d712a7 authored by Yan Grange's avatar Yan Grange :wave:
Browse files

SDC-45: Write srmmv commands to STDOUT

parent d33807c2
Branches
Tags
No related merge requests found
......@@ -29,13 +29,15 @@ with open("source_data_list.dat") as sdl:
filepaths, filelist_data = data_parser(source_data)
# step 2: compute directory hashes
scope = 'lofar'
srm_root_host = "srm://srm.grid.sara.nl"
rucio_rse_rootdir = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/escape/disk/rucio/sara_dcache"
rdt = protocol.RSEDeterministicTranslation()
for frompath in filepaths:
fname = os.path.basename(frompath)
tosubpath = rdt.path(scope,fname)
print(frompath, tosubpath)
# step 3: move data to directories
from_address = "/".join([srm_root_host, frompath])
to_address = "/".join([rucio_rse_rootdir, tosubpath])
print("srmmv {src} {tgt}".format(src=from_address, tgt=to_address))
# step 4: Add replicas for files using rucio.client.replicaclient the ReplicaClient class (add_replicas)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment