Added passthrough for PySFTP Connection keyword arguments to RemoteTarget constructor #1815
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is simply a passthrough to enable the RemoteTarget to be used in cases
where the SFTP connection is made using a private key instead of a password.
However, since PySFTP is the underlying SFTP module in use, I reason that there
is no need to continue adding the Connection options piecemeal as people decide
they need them. It is sufficient at this point to maintain the existing username,password
interface of RemoteTarget while allowing users to supplement these with any other
valid PySFTP Connection() constructor arguments that are useful to them.
This doesn't alter the interface for existing users - it simply
allows users who know that PySFTP is the underlying implementation
to pass additional keyword arguments to the creation of the PySFTP
Connection.
Motivation and Context
My usage of Luigi requires uploading a file to an SFTP server, to which I authenticate with a username and private key.
Have you tested this? If so, how?
I have not tested this except for my own usage, but I anticipate it will pass all existing tests, and the implementation is a simple use of standard Python kwargs semantics.