Sha256: 83d223fa6c7a1d0335594965c6f0dd4d2ec777036cff58a18dc92bdaabee02eb

Contents?: true

Size: 424 Bytes

Versions: 29

Compression:

Stored size: 424 Bytes

Contents

module VagrantPlugins
  module ProviderLibvirt
    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

29 entries across 29 versions & 1 rubygems

Version Path
vagrant-libvirt-0.0.36 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.35 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.33 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.32 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.31 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.30 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.29 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.28 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.27 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.26 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.25 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.24 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.23 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.22 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.21 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.20 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.19 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.18 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.17 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.16 lib/vagrant-libvirt/action/is_created.rb