Class: Specinfra::Backend::Telnet
- Defined in:
- lib/specinfra/backend/telnet.rb
Instance Method Summary collapse
Methods inherited from Exec
Methods inherited from Base
clear, #command, #get_config, #host_inventory, #initialize, instance, #os_info, #set_config, #set_example, #stderr_handler=, #stdout_handler=
Constructor Details
This class inherits a constructor from Specinfra::Backend::Base
Instance Method Details
#build_command(cmd) ⇒ Object
22 23 24 25 |
# File 'lib/specinfra/backend/telnet.rb', line 22 def build_command(cmd) cmd = super(cmd) cmd end |
#run_command(cmd, opt = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/specinfra/backend/telnet.rb', line 8 def run_command(cmd, opt={}) cmd = build_command(cmd) cmd = add_pre_command(cmd) ret = with_env do telnet_exec!(cmd) end if @example @example.[:command] = cmd @example.[:stdout] = ret[:stdout] end CommandResult.new ret end |