This can be used with “Call” built-in to check if the machine is created and branch in the middleware.
# File lib/vagrant-ovirt3/action/is_created.rb, line 7 def initialize(app, env) @app = app end
# File lib/vagrant-ovirt3/action/is_created.rb, line 11 def call(env) env[:result] = env[:machine].state.id != :not_created @app.call(env) end