Class: VagrantLXD::Action::ConnectionValidate

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-lxd/action.rb

Overview

Check whether the LXD driver is usable and immediately signal an error if not (preventing any remaining middlewares from running).

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ ConnectionValidate

Returns a new instance of ConnectionValidate.



87
88
89
90
# File 'lib/vagrant-lxd/action.rb', line 87

def initialize(app, env)
  @app = app
  @driver = Driver.new(env[:machine])
end

Instance Method Details

#call(env) ⇒ Object



92
93
94
95
# File 'lib/vagrant-lxd/action.rb', line 92

def call(env)
  @driver.validate!
  @app.call(env)
end