Sha256: 4653f65e1887b4e477f3ca69fb6b1da84aca827dae2f7dbb0fd11bd162529e89

Contents?: true

Size: 813 Bytes

Versions: 4

Compression:

Stored size: 813 Bytes

Contents

module Vagrant
  module Config
    class WinRM < Vagrant::Config::Base
      attr_accessor :username
      attr_accessor :password
      attr_accessor :host
      attr_accessor :port
      attr_accessor :guest_port
      attr_accessor :max_tries
      attr_accessor :timeout

      def initialize
        @username = "vagrant"
        @password = "vagrant"
        @guest_port = 5985
        @host = "localhost"
        @max_tries = 12
        @timeout = 1800
      end

      def validate(env, errors)
        [:username, :password, :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

      end
    end
  end
end

Vagrant.config_keys.register(:winrm) { Vagrant::Config::WinRM }

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
realityforge-vagrant-windows-0.1.4 lib/vagrant-windows/config/winrm.rb
vagrant-windows-0.1.2 lib/vagrant-windows/config/winrm.rb
vagrant-windows-0.1.1 lib/vagrant-windows/config/winrm.rb
vagrant-windows-0.1.0 lib/vagrant-windows/config/winrm.rb