Bug 1477053 - API to set additional feature at cluster
API to set additional feature at cluster
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: RestAPI (Show other bugs)
4.1.4
Unspecified Unspecified
high Severity medium (vote)
: ovirt-4.1.6
: 4.1.6.2
Assigned To: Sahina Bose
Gonza
:
Depends On:
Blocks: 1471658 RHHI-1.1-RFEs
  Show dependency treegraph
 
Reported: 2017-08-01 03:05 EDT by Sahina Bose
Modified: 2017-09-19 23:10 EDT (History)
4 users (show)

See Also:
Fixed In Version: ovirt-engine-4.1.6.2
Doc Type: Enhancement
Doc Text:
This update lists the additional features available for a cluster level, and allows you to enable or disable additional cluster features using an API.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-19 06:03:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Gluster
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
sabose: ovirt‑4.1?
sabose: planning_ack?
sabose: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 79928 master MERGED Adding ClusterFeature for cluster 2017-08-21 02:24 EDT
oVirt gerrit 80080 master MERGED restapi: Enable additional feature for cluster 2017-08-30 03:15 EDT
oVirt gerrit 80848 model_4.1 MERGED Adding ClusterFeature for cluster 2017-08-22 03:48 EDT
oVirt gerrit 81134 master MERGED restapi: Update to model 4.2.16 and metamodel 1.2.10 2017-08-29 05:22 EDT
oVirt gerrit 81182 ovirt-engine-4.1 MERGED restapi: Enable additional feature for cluster 2017-08-30 05:33 EDT

  None (edit)
Description Sahina Bose 2017-08-01 03:05:49 EDT
Description of problem:

Additional features are configured at cluster level and can be enabled per cluster (for a cluster that's at defined cluster level) in engine
Enabling/disabling this should be available via the API

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

How reproducible:
NA
Comment 1 Gonza 2017-09-12 04:29:16 EDT
Verified with:
ovirt-engine-4.2.0-0.0.master.20170906185835.gitcee3e58.el7.centos.noarch

# curl -vvvv -X POST -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/22f3c88b-3e9c-43bd-bf03-ecc467528a6c/enabledfeatures \
-d "<cluster_feature id=\"00000020-0020-0020-0020-000000000300\"/>"                 
...
> POST /ovirt-engine/api/clusters/22f3c88b-3e9c-43bd-bf03-ecc467528a6c/enabledfeatures HTTP/1.1
...
{
  "name" : "libgfapi_supported",
  "id" : "00000020-0020-0020-0020-000000000300"
* Connection #0 to host engine.com left intact
}%  

# curl -vvvv -X DELETE -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/22f3c88b-3e9c-43bd-bf03-ecc467528a6c/enabledfeatures/00000020-0020-0020-0020-000000000300
...
> DELETE /ovirt-engine/api/clusters/22f3c88b-3e9c-43bd-bf03-ecc467528a6c/enabledfeatures/00000020-0020-0020-0020-000000000300 
...
{
  "status" : "complete"
* Connection #0 to host engine.com left intact
}%
Comment 2 Sandro Bonazzola 2017-09-18 03:24:03 EDT
(In reply to Gonza from comment #1)
> Verified with:
> ovirt-engine-4.2.0-0.0.master.20170906185835.gitcee3e58.el7.centos.noarch

This bug is targeted 4.1.6 and should be tested with 4.1.6 engine.
Moving back to QE
Comment 3 Gonza 2017-09-18 05:08:55 EDT
Verified with:
ovirt-engine-4.1.6.2-0.1.el7.noarch

# curl -vvvv -X GET -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures   
...
> GET /ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures HTTP/1.1
...
{ }%

# curl -vvvv -X POST -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures \
-d "<cluster_feature id=\"00000020-0020-0020-0020-000000000300\"/>"
...
> POST /ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures HTTP/1.1
...
{
  "name" : "libgfapi_supported",
  "id" : "00000020-0020-0020-0020-000000000300"
}%

# curl -vvvv -X GET -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures 
...
> GET /ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures HTTP/1.1
...
{
  "cluster_feature" : [ {
    "name" : "libgfapi_supported",
    "id" : "00000020-0020-0020-0020-000000000300"
  } ]

}%

# curl -vvvv -X DELETE -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal https://engine.com/ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures/00000020-0020-0020-0020-000000000300
...
> DELETE /ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures/00000020-0020-0020-0020-000000000300 HTTP/1.1
...
{
  "status" : "complete"
}%

# curl -vvvv -X GET -H "Content-type: application/xml" -H "Accept: application/json" -k -u admin@internal  https://engine.com/ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures
...
> GET /ovirt-engine/api/clusters/59b63c22-03e2-0368-00c2-00000000018f/enabledfeatures HTTP/1.1
...
{ }%

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