-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14106 from jameswnl/cred-attributes
Refresh to pick up extra attributes of Ansible Credentials
- Loading branch information
Showing
6 changed files
with
18 additions
and
21 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
app/models/manageiq/providers/ansible_tower/automation_manager/credential.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
class ManageIQ::Providers::AnsibleTower::AutomationManager::Credential < ManageIQ::Providers::ExternalAutomationManager::Authentication | ||
COMMON_ATTRIBUTES = {}.freeze | ||
EXTRA_ATTRIBUTES = {}.freeze | ||
API_ATTRIBUTES = COMMON_ATTRIBUTES.merge(EXTRA_ATTRIBUTES).freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
app/models/manageiq/providers/embedded_ansible/automation_manager/credential.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
class ManageIQ::Providers::EmbeddedAnsible::AutomationManager::Credential < | ||
ManageIQ::Providers::EmbeddedAutomationManager::Authentication | ||
COMMON_ATTRIBUTES = {}.freeze | ||
EXTRA_ATTRIBUTES = {}.freeze | ||
API_ATTRIBUTES = COMMON_ATTRIBUTES.merge(EXTRA_ATTRIBUTES).freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,20 +85,27 @@ def assert_credentials | |
:name => "Demo Credential", | ||
:userid => "admin", | ||
) | ||
expect(machine_credential.options.keys).to match_array(machine_credential.class::EXTRA_ATTRIBUTES.keys) | ||
expect(machine_credential.options[:become_method]).to eq('su') | ||
expect(machine_credential.options[:become_username]).to eq('root') | ||
|
||
network_credential = expected_configuration_script.authentications.find_by( | ||
:type => ManageIQ::Providers::AnsibleTower::AutomationManager::NetworkCredential | ||
) | ||
expect(network_credential).to have_attributes( | ||
:name => "Demo Creds 2", | ||
:userid => "awdd", | ||
) | ||
expect(network_credential.options.keys).to match_array(network_credential.class::EXTRA_ATTRIBUTES.keys) | ||
|
||
cloud_credential = expected_configuration_script.authentications.find_by( | ||
:type => ManageIQ::Providers::AnsibleTower::AutomationManager::VmwareCredential | ||
) | ||
expect(cloud_credential).to have_attributes( | ||
:name => "dev-vc60", | ||
:userid => "[email protected]", | ||
) | ||
expect(cloud_credential.options.keys).to match_array(cloud_credential.class::EXTRA_ATTRIBUTES.keys) | ||
end | ||
|
||
def assert_playbooks | ||
|
2 changes: 1 addition & 1 deletion
2
...r_cassettes/manageiq/providers/ansible_tower/automation_manager/refresher_credentials.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.