winrm 2.2.3 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +13 -1
- data/.travis.yml +10 -11
- data/Gemfile +2 -3
- data/README.md +1 -1
- data/Rakefile +3 -4
- data/appveyor.yml +1 -2
- data/bin/rwinrm +90 -97
- data/changelog.md +5 -0
- data/lib/winrm.rb +3 -5
- data/lib/winrm/connection.rb +84 -86
- data/lib/winrm/connection_opts.rb +90 -91
- data/lib/winrm/exceptions.rb +14 -2
- data/lib/winrm/http/response_handler.rb +127 -96
- data/lib/winrm/http/transport.rb +462 -427
- data/lib/winrm/http/transport_factory.rb +1 -5
- data/lib/winrm/output.rb +1 -2
- data/lib/winrm/psrp/fragment.rb +0 -2
- data/lib/winrm/psrp/message.rb +1 -3
- data/lib/winrm/psrp/message_data.rb +0 -2
- data/lib/winrm/psrp/message_data/base.rb +0 -2
- data/lib/winrm/psrp/message_data/error_record.rb +0 -2
- data/lib/winrm/psrp/message_data/pipeline_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/pipeline_output.rb +48 -54
- data/lib/winrm/psrp/message_data/pipeline_state.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_host_call.rb +0 -2
- data/lib/winrm/psrp/message_data/runspacepool_state.rb +0 -2
- data/lib/winrm/psrp/message_data/session_capability.rb +0 -2
- data/lib/winrm/psrp/message_defragmenter.rb +2 -2
- data/lib/winrm/psrp/message_factory.rb +2 -3
- data/lib/winrm/psrp/message_fragmenter.rb +1 -3
- data/lib/winrm/psrp/powershell_output_decoder.rb +0 -2
- data/lib/winrm/psrp/receive_response_reader.rb +3 -5
- data/lib/winrm/psrp/uuid.rb +1 -2
- data/lib/winrm/shells/base.rb +6 -4
- data/lib/winrm/shells/cmd.rb +63 -65
- data/lib/winrm/shells/power_shell.rb +207 -202
- data/lib/winrm/shells/retryable.rb +44 -45
- data/lib/winrm/shells/shell_factory.rb +0 -2
- data/lib/winrm/version.rb +1 -3
- data/lib/winrm/wsmv/base.rb +0 -2
- data/lib/winrm/wsmv/cleanup_command.rb +1 -2
- data/lib/winrm/wsmv/close_shell.rb +1 -2
- data/lib/winrm/wsmv/command.rb +2 -3
- data/lib/winrm/wsmv/command_output.rb +2 -3
- data/lib/winrm/wsmv/command_output_decoder.rb +1 -2
- data/lib/winrm/wsmv/configuration.rb +0 -2
- data/lib/winrm/wsmv/create_pipeline.rb +0 -2
- data/lib/winrm/wsmv/create_shell.rb +2 -6
- data/lib/winrm/wsmv/header.rb +213 -215
- data/lib/winrm/wsmv/init_runspace_pool.rb +96 -95
- data/lib/winrm/wsmv/iso8601_duration.rb +0 -2
- data/lib/winrm/wsmv/keep_alive.rb +0 -2
- data/lib/winrm/wsmv/receive_response_reader.rb +128 -126
- data/lib/winrm/wsmv/send_data.rb +0 -2
- data/lib/winrm/wsmv/soap.rb +0 -2
- data/lib/winrm/wsmv/wql_pull.rb +54 -56
- data/lib/winrm/wsmv/wql_query.rb +98 -99
- data/lib/winrm/wsmv/write_stdin.rb +0 -2
- data/tests/integration/auth_timeout_spec.rb +0 -1
- data/tests/integration/cmd_spec.rb +2 -3
- data/tests/integration/issue_59_spec.rb +0 -1
- data/tests/integration/powershell_spec.rb +4 -5
- data/tests/integration/spec_helper.rb +3 -6
- data/tests/integration/transport_spec.rb +0 -1
- data/tests/integration/wql_spec.rb +33 -34
- data/tests/matchers.rb +2 -3
- data/tests/spec/configuration_spec.rb +0 -1
- data/tests/spec/connection_spec.rb +0 -2
- data/tests/spec/exception_spec.rb +0 -1
- data/tests/spec/http/transport_factory_spec.rb +1 -3
- data/tests/spec/http/transport_spec.rb +0 -1
- data/tests/spec/output_spec.rb +4 -3
- data/tests/spec/psrp/fragment_spec.rb +0 -2
- data/tests/spec/psrp/message_data/base_spec.rb +0 -2
- data/tests/spec/psrp/message_data/error_record_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_output_spec.rb +0 -2
- data/tests/spec/psrp/message_data/pipeline_state_spec.rb +0 -2
- data/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +0 -2
- data/tests/spec/psrp/message_data/runspacepool_state_spec.rb +0 -2
- data/tests/spec/psrp/message_data/session_capability_spec.rb +0 -2
- data/tests/spec/psrp/message_data_spec.rb +0 -2
- data/tests/spec/psrp/message_defragmenter_spec.rb +0 -2
- data/tests/spec/psrp/message_fragmenter_spec.rb +0 -2
- data/tests/spec/psrp/powershell_output_decoder_spec.rb +0 -2
- data/tests/spec/psrp/psrp_message_spec.rb +10 -7
- data/tests/spec/psrp/recieve_response_reader_spec.rb +0 -2
- data/tests/spec/psrp/uuid_spec.rb +2 -2
- data/tests/spec/response_handler_spec.rb +69 -61
- data/tests/spec/shells/base_spec.rb +7 -5
- data/tests/spec/shells/cmd_spec.rb +4 -4
- data/tests/spec/shells/powershell_spec.rb +221 -175
- data/tests/spec/spec_helper.rb +0 -1
- data/tests/spec/stubs/responses/get_omi_command_output_response.xml.erb +23 -0
- data/tests/spec/stubs/responses/get_omi_command_output_response_not_done.xml.erb +24 -0
- data/tests/spec/stubs/responses/get_omi_config_response.xml +45 -0
- data/tests/spec/stubs/responses/get_omi_powershell_keepalive_response.xml.erb +33 -0
- data/tests/spec/stubs/responses/open_shell_omi.xml +43 -0
- data/tests/spec/stubs/responses/soap_fault_omi.xml +31 -0
- data/tests/spec/wsmv/cleanup_command_spec.rb +0 -2
- data/tests/spec/wsmv/close_shell_spec.rb +0 -2
- data/tests/spec/wsmv/command_output_decoder_spec.rb +0 -2
- data/tests/spec/wsmv/command_output_spec.rb +1 -3
- data/tests/spec/wsmv/command_spec.rb +0 -2
- data/tests/spec/wsmv/configuration_spec.rb +0 -2
- data/tests/spec/wsmv/create_pipeline_spec.rb +2 -3
- data/tests/spec/wsmv/create_shell_spec.rb +6 -5
- data/tests/spec/wsmv/init_runspace_pool_spec.rb +38 -36
- data/tests/spec/wsmv/keep_alive_spec.rb +4 -4
- data/tests/spec/wsmv/receive_response_reader_spec.rb +124 -123
- data/tests/spec/wsmv/send_data_spec.rb +4 -4
- data/tests/spec/wsmv/wql_query_spec.rb +11 -13
- data/tests/spec/wsmv/write_stdin_spec.rb +0 -2
- data/winrm.gemspec +11 -12
- metadata +73 -67
data/lib/winrm/version.rb
CHANGED
data/lib/winrm/wsmv/base.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -23,6 +21,7 @@ module WinRM
|
|
23
21
|
def initialize(session_opts, opts)
|
24
22
|
raise 'opts[:shell_id] is required' unless opts[:shell_id]
|
25
23
|
raise 'opts[:command_id] is required' unless opts[:command_id]
|
24
|
+
|
26
25
|
@session_opts = session_opts
|
27
26
|
@shell_id = opts[:shell_id]
|
28
27
|
@command_id = opts[:command_id]
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -22,6 +20,7 @@ module WinRM
|
|
22
20
|
class CloseShell < Base
|
23
21
|
def initialize(session_opts, shell_opts)
|
24
22
|
raise 'shell_opts[:shell_id] is required' unless shell_opts[:shell_id]
|
23
|
+
|
25
24
|
@session_opts = session_opts
|
26
25
|
@shell_id = shell_opts[:shell_id]
|
27
26
|
@shell_uri = shell_opts[:shell_uri] || RESOURCE_URI_CMD
|
data/lib/winrm/wsmv/command.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -85,12 +83,13 @@ module WinRM
|
|
85
83
|
|
86
84
|
def command_header_opts
|
87
85
|
return {} if @shell_uri != RESOURCE_URI_CMD
|
86
|
+
|
88
87
|
# this is only needed for the regular Windows shell
|
89
88
|
{
|
90
89
|
"#{NS_WSMAN_DMTF}:OptionSet" => {
|
91
90
|
"#{NS_WSMAN_DMTF}:Option" => [@consolemode, @skipcmd], :attributes! => {
|
92
91
|
"#{NS_WSMAN_DMTF}:Option" => {
|
93
|
-
'Name' => %w
|
92
|
+
'Name' => %w[WINRS_CONSOLEMODE_STDIN WINRS_SKIP_CMD_SHELL]
|
94
93
|
}
|
95
94
|
}
|
96
95
|
}
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -23,11 +21,12 @@ module WinRM
|
|
23
21
|
def initialize(session_opts, command_out_opts)
|
24
22
|
raise 'command_out_opts[:shell_id] is required' unless command_out_opts[:shell_id]
|
25
23
|
raise 'command_out_opts[:command_id] is required' unless command_out_opts[:command_id]
|
24
|
+
|
26
25
|
@session_opts = session_opts
|
27
26
|
@shell_id = command_out_opts[:shell_id]
|
28
27
|
@command_id = command_out_opts[:command_id]
|
29
28
|
@shell_uri = command_out_opts[:shell_uri] || RESOURCE_URI_CMD
|
30
|
-
@out_streams = command_out_opts[:out_streams] || %w
|
29
|
+
@out_streams = command_out_opts[:out_streams] || %w[stdout stderr]
|
31
30
|
end
|
32
31
|
|
33
32
|
protected
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -39,6 +37,7 @@ module WinRM
|
|
39
37
|
|
40
38
|
def handle_invalid_encoding(decoded_text)
|
41
39
|
return decoded_text if decoded_text.valid_encoding?
|
40
|
+
|
42
41
|
if decoded_text.respond_to?(:scrub)
|
43
42
|
decoded_text.scrub
|
44
43
|
else
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
#
|
3
1
|
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
4
2
|
#
|
5
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -62,9 +60,7 @@ module WinRM
|
|
62
60
|
"#{NS_WIN_SHELL}:OutputStreams" => @o_stream
|
63
61
|
}
|
64
62
|
body["#{NS_WIN_SHELL}:WorkingDirectory"] = @working_directory if @working_directory
|
65
|
-
if @idle_timeout
|
66
|
-
body["#{NS_WIN_SHELL}:IdleTimeOut"] = format_idle_timeout(@idle_timeout)
|
67
|
-
end
|
63
|
+
body["#{NS_WIN_SHELL}:IdleTimeOut"] = format_idle_timeout(@idle_timeout) if @idle_timeout
|
68
64
|
body["#{NS_WIN_SHELL}:Environment"] = environment_vars_body if @env_vars
|
69
65
|
body
|
70
66
|
end
|
@@ -108,7 +104,7 @@ module WinRM
|
|
108
104
|
"#{NS_WSMAN_DMTF}:OptionSet" => {
|
109
105
|
"#{NS_WSMAN_DMTF}:Option" => [@noprofile, @codepage], :attributes! => {
|
110
106
|
"#{NS_WSMAN_DMTF}:Option" => {
|
111
|
-
'Name' => %w
|
107
|
+
'Name' => %w[WINRS_NOPROFILE WINRS_CODEPAGE]
|
112
108
|
}
|
113
109
|
}
|
114
110
|
}
|
data/lib/winrm/wsmv/header.rb
CHANGED
@@ -1,215 +1,213 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
|
15
|
-
#
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
},
|
56
|
-
"#{SOAP::
|
57
|
-
"#{SOAP::
|
58
|
-
"#{SOAP::NS_WSMAN_MSFT}:
|
59
|
-
"#{SOAP::NS_WSMAN_DMTF}:
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
# rubocop:enable Metrics/MethodLength
|
1
|
+
# Copyright 2016 Shawn Neal <sneal@sneal.net>
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
# rubocop:disable Metrics/MethodLength
|
16
|
+
|
17
|
+
require_relative 'soap'
|
18
|
+
require_relative 'iso8601_duration'
|
19
|
+
|
20
|
+
module WinRM
|
21
|
+
module WSMV
|
22
|
+
# SOAP header utility mixin
|
23
|
+
module Header
|
24
|
+
# WSMan URI of the regular Windows cmd shell
|
25
|
+
RESOURCE_URI_CMD = 'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/cmd'.freeze
|
26
|
+
|
27
|
+
# WSMan URI for PowerShell
|
28
|
+
RESOURCE_URI_POWERSHELL = 'http://schemas.microsoft.com/powershell/Microsoft.PowerShell'.freeze
|
29
|
+
|
30
|
+
# Merge the various header hashes and make sure we carry all of the attributes
|
31
|
+
# through instead of overwriting them.
|
32
|
+
def merge_headers(*headers)
|
33
|
+
hdr = {}
|
34
|
+
headers.each do |h|
|
35
|
+
hdr.merge!(h) do |k, v1, v2|
|
36
|
+
v1.merge!(v2) if k == :attributes!
|
37
|
+
end
|
38
|
+
end
|
39
|
+
hdr
|
40
|
+
end
|
41
|
+
|
42
|
+
def shared_headers(session_opts)
|
43
|
+
{
|
44
|
+
"#{SOAP::NS_ADDRESSING}:To" => session_opts[:endpoint],
|
45
|
+
"#{SOAP::NS_ADDRESSING}:ReplyTo" => {
|
46
|
+
"#{SOAP::NS_ADDRESSING}:Address" =>
|
47
|
+
'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous',
|
48
|
+
:attributes! => {
|
49
|
+
"#{SOAP::NS_ADDRESSING}:Address" => {
|
50
|
+
'mustUnderstand' => true
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
54
|
+
"#{SOAP::NS_WSMAN_DMTF}:MaxEnvelopeSize" => session_opts[:max_envelope_size],
|
55
|
+
"#{SOAP::NS_ADDRESSING}:MessageID" => "uuid:#{SecureRandom.uuid.to_s.upcase}",
|
56
|
+
"#{SOAP::NS_WSMAN_MSFT}:SessionId" => "uuid:#{session_opts[:session_id]}",
|
57
|
+
"#{SOAP::NS_WSMAN_DMTF}:Locale/" => '',
|
58
|
+
"#{SOAP::NS_WSMAN_MSFT}:DataLocale/" => '',
|
59
|
+
"#{SOAP::NS_WSMAN_DMTF}:OperationTimeout" =>
|
60
|
+
Iso8601Duration.sec_to_dur(session_opts[:operation_timeout]),
|
61
|
+
:attributes! => {
|
62
|
+
"#{SOAP::NS_WSMAN_DMTF}:MaxEnvelopeSize" => { 'mustUnderstand' => true },
|
63
|
+
"#{SOAP::NS_WSMAN_DMTF}:Locale/" => {
|
64
|
+
'xml:lang' => session_opts[:locale], 'mustUnderstand' => false
|
65
|
+
},
|
66
|
+
"#{SOAP::NS_WSMAN_MSFT}:DataLocale/" => {
|
67
|
+
'xml:lang' => session_opts[:locale], 'mustUnderstand' => false
|
68
|
+
},
|
69
|
+
"#{SOAP::NS_WSMAN_MSFT}:SessionId" => { 'mustUnderstand' => false }
|
70
|
+
}
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Helper methods for SOAP Headers
|
75
|
+
|
76
|
+
def resource_uri_shell(shell_uri)
|
77
|
+
{
|
78
|
+
"#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => shell_uri, :attributes! => {
|
79
|
+
"#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => {
|
80
|
+
'mustUnderstand' => true
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
def resource_uri_cmd
|
87
|
+
resource_uri_shell(RESOURCE_URI_CMD)
|
88
|
+
end
|
89
|
+
|
90
|
+
def resource_uri_wmi(namespace = 'root/cimv2/*')
|
91
|
+
{
|
92
|
+
"#{SOAP::NS_WSMAN_DMTF}:ResourceURI" =>
|
93
|
+
"http://schemas.microsoft.com/wbem/wsman/1/wmi/#{namespace}",
|
94
|
+
:attributes! => {
|
95
|
+
"#{SOAP::NS_WSMAN_DMTF}:ResourceURI" => {
|
96
|
+
'mustUnderstand' => true
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
def action_get
|
103
|
+
{
|
104
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
105
|
+
'http://schemas.xmlsoap.org/ws/2004/09/transfer/Get',
|
106
|
+
:attributes! => {
|
107
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
108
|
+
'mustUnderstand' => true
|
109
|
+
}
|
110
|
+
}
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
def action_delete
|
115
|
+
{
|
116
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
117
|
+
'http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete',
|
118
|
+
:attributes! => {
|
119
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
120
|
+
'mustUnderstand' => true
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
end
|
125
|
+
|
126
|
+
def action_command
|
127
|
+
{
|
128
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
129
|
+
'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Command',
|
130
|
+
:attributes! => {
|
131
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
132
|
+
'mustUnderstand' => true
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
end
|
137
|
+
|
138
|
+
def action_receive
|
139
|
+
{
|
140
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
141
|
+
'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Receive',
|
142
|
+
:attributes! => {
|
143
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
144
|
+
'mustUnderstand' => true
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
def action_send
|
151
|
+
{
|
152
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
153
|
+
'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Send',
|
154
|
+
:attributes! => {
|
155
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
156
|
+
'mustUnderstand' => true
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
end
|
161
|
+
|
162
|
+
def action_signal
|
163
|
+
{
|
164
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
165
|
+
'http://schemas.microsoft.com/wbem/wsman/1/windows/shell/Signal',
|
166
|
+
:attributes! => {
|
167
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
168
|
+
'mustUnderstand' => true
|
169
|
+
}
|
170
|
+
}
|
171
|
+
}
|
172
|
+
end
|
173
|
+
|
174
|
+
def action_enumerate
|
175
|
+
{
|
176
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
177
|
+
'http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate',
|
178
|
+
:attributes! => {
|
179
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
180
|
+
'mustUnderstand' => true
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}
|
184
|
+
end
|
185
|
+
|
186
|
+
def action_enumerate_pull
|
187
|
+
{
|
188
|
+
"#{SOAP::NS_ADDRESSING}:Action" =>
|
189
|
+
'http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull',
|
190
|
+
:attributes! => {
|
191
|
+
"#{SOAP::NS_ADDRESSING}:Action" => {
|
192
|
+
'mustUnderstand' => true
|
193
|
+
}
|
194
|
+
}
|
195
|
+
}
|
196
|
+
end
|
197
|
+
|
198
|
+
def selector_shell_id(shell_id)
|
199
|
+
{
|
200
|
+
"#{SOAP::NS_WSMAN_DMTF}:SelectorSet" => {
|
201
|
+
"#{SOAP::NS_WSMAN_DMTF}:Selector" => shell_id, :attributes! => {
|
202
|
+
"#{SOAP::NS_WSMAN_DMTF}:Selector" => {
|
203
|
+
'Name' => 'ShellId'
|
204
|
+
}
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# rubocop:enable Metrics/MethodLength
|