Sha256: 64493b55dad0b6dbbfc0610f5207932dbd685c39817b1d0cab86e2337da8aa5f

Contents?: true

Size: 422 Bytes

Versions: 20

Compression:

Stored size: 422 Bytes

Contents

module VagrantPlugins
  module OVirtProvider
    module Action
      # This can be used with "Call" built-in to check if the machine
      # is created and branch in the middleware.
      class IsCreated
        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:result] = env[:machine].state.id != :not_created
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
vagrant-ovirt3-1.9.3 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.9.2 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.9.1 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.9.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.8.2 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.7.1 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.7.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.6.2 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.6.1 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.6.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.5.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.3.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.4.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.2.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.1.2 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.1.1 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.1.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt3-1.0.0 lib/vagrant-ovirt3/action/is_created.rb
vagrant-ovirt-0.0.2 lib/vagrant-ovirt/action/is_created.rb
vagrant-ovirt-0.0.1 lib/vagrant-ovirt/action/is_created.rb