Sha256: 25255afe61126b41fa8986cfc6a35d21e51fc8b07b9149db5c7a09d710c42d16

Contents?: true

Size: 507 Bytes

Versions: 15

Compression:

Stored size: 507 Bytes

Contents

require "log4r"

module VagrantPlugins
  module Sakura
    module Action
      class PowerOn
        def initialize(app, env)
          @app    = app
          @logger = Log4r::Logger.new("vagrant_sakura::action::power_on")
        end

        def call(env)
          api      = env[:sakura_api]
          serverid = env[:machine].id

          env[:ui].info(I18n.t("vagrant_sakura.power_on"))
          api.put("/server/#{serverid}/power")
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vagrant-sakura-0.4.2 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.4.0 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.3.2 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.3.1 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.3.0 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.2.1 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.1.0 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.9 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.8 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.7 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.6 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.5 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.3 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.2 lib/vagrant-sakura/action/power_on.rb
vagrant-sakura-0.0.1 lib/vagrant-sakura/action/power_on.rb