Bug 1477053 - API to set additional feature at cluster
Summary: API to set additional feature at cluster
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.1.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ovirt-4.1.6
: 4.1.6.2
Assignee: Sahina Bose
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks: 1471658 RHHI-1.1-RFEs
TreeView+ depends on / blocked
 
Reported: 2017-08-01 07:05 UTC by Sahina Bose
Modified: 2017-09-20 03:10 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2017-09-19 10:03:50 UTC
oVirt Team: Gluster
Embargoed:
sabose: ovirt-4.1?
sabose: planning_ack?
sabose: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 79928 0 master MERGED Adding ClusterFeature for cluster 2017-08-21 06:24:55 UTC
oVirt gerrit 80080 0 master MERGED restapi: Enable additional feature for cluster 2017-08-30 07:15:28 UTC
oVirt gerrit 80848 0 model_4.1 MERGED Adding ClusterFeature for cluster 2017-08-22 07:48:15 UTC
oVirt gerrit 81134 0 master MERGED restapi: Update to model 4.2.16 and metamodel 1.2.10 2017-08-29 09:22:09 UTC
oVirt gerrit 81182 0 ovirt-engine-4.1 MERGED restapi: Enable additional feature for cluster 2017-08-30 09:33:14 UTC

Description Sahina Bose 2017-08-01 07:05:49 UTC
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 08:29:16 UTC
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 07:24:03 UTC
(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 09:08:55 UTC
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.