Class: LASRpcUtils::SshTransport

Inherits:
AbstractTransport show all
Includes:
MintLogger
Defined in:
src/las-rpc-utils/lib/las-rpc-utils/ssh-transport.rb

Properties (Read/Write)

Properties (Read Only)

Constant Summary

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Constants inherited from AbstractTransport

AbstractTransport::OKAY, AbstractTransport::PROMPT_PREAMBLE, AbstractTransport::REBOOTED, AbstractTransport::SCRIPT_END, AbstractTransport::SCRIPT_FAIL, AbstractTransport::SCRIPT_READY, AbstractTransport::SCRIPT_RESULT, AbstractTransport::SCRIPT_START

Instance Attribute Summary collapse

Attributes inherited from AbstractTransport

#channel_mutex, #dontkillme, #eof

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Methods inherited from AbstractTransport

#alive?, #allocate, #allocated?, #buffer_length, #debug?, #disable_history, #execute, #in_use?, #info?, #logconsole, #platform, #release, #reserve, #reserved?, #set_default_init, #set_parent, #start_channel, #start_execute, #unallocate, #uuid, #wait_for_complete, #wait_for_prompt, #wait_for_stdout, #wait_for_stream_start, #wait_respond

Constructor Details

#initialize(host, transport_options, parent_transport, channel_id: nil) ⇒ SshTransport

Transport options for SSH: sudo_user - use sudo sudo_password - password for sudo, if required sudo_shell_type - "su" or "direct" - direct is default, which will run sudo -i port - default 22

Instance Attribute Details

#connObject

Returns the value of attribute conn.

#directObject

Returns the value of attribute direct.

#hostObject

Returns the value of attribute host.

#modeObject

Returns the value of attribute mode.

#ntoObject

Returns the value of attribute nto.

#transport_optionsObject

Returns the value of attribute transport_options.

Class Method Details

.finalize(sock, conn) ⇒ Object

Try and kill our socket server if it exists

Instance Method Details

#closeObject

#directfile(remote) ⇒ Object

#directput(remote, content) ⇒ Object

#directrm(remote) ⇒ Object

#establish(recon: false) ⇒ Object

#fast_path_forward(listen_addr, listen_port, remote_addr, remote_port) ⇒ Object

#hop(host, type, transport_options) ⇒ Object

hop to the next transport

#process_buffers(internal: false, select_time: nil) ⇒ Object

#re_establishObject

#send_text(text, newline: true) ⇒ Object

Is is really needed here to base64 encode, when the rest of the system assumes a 7bit terminal anyhow? I may yet remove this from the protocol, since it is kind of wasteful... though with SSH compression, it kind of does not matter?

#send_text_indirect(text, newline: true) ⇒ Object

This protocol goes: a) send text via sendtext b) wait for an ack c) confirm that the ack matches the sequence we sent This could be made more efficient by NOT checking for that ack, but rather re-sending if only process_buffers doens't see it within $TIMEOUT - this can be handled in process_buffers, which is actually our caller at this point anyhow... so in truth this is a little silly in that respect. But how it _could_ be handled via a check_all_sends ack call on those re_establish paths.

#set_eof(val) ⇒ Object

#set_mode(mode) ⇒ Object

#transform_channelObject