-
Notifications
You must be signed in to change notification settings - Fork 62
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 supports_conversion_host to Host #315
Conversation
@agrare Yes, the minimum version of RHV is 4.2.4. We check it in the enablement playbook. It would be good to check it here too, but I don't know how to check the hypervisor version. |
@fdupont-redhat it should be ext_management_system.api_version |
@agrare not necessarily. It is the API version of the manager, but the host may use an older version. I don't know how common it is, though. Today, the wrapper checks the version of |
@agrare @fdupont-redhat Ok, I've updated it so that it must meet a minimum |
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.
So won't going for the ems version create a bug when the host is of lower version?
@borod108 I can restore that code if you feel more comfortable with it. For our types of version strings it shouldn't be an issue, but I suppose it's best to avoid any risk. |
@borod108 Well, it's potentially a bug either way I would think, so I'm open to suggestions. |
LGTM |
This pull request is not mergeable. Please rebase and repush. |
@miq-bot remove_label unmergeable |
Update supports_conversion_host to require a minimum EMS api_version.
Checked commit https://github.com/djberg96/manageiq-providers-ovirt/commit/c3aa70dd41451f7b973db7850dfb3229ec932a45 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@borod108 is there anyway to get the API version of the host from the rhevm api? |
@@ -1,4 +1,6 @@ | |||
class ManageIQ::Providers::Redhat::InfraManager::Host < ::Host | |||
MINIMUM_CONVERSION_HOST_VERSION = '4.2.4'.freeze |
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.
A constant just used in one place seems like overkill, think its fine to just use "4.2.4"
below with a comment about this being the minimum supported version (thought the unsupported_reason_add is pretty self explanatory even)
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.
Another option would be to put this in settings.yml, but I'm fine with whatever other folks prefer.
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.
Even more overkill, don't think we'd ever want to allow that to be changed right? I was only added to rhev once.
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 was thinking this would let people switch to 4.2.31
if desired, but if that's a bad idea, then I'll just hard code it.
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.
Was it added in 4.2.31 or 4.2.4?
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.
@agrare I was just trying to provide maximum flexibility as per @fdupont-redhat's comment at #315 (comment)
@agrare I've removed the constant and just hard coded it as per your request. If there's a way to get it dynamically, I never discovered it. I would ask that we go with this for now, and update later if/when needed. |
@miq-bot add_label hammer/yes |
Add supports_conversion_host to Host (cherry picked from commit 37e9e07) https://bugzilla.redhat.com/show_bug.cgi?id=1694229
Hammer backport details:
|
Reverted the backport:
|
Add supports_conversion_host to Host (cherry picked from commit 37e9e07) https://bugzilla.redhat.com/show_bug.cgi?id=1702019
Hammer backport details:
|
This sets
supports :conversion_host
to the Host model.The main purpose for this is for the ManageIQ REST API, where support for
conversion_host
will be checked before attempting to enable or disable the resource.Part of the V2V effort.
https://bugzilla.redhat.com/show_bug.cgi?id=1622728https://bugzilla.redhat.com/show_bug.cgi?id=1695810