winrm 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/soap/winrm_service.rb +16 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/soap/winrm_service.rb
CHANGED
@@ -174,6 +174,22 @@ module WinRM
|
|
174
174
|
next if n.to_s.nil?
|
175
175
|
cmd_stderr << Base64.decode64(n.to_s)
|
176
176
|
end
|
177
|
+
|
178
|
+
# We may need to get additional output if the stream has not finished.
|
179
|
+
# The CommandState will change from Running to Done like so:
|
180
|
+
# @example
|
181
|
+
# from...
|
182
|
+
# <rsp:CommandState CommandId="495C3B09-E0B0-442A-9958-83B529F76C2C" State="http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Running"/>
|
183
|
+
# to...
|
184
|
+
# <rsp:CommandState CommandId="495C3B09-E0B0-442A-9958-83B529F76C2C" State="http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done">
|
185
|
+
# <rsp:ExitCode>0</rsp:ExitCode>
|
186
|
+
# </rsp:CommandState>
|
187
|
+
if((resp/"//#{NS_WIN_SHELL}:ExitCode").empty?)
|
188
|
+
more_out = get_command_output(shell_id,command_id)
|
189
|
+
cmd_stdout << more_out[:stdout]
|
190
|
+
cmd_stderr << more_out[:stderr]
|
191
|
+
end
|
192
|
+
|
177
193
|
{:stdout => cmd_stdout, :stderr => cmd_stderr}
|
178
194
|
end
|
179
195
|
|