Fix accessors used by in communicator.rb

This commit is contained in:
Max Lincoln 2014-07-25 17:00:10 -04:00
parent 62ddd92768
commit 24f919c4d3
2 changed files with 8 additions and 3 deletions

View File

@ -9,6 +9,7 @@ module VagrantPlugins
attr_accessor :max_tries
attr_accessor :timeout
attr_accessor :transport
attr_accessor :ssl_peer_verification
def initialize
@username = UNSET_VALUE
@ -31,7 +32,7 @@ module VagrantPlugins
@port = (is_ssl ? 5986 : 5985) if @port == UNSET_VALUE
@guest_port = (is_ssl ? 5986 : 5985) if @guest_port == UNSET_VALUE
@max_tries = 20 if @max_tries == UNSET_VALUE
@timeout = 60 if @timeout == UNSET_VALUE
@timeout = 1800 if @timeout == UNSET_VALUE
@ssl_peer_verification = true if @ssl_peer_verification == UNSET_VALUE
end

View File

@ -34,6 +34,8 @@ module VagrantPlugins
attr_reader :logger
attr_reader :host
attr_reader :port
attr_reader :username
attr_reader :password
attr_reader :config
def initialize(host, port, config)
@ -42,6 +44,8 @@ module VagrantPlugins
@host = host
@port = port
@username = config.username
@password = config.password
@config = config
end
@ -137,8 +141,8 @@ module VagrantPlugins
end
def endpoint_options
{ user: @config.username,
pass: @config.password,
{ user: @username,
pass: @password,
host: @host,
port: @port,
basic_auth_only: true,