Sha256: c72332b03f81ff042fe18e1a98505c8668d3d485852e52268e07579803c9e1de
Contents?: true
Size: 716 Bytes
Versions: 42
Compression:
Stored size: 716 Bytes
Contents
require "log4r" module VagrantPlugins module MCS module Action # This stops the running instance. class StopInstance def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant_mcs::action::stop_instance") end def call(env) server = env[:mcs_compute].servers.get(env[:machine].id) if env[:machine].state.id == :stopped env[:ui].info(I18n.t("vagrant_mcs.already_status", :status => env[:machine].state.id)) else env[:ui].info(I18n.t("vagrant_mcs.stopping")) server.stop(!!env[:force_halt]) end @app.call(env) end end end end end
Version data entries
42 entries across 42 versions & 1 rubygems