-
Notifications
You must be signed in to change notification settings - Fork 70
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
Convert host operations to supports #804
Convert host operations to supports #804
Conversation
|
||
def validate_active_with_power_state(feature, expected_power_state) | ||
return unsupported_reason_add(feature, _("The Host is not connected to an active Provider")) unless has_active_ems? | ||
return unsupported_reason_add(feature, _("The host is not powered '#{expected_power_state}'")) unless expected_power_state == power_state |
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.
"This host is not powered 'maintenance'" is going to read weird. Not sure how else to do this though.
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.
I agree but this is the current string, trying to not move and modify in the same change
supports :standby do | ||
validate_active_with_power_state(:standby, "on") | ||
end | ||
supports :enter_maint_mode do |
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.
any reason to not spell it out?
supports :enter_maint_mode do | |
supports :enter_maintenance_mode do |
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.
Wanted to keep these feature names the same https://github.com/ManageIQ/manageiq/pull/21847/files#diff-9daa2c365cb8a7cb177648fe53854dae6588080e089b01333768fcb5da8ff4aeL256
supports :vmotion do | ||
validate_active_with_power_state(:vmotion, "on") | ||
end |
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.
This one is a little weird, it really means "am I able to ask if vmotion is enabled" not actually checking if it is enabled might want to do this differently
76d1f1f
to
6810b9e
Compare
6810b9e
to
23b0ab4
Compare
Checked commits agrare/manageiq-providers-vmware@26c18e4~...23b0ab4 with ruby 2.6.9, rubocop 1.19.1, haml-lint 0.35.0, and yamllint |
Required for: