-
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
Add raw_connect? method to ExtManagementSystem #16636
Conversation
From OpenStack provider point of view, LGTM! |
ca293dc
to
88b4cd1
Compare
app/models/ext_management_system.rb
Outdated
@@ -217,6 +217,10 @@ def self.create_discovered_ems(ost) | |||
end | |||
end | |||
|
|||
def self.raw_connect!(*params) | |||
!!raw_connect(*params) |
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.
My only issue is that !
as a suffix usually implies an Exception or side effect could occur. I'm thinking this should be raw_connect?
instead, which implies it will return a boolean.
88b4cd1
to
5c165e8
Compare
When validating credentials on the queue, existing raw_connect methods return the actual connection, which is then being placed into the logs on callback. It should not be present in the logs. The credential validation only cares about a success or failure, not the connection, so this raw_connect? wrapper method will return a true value on successful validation, rather than the connection itself.
5c165e8
to
835b837
Compare
Checked commit jntullo@835b837 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Add raw_connect? method to ExtManagementSystem (cherry picked from commit 13ce272)
Gaprindashvili backport details:
|
When validating credentials on the queue, existing raw_connect methods return the actual connection, which is then being placed into the logs on callback. It should not be present in the logs. The credential validation only cares about a success or failure, not the connection, so this raw_connect? wrapper method will return a true value on successful validation, rather than the connection itself.
Log Before where you will see
#<Aws::EC2::Resource>
in the result:Log after where you will only see true:
Resolves ManageIQ/manageiq-providers-openstack#174
@miq-bot add_label gaprindashvili/yes, bug
@miq-bot assign @Fryguy
cc: @aufi @Ladas @dikonoor