Class: VagrantPlugins::AVF::Action::SshInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_provider_avf/action/ssh_info.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, env, machine_id_store: MachineIdStore.new(env[:machine]), driver: Driver.new( machine_metadata_store: MachineMetadataStore.new(env[:machine]), machine_data_dir: env[:machine].data_dir )) ⇒ SshInfo

Returns a new instance of SshInfo.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vagrant_provider_avf/action/ssh_info.rb', line 15

def initialize(
  app,
  env,
  machine_id_store: MachineIdStore.new(env[:machine]),
  driver: Driver.new(
    machine_metadata_store: MachineMetadataStore.new(env[:machine]),
    machine_data_dir: env[:machine].data_dir
  )
)
  @app = app
  @machine_id_store = machine_id_store
  @driver = driver
end

Instance Method Details

#call(env) ⇒ Object



29
30
31
32
# File 'lib/vagrant_provider_avf/action/ssh_info.rb', line 29

def call(env)
  env[:machine_ssh_info] = machine_ssh_info
  @app.call(env)
end