Class: VagrantPlugins::ProviderKvm::Action::CheckKvm
- Inherits:
-
Object
- Object
- VagrantPlugins::ProviderKvm::Action::CheckKvm
- Defined in:
- lib/vagrant-kvm/action/check_kvm.rb
Overview
Checks that the libvirt/kvm/qemu environment is ready to be used.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ CheckKvm
constructor
A new instance of CheckKvm.
Constructor Details
#initialize(app, env) ⇒ CheckKvm
Returns a new instance of CheckKvm.
6 7 8 |
# File 'lib/vagrant-kvm/action/check_kvm.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 19 |
# File 'lib/vagrant-kvm/action/check_kvm.rb', line 10 def call(env) # This verifies that kvm/qemu is installed, the environment is # set-up and the driver is ready to function. If not, then an # exception will be raised which will break us out of execution # of the middleware sequence. Driver::Driver.new.verify! # Carry on. @app.call(env) end |