From 404353dcf345122c0f04555a572efc5417f1b661 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 11 Jun 2013 09:41:26 -0700 Subject: added --ip and --port override flags to deploy and init. --- lib/leap_cli/commands/shell.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/leap_cli/commands/shell.rb') diff --git a/lib/leap_cli/commands/shell.rb b/lib/leap_cli/commands/shell.rb index 2822481..822ef05 100644 --- a/lib/leap_cli/commands/shell.rb +++ b/lib/leap_cli/commands/shell.rb @@ -16,6 +16,22 @@ module LeapCli; module Commands end end + protected + + # + # allow for ssh overrides of all commands that use ssh_connect + # + def connect_options(options) + connect_options = {:ssh_options=>{}} + if options[:port] + connect_options[:ssh_options][:port] = options[:port] + end + if options[:ip] + connect_options[:ssh_options][:host_name] = options[:ip] + end + return connect_options + end + private def exec_ssh(cmd, args) -- cgit v1.2.3