Bug 987917 - [oVirt] [glance] API version not specified in provider dialog
[oVirt] [glance] API version not specified in provider dialog
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-webadmin (Show other bugs)
3.3
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.4.1
Assigned To: Mike Kolesnik
GenadiC
network
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-24 08:16 EDT by Mike Kolesnik
Modified: 2014-05-08 09:37 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-08 09:37:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 24991 None MERGED webadmin: Remove API version field for Neutron Never
oVirt gerrit 25367 None MERGED webadmin: Remove API version field for Neutron Never

  None (edit)
Description Mike Kolesnik 2013-07-24 08:16:12 EDT
Description of problem:
API version should be specified in the dialog, so that it would be clear to the admin which API version we're using.
Please look at hos it's done for OPenstack Network provider.


Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1. Try to add a new Openstack Image provider
2. 
3.
  
Actual results:
Under the URL field there is no version


Expected results:
There should be a version under the URL field


Additional info:
Comment 1 Federico Simoncelli 2013-09-05 09:03:50 EDT
(In reply to Mike Kolesnik from comment #0)
> Description of problem:
> API version should be specified in the dialog, so that it would be clear to
> the admin which API version we're using.
> Please look at hos it's done for OPenstack Network provider.


At the moment the provider api version implementation is based only on the network provider needs, hard-coding the api version both on the frontend:

 getApiVersion().setItems(Arrays.asList("v2.0"));

and in the backend:

 private static final String API_VERSION = "/v2.0";

These hard-coded values are not valid for glance (and probably for other future providers as well).

Simply put, we're missing all the provider infrastructure that defines the valid versions per-provider and displays them in the UI.
If we want to tackle this properly, then the scope of this bug is the provider implementation (not just glance).


Now, that said, my opinion is that by default the user shouldn't be involved in picking or forcing any specific version.
Think for example when you update a glance server, you don't want to go into the provider definition and manually update the version to take advantage of the new api.

OpenStack is designed so that the api version is decided at connection-time depending on the server endpoint (publishes versions + urls) and client support.

On the oVirt side we should report meaningful errors (e.g. "Neutron server doesn't support api versions 2.0,...") when the remote endpoint (glance/neutron) is not advertising any of the versions we can communicate with.

From the user point of view such error in the UI is more informative than trying one by one all the versions in the dropdown box.
Comment 2 Itamar Heim 2013-09-06 01:36:37 EDT
still, magic numbers in the code... at least move to config?
Comment 3 Sandro Bonazzola 2013-11-15 05:55:46 EST
Re targeting to 3.3.2 since 3.3.0 has been already released.
Comment 4 Sandro Bonazzola 2013-11-28 10:34:24 EST
Re-targeting to 3.3.3 since the bug is not resolved in 3.3.2 beta and is not blocking 3.3.2 release tracker (bug #1027349)
Comment 5 Sandro Bonazzola 2014-01-22 06:29:10 EST
Re targeting to 3.3.4 as not blocking 3.3.3 release.
Comment 6 Ayal Baron 2014-02-17 16:53:45 EST
(In reply to Itamar Heim from comment #2)
> still, magic numbers in the code... at least move to config?

As specified in comment 1, these numbers are only relevant for the neutron provider so moving to network if this is to be fixed.

Also as explained, for glance there is no point in specifying the version (it goes against the way openstack works with versioning).

"
OpenStack is designed so that the api version is decided at connection-time depending on the server endpoint (publishes versions + urls) and client support.
"
Comment 7 Mike Kolesnik 2014-02-25 03:50:10 EST
Decided to remove version field on Neutron dialog since only v2.0 is suggested.

(In reply to Itamar Heim from comment #2)
> still, magic numbers in the code... at least move to config?

No need currently as only very specific API versions are supported for Glance/Neutron and the SDK is not build for supporting any other version so it's not configurable.
Comment 8 Sandro Bonazzola 2014-03-04 04:27:56 EST
This is an automated message.
Re-targeting all non-blocker bugs still open on 3.4.0 to 3.4.1.
Comment 9 Sandro Bonazzola 2014-05-08 09:37:11 EDT
This is an automated message

oVirt 3.4.1 has been released:
 * should fix your issue
 * should be available at your local mirror within two days.

If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.