Skip to content

Commit 5aeefbf

Browse files
committed
Fix Host#vim_connect missing port, verify_ssl
1 parent f23197b commit 5aeefbf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/manageiq/providers/vmware/infra_manager/vim_connect_mixin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ def vim_connect(options = {})
88
raise _("no credentials defined") if missing_credentials?(options[:auth_type])
99

1010
options[:ip] ||= hostname
11-
options[:port] ||= port || 443
11+
options[:port] ||= try(:port) || 443
1212
options[:user] ||= authentication_userid(options[:auth_type])
1313
options[:pass] ||= authentication_password(options[:auth_type])
1414

15-
options[:verify_ssl] ||= verify_ssl
16-
options[:certificate_authority] ||= certificate_authority
15+
options[:verify_ssl] = try(:verify_ssl) unless options.key?(:verify_ssl)
16+
options[:certificate_authority] = try(:certificate_authority) unless options.key?(:certificate_authority)
1717

1818
conn_key = connection_key(options)
1919

0 commit comments

Comments
 (0)