vagrant-unbundled 2.1.4.0 → 2.2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +58 -1
  3. data/Gemfile.lock +9 -5
  4. data/contrib/bash/completion.sh +16 -2
  5. data/contrib/sudoers/osx +1 -1
  6. data/lib/vagrant/environment.rb +16 -21
  7. data/lib/vagrant/errors.rb +28 -0
  8. data/lib/vagrant/machine.rb +1 -1
  9. data/lib/vagrant/plugin/manager.rb +35 -1
  10. data/lib/vagrant/plugin/v2/trigger.rb +23 -0
  11. data/lib/vagrant/util/curl_helper.rb +96 -0
  12. data/lib/vagrant/util/downloader.rb +2 -79
  13. data/lib/vagrant/util/guest_inspection.rb +18 -5
  14. data/lib/vagrant/util/platform.rb +33 -8
  15. data/lib/vagrant/util/uploader.rb +103 -0
  16. data/lib/vagrant/vagrantfile.rb +5 -1
  17. data/lib/vagrant.rb +39 -13
  18. data/plugins/commands/cloud/auth/login.rb +90 -0
  19. data/plugins/commands/cloud/auth/logout.rb +42 -0
  20. data/plugins/commands/cloud/auth/plugin.rb +20 -0
  21. data/plugins/commands/cloud/auth/root.rb +73 -0
  22. data/plugins/commands/cloud/auth/whoami.rb +62 -0
  23. data/plugins/commands/cloud/box/create.rb +75 -0
  24. data/plugins/commands/cloud/box/delete.rb +65 -0
  25. data/plugins/commands/cloud/box/plugin.rb +19 -0
  26. data/plugins/commands/cloud/box/root.rb +77 -0
  27. data/plugins/commands/cloud/box/show.rb +74 -0
  28. data/plugins/commands/cloud/box/update.rb +71 -0
  29. data/plugins/commands/cloud/client/client.rb +264 -0
  30. data/plugins/commands/cloud/errors.rb +28 -0
  31. data/plugins/commands/cloud/list.rb +52 -0
  32. data/plugins/commands/cloud/locales/en.yml +159 -0
  33. data/plugins/commands/cloud/plugin.rb +30 -0
  34. data/plugins/commands/cloud/provider/create.rb +73 -0
  35. data/plugins/commands/cloud/provider/delete.rb +70 -0
  36. data/plugins/commands/cloud/provider/plugin.rb +19 -0
  37. data/plugins/commands/cloud/provider/root.rb +77 -0
  38. data/plugins/commands/cloud/provider/update.rb +73 -0
  39. data/plugins/commands/cloud/provider/upload.rb +75 -0
  40. data/plugins/commands/cloud/publish.rb +165 -0
  41. data/plugins/commands/cloud/root.rb +104 -0
  42. data/plugins/commands/cloud/search.rb +83 -0
  43. data/plugins/commands/cloud/util.rb +206 -0
  44. data/plugins/commands/cloud/version/create.rb +69 -0
  45. data/plugins/commands/cloud/version/delete.rb +68 -0
  46. data/plugins/commands/cloud/version/plugin.rb +19 -0
  47. data/plugins/commands/cloud/version/release.rb +69 -0
  48. data/plugins/commands/cloud/version/revoke.rb +69 -0
  49. data/plugins/commands/cloud/version/root.rb +81 -0
  50. data/plugins/commands/cloud/version/update.rb +69 -0
  51. data/plugins/commands/init/command.rb +1 -1
  52. data/plugins/commands/login/plugin.rb +4 -3
  53. data/plugins/commands/powershell/command.rb +3 -0
  54. data/plugins/commands/powershell/plugin.rb +1 -0
  55. data/plugins/commands/upload/command.rb +236 -0
  56. data/plugins/commands/upload/plugin.rb +17 -0
  57. data/plugins/commands/winrm/command.rb +69 -0
  58. data/plugins/commands/winrm/plugin.rb +17 -0
  59. data/plugins/commands/winrm_config/command.rb +125 -0
  60. data/plugins/commands/winrm_config/plugin.rb +17 -0
  61. data/plugins/guests/bsd/cap/file_system.rb +77 -0
  62. data/plugins/guests/bsd/plugin.rb +15 -0
  63. data/plugins/guests/linux/cap/file_system.rb +79 -0
  64. data/plugins/guests/linux/cap/network_interfaces.rb +13 -2
  65. data/plugins/guests/linux/plugin.rb +15 -0
  66. data/plugins/guests/redhat/cap/change_host_name.rb +21 -13
  67. data/plugins/guests/solaris/cap/file_system.rb +77 -0
  68. data/plugins/guests/solaris/plugin.rb +15 -0
  69. data/plugins/guests/windows/cap/file_system.rb +65 -0
  70. data/plugins/guests/windows/cap/mount_shared_folder.rb +1 -1
  71. data/plugins/guests/windows/plugin.rb +10 -0
  72. data/plugins/kernel_v2/config/vm.rb +3 -0
  73. data/plugins/kernel_v2/config/vm_trigger.rb +49 -1
  74. data/plugins/providers/docker/action/build.rb +23 -8
  75. data/plugins/providers/docker/action/is_build.rb +1 -1
  76. data/plugins/providers/docker/config.rb +50 -10
  77. data/plugins/providers/hyperv/scripts/configure_vm.ps1 +16 -2
  78. data/plugins/providers/virtualbox/action/match_mac_address.rb +8 -5
  79. data/plugins/providers/virtualbox/driver/version_5_0.rb +1 -0
  80. data/plugins/provisioners/ansible/provisioner/guest.rb +2 -8
  81. data/plugins/provisioners/puppet/provisioner/puppet.rb +4 -2
  82. data/plugins/provisioners/salt/bootstrap-salt.sh +1 -1
  83. data/plugins/provisioners/salt/provisioner.rb +19 -4
  84. data/plugins/synced_folders/rsync/helper.rb +2 -1
  85. data/templates/commands/ssh_config/config.erb +1 -1
  86. data/templates/commands/winrm_config/config.erb +11 -0
  87. data/templates/guests/openbsd/network_static6.erb +1 -0
  88. data/templates/locales/en.yml +60 -1
  89. data/templates/locales/providers_docker.yml +11 -3
  90. data/vagrant.gemspec +3 -1
  91. data/vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-spec-94a9d31ba18b/vagrant-spec.gemspec +1 -1
  92. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/LICENSE +22 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/README.md +67 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/bin/vagrant_cloud +5 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/account.rb +190 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/box.rb +185 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/client.rb +73 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/errors.rb +25 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/provider.rb +149 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/search.rb +31 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud/version.rb +188 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/vagrant_cloud-2.0.1/lib/vagrant_cloud.rb +11 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.gitignore +10 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.rubocop.yml +38 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/.travis.yml +10 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Gemfile +2 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/LICENSE +202 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/README.md +276 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Rakefile +33 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/Vagrantfile +6 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/WinrmAppveyor.psm1 +32 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/appveyor.yml +50 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/bin/rwinrm +90 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/changelog.md +133 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/connection.rb +84 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/connection_opts.rb +90 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/exceptions.rb +88 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/response_handler.rb +127 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/transport.rb +462 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/http/transport_factory.rb +64 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/output.rb +58 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/create_pipeline.xml.erb +167 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/fragment.rb +68 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message.rb +128 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/base.rb +47 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/error_record.rb +66 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_host_call.rb +30 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_output.rb +48 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/pipeline_state.rb +38 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/runspacepool_host_call.rb +30 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/runspacepool_state.rb +37 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data/session_capability.rb +34 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_data.rb +40 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_defragmenter.rb +62 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_factory.rb +74 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/message_fragmenter.rb +58 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/powershell_output_decoder.rb +142 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/receive_response_reader.rb +95 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/session_capability.xml.erb +7 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/psrp/uuid.rb +39 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/base.rb +187 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/cmd.rb +63 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/power_shell.rb +207 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/retryable.rb +44 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/shells/shell_factory.rb +56 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/version.rb +5 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/base.rb +57 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/cleanup_command.rb +60 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/close_shell.rb +49 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command.rb +100 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command_output.rb +75 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/command_output_decoder.rb +54 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/configuration.rb +44 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/create_pipeline.rb +64 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/create_shell.rb +115 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/header.rb +213 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/init_runspace_pool.rb +96 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/iso8601_duration.rb +58 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/keep_alive.rb +66 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/receive_response_reader.rb +128 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/send_data.rb +66 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/soap.rb +49 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/wql_pull.rb +54 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/wql_query.rb +98 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm/wsmv/write_stdin.rb +86 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/lib/winrm.rb +37 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/preamble +17 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/auth_timeout_spec.rb +17 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/cmd_spec.rb +130 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/config-example.yml +16 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/issue_59_spec.rb +25 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/powershell_spec.rb +164 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/spec_helper.rb +62 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/transport_spec.rb +98 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/integration/wql_spec.rb +33 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/matchers.rb +59 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/configuration_spec.rb +183 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/connection_spec.rb +37 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/exception_spec.rb +49 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/http/transport_factory_spec.rb +66 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/http/transport_spec.rb +43 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/output_spec.rb +128 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/fragment_spec.rb +60 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/base_spec.rb +11 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/error_record_spec.rb +39 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_host_call_spec.rb +23 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_output_spec.rb +30 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/pipeline_state_spec.rb +38 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/runspace_pool_host_call_spec.rb +23 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/runspacepool_state_spec.rb +14 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data/session_capability_spec.rb +28 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_data_spec.rb +33 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_defragmenter_spec.rb +45 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/message_fragmenter_spec.rb +103 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/powershell_output_decoder_spec.rb +98 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/psrp_message_spec.rb +73 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/recieve_response_reader_spec.rb +170 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/psrp/uuid_spec.rb +28 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/response_handler_spec.rb +69 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/base_spec.rb +227 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/cmd_spec.rb +75 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/shells/powershell_spec.rb +221 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/spec_helper.rb +46 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/clixml/error_record.xml.erb +84 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/clixml/pipeline_state.xml.erb +88 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_command_output_response.xml.erb +13 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_command_output_response_not_done.xml.erb +10 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_command_output_response.xml.erb +23 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_command_output_response_not_done.xml.erb +24 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_config_response.xml +45 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_omi_powershell_keepalive_response.xml.erb +33 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_keepalive_response.xml.erb +10 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_output_response.xml.erb +12 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/get_powershell_output_response_not_done.xml.erb +9 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_omi.xml +43 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_v1.xml +19 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/open_shell_v2.xml +20 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_omi.xml +31 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_v1.xml +36 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/soap_fault_v2.xml +42 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/stubs/responses/wmi_error_v2.xml +41 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/cleanup_command_spec.rb +20 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/close_shell_spec.rb +15 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_output_decoder_spec.rb +35 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_output_spec.rb +43 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/command_spec.rb +17 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/configuration_spec.rb +15 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/create_pipeline_spec.rb +30 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/create_shell_spec.rb +39 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/init_runspace_pool_spec.rb +38 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/keep_alive_spec.rb +21 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/receive_response_reader_spec.rb +124 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/send_data_spec.rb +30 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/wql_query_spec.rb +11 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/tests/spec/wsmv/write_stdin_spec.rb +20 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/winrm-2.3.0/winrm.gemspec +46 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.gitignore +11 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rspec +2 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rubocop.yml +17 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.rubocop_todo.yml +65 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/.travis.yml +10 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Gemfile +4 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/LICENSE +202 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/README.md +82 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Rakefile +27 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/VERSION +1 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/Vagrantfile +8 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/appveyor.yml +38 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/bin/rwinrmcp +85 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/changelog.md +74 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/core/file_transporter.rb +566 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/core/tmp_zip.rb +176 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/exceptions.rb +27 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/file_manager.rb +156 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/check_files.ps1.erb +49 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/checksum.ps1.erb +13 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/create_dir.ps1.erb +6 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/delete.ps1.erb +6 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/download.ps1.erb +17 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/exists.ps1.erb +10 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/extract_files.ps1.erb +52 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs/scripts/scripts.rb +31 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/lib/winrm-fs.rb +27 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/config-example.yml +3 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/integration/file_manager_spec.rb +303 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/integration/tmp_zip_spec.rb +26 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/matchers.rb +57 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/spec_helper.rb +66 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/spec/unit/tmp_zip_spec.rb +78 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/winrm-fs-1.3.1/winrm-fs.gemspec +36 -0
  272. data/vendor/bundle/ruby/2.5.0/specifications/vagrant_cloud-2.0.1.gemspec +45 -0
  273. data/vendor/bundle/ruby/2.5.0/specifications/winrm-2.3.0.gemspec +73 -0
  274. data/vendor/bundle/ruby/2.5.0/specifications/winrm-fs-1.3.1.gemspec +57 -0
  275. data/version.txt +1 -1
  276. metadata +268 -4
@@ -0,0 +1,75 @@
1
+ require 'winrm/shells/cmd'
2
+
3
+ describe WinRM::Shells::Cmd do
4
+ let(:retry_limit) { 1 }
5
+ let(:shell_id) { 'shell_id' }
6
+ let(:output) { 'output' }
7
+ let(:create_shell_payload) { 'create_shell_payload' }
8
+ let(:close_shell_payload) { 'close_shell_payload' }
9
+ let(:cleanup_payload) { 'cleanup_payload' }
10
+ let(:command) { 'run this command' }
11
+ let(:arguments) { ['args'] }
12
+ let(:command_response) { "<a xmlns:rsp='foo'><rsp:CommandId>command_id</rsp:CommandId></a>" }
13
+ let(:connection_options) { { max_commands: 100, retry_limit: retry_limit, retry_delay: 0 } }
14
+ let(:transport) { double('transport', send_request: nil) }
15
+
16
+ before do
17
+ allow_any_instance_of(WinRM::WSMV::CloseShell).to receive(:build)
18
+ .and_return(close_shell_payload)
19
+ allow_any_instance_of(WinRM::WSMV::CreateShell).to receive(:build)
20
+ .and_return(create_shell_payload)
21
+ allow_any_instance_of(WinRM::WSMV::CleanupCommand).to receive(:build)
22
+ .and_return(cleanup_payload)
23
+ allow_any_instance_of(WinRM::WSMV::ReceiveResponseReader).to receive(:read_output)
24
+ .and_return(output)
25
+ allow(transport).to receive(:send_request)
26
+ .with(create_shell_payload)
27
+ .and_return(REXML::Document.new("<blah Name='ShellId'>#{shell_id}</blah>"))
28
+ allow(transport).to receive(:send_request)
29
+ .with(/#{command}/)
30
+ .and_return(REXML::Document.new(command_response))
31
+ end
32
+
33
+ subject { described_class.new(connection_options, transport, Logging.logger['test']) }
34
+
35
+ describe '#run' do
36
+ it 'opens a shell and gets shell id' do
37
+ subject.run(command, arguments)
38
+ expect(subject.shell_id).to eq shell_id
39
+ end
40
+
41
+ it 'sends create shell through transport' do
42
+ expect(transport).to receive(:send_request).with(create_shell_payload)
43
+ subject.run(command, arguments)
44
+ end
45
+
46
+ it 'returns output from generated command' do
47
+ expect(subject.run(command, arguments)).to eq output
48
+ end
49
+
50
+ it 'sends command through transport' do
51
+ expect(transport).to receive(:send_request).with(/#{command}/)
52
+ subject.run(command, arguments)
53
+ end
54
+
55
+ it 'sends cleanup message through transport' do
56
+ expect(transport).to receive(:send_request).with(cleanup_payload)
57
+ subject.run(command, arguments)
58
+ end
59
+ end
60
+
61
+ describe '#close' do
62
+ it 'sends close shell through transport' do
63
+ subject.run(command, arguments)
64
+ expect(transport).to receive(:send_request).with(close_shell_payload)
65
+ subject.close
66
+ end
67
+
68
+ it 'creates a shell closer with default shell uri' do
69
+ allow(WinRM::WSMV::CloseShell).to receive(:new) do |_, opts|
70
+ expect(opts[:shell_uri]).to be nil
71
+ end.and_call_original
72
+ subject.close
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,221 @@
1
+ require 'winrm/shells/power_shell'
2
+
3
+ describe WinRM::Shells::Powershell do
4
+ let(:retry_limit) { 1 }
5
+ let(:max_envelope_size_kb) { 150 }
6
+ let(:shell_id) { 'bc1bfbba-8215-4a04-b2df-7a3ac0310e16' }
7
+ let(:output) { 'output' }
8
+ let(:command_id) { '4218A578-0F18-4B19-82C3-46B433319126' }
9
+ let(:keepalive_payload) { 'keepalive_payload' }
10
+ let(:configuration_payload) { 'configuration_payload' }
11
+ let(:command_payload) { 'command_payload' }
12
+ let(:create_shell_payload) { 'create_shell_payload' }
13
+ let(:close_shell_payload) { 'close_shell_payload' }
14
+ let(:cleanup_payload) { 'cleanup_payload' }
15
+ let(:command) { 'command' }
16
+ let(:output_message) { double('output_message', build: 'output_message') }
17
+ let(:connection_options) { { max_commands: 100, retry_limit: retry_limit, retry_delay: 0 } }
18
+ let(:transport) { double('transport', send_request: nil) }
19
+ let(:protocol_version) { 2.2 }
20
+ let(:test_data1) do
21
+ <<-EOH
22
+ <Obj RefId="0">
23
+ <MS>
24
+ <Version N="protocolversion">#{protocol_version}</Version>
25
+ <Version N="PSVersion">2.0</Version>
26
+ <Version N="SerializationVersion">1.1.0.1</Version>
27
+ </MS>
28
+ </Obj>
29
+ EOH
30
+ end
31
+ let(:test_data2) { '<Obj RefId="0"><MS><I32 N="RunspaceState">2</I32></MS></Obj>' }
32
+ let(:message1) do
33
+ WinRM::PSRP::Message.new(
34
+ shell_id,
35
+ WinRM::PSRP::Message::MESSAGE_TYPES[:session_capability],
36
+ test_data1,
37
+ command_id
38
+ )
39
+ end
40
+ let(:message2) do
41
+ WinRM::PSRP::Message.new(
42
+ shell_id,
43
+ WinRM::PSRP::Message::MESSAGE_TYPES[:runspacepool_state],
44
+ test_data2,
45
+ command_id
46
+ )
47
+ end
48
+ let(:fragment1) { WinRM::PSRP::Fragment.new(1, message1.bytes) }
49
+ let(:fragment2) { WinRM::PSRP::Fragment.new(1, message2.bytes) }
50
+ let(:test_data_stdout1) { Base64.strict_encode64(fragment1.bytes.pack('C*')) }
51
+ let(:test_data_stdout2) { Base64.strict_encode64(fragment2.bytes.pack('C*')) }
52
+
53
+ {
54
+ 'powershell' => {
55
+ keepalive_template_path: 'get_powershell_keepalive_response.xml.erb',
56
+ config: "<a xmlns:cfg='f'><cfg:MaxEnvelopeSizekb>" \
57
+ '<%= max_envelope_size_kb %></cfg:MaxEnvelopeSizekb></a>',
58
+ command: "<a xmlns:rsp='foo'><rsp:CommandId><%= command_id %></rsp:CommandId></a>"
59
+ },
60
+ 'omi' => {
61
+ keepalive_template_path: 'get_omi_powershell_keepalive_response.xml.erb',
62
+ config: File.read('tests/spec/stubs/responses/get_omi_config_response.xml'),
63
+ command: "<p:CommandResponse xmlns:p='foo'><p:CommandId>" \
64
+ '<%= command_id %></p:CommandId></p:CommandResponse>'
65
+ }
66
+ }.each_pair do |server_type, response|
67
+ context "with server type #{server_type}" do
68
+ let(:command_response) { ERB.new(response[:command]).result(binding) }
69
+
70
+ before do
71
+ config_response = ERB.new(response[:config]).result(binding)
72
+ test_data_xml_template = ERB.new(stubbed_response(response[:keepalive_template_path]))
73
+
74
+ allow(SecureRandom).to receive(:uuid).and_return(command_id)
75
+ allow(subject).to receive(:command_output_message)
76
+ .with(shell_id, command_id)
77
+ .and_return(output_message)
78
+ allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
79
+ .and_return(command_payload)
80
+ allow_any_instance_of(WinRM::WSMV::CloseShell).to receive(:build)
81
+ .and_return(close_shell_payload)
82
+ allow_any_instance_of(WinRM::WSMV::InitRunspacePool).to receive(:build)
83
+ .and_return(create_shell_payload)
84
+ allow_any_instance_of(WinRM::WSMV::Configuration).to receive(:build)
85
+ .and_return(configuration_payload)
86
+ allow_any_instance_of(WinRM::WSMV::CleanupCommand).to receive(:build)
87
+ .and_return(cleanup_payload)
88
+ allow_any_instance_of(WinRM::WSMV::KeepAlive).to receive(:build)
89
+ .and_return(keepalive_payload)
90
+ allow_any_instance_of(WinRM::PSRP::ReceiveResponseReader).to receive(:read_output)
91
+ .with(output_message).and_return(output)
92
+ allow(transport).to receive(:send_request).with(configuration_payload) do |_|
93
+ # parse real XML with ResponseHandler to raise WinRMSoapFault
94
+ WinRM::ResponseHandler.new(config_response, 500).parse_to_xml if server_type == 'omi'
95
+ REXML::Document.new(config_response)
96
+ end
97
+ allow(transport).to receive(:send_request)
98
+ .with(create_shell_payload)
99
+ .and_return(REXML::Document.new("<blah Name='ShellId'>#{shell_id}</blah>"))
100
+ allow(transport).to receive(:send_request)
101
+ .with(command_payload)
102
+ .and_return(REXML::Document.new(command_response))
103
+ allow(transport).to receive(:send_request)
104
+ .with(keepalive_payload)
105
+ .and_return(REXML::Document.new(test_data_xml_template.result(binding)))
106
+ end
107
+
108
+ subject { described_class.new(connection_options, transport, Logging.logger['test']) }
109
+
110
+ describe '#run' do
111
+ it 'opens a shell and gets shell id' do
112
+ subject.run(command)
113
+ expect(subject.shell_id).to eq shell_id
114
+ end
115
+
116
+ it 'sends create shell through transport' do
117
+ expect(transport).to receive(:send_request).with(create_shell_payload)
118
+ subject.run(command)
119
+ end
120
+
121
+ it 'sends keepalive shell through transport' do
122
+ expect(transport).to receive(:send_request).with(keepalive_payload)
123
+ subject.run(command)
124
+ end
125
+
126
+ it 'returns output from generated command' do
127
+ expect(subject.run(command)).to eq output
128
+ end
129
+
130
+ it 'sends command through transport' do
131
+ expect(transport).to receive(:send_request).with(command_payload)
132
+ subject.run(command)
133
+ end
134
+
135
+ it 'sends cleanup message through transport' do
136
+ expect(transport).to receive(:send_request).with(cleanup_payload)
137
+ subject.run(command)
138
+ end
139
+
140
+ # OMI server doesn't respond to configuration so these tests are irrelevant there
141
+ context 'non admin user', if: server_type == 'powershell' do
142
+ before do
143
+ allow(transport).to receive(:send_request)
144
+ .with(configuration_payload)
145
+ .and_raise(WinRM::WinRMWSManFault.new('no access for you', '5'))
146
+ end
147
+
148
+ context 'protocol version 2.1' do
149
+ let(:protocol_version) { 2.1 }
150
+ let(:command) { 'c' * 200000 }
151
+
152
+ it 'sets the fragmenter max_blob_length' do
153
+ expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
154
+ .with(153600)
155
+ subject.run(command)
156
+ end
157
+
158
+ it 'fragments messages smaller than max envelope size' do
159
+ allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
160
+ .and_call_original
161
+ allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
162
+ expect(payload.length).to eq 206512
163
+ end.and_return(REXML::Document.new(command_response))
164
+ subject.run(command)
165
+ end
166
+ end
167
+
168
+ context 'protocol version 2.2' do
169
+ let(:protocol_version) { 2.2 }
170
+ let(:command) { 'c' * 200000 }
171
+
172
+ it 'sets the fragmenter max_blob_length' do
173
+ expect_any_instance_of(WinRM::PSRP::MessageFragmenter).to receive(:max_blob_length=)
174
+ .with(512000)
175
+ subject.run(command)
176
+ end
177
+
178
+ it 'fragments messages smaller than max envelope size' do
179
+ allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build)
180
+ .and_call_original
181
+ allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
182
+ expect(payload.length).to eq 276028
183
+ end.and_return(REXML::Document.new(command_response))
184
+ subject.run(command)
185
+ end
186
+ end
187
+ end
188
+
189
+ context 'fragment large command' do
190
+ let(:command) { 'c' * 200000 }
191
+
192
+ it 'fragments messages as large as max envelope size' do
193
+ allow_any_instance_of(WinRM::WSMV::CreatePipeline).to receive(:build).and_call_original
194
+ allow(transport).to receive(:send_request).with(/CommandLine/) do |payload|
195
+ fallback = subject.max_fragment_blob_size ==
196
+ WinRM::PSRP::MessageFragmenter::DEFAULT_BLOB_LENGTH
197
+ # OMI server uses default blob size b/c config endpoint unavailable
198
+ expect(payload.length).to eq fallback ? 45404 : max_envelope_size_kb * 1024
199
+ end.and_return(REXML::Document.new(command_response))
200
+ subject.run(command)
201
+ end
202
+ end
203
+ end
204
+
205
+ describe '#close' do
206
+ it 'sends close shell through transport' do
207
+ subject.run(command)
208
+ expect(transport).to receive(:send_request).with(close_shell_payload)
209
+ subject.close
210
+ end
211
+
212
+ it 'creates a shell closer with powershell uri' do
213
+ allow(WinRM::WSMV::CloseShell).to receive(:new) do |_, opts|
214
+ expect(opts[:shell_uri]).to be WinRM::WSMV::Header::RESOURCE_URI_POWERSHELL
215
+ end.and_call_original
216
+ subject.close
217
+ end
218
+ end
219
+ end
220
+ end
221
+ end
@@ -0,0 +1,46 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'winrm'
4
+ require 'json'
5
+ require_relative '../matchers'
6
+
7
+ # Unit test spec helper
8
+ module SpecUnitHelper
9
+ def stubbed_response(file)
10
+ File.read("tests/spec/stubs/responses/#{file}")
11
+ end
12
+
13
+ def stubbed_clixml(file)
14
+ File.read("tests/spec/stubs/clixml/#{file}")
15
+ end
16
+
17
+ def default_connection_opts
18
+ {
19
+ user: 'Administrator',
20
+ password: 'password',
21
+ endpoint: 'http://localhost:5985/wsman',
22
+ max_envelope_size: 153600,
23
+ session_id: '05A2622B-B842-4EB8-8A78-0225C8A993DF',
24
+ operation_timeout: 60,
25
+ locale: 'en-US'
26
+ }
27
+ end
28
+ end
29
+
30
+ # Strip leading whitespace from each line that is the same as the
31
+ # amount of whitespace on the first line of the string.
32
+ # Leaves _additional_ indentation on later lines intact.
33
+ # and remove newlines.
34
+ class String
35
+ def unindent
36
+ gsub(/^#{self[/\A[ \t]*/]}/, '').delete("\n")
37
+ end
38
+
39
+ def to_byte_string
40
+ force_encoding(Encoding::ASCII_8BIT)
41
+ end
42
+ end
43
+
44
+ RSpec.configure do |config|
45
+ config.include(SpecUnitHelper)
46
+ end
@@ -0,0 +1,84 @@
1
+ <?xml version="1.0"?>
2
+ <Obj RefId="0">
3
+ <TN RefId="0">
4
+ <T>System.Management.Automation.ErrorRecord</T>
5
+ <T>System.Object</T>
6
+ </TN>
7
+ <ToString><%= error_message %></ToString>
8
+ <MS>
9
+ <B N="writeErrorStream">true</B>
10
+ <Obj N="Exception" RefId="1">
11
+ <TN RefId="1">
12
+ <T>Microsoft.PowerShell.Commands.WriteErrorException</T>
13
+ <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
14
+ <T>System.Exception</T>
15
+ <T>System.Object</T>
16
+ </TN>
17
+ <ToString>Microsoft.PowerShell.Commands.WriteErrorException: <%= error_message %></ToString>
18
+ <Props>
19
+ <S N="Message"><%= error_message %></S>
20
+ <Obj N="Data" RefId="2">
21
+ <TN RefId="2">
22
+ <T>System.Collections.ListDictionaryInternal</T>
23
+ <T>System.Object</T>
24
+ </TN>
25
+ <DCT/>
26
+ </Obj>
27
+ <Nil N="InnerException"/>
28
+ <Nil N="StackTrace"/>
29
+ <Nil N="HelpLink"/>
30
+ <Nil N="Source"/>
31
+ <I32 N="HResult">-2146233088</I32>
32
+ </Props>
33
+ </Obj>
34
+ <Nil N="TargetObject"/>
35
+ <S N="FullyQualifiedErrorId"><%= error_id %></S>
36
+ <Obj N="InvocationInfo" RefId="3">
37
+ <TN RefId="3">
38
+ <T>System.Management.Automation.InvocationInfo</T>
39
+ <T>System.Object</T>
40
+ </TN>
41
+ <ToString>System.Management.Automation.InvocationInfo</ToString>
42
+ <Props>
43
+ <Nil N="MyCommand"/>
44
+ <Obj N="BoundParameters" RefId="4">
45
+ <TN RefId="4">
46
+ <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
47
+ <T>System.Object</T>
48
+ </TN>
49
+ <DCT/>
50
+ </Obj>
51
+ <Obj N="UnboundArguments" RefId="5">
52
+ <TN RefId="5">
53
+ <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
54
+ <T>System.Object</T>
55
+ </TN>
56
+ <LST/>
57
+ </Obj>
58
+ <I32 N="ScriptLineNumber">1</I32>
59
+ <I32 N="OffsetInLine">1</I32>
60
+ <I64 N="HistoryId">1</I64>
61
+ <S N="ScriptName"/>
62
+ <S N="Line">write-error '<%= error_message %>'</S>
63
+ <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ write-error '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</S>
64
+ <S N="PSScriptRoot"><%= script_root %></S>
65
+ <Nil N="PSCommandPath"/>
66
+ <S N="InvocationName"/>
67
+ <I32 N="PipelineLength">0</I32>
68
+ <I32 N="PipelinePosition">0</I32>
69
+ <B N="ExpectingInput">false</B>
70
+ <S N="CommandOrigin">Internal</S>
71
+ <Nil N="DisplayScriptPosition"/>
72
+ </Props>
73
+ </Obj>
74
+ <I32 N="ErrorCategory_Category">0</I32>
75
+ <S N="ErrorCategory_Activity">Write-Error</S>
76
+ <S N="ErrorCategory_Reason">WriteErrorException</S>
77
+ <S N="ErrorCategory_TargetName"/>
78
+ <S N="ErrorCategory_TargetType"/>
79
+ <S N="ErrorCategory_Message"><%= category_message %></S>
80
+ <B N="SerializeExtendedInfo">false</B>
81
+ <S N="ErrorDetails_ScriptStackTrace"><%= stack_trace %></S>
82
+ <Nil N="PSMessageDetails"/>
83
+ </MS>
84
+ </Obj>
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0"?>
2
+ <Obj RefId="0">
3
+ <MS>
4
+ <I32 N="PipelineState"><%= pipeline_state %></I32>
5
+ <Obj N="ExceptionAsErrorRecord" RefId="1">
6
+ <TN RefId="0">
7
+ <T>System.Management.Automation.ErrorRecord</T>
8
+ <T>System.Object</T>
9
+ </TN>
10
+ <ToString><%= error_message %></ToString>
11
+ <MS>
12
+ <Obj N="Exception" RefId="2">
13
+ <TN RefId="1">
14
+ <T>System.Management.Automation.RuntimeException</T>
15
+ <T>Microsoft.PowerShell.CoreClr.Stubs.SystemException</T>
16
+ <T>System.Exception</T>
17
+ <T>System.Object</T>
18
+ </TN>
19
+ <ToString>System.Management.Automation.RuntimeException: <%= error_message %></ToString>
20
+ <Props>
21
+ <S N="ErrorRecord"><%= error_message %></S>
22
+ <B N="WasThrownFromThrowStatement">true</B>
23
+ <S N="Message"><%= error_message %></S>
24
+ <Obj N="Data" RefId="3">
25
+ <TN RefId="2">
26
+ <T>System.Collections.ListDictionaryInternal</T>
27
+ <T>System.Object</T>
28
+ </TN>
29
+ <DCT />
30
+ </Obj>
31
+ <Nil N="InnerException" />
32
+ <Nil N="StackTrace" />
33
+ <Nil N="HelpLink" />
34
+ <Nil N="Source" />
35
+ <I32 N="HResult">-2146233088</I32>
36
+ </Props>
37
+ </Obj>
38
+ <S N="TargetObject"><%= error_message %></S>
39
+ <S N="FullyQualifiedErrorId"><%= error_id %></S>
40
+ <Obj N="InvocationInfo" RefId="4">
41
+ <TN RefId="3">
42
+ <T>System.Management.Automation.InvocationInfo</T>
43
+ <T>System.Object</T>
44
+ </TN>
45
+ <ToString>System.Management.Automation.InvocationInfo</ToString>
46
+ <Props>
47
+ <Nil N="MyCommand" />
48
+ <Obj N="BoundParameters" RefId="5">
49
+ <TN RefId="4">
50
+ <T>System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
51
+ <T>System.Object</T>
52
+ </TN>
53
+ <DCT />
54
+ </Obj>
55
+ <Obj N="UnboundArguments" RefId="6">
56
+ <TN RefId="5">
57
+ <T>System.Collections.Generic.List`1[[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]</T>
58
+ <T>System.Object</T>
59
+ </TN>
60
+ <LST />
61
+ </Obj>
62
+ <I32 N="ScriptLineNumber">1</I32>
63
+ <I32 N="OffsetInLine">1</I32>
64
+ <I64 N="HistoryId">-1</I64>
65
+ <S N="ScriptName"></S>
66
+ <S N="Line">throw '<%= error_message %>'</S>
67
+ <S N="PositionMessage">At line:1 char:1_x000D__x000A_+ throw '<%= error_message %>'_x000D__x000A_+ ~~~~~~~~~~~~~~~~~~~~~~~~</S>
68
+ <S N="PSScriptRoot"></S>
69
+ <Nil N="PSCommandPath" />
70
+ <S N="InvocationName"></S>
71
+ <I32 N="PipelineLength">0</I32>
72
+ <I32 N="PipelinePosition">0</I32>
73
+ <B N="ExpectingInput">false</B>
74
+ <S N="CommandOrigin">Internal</S>
75
+ <Nil N="DisplayScriptPosition" />
76
+ </Props>
77
+ </Obj>
78
+ <I32 N="ErrorCategory_Category">14</I32>
79
+ <S N="ErrorCategory_Activity"></S>
80
+ <S N="ErrorCategory_Reason">RuntimeException</S>
81
+ <S N="ErrorCategory_TargetName"><%= error_message %></S><S N="ErrorCategory_TargetType">String</S>
82
+ <S N="ErrorCategory_Message"><%= category_message %></S>
83
+ <B N="SerializeExtendedInfo">false</B>
84
+ <S N="ErrorDetails_ScriptStackTrace">at &lt;ScriptBlock&gt;, &lt;No file&gt;: line 1</S>
85
+ </MS>
86
+ </Obj>
87
+ </MS>
88
+ </Obj>
@@ -0,0 +1,13 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
+ <rsp:CommandState CommandId='<%= command_id %>' State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'>
9
+ <rsp:ExitCode>0</rsp:ExitCode>
10
+ </rsp:CommandState>
11
+ </rsp:ReceiveResponse>
12
+ </s:Body>
13
+ </s:Envelope>
@@ -0,0 +1,10 @@
1
+ <s:Envelope xmlns:a='http://schemas.xmlsoap.org/ws/2004/08/addressing' xml:lang='en-US' xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd' xmlns:rsp='http://schemas.microsoft.com/wbem/wsman/1/windows/shell' xmlns:s='http://www.w3.org/2003/05/soap-envelope' xmlns:w='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'>
2
+ <s:Header>
3
+ </s:Header>
4
+ <s:Body>
5
+ <rsp:ReceiveResponse>
6
+ <rsp:Stream CommandId='<%= command_id %>' Name='stdout'><%= test_data_stdout %></rsp:Stream>
7
+ <rsp:Stream CommandId='<%= command_id %>' End='true' Name='stderr'><%= test_data_stderr %></rsp:Stream>
8
+ </rsp:ReceiveResponse>
9
+ </s:Body>
10
+ </s:Envelope>
@@ -0,0 +1,23 @@
1
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'
2
+ xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
3
+ xmlns:wsen='http://schemas.xmlsoap.org/ws/2004/09/enumeration'
4
+ xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing'
5
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
6
+ xmlns:wsmb='http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd'
7
+ xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'
8
+ xmlns:wxf='http://schemas.xmlsoap.org/ws/2004/09/transfer'
9
+ xmlns:cim='http://schemas.dmtf.org/wbem/wscim/1/common'
10
+ xmlns:msftwinrm='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd'
11
+ xmlns:wsmid='http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd'>
12
+ <SOAP-ENV:Header>
13
+ <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
14
+ <wsa:Action>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse</wsa:Action>
15
+ <wsa:MessageID>uuid:5825BEA8-76AB-0005-0000-000000640000</wsa:MessageID>
16
+ <wsa:RelatesTo>uuid:E22E9766-0817-4056-99F8-EB5997BC2138</wsa:RelatesTo>
17
+ </SOAP-ENV:Header>
18
+ <SOAP-ENV:Body>
19
+ <p:ReceiveResponse xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
20
+ <p:CommandState State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done'/>
21
+ </p:ReceiveResponse>
22
+ </SOAP-ENV:Body>
23
+ </SOAP-ENV:Envelope>
@@ -0,0 +1,24 @@
1
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2003/05/soap-envelope'
2
+ xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/addressing'
3
+ xmlns:wsen='http://schemas.xmlsoap.org/ws/2004/09/enumeration'
4
+ xmlns:e='http://schemas.xmlsoap.org/ws/2004/08/eventing'
5
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
6
+ xmlns:wsmb='http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd'
7
+ xmlns:wsman='http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd'
8
+ xmlns:wxf='http://schemas.xmlsoap.org/ws/2004/09/transfer'
9
+ xmlns:cim='http://schemas.dmtf.org/wbem/wscim/1/common'
10
+ xmlns:msftwinrm='http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd'
11
+ xmlns:wsmid='http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd'>
12
+ <SOAP-ENV:Header>
13
+ <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
14
+ <wsa:Action>http://schemas.microsoft.com/wbem/wsman/1/windows/shell/ReceiveResponse</wsa:Action>
15
+ <wsa:MessageID>uuid:5825BEA8-76AB-0005-0000-000000640000</wsa:MessageID>
16
+ <wsa:RelatesTo>uuid:E22E9766-0817-4056-99F8-EB5997BC2138</wsa:RelatesTo>
17
+ </SOAP-ENV:Header>
18
+ <SOAP-ENV:Body>
19
+ <p:ReceiveResponse xmlns:p='http://schemas.microsoft.com/wbem/wsman/1/windows/shell'>
20
+ <p:Stream Name='stdout'><%= test_data_stdout %></p:Stream>
21
+ <p:CommandState State='http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Running'/>
22
+ </p:ReceiveResponse>
23
+ </SOAP-ENV:Body>
24
+ </SOAP-ENV:Envelope>
@@ -0,0 +1,45 @@
1
+ <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
2
+ xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
3
+ xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration"
4
+ xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"
5
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6
+ xmlns:wsmb="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd"
7
+ xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
8
+ xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer"
9
+ xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
10
+ xmlns:msftwinrm="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"
11
+ xmlns:wsmid="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd">
12
+ <SOAP-ENV:Header>
13
+ <wsa:To>
14
+ http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
15
+ </wsa:To>
16
+ <wsa:Action>
17
+ http://schemas.dmtf.org/wbem/wsman/1/wsman/fault
18
+ </wsa:Action>
19
+ <wsa:MessageID>
20
+ uuid:5825BEA8-76AB-0005-0000-000001A80000
21
+ </wsa:MessageID>
22
+ <wsa:RelatesTo>
23
+ uuid:01022086-C0D6-45DA-85F2-21FA2B476FCA
24
+ </wsa:RelatesTo>
25
+ </SOAP-ENV:Header>
26
+ <SOAP-ENV:Body>
27
+ <SOAP-ENV:Fault>
28
+ <SOAP-ENV:Code>
29
+ <SOAP-ENV:Value>
30
+ SOAP-ENV:Receiver
31
+ </SOAP-ENV:Value>
32
+ <SOAP-ENV:Subcode>
33
+ <SOAP-ENV:Value>
34
+ wsman:InternalError
35
+ </SOAP-ENV:Value>
36
+ </SOAP-ENV:Subcode>
37
+ </SOAP-ENV:Code>
38
+ <SOAP-ENV:Reason>
39
+ <SOAP-ENV:Text xml:lang="en-US">
40
+ get-instance: instance name parameter is missing
41
+ </SOAP-ENV:Text>
42
+ </SOAP-ENV:Reason>
43
+ </SOAP-ENV:Fault>
44
+ </SOAP-ENV:Body>
45
+ </SOAP-ENV:Envelope>