Sha256: 8be3f1122d8aaf8a1011a825d1dbee8e49a4300b95174a42435f34f54a794c5c

Contents?: true

Size: 497 Bytes

Versions: 13

Compression:

Stored size: 497 Bytes

Contents

require 'log4r'

module VagrantPlugins
  module OVirtProvider
    module Action
      class SuspendVM
        def initialize(app, env)
          @logger = Log4r::Logger.new("vagrant_ovirt3::action::suspend_vm")
          @app = app
        end

        def call(env)
          env[:ui].info(I18n.t("vagrant_ovirt3.suspend_vm"))

          machine = env[:ovirt_compute].servers.get(env[:machine].id.to_s)
          machine.suspend

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-ovirt3-1.9.3 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.9.2 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.9.1 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.9.0 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.8.2 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.7.1 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.7.0 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.6.2 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.6.1 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.6.0 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.5.0 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.3.0 lib/vagrant-ovirt3/action/suspend_vm.rb
vagrant-ovirt3-1.4.0 lib/vagrant-ovirt3/action/suspend_vm.rb