Bug 1328404

Summary: [REST-API] refresh host capabilities not working
Product: [oVirt] ovirt-engine Reporter: Meni Yakove <myakove>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, pstehlik, sbonazzo
Target Milestone: ovirt-4.0.0-betaKeywords: Automation, Regression
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:52:10 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 Meni Yakove 2016-04-19 10:30:16 UTC
Description of problem:
On 3.6 in order to refresh host capabilities we send GET with:
/ovirt-engine/api/hosts/<host_id>;force

In 4.0 this is not working (no error) and only the new method working:
POST with:
/ovirt-engine/api/hosts/host_id/refresh
<action>
</action>

Version-Release number of selected component (if applicable):
oVirt Engine Version: 4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos


How reproducible:
100%

Steps to Reproduce:
1. Send GET with /ovirt-engine/api/hosts/<host_id>;force

Comment 1 Meni Yakove 2016-04-19 10:37:45 UTC
same when setting version: 3 in the header

Comment 2 Juan Hernández 2016-04-19 10:55:15 UTC
This happens because the code that handles parameters ignores them if they don't have a value. This needs to be fixed, we should assume that the value is an empty string instead. We will fix that.

Meanwhile the expected result can be obtained including explicitly the value of the parameter:

  GET /ovirt-engine/api/hosts/<host_id>;force=true

This will work with version 3 of the API, including the "Version: 3" header. The "force" parameter has been completely removed from version 4 of the API, replaced by the "refresh" action.

Comment 3 Red Hat Bugzilla Rules Engine 2016-04-19 10:55:47 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Michael Burman 2016-06-15 12:01:14 UTC
Verified on - 4.0.0.4-0.1.el7ev

Comment 5 Sandro Bonazzola 2016-07-05 07:52:10 UTC
oVirt 4.0.0 has been released, closing current release.