Class: WinRM::WSMV::CreateShell

Inherits:
Base
  • Object
show all
Defined in:
lib/winrm/wsmv/create_shell.rb

Overview

WSMV message to create a remote shell

Constant Summary collapse

UTF8_CODE_PAGE =
65001

Constants included from Header

Header::RESOURCE_URI_CMD, Header::RESOURCE_URI_POWERSHELL

Constants included from SOAP

SOAP::NS_ADDRESSING, SOAP::NS_CIMBINDING, SOAP::NS_ENUM, SOAP::NS_SCHEMA_INST, SOAP::NS_SOAP_ENV, SOAP::NS_TRANSFER, SOAP::NS_WIN_SHELL, SOAP::NS_WSMAN_CONF, SOAP::NS_WSMAN_DMTF, SOAP::NS_WSMAN_FAULT, SOAP::NS_WSMAN_MSFT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#build

Methods included from Header

#action_command, #action_delete, #action_enumerate, #action_enumerate_pull, #action_get, #action_receive, #action_send, #action_signal, #merge_headers, #resource_uri_cmd, #resource_uri_shell, #resource_uri_wmi, #selector_shell_id, #shared_headers

Methods included from SOAP

#namespaces

Constructor Details

#initialize(session_opts, shell_opts = {}) ⇒ CreateShell

Returns a new instance of CreateShell.



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/winrm/wsmv/create_shell.rb', line 29

def initialize(session_opts, shell_opts = {})
  @session_opts = session_opts
  @shell_uri = opt_or_default(shell_opts, :shell_uri, RESOURCE_URI_CMD)
  @i_stream = opt_or_default(shell_opts, :i_stream, 'stdin')
  @o_stream = opt_or_default(shell_opts, :o_stream, 'stdout stderr')
  @codepage = opt_or_default(shell_opts, :codepage, UTF8_CODE_PAGE)
  @noprofile = opt_or_default(shell_opts, :noprofile, 'FALSE')
  @working_directory = opt_or_default(shell_opts, :working_directory)
  @idle_timeout = opt_or_default(shell_opts, :idle_timeout)
  @env_vars = opt_or_default(shell_opts, :env_vars)
end

Instance Attribute Details

#codepageObject

Returns the value of attribute codepage.



26
27
28
# File 'lib/winrm/wsmv/create_shell.rb', line 26

def codepage
  @codepage
end

#env_varsObject

Returns the value of attribute env_vars.



27
28
29
# File 'lib/winrm/wsmv/create_shell.rb', line 27

def env_vars
  @env_vars
end

#i_streamObject

Returns the value of attribute i_stream.



26
27
28
# File 'lib/winrm/wsmv/create_shell.rb', line 26

def i_stream
  @i_stream
end

#idle_timeoutObject

Returns the value of attribute idle_timeout.



27
28
29
# File 'lib/winrm/wsmv/create_shell.rb', line 27

def idle_timeout
  @idle_timeout
end

#noprofileObject

Returns the value of attribute noprofile.



26
27
28
# File 'lib/winrm/wsmv/create_shell.rb', line 26

def noprofile
  @noprofile
end

#o_streamObject

Returns the value of attribute o_stream.



26
27
28
# File 'lib/winrm/wsmv/create_shell.rb', line 26

def o_stream
  @o_stream
end

#working_directoryObject

Returns the value of attribute working_directory.



27
28
29
# File 'lib/winrm/wsmv/create_shell.rb', line 27

def working_directory
  @working_directory
end