-
Notifications
You must be signed in to change notification settings - Fork 66
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
Supporting differents identify leds name of physical servers on refresh #115
Conversation
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.
LGTM
@miq-bot add_label gaprindashvili/yes |
@miq-bot add_label bug |
end | ||
loc_led_state | ||
identification_led_name = %w(Identify Identification) | ||
identification_led = leds&.find { |led| identification_led_name.include?(led["name"]) } |
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.
leds.to_a.find
would be better, we still backport to versions with rubies without &.
identification_led_name = %w(Identify Identification) | ||
identification_led = leds&.find { |led| identification_led_name.include?(led["name"]) } | ||
return identification_led["state"] unless identification_led.nil? | ||
"" |
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.
Does this have to be ""
or is nil
okay?
How about just identification_led.try(:[], "state")
b2c784b
to
64fd5c8
Compare
Checked commit douglasgabriel@64fd5c8 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Thanks @agrare for the feedback, I've already adapt the code |
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.
👍
Supporting differents identify leds name of physical servers on refresh (cherry picked from commit c0b7889) https://bugzilla.redhat.com/show_bug.cgi?id=1515898
Gaprindashvili backport details:
|
This PR is able to:
https://bugzilla.redhat.com/show_bug.cgi?id=1515453