Sha256: 5f62d6bc4538a645b9eaa7ef120ba815226187cc1077c20d5e9498847c0d4fa3
Contents?: true
Size: 995 Bytes
Versions: 15
Compression:
Stored size: 995 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 environment and waits until stopped. class StopEnvironment attr_reader :env def initialize(app, env) @app = app @env = env @logger = Log4r::Logger.new("vagrant_skytap::action::stop_environment") end def call(env) environment = env[:environment] if env[:force_halt] environment.poweroff! else begin environment.stop! rescue Errors::InstanceReadyTimeout @logger.info(I18n.t("vagrant_skytap.graceful_halt_environment_failed")) environment.poweroff! end end @app.call(env) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems