Sha256: 7b271b822dd4fb8ffe2a2ef83693b0470e21c2b6648780a3a31c353ab379cf5f

Contents?: true

Size: 867 Bytes

Versions: 19

Compression:

Stored size: 867 Bytes

Contents

module Vagrant
  module Config
    class SSHConfig < Base
      attr_accessor :username
      attr_accessor :password
      attr_accessor :host
      attr_accessor :port
      attr_accessor :guest_port
      attr_accessor :max_tries
      attr_accessor :timeout
      attr_accessor :private_key_path
      attr_accessor :forward_agent
      attr_accessor :forward_x11
      attr_accessor :shell

      def validate(env, errors)
        [:username, :host, :max_tries, :timeout].each do |field|
          errors.add(I18n.t("vagrant.config.common.error_empty", :field => field)) if !instance_variable_get("@#{field}".to_sym)
        end

        if private_key_path && !File.file?(File.expand_path(private_key_path, env.root_path))
          errors.add(I18n.t("vagrant.config.ssh.private_key_missing", :path => private_key_path))
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
bmhatfield-vagrant-1.0.10 lib/vagrant/config/ssh.rb
bmhatfield-vagrant-1.0.9 lib/vagrant/config/ssh.rb
bmhatfield-vagrant-1.0.8 lib/vagrant/config/ssh.rb
bmhatfield-vagrant-1.0.7 lib/vagrant/config/ssh.rb
vagrantup-1.0.7 lib/vagrant/config/ssh.rb
vagrantup-1.0.6 lib/vagrant/config/ssh.rb
vagrantup-1.0.5 lib/vagrant/config/ssh.rb
vagrantup-1.0.4 lib/vagrant/config/ssh.rb
vagrantup-1.0.3 lib/vagrant/config/ssh.rb
vagrantup-1.0.2 lib/vagrant/config/ssh.rb
vagrant-fixed-ssh-1.0.7 lib/vagrant/config/ssh.rb
vagrant-1.0.7 lib/vagrant/config/ssh.rb
vagrant-1.0.6 lib/vagrant/config/ssh.rb
boxcar-0.10005.1 lib/vagrant/config/ssh.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/vagrant-1.0.5/lib/vagrant/config/ssh.rb
vagrant-1.0.5 lib/vagrant/config/ssh.rb
vagrant-1.0.4 lib/vagrant/config/ssh.rb
vagrant-1.0.3 lib/vagrant/config/ssh.rb
vagrant-1.0.2 lib/vagrant/config/ssh.rb