Class: Cabal::CLI::SSH

Inherits:
Belafonte::App
  • Object
show all
Includes:
Authenticated
Defined in:
lib/cabal/cli/ssh.rb

Instance Method Summary collapse

Methods included from Authenticated

#with_authentication

Instance Method Details

#handleObject



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/cabal/cli/ssh.rb', line 28

def handle
  with_authentication(partake(:config)) do
    Cabal::SSH.connect(
      cluster: option(:cluster_name),
      ssh_signature: arg(:ssh_signature).first,
      client: partake(:client),
      identity_timeout: lifetime,
      kernel: kernel
    )
  end
end

#lifetimeObject



40
41
42
43
# File 'lib/cabal/cli/ssh.rb', line 40

def lifetime
  return nil unless option(:lifetime)
  option(:lifetime).to_i * 60
end