Sha256: ea58cc48797fafb4f6901397268c2aadd76880345b76597c9b3525dc54dd3c5f
Contents?: true
Size: 827 Bytes
Versions: 17
Compression:
Stored size: 827 Bytes
Contents
require 'log4r' module VagrantPlugins module OVirtProvider module Action # Just start the VM. class StartVM def initialize(app, env) @logger = Log4r::Logger.new("vagrant_ovirt::action::start_vm") @app = app end def call(env) env[:ui].info(I18n.t("vagrant_ovirt3.starting_vm")) machine = env[:ovirt_compute].servers.get(env[:machine].id.to_s) if machine == nil raise Errors::NoVMError, :vm_name => env[:machine].id.to_s end # Start VM. begin machine.start rescue OVIRT::OvirtException => e raise Errors::StartVMError, :error_message => e.message end @app.call(env) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems