Bug 1441501

Summary: [RFE] Exposing configuration options within RESTAPI
Product: [oVirt] ovirt-engine Reporter: Michal Skrivanek <michal.skrivanek>
Component: RestAPIAssignee: Miroslava Voglova <mvoglova>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.0CC: bgraveno, bugs, mgoldboi, mperina, stirabos
Target Milestone: ovirt-4.2.0Keywords: FutureFeature
Target Release: 4.2.0Flags: mperina: ovirt-4.2?
rhrazdil: testing_plan_complete-
rule-engine: planning_ack?
mperina: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Previously the Manager configuration options with user or admin access levels were only available to GWT clients. To obtain option values for non-GWT clients they are now exposed in the following REST API: GET https://<ENGINE_FQDN>:/ovirt-engine/api/options/<OPTION_NAME> Where <OPTION_NAME> is an existing configuration option name. The output of that call is a list of values. To obtain a value for only a specific client version, you need to specify the requested version as follows: GET https://<ENGINE_FQDN>:/ovirt-engine/api/options/<OPTION_NAME>?version=<VERSION> The Manager configuration options are not backward compatible and may differ for each Manager version, and therefore existing options may not be available. Options are exposed as read-only in the REST APIs, but some of them can be updated by using the engine-config command-line tool.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:20:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Skrivanek 2017-04-12 06:36:44 UTC
REST API for VdcOptions is missing. 
It should be added to allow queries and modification of user settings, this will resolve several other missing APIs in bulk

Comment 1 Martin Perina 2017-04-14 19:26:00 UTC
(In reply to Michal Skrivanek from comment #0)
> REST API for VdcOptions is missing. 
> It should be added to allow queries and modification of user settings, this
> will resolve several other missing APIs in bulk

I can image REST API call to get values from vdc_options, but I don't think it's a good idea to allow writing values as IMO most of the flows are not ready for runtime updates of vdc_options

Comment 2 Martin Perina 2017-04-19 06:11:21 UTC
After offline discussion we can create read and write access to vdc_options values, but we will still require engine restart to apply those values (same behaviour as engine-config).

Comment 3 Michal Skrivanek 2017-05-11 11:49:41 UTC
This bug is a dependency to resolve bug 1441225 so both need to be pushed out

Comment 4 Michal Skrivanek 2017-05-17 05:42:22 UTC
If you do not plan to work on this please let me know, we will add it ourselves

Comment 6 Radim Hrazdil 2017-12-14 09:13:10 UTC
Verified that REST API allows for listing VdcOptions and filter by version. 
Version RHVM 4.2.0-0.6.el7

Comment 7 Sandro Bonazzola 2017-12-20 11:20:59 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.

Comment 8 Simone Tiraboschi 2018-02-07 09:57:16 UTC
/ovirt-engine/api/options/ServerCPUList and /ovirt-engine/api/options/ClusterEmulatedMachines constantly produce a 404 HTTP ERROR.

Comment 9 Martin Perina 2018-02-07 15:47:56 UTC
(In reply to Simone Tiraboschi from comment #8)
> /ovirt-engine/api/options/ServerCPUList and
> /ovirt-engine/api/options/ClusterEmulatedMachines constantly produce a 404
> HTTP ERROR.

Please take a look at https://bugzilla.redhat.com/show_bug.cgi?id=1542531#c6