Class: VagrantPlugins::VCloudAir::Action::AnnounceSSHExec

Inherits:
Vagrant::Action::Builtin::SSHExec
  • Object
show all
Defined in:
lib/vagrant-vcloudair/action/announce_ssh_exec.rb

Overview

Override the builtin SSHExec action to show the IP used to connect

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ AnnounceSSHExec

Returns a new instance of AnnounceSSHExec.



6
7
8
# File 'lib/vagrant-vcloudair/action/announce_ssh_exec.rb', line 6

def initialize(app, env)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/vagrant-vcloudair/action/announce_ssh_exec.rb', line 10

def call(env)
  ssh_info = env[:machine].ssh_info
  env[:ui].success(
    I18n.t('vagrant_vcloudair.vm.ssh_announce',
           machine_name: env[:machine].name,
           ip: ssh_info[:host])
  )
  super
end