-
Notifications
You must be signed in to change notification settings - Fork 900
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
Support for version 4 of oVirt engine #7573
Comments
EDIT: I didn't see the links in the OP. Normally we use GitHub's automatic linking for remote repos and it full qualifies the links...I changed the OP accordingly |
I think the first thing to check is whether or not we need to support oVirt < 3.3 as @bdunne mentioned in ManageIQ/ovirt#47 (comment). If we can drop that, then the simple answer is to always hit Otherwise, I think number 2 is the best approach, for now. I'm not sure the user cares what underlying API is used as long as the data comes back, so, the ovirt gem can also not care. Of course this changes if we need to actually use anything that is only in the v4 API and not in the v3 API, but then in that case that one class in the ovirt gem can talk v4 under the covers, so again the caller doesn't care. Another similar option, which might be nicer for the end-user, is to just autodetect the version. Try to hit v4, and if it 404s, then try v3. The autodetection code would live as a helper method in the ovirt gem, but called on the manageiq side at provider creation (or perhaps at credential validation time), and stored in the |
The |
Hello, Does all this mean that ManageIQ version '*' + oVirt 4.y.z is not working so far? |
No, the issues with oVirt 4 have been addressed. I am closing this issue. |
Currently the gem used by ManageIQ to connect ot oVirt or RHEV-M uses a hard-coded URL:
The path of this URL,
/api
, has been used in oVirt since version 3.0. In version 3.5 of the engine that URL has been deprecated, and replaced by/ovirt-engine/api
. The old\api
URL has been preserved, for backwards compatibility, but it will be removed in version 4 of the engine.In addition, version 4 of the engine will support two versions of the API:
Clients that need to work with version 4 of the engine can select the version of the API that they want to use. If they don't, then they will use version 4 by default. There are two mechanisms to select the version of the API:
/ovirt-engine/api/v3
or/ovirt-engine/api/v4
. This is not recommended, as it doesn't work with old versions of the engine, like 3.6.Version: 3
. This is the recommended mechanism, as old versions of the engine (3.6 and older) will just ignore the header and new versions of the engine (4.0 and newer) will honor it.These two changes together (the new
/ovirt-engine/api
path and the multiple versions support) mean that theovirt
gem and/or ManageIQ need to be modified in order to work correctly with version 4 of the engine. There are several approaches:ovirt
gem so that it always sends theVersion: 3
header, and so that it detects the correct path. That is what is proposed in pull request Add support for version 4 of the engine ovirt#48. The second part of this pull request, detecting the path, isn't needed if the oVirt support is restricted to version 3.5 or newer.ovirt
gem so that it uses the value of that drop down to build the correct URL. That is what is proposed by pull requests api_uri - oVirt API v4 moved to /ovirt-engine/api ovirt#47 for theovirt
gem and pull request [WIP] rhevm provider - add an 'API version' select-box in UI #7127 for ManageIQ. This builds the correct URL, but doesn't tell the server what version of the API to use.https://engine.example.com/ovirt-engine/api/v3
, which would out of the box without any additional modification. This URL field could be par of an advanced section, and hidden by default. It could also be populated automatically from the host and port number, and then shown to the user so that she can accept it or do some additional changes.Version
header.One of these approaches needs to be selected and implemented in order to support oVirt 4.
The text was updated successfully, but these errors were encountered: