Added support for legacy SCP protocol.#123
Conversation
Rahix
left a comment
There was a problem hiding this comment.
Hi, thanks a lot for the contribution!
Yeah, I can see why this would be needed. However, I am wondering if it wouldn't make more sense to make this an attribute of the machine-class you are copying to? Then testcases don't have to know whether they need to set use_legacy_protocol, but instead automatically do the right thing depending on the machine that it is copying to.
So essentially, doing this in _scp_copy():
use_legacy_protocol = getattr(remote_path.host, "requires_legacy_scp", False)
if use_legacy_protocol:
scp_command += ["-O"]And then you just set requires_legacy_scp = True inside you machine class configuration for machines that need it.
What do you think?
Sure thing, that sounds better :) |
Rahix
left a comment
There was a problem hiding this comment.
Looks great, thank you very much!
Added option
use_legacy_protocol:booltolinux.copyandutils.copy_to_dirto use the legacy SCP protocol for file transfers instead of the SFTP protocol. Forcing the use of the SCP protocol may be necessary for servers that do not implement SFTP, for backwards compatibility. In essence is to pass-Ooption to SCP command.