fr4nk5ch31n3r / gtransfer

GridFTP transfers made easy!
GNU General Public License v3.0
7 stars 3 forks source link

dpath: Support creation of multi-step path directly on the command line #29

Open fscheiner opened 11 years ago

fscheiner commented 11 years ago

Currently when creating a dpath, a user has to specify source and destination of the dpath. The dpath tool then:

  1. creates a dpath according to an internal or external template that includes a single step path (with metric equal to 0) and a multi-step path (with metric equal to 1) that needs to be edited
  2. and if the EDITOR environment variable is set, it opens this dpath file for editing

It would be beneficial to be able to create a multi-step path in a dpath file just by using the command line, i.e. to support additional switches which allow to specifiy the transit sites and directories to use.

Possible implementation details

$ dpath -c [...] --via "<PUT_ADDRESS_AND_PATH1>;<GET_ADDRESS_AND_PATH1>"[ --via "<PUT_ADDRESS_AND_PATH2>;<GET_ADDRESS_AND_PATH2>"[ [...]]] 

As the transit site and directory of transfer step n could differ from the transit site and directory of transfer step n+1 (see example path below), both have to be specified as <PUT_ADDRESS_AND_PATH> and <GET_ADDRESS_AND_PATH>. The dpath tools should support multiple occurrences of the--via switch.

Example Command line:

$ dpath -c --source "gsiftp://host1-int.domain.tld:2811" \
>             --destination "gsiftp://host3-ext.domain.tld:2811" \
>             --via "gsiftp://host2-int.domain.tld:2811/transit/dir/int/;gsiftp://host2-ext.domain.tld:2811/transit/dir/ext/"

Resulting path:

<path metric="0">
gsiftp://host1-int.domain.tld:2811;gsiftp://host2-int.domain.tld:2811/transit/dir/int/
gsiftp://host2-ext.domain.tld:2811/transit/dir/ext/;gsiftp://host3-ext.domain.tld:2811
</path>
fscheiner commented 11 years ago

Todo: