Class: Vagrant::LXC::Action::CheckCreated

Inherits:
BaseAction
  • Object
show all
Defined in:
lib/vagrant-lxc/action/check_created.rb

Instance Method Summary collapse

Methods inherited from BaseAction

#initialize

Constructor Details

This class inherits a constructor from Vagrant::LXC::Action::BaseAction

Instance Method Details

#call(env) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/vagrant-lxc/action/check_created.rb', line 5

def call(env)
  unless env[:machine].state.created?
    raise Vagrant::Errors::VMNotCreatedError
  end

  # Call the next if we have one (but we shouldn't, since this
  # middleware is built to run with the Call-type middlewares)
  @app.call(env)
end