Sha256: 05961772c86f4af0014805feee6a75f3e775524e992773f069a41e76fdfbf508
Contents?: true
Size: 684 Bytes
Versions: 24
Compression:
Stored size: 684 Bytes
Contents
require 'log4r' module VagrantPlugins module ProviderLibvirt module Action # Suspend domain. class SuspendDomain def initialize(app, env) @logger = Log4r::Logger.new("vagrant_libvirt::action::suspend_domain") @app = app end # make pause def call(env) env[:ui].info(I18n.t("vagrant_libvirt.suspending_domain")) domain = env[:libvirt_compute].servers.get(env[:machine].id.to_s) raise Errors::NoDomainError if domain == nil domain.suspend @logger.info("Machine #{env[:machine].id} is suspended ") @app.call(env) end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems