Sha256: 8890107242d22e4a6ab1584f9089fa4b9b419d47d2f75dd7d05efd664ff48367

Contents?: true

Size: 425 Bytes

Versions: 17

Compression:

Stored size: 425 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

17 entries across 17 versions & 1 rubygems

Version Path
vagrant-libvirt-0.5.3 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.5.2 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.5.1 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.5.0 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.4.1 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.4.0 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.3.0 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.2.1 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.1.2 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.1.0 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.45 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.43 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.42 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.40 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.39 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.38 lib/vagrant-libvirt/action/is_created.rb
vagrant-libvirt-0.0.37 lib/vagrant-libvirt/action/is_created.rb