Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use organization instead of organization_id when talking to Tower #14538

Merged
merged 1 commit into from
Mar 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential < Mana
include ManageIQ::Providers::AnsibleTower::Shared::AutomationManager::Credential

def self.provider_params(params)
super.merge(:organization_id => ManageIQ::Providers::EmbeddedAnsible::AutomationManager.first.provider.default_organization)
super.merge(:organization => ManageIQ::Providers::EmbeddedAnsible::AutomationManager.first.provider.default_organization)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
:username => "john",
:kind => described_class::TOWER_KIND
}
expected_params[:organization_id] = 1 if described_class.name.include?("::EmbeddedAnsible::")
expected_params[:organization] = 1 if described_class.name.include?("::EmbeddedAnsible::")
expect(AnsibleTowerClient::Connection).to receive(:new).and_return(atc)
store_new_credential(credential, manager)
expect(EmsRefresh).to receive(:queue_refresh_task).and_return([finished_task])
Expand Down Expand Up @@ -107,7 +107,7 @@ def store_new_credential(credential, manager)
:username => 'john',
:kind => described_class::TOWER_KIND
}
expected_params[:organization_id] = 1 if described_class.name.include?("::EmbeddedAnsible::")
expected_params[:organization] = 1 if described_class.name.include?("::EmbeddedAnsible::")
expect(AnsibleTowerClient::Connection).to receive(:new).and_return(atc)
expect(EmsRefresh).to receive(:queue_refresh_task).and_return([finished_task])
expect(credential).to receive(:update_attributes!).with(expected_params)
Expand Down