Sha256: e53fec8be5dfbc6dcb5146b240dd70af2883688d5eb8dc97728061bb705a2346
Contents?: true
Size: 814 Bytes
Versions: 1
Compression:
Stored size: 814 Bytes
Contents
require 'vagrant-deltacloud-provider/action/abstract_action' require 'vagrant-deltacloud-provider/client/deltacloud' module VagrantPlugins module Deltacloud module Action class Suspend < AbstractAction def initialize(app, _env) @app = app @logger = Log4r::Logger.new('vagrant_deltacloud::action::suspend_server') end def execute(env) env[:deltacloud_client] = Deltacloud::DeltacloudClient.instance if env[:machine].id @logger.info "Saving VM #{env[:machine].id} state and suspending execution..." env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending') env[:deltacloud_client].stop_instance(env, env[:machine].id) end @app.call(env) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-deltacloud-provider-0.0.9 | lib/vagrant-deltacloud-provider/action/suspend.rb |