Skip to content

Commit

Permalink
Merge pull request #895 from agrare/fix_host_esx_missing_authentication
Browse files Browse the repository at this point in the history
Fix Host default_authentication_type
  • Loading branch information
Fryguy authored Feb 13, 2024
2 parents e382f66 + db0f714 commit 1c2efc4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions app/models/manageiq/providers/vmware/infra_manager/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ def params_for_update
:fields => [
{
:component => 'validate-host-credentials',
:id => 'endpoints.ws.valid',
:name => 'endpoints.ws.valid',
:id => 'authentications.default.valid',
:name => 'authentications.default.valid',
:skipSubmit => true,
:isRequired => true,
:fields => [
{
:component => "text-field",
:id => "authentications.ws.userid",
:name => "authentications.ws.userid",
:id => "authentications.default.userid",
:name => "authentications.default.userid",
:label => _("Username"),
:isRequired => true,
:validate => [{:type => "required"}],
},
{
:component => "password-field",
:id => "authentications.ws.password",
:name => "authentications.ws.password",
:id => "authentications.default.password",
:name => "authentications.default.password",
:label => _("Password"),
:type => "password",
:isRequired => true,
Expand Down Expand Up @@ -150,8 +150,8 @@ def params_for_update
},
{
:component => 'validate-host-credentials',
:id => 'endpoints.remote.valid',
:name => 'endpoints.remote.valid',
:id => 'authentications.remote.valid',
:name => 'authentications.remote.valid',
:skipSubmit => true,
:condition => {
:when => 'remoteEnabled',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ module ManageIQ::Providers::Vmware::InfraManager::VimConnectMixin
extend ActiveSupport::Concern

def vim_connect(options = {})
options[:auth_type] ||= :ws

raise _("no console credentials defined") if options[:auth_type] == :console && !authentication_type(options[:auth_type])
raise _("no credentials defined") if missing_credentials?(options[:auth_type])

Expand Down

0 comments on commit 1c2efc4

Please sign in to comment.