Extending aexpect with file transfer
Closed this issue · 7 comments
Is it possible to extend aexpect with simple data transfer functionality like the one in avocado-vt's remote module?
The reasoning behind this is that file transfer is tightly coupled (also in terms of use cases) to aexpect and generalizes beyond virtualization as the use of virtual machines done in avocado-vt.
Actually I've been struggling to find the time to polish and refine a SSHSession
class that inherits from ShellSession
that allows reading/writing/... remote files and has other helpers with regards to ssh, but unfortunately I'm fairly overloaded now. If you have some spare cycles that is what I'd suggest as extending it of scp
seems possible...
Will it be ok this is done by copying remote.py
(and deps) from avocado-vt and then simply calling its file copy methods from a newly developed SSHSession
instance?
Aexpect should not depend on avocado-vt
as avocado-vt
already depends on aexpect
. So at least for a while we'd have to maintain copy of the implementation in both and then slowly remove it from avocado-vt
and use it from aexpect
instead.
Btw just to clarify I won't have time to propose the SSHSession any time soon due to other tasks so take that only as a recommendation, or suggestion, but feel free to propose a different way if it doesn't fit your goal.
@ldoktor Gladly, will be able to try to extend this and add a new utility about running code remotely in the near months.
Hi @ldoktor, I have implemented the minimal set of changes I saw fit in #55 where I didn't extend the previous client classes with an SSHSession since all remote operations (from remote.py
) create and manipulate sessions and instances of these classes themselves.
Feel free to take a look when you can.
Since we now have such file transfer functionality and the additional session classes, I am closing this. Anybody with more specific file transfer feature request is free to open another issue.