Sha256: 4eb9b59924529fab0bcfb25ccf887716b9a900fe02667e96a9e6b64afd5531e9
Contents?: true
Size: 934 Bytes
Versions: 15
Compression:
Stored size: 934 Bytes
Contents
require "log4r" require 'json' require 'vagrant-skytap/util/timer' require 'vagrant-skytap/api/environment' require 'net/https' require 'uri' require 'base64' require 'json' require 'timeout' module VagrantPlugins module Skytap module Action # Stops the Skytap VM and waits until stopped. class StopVm attr_reader :env def initialize(app, env) @app = app @env = env @logger = Log4r::Logger.new("vagrant_skytap::action::stop_vm") end def call(env) vm = env[:environment].current_vm if env[:force_halt] vm.poweroff! else begin vm.stop! rescue Errors::InstanceReadyTimeout @logger.info(I18n.t("vagrant_skytap.graceful_halt_vm_failed")) vm.poweroff! end end @app.call(env) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems