flightplan icon indicating copy to clipboard operation
flightplan copied to clipboard

No access to remote host name in local.transfer()

Open ravi opened this issue 9 years ago • 5 comments
trafficstars

Perhaps this is a poor usage pattern, but I have a need to access the remote host name or at least the target name, in transfer() (the files to be transferred are based on the remote hostname or target). In earlier versions I could do this using something like local.flight.flightplan.target.destination (IIRC) but now I don't have that (I could fudge using local._context.target but I am guessing underscore prefixed properties should be treated as private following Unix conventions).

I am wondering if this may be a general need, not just a peculiarity of my usage :-).

ravi avatar Jun 02 '16 02:06 ravi

See this section in the docs: https://github.com/pstadler/flightplan#accessing-runtime-information

Is this what you're asking for?

pstadler avatar Jun 02 '16 07:06 pstadler

For local.transfer() (IIUC) even though there is a remote end, that info is not accessible via the runtime. But I came up with a workaround using plan.runtime.target for my current need. Thank you for the response.

ravi avatar Jun 03 '16 18:06 ravi

I am bumping up against this issue once again. @pstadler is there an easy way to accomplish this? My guess is not? Because the looping over the target hosts occurs within the local.transfer(), but I thought I'd ask to be sure.

ravi avatar May 15 '17 00:05 ravi

This is a bug. Shouldn't be too hard to fix. Will try to do another release pretty soon

On 15 May 2017 at 02:55:41, Ravi Sarma ([email protected]) wrote:

I am bumping up against this issue once again. @pstadler https://github.com/pstadler is there an easy way to accomplish this? My guess is not? Because the looping over the target hosts occurs within the local.transfer(), but I thought I'd ask to be sure.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pstadler/flightplan/issues/140#issuecomment-301352659, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkoIZU9wZ-QyvnrUJ8Uw9hX69eVSZkhks5r56KNgaJpZM4IsKVE .

pstadler avatar May 15 '17 05:05 pstadler

Ah sorry, I thought this is about another ticket. This is indeed hard to solve. Maybe you should simply roll with an own implementation running rsync in a local loop.

pstadler avatar May 15 '17 07:05 pstadler