Bug 1350228 - Add affinity label to the VM or to the host does not return in response body entity
Summary: Add affinity label to the VM or to the host does not return in response body ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Juan Hernández
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-26 15:11 UTC by Artyom
Modified: 2016-09-26 12:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:31:36 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
rgolan: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 59821 0 master MERGED restapi: Return added affinity label 2016-06-27 15:39:59 UTC
oVirt gerrit 59840 0 ovirt-engine-4.0 MERGED restapi: Return added affinity label 2016-06-27 16:11:31 UTC
oVirt gerrit 61388 0 master MERGED restapi: Improve affinity label resources 2016-07-27 12:34:31 UTC
oVirt gerrit 61488 0 ovirt-engine-4.0 MERGED restapi: Improve affinity label resources 2016-07-27 19:51:53 UTC

Description Artyom 2016-06-26 15:11:28 UTC
Description of problem:
Add affinity label to the VM or to the host does not return in response body entity.
It just return some information message:
<action>
<status>complete</status>
</action>

Version-Release number of selected component (if applicable):
rhevm-4.0.0.6-0.1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create new affinity label
2. Add affinity label to the VM or to the host
POST action to api/vms/vm_id/affinitylabels:
<affinity_label id="affinity_label_id"/>
3.

Actual results:
<action>
<status>complete</status>
</action>

Expected results:
<affinity_label>
  ...
</affinity_label>

Additional info:
The same correct if I add VM or host under affinity label collection
POST action to api/affinitylabels/vm_id/vms
<vm id="affinity_label_id"/>

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-27 06:27:39 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Artyom 2016-07-17 12:07:53 UTC
Checked on rhevm-4.0.2-0.2.rc1.el7ev.noarch

1) Add affinity label to VM or host works correctly.

2) Add host or VM to affinity label
POST to
api/affinitylabels/84f70042-d00c-4b9f-be5b-c5f5d2ad9add/vms

body:
<vm id="cbe701c0-f395-4b90-a67f-a461057f4638"/>

still, response is only:
<action>
<status>complete</status>
</action>

Comment 3 Red Hat Bugzilla Rules Engine 2016-07-17 12:07:58 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 4 Artyom 2016-07-24 14:19:49 UTC
Checked on rhevm-4.0.2-0.1.rc.el7ev.noarch

Add host or VM to affinity label
POST to
api/affinitylabels/84f70042-d00c-4b9f-be5b-c5f5d2ad9add/vms

body:
<vm id="cbe701c0-f395-4b90-a67f-a461057f4638"/>

still, response is only:
<action>
<status>complete</status>
</action>

Comment 5 Red Hat Bugzilla Rules Engine 2016-07-24 14:19:54 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 6 Juan Hernández 2016-07-26 10:40:31 UTC
The affected resources have been changed so they will return the added virtual machine (or host) instead of an action, so a request like this:

  POST /ovirt-engine/api/affinitylabels/{label:id}/vms
  <vm id="{vm:id}"/>

Will return the following response:

  HTTP/1.1 200 OK
  <vm id="{vm:id}" href="/ovirt-engine/api/vms/{vm:id}"/>

Comment 7 Artyom 2016-09-05 12:00:15 UTC
Verified on ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch

Comment 8 Artyom 2016-09-05 12:00:16 UTC
Verified on ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch


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