-
Notifications
You must be signed in to change notification settings - Fork 897
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
Conversation
@miq-bot add_labels wip, enhancement, providers/ansible_tower |
2dd8f12
to
5346db3
Compare
@miq-bot remove_label wip |
@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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but its not yet in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅 forgot the --force
options when pushing. now done
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer public_send
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done! thanks
5346db3
to
f5da00d
Compare
Close to kick tests |
@durandom can you give me a green checkmark in the "Reviewers" section? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 🇮🇹
f5da00d
to
5557603
Compare
Rebased to pick up the new |
Checked commit jameswnl@5557603 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
We have added more attributes to Ansible credentials in #13826. This is to populate those.