-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to send data on standard input when executing a command #379
Add support to send data on standard input when executing a command #379
Conversation
Checked commit fabiendupont@fd9cb28 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 lib/gems/pending/util/MiqSshUtil.rb
|
Can you reference a WIP patch where this would be used? It's hard to review without seeing the use case. |
@carbonin it would be used like this https://github.com/ManageIQ/manageiq/blob/7de90d65d5069ad4a1cb2a9eb3695b739ad00f3d/app/models/conversion_host.rb#L47. In Automate, I had implemented a method similar to |
@fdupont-redhat Does this need to go back to the Hammer release? |
@carbonin Yes, it does. ManageIQ/manageiq#18064 expected to be backported to Hammer, so this one should too. |
…ssh_exec Add support to send data on standard input when executing a command (cherry picked from commit 7cfbbb0)
Hammer backport details:
|
When running a command via SSH, one may need to send data on the standard input of the command. This PR adds a
stdin
argument toexec
andsuexec
methods, with a default value ofnil
. The data is sent only if this is not nil, so current calls to these methods should not be impacted.Associated RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1634029