Sha256: 96f5832d2cfb5e1d766cf2fc71e3d0bb8b1ab8747e19c045663b6829d1a0d9e9
Contents?: true
Size: 595 Bytes
Versions: 12
Compression:
Stored size: 595 Bytes
Contents
require "log4r" module VagrantPlugins module G5K module Action # This can be used with "Call" built-in to check if the machine # is created and branch in the middleware. class GetState def initialize(app, env) @app = app @logger = Log4r::Logger.new("vagrant_g5k::action::get_state") end def call(env) machine_state_id = env[:machine].state.id @logger.info "machine is in state #{machine_state_id}" env[:result] = machine_state_id @app.call(env) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems