-
Notifications
You must be signed in to change notification settings - Fork 93
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
Windows script files #950
base: master
Are you sure you want to change the base?
Windows script files #950
Conversation
402b255
to
a42ec9a
Compare
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Set; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please configure your IDE to not reorder imports.
36d8ed0
to
1fa3057
Compare
c4c3e9f
to
71ba10a
Compare
71ba10a
to
8d929b3
Compare
@bostko any update on this? it looks like we are still waiting on cloudsoft/winrm4j#2 -- it looks like you addressed @aledsage 's remaining comment about |
acc2d97
to
7dad21b
Compare
@ahgittin Yes it is still waiting for cloudsoft/winrm4j#2 |
7dad21b
to
40b5a90
Compare
6e383a5
to
55562c9
Compare
Can you review it again? @aledsage |
The current implementation of the code and |
Done. |
55562c9
to
32dc230
Compare
* @param commands | ||
* @deprecated since 0.2; Use the {@link #executeCommand(String)} instead and transform your commands list explicitly | ||
*/ | ||
@Deprecated | ||
WinRmToolResponse executeScript(List<String> commands); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bostko see @neykov 's comments in cloudsoft/winrm4j#2, saying "we should keep the (List<String>)
...".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aledsage I kept it. It is here
f9f96d0
to
8672510
Compare
import java.util.Map; | ||
|
||
public interface NativeWindowsScriptRunner { | ||
public interface NaiveWindowsScriptRunner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why rename this to "Naive" instead of "Native"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I named it similar to NaiveScriptRunner
.
Docs added.
#1158 contains some of these same changes (it switches to using the pure-java winrm4j client v0.2.0). |
8672510
to
f3ddf8f
Compare
fa7e0b8
to
dec1f2c
Compare
Use executePsCommand and executeCmdCommand instead of executeScript WinRM Script tests
dec1f2c
to
a3f57a6
Compare
The PR includes #947 and it is
Dependent on cloudsoft/winrm4j#2
Introduces support for executing multiline commands from a script. This is needed so we can have more control over how commands are executed and catch properly their exit code.
Just like in ssh it uploads multiline commands into a script file on the machine and it is executing it from there.
Multiline commands into scripts is available only in WinRmMachineLocation. If we add it to AbstractSoftwareProcessWinRmDriver it will allow writing more complicated Windows Entities.
The most important part here is that I wrote Live tests for executing scripts so we can advice users better how to write Windows scripts properly.