Sha256: bafcaaed3c9207bb20c9399aa00a8d0175f54d08a437c87bd962b4c43a1f8249

Contents?: true

Size: 746 Bytes

Versions: 15

Compression:

Stored size: 746 Bytes

Contents

require "log4r"
require "vagrant"

module VagrantPlugins
  module Sakura
    class Provider < Vagrant.plugin("2", :provider)
      def initialize(machine)
        @machine = machine
      end

      def action(name)
        action_method = "action_#{name}"
        return Action.send(action_method) if Action.respond_to?(action_method)
        nil
      end

      def ssh_info
        env = @machine.action("read_ssh_info")
        env[:machine_ssh_info]
      end

      def state
        env = @machine.action("read_state")
        state_id = env[:machine_state_id]
        short = state_id.to_s
        long = I18n.t("vagrant_sakura.state_#{short}")
        Vagrant::MachineState.new(state_id.to_sym, short, long)
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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