class WinRM::WSMV::CloseShell

WSMV message to close a remote shell

Public Class Methods

new(session_opts, shell_opts) click to toggle source
# File lib/winrm/wsmv/close_shell.rb, line 21
def initialize(session_opts, shell_opts)
  raise 'shell_opts[:shell_id] is required' unless shell_opts[:shell_id]

  @session_opts = session_opts
  @shell_id = shell_opts[:shell_id]
  @shell_uri = shell_opts[:shell_uri] || RESOURCE_URI_CMD
end

Protected Instance Methods

create_body(_body) click to toggle source
# File lib/winrm/wsmv/close_shell.rb, line 35
def create_body(_body)
  # no body
end
create_header(header) click to toggle source
# File lib/winrm/wsmv/close_shell.rb, line 31
def create_header(header)
  header << Gyoku.xml(close_header)
end

Private Instance Methods

close_header() click to toggle source
# File lib/winrm/wsmv/close_shell.rb, line 41
def close_header
  merge_headers(shared_headers(@session_opts),
                resource_uri_shell(@shell_uri),
                action_delete,
                selector_shell_id(@shell_id))
end