Sha256: 2842c3a92c286e7786e5e3a15966f60ce9151f887c27d1c2402e3b0e607e02c9
Contents?: true
Size: 804 Bytes
Versions: 7
Compression:
Stored size: 804 Bytes
Contents
require 'log4r' require 'vagrant-deltacloud-provider/action/abstract_action' require 'vagrant-deltacloud-provider/client/deltacloud' module VagrantPlugins module Deltacloud module Action class StopServer < AbstractAction def initialize(app, _env) @app = app @logger = Log4r::Logger.new('vagrant_deltacloud::action::stop_server') end def execute(env) env[:deltacloud_client] = Deltacloud::DeltacloudClient.instance if env[:machine].id @logger.info "Stopping server #{env[:machine].id}..." env[:ui].info(I18n.t('vagrant_deltacloud.stopping_server')) env[:deltacloud_client].stop_server(env, env[:machine].id) end @app.call(env) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems