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

Refresh to pick up extra attributes of Ansible Credentials #14106

Merged
merged 1 commit into from Mar 7, 2017

Conversation

@jameswnl
Copy link
Contributor

jameswnl commented Feb 28, 2017

We have added more attributes to Ansible credentials in #13826. This is to populate those.

@jameswnl

This comment has been minimized.

Copy link
Contributor Author

jameswnl commented Feb 28, 2017

@miq-bot add_labels wip, enhancement, providers/ansible_tower

@jameswnl jameswnl closed this Mar 1, 2017
@jameswnl jameswnl reopened this Mar 1, 2017
@jameswnl jameswnl force-pushed the jameswnl:cred-attributes branch 5 times, most recently Mar 1, 2017
@jameswnl jameswnl changed the title [WIP] Refresh to pick up extra attributes of Ansible Credentials Refresh to pick up extra attributes of Ansible Credentials Mar 1, 2017
@jameswnl

This comment has been minimized.

Copy link
Contributor Author

jameswnl commented Mar 1, 2017

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Mar 1, 2017
@jameswnl

This comment has been minimized.

Copy link
Contributor Author

jameswnl commented Mar 1, 2017

@durandom check this out. thanks

@@ -85,20 +85,25 @@ def assert_credentials
:name => "Demo Credential",
:userid => "admin",
)
expect(machine_credential.options.keys).to match_array(machine_credential.class::EXTRA_ATTRIBUTES.keys)

This comment has been minimized.

Copy link
@durandom

durandom Mar 2, 2017

Member

can you also test for the values here and in the other 2 tests?
Or are they empty?
If empty, maybe change to creds that are not empty?

This comment has been minimized.

Copy link
@jameswnl

jameswnl Mar 2, 2017

Author Contributor

Yeah, I modified the machine credential and now added the check for a couple values. The other network/cloud credentials we don't have any extra attributes for them yet.

This comment has been minimized.

Copy link
@durandom

durandom Mar 3, 2017

Member

but its not yet in this PR?

This comment has been minimized.

Copy link
@jameswnl

jameswnl Mar 3, 2017

Author Contributor

😅 forgot the --force options when pushing. now done

app/models/manageiq/providers/ansible_tower/shared/inventory/parser/automation_manager.rb Outdated
@@ -99,6 +80,9 @@ def credentials
when 'openstack' then "#{provider_module}::AutomationManager::OpenstackCredential"
else "#{provider_module}::AutomationManager::Credential"
end
inventory_object.options = inventory_object.type.constantize::EXTRA_ATTRIBUTES.keys.each_with_object({}) do |k, h|
h[k] = credential.send(k)

This comment has been minimized.

Copy link
@durandom

durandom Mar 2, 2017

Member

prefer public_send

This comment has been minimized.

Copy link
@jameswnl

jameswnl Mar 2, 2017

Author Contributor

done! thanks

@jameswnl jameswnl force-pushed the jameswnl:cred-attributes branch Mar 3, 2017
@blomquisg

This comment has been minimized.

Copy link
Member

blomquisg commented Mar 6, 2017

Close to kick tests

@blomquisg blomquisg closed this Mar 6, 2017
@blomquisg blomquisg reopened this Mar 6, 2017
@blomquisg

This comment has been minimized.

Copy link
Member

blomquisg commented Mar 6, 2017

@durandom can you give me a green checkmark in the "Reviewers" section?

Copy link
Member

durandom left a comment

🚢 🇮🇹

@jameswnl jameswnl closed this Mar 7, 2017
@jameswnl jameswnl reopened this Mar 7, 2017
@jameswnl jameswnl force-pushed the jameswnl:cred-attributes branch to 5557603 Mar 7, 2017
@jameswnl

This comment has been minimized.

Copy link
Contributor Author

jameswnl commented Mar 7, 2017

Rebased to pick up the new app/models/manager_refresh/inventory/core.rb and added options to it. Now travis should be happy.

@miq-bot

This comment has been minimized.

Copy link
Member

miq-bot commented Mar 7, 2017

Checked commit jameswnl@5557603 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
5 files checked, 0 offenses detected
Everything looks good. 👍

@blomquisg blomquisg merged commit 659c7cf into ManageIQ:master Mar 7, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.01%) to 44.363%
Details
@jameswnl jameswnl deleted the jameswnl:cred-attributes branch Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.