Skip to content

Commit

Permalink
Merge pull request #2770 from agrare/fix_vmware_infra_credential_vali…
Browse files Browse the repository at this point in the history
…dation

Explicitly disable broker for vSphere validation
  • Loading branch information
h-kataria authored Nov 20, 2017
2 parents da20aec + 81306ab commit 29ffef9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/mixins/ems_common_angular.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_task_args(ems)
:metrics_database => params[:metrics_database_name],
}]
when 'ManageIQ::Providers::Vmware::InfraManager'
[{:pass => password, :user => user, :ip => params[:default_hostname]}]
[{:pass => password, :user => user, :ip => params[:default_hostname], :use_broker => false}]
when 'ManageIQ::Providers::Nuage::NetworkManager'
endpoint_opts = {:protocol => params[:default_security_protocol], :hostname => params[:default_hostname], :api_port => params[:default_api_port], :api_version => params[:api_version]}
[user, params[:default_password], endpoint_opts]
Expand Down
11 changes: 11 additions & 0 deletions spec/controllers/ems_cloud_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@
expect(mocked_class).to receive(:validate_credentials_task)
controller.send(:create_ems_button_validate)
end

context "vmware infrastructure manager" do
let(:mocked_class) { ManageIQ::Providers::Vmware::InfraManager }
let(:mocked_class_controller) { "ems_infra" }

it "disables the broker" do
expected_validate_args = [{:pass => nil, :user => nil, :ip => nil, :use_broker => false}]
expect(mocked_class).to receive(:validate_credentials_task).with(expected_validate_args, nil, nil)
controller.send(:create_ems_button_validate)
end
end
end

context "with a container manager" do
Expand Down

0 comments on commit 29ffef9

Please sign in to comment.