Sha256: 89623489af8c6d66d0082755749dfe10cb652d3aa47fce1b9fe9a5292995862f

Contents?: true

Size: 413 Bytes

Versions: 5

Compression:

Stored size: 413 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 IsRunning
        def initialize(app, env)
          @app = app
        end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vagrant-ovirt3-1.9.3 lib/vagrant-ovirt3/action/is_running.rb
vagrant-ovirt3-1.9.2 lib/vagrant-ovirt3/action/is_running.rb
vagrant-ovirt3-1.9.1 lib/vagrant-ovirt3/action/is_running.rb
vagrant-ovirt3-1.9.0 lib/vagrant-ovirt3/action/is_running.rb
vagrant-ovirt3-1.8.2 lib/vagrant-ovirt3/action/is_running.rb