Skip to content

Commit

Permalink
Merge pull request #14538 from jameswnl/fix-org
Browse files Browse the repository at this point in the history
use organization instead of organization_id when talking to Tower
(cherry picked from commit 5c3cbf6)
  • Loading branch information
bdunne authored and simaishi committed Mar 30, 2017
1 parent 0ed165e commit 70672cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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
4 changes: 2 additions & 2 deletions spec/support/ansible_shared/automation_manager/credential.rb
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

0 comments on commit 70672cc

Please sign in to comment.