Class: Vagrant::Config::WinRM
- Inherits:
-
Base
- Object
- Base
- Vagrant::Config::WinRM
- Defined in:
- lib/vagrant-windows/config/winrm.rb
Instance Attribute Summary collapse
-
#guest_port ⇒ Object
Returns the value of attribute guest_port.
-
#host ⇒ Object
Returns the value of attribute host.
-
#max_tries ⇒ Object
Returns the value of attribute max_tries.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ WinRM
constructor
A new instance of WinRM.
- #validate(env, errors) ⇒ Object
Constructor Details
#initialize ⇒ WinRM
Returns a new instance of WinRM.
12 13 14 15 16 17 18 19 |
# File 'lib/vagrant-windows/config/winrm.rb', line 12 def initialize @username = "vagrant" @password = "vagrant" @guest_port = 5985 @host = "localhost" @max_tries = 12 @timeout = 1800 end |
Instance Attribute Details
#guest_port ⇒ Object
Returns the value of attribute guest_port.
8 9 10 |
# File 'lib/vagrant-windows/config/winrm.rb', line 8 def guest_port @guest_port end |
#host ⇒ Object
Returns the value of attribute host.
6 7 8 |
# File 'lib/vagrant-windows/config/winrm.rb', line 6 def host @host end |
#max_tries ⇒ Object
Returns the value of attribute max_tries.
9 10 11 |
# File 'lib/vagrant-windows/config/winrm.rb', line 9 def max_tries @max_tries end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/vagrant-windows/config/winrm.rb', line 5 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
7 8 9 |
# File 'lib/vagrant-windows/config/winrm.rb', line 7 def port @port end |
#timeout ⇒ Object
Returns the value of attribute timeout.
10 11 12 |
# File 'lib/vagrant-windows/config/winrm.rb', line 10 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/vagrant-windows/config/winrm.rb', line 4 def username @username end |
Instance Method Details
#validate(env, errors) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/vagrant-windows/config/winrm.rb', line 21 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 |